Lutron keypad - managing buttons possible?

Posted on
Wed Nov 20, 2019 6:23 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Lutron keypad - managing buttons possible?

The script below controls landscape lighting.
- if it's dark, it turns on the lights
- if it's not dark, it enables/disables a schedule that will turn on the lights when it becomes dark
- I want to turn on the LED associated with the lights if the schedule is enabled. What I am finding is that a few seconds after turning the light, Lutron(?) is turning it off. Is it possible to manage the LED on/off status?
Code: Select all
# Devices to be tested
ltSensor = indigo.devices[1666063006] #phidgets amb lt
ambLt = int(ltSensor.states["brightness"])

dev = indigo.devices[1017239549] # dRm kPdW LED#1

# test variable - daylight
if ambLt < 100:

#test device condition
   if not dev.onState: #if device is off
 
# turn device on/off
       indigo.actionGroup.execute(1870342736) #bYrd Deck ON
 
# manage keypad LEDs
      indigo.device.turnOn(1017239549) # turn on LED#1
 
   else:
      indigo.actionGroup.execute(1695122854) # bYrd Deck OFF
# manage keypad LEDs
      indigo.device.turnOff(1017239549) # turn off LED#1

# Because it is still light out, enable schedule to turn on light when ambient light <100
else:
# if keypad LED is off, enable schedule and turn on LED
   if not dev.onState: #if LED is off
      indigo.schedule.enable(1133523279,value=True) #enable schedule for ~sunset
      indigo.device.turnOn(1017239549) # turn on LED#1
   else:
      indigo.device.turnOff(1017239549) # turn off LED#1
      indigo.schedule.enable(1133523279,value=False) #disable schedule for ~sunset


Posted on
Wed Nov 20, 2019 7:03 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Lutron keypad - managing buttons possible?

As soon as I posted the question below, I thought perhaps the solution would be to change the button type: I changed the keypad button from 'path of light' to 'single/multi-room scene' - and now the LED is sticking - but not the keypad button, once changed, stays on - verified with this:
Code: Select all
indigo.device.turnOn(1017239549) # turn off LED#1
indigo.device.turnOff(1017239549) # turn off LED#1

While I hesitate to declare victory, the two lines above work when the Button Type is set to 'Toggle control/room monitoring'. I suppose I should have guess that.

Posted on
Wed Nov 20, 2019 11:36 pm
FlyingDiver online
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron keypad - managing buttons possible?

Do you actually have the button programmed in Lutron? I find that trying to control a button led if the button is programmed is difficult, as you can’t override the Lutron programming.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests