Jump to content

Goodnight program - double tap


BryanLee

Recommended Posts

I have a goodnight program.  This program is to turn a hallway light on to 30% (via a scene), and then turn various lights off (again, via a scene).  Part of this second scene is also to slowly turn off the hallway light over 19 seconds.  Then turn the "Goodnight button's" LED off.

 

Goodnight Scene - WalkingToBed

Hallway Switch: On Level 30, Ramp Rate 27 (2 seconds)

 

Goodnight Scene

Various lights: On Level 0, Ramp Rate 31 (0.1 seconds)

Hallway Switch: On Level: 0, Ramp Rate 23 (19 seconds)

 

Program Goodnight:

if
   control 'Hallway Switch - Goodnight' is switched On
  And control 'Hallway Switch - Goodnight' is not switched Off

Then
   Set Scene 'Goodnight-walking" On
   Wait 3 seconds
   Set Scene 'Goodnight' On
   Wait 25 seconds
   Set 'Hallway Switch - Goodnight' On 0 / Off 0 (Backlight Level)
Else
 - No Actions

This has almost the desired effect.  When I press button H (Hallway Switch - Goodnight), the hallway light ramps to 30% over two seconds, the rest of the lights quickly fade in .1 second.  Then the hallway light fades off over 19 seconds, and finally the LED behind "Hallway Swtich - Goodnight" turns off.

 

The only problem... the next time I go to use the "Goodnight scene" the first button press does nothing, and the second press activates the program.  It's as if the button believes it's still in the "on" condition, despite the fact that I turned it off via the program.

 

I'm sure it's something simple I'm missing.

 

Thank you.

 

 

Link to comment

Set button H to non-Toggle On. Also, you set the level of the LED, not the state of the button. Create a scene with only the button as a member and as a responder and control the scene, not the LED level.

Link to comment

Thank you.  I think I got the desired effect.  But just to clarify, for my own education and others after... I think you gave me two different solutions.

 

First solution

On the "Main" tab, select the button in the left pane, on the right side, select "Buttons Toggle Mode" , select the button again and select "Toggle On/Off", then select "on" for "Non-Toggle-on".  From my understanding this will trigger any programs that use "control is switched on", but it won't make the on state persistent.  I also removed the "Set 'Hallway Switch - Goodnight' On 0 / Off 0 (Backlight Level)" line from my program, as with the toggle mode set, the LED light never turns on.  

 

Second solution

The other solutions would have been to leave the toggle mode as it was, but change the final line of my program to activate a scene that sets the button to zero.  This will allow the button LED to be lit while the "fade out" is happening, and then turn it off.

 

I choose the first solution.

Link to comment

This is my Dine Out program. The program turns off virtually all devices except the room I'm in and the area I'm entering (first two Then statements). I don't need to turn on the scene at all because the Dine Out button is a controller of the scene. A separate scene has only the Dine Out buttons (side door, front door) as responders. The Dine Out buttons scene has no controller. Only a program can turn it on/off. The last statement turns off the buttons LEDs.

 

If
        Control 'DR / Devices / DR Side Door Light / DR Side Door B Dine Out' is switched On
 
Then
        Set 'DR / Devices / DR Ceiling Light 50' 50%
        Set 'DR / Devices / DR Side Door Light' On
        Wait  1 minute
        Set 'DR / Devices / DR Ceiling Light 50' Off
        Wait  6 minutes
        Set 'DR / Devices / DR Side Door Light' Off
        Set Scene 'Dine Out Buttons' Off
 
Else
   - No Actions - (To add one, press 'Action')

 

The Dine Out buttons are set to Non-Toggle On. That way, one tap sends an On signal no matter the last state of the button, on or off. They always lit unless the Done Out Buttons scene turns them off.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...