Thanks Thanks:  0
Likes Likes:  0
Results 1 to 9 of 9

Thread: Different actions on button press if controlled loads are on or off

  1. #1
    Junior Member
    Join Date
    Jun 2019
    Posts
    14

    Different actions on button press if controlled loads are on or off

    I would like to have a button operate differently when the loads it controls are on vs off. A few specific scenarios ...

    1. In the evening, I'd like to turn off all the lights on the lower level of the house. In the morning, I'd like the same button to turn on a subset of the lights on the lower level.

    2. I'd like a button to simply toggle lights on and off on a single press. However, on press/hold, I'd like the lights to brighten if they are off, and dim if they are on.

    3. In a room with a HIGH and a LOW buttons (with corresponding levels on the same loads), I'd like either button to turn OFF the lights if they are on. So, if the lights were on LOW, then pressing either HIGH or LOW should turn them off.

    Seems this kind of thing should be possible with conditional programming.

    Any thoughts?

  2. #2
    Senior Member
    Join Date
    Sep 2014
    Posts
    119
    Yup conditional buttons are the way to go. You my need to involve some variables.

  3. #3
    Junior Member
    Join Date
    Jun 2019
    Posts
    14
    Thank you, Johnmax. I had hoped this would be the case. Can you please send a brief example of how to do this? I'd appreciate it ...

  4. #4
    Senior Member
    Join Date
    Oct 2013
    Posts
    1,968
    I highly recommend you use 2 different buttons instead of conditional logic. Conditional logic will work and I'm sure it makes sense to you. However, most people think about lights as on/off/dim. Having it do different things based on time of day will cause frustration.
    LED, Incorporated
    Raleigh, NC 27614

  5. #5
    Senior Member
    Join Date
    Sep 2014
    Posts
    119
    Case 1: Conditional button and for that create 2 actions- action 1: lower level lights off, action 2: lower level subset on. Then on your button press add condition If>Time Period>Time Of Day is... and select your time period you want the button to do action 1, and then add another condition If Time Of Day is.... for the other time period for action 2. Or you could just *** an Else instead of the second If.
    Case 2: On your Hold tab another conditional If>Lighting Zone is from 0 to 0 then Raise lighting zone, and then Else Lower lighting zone

    You get the idea here

  6. #6
    Junior Member
    Join Date
    Jun 2019
    Posts
    14
    Oh, sorry ... I didn’t mean to imply I wanted the buttons to do different things at different times of day. I agree that such an approach can be frustrating or confusing to users.

    By “in the evening” I just meant that before I go to bed, I want to press a button that will turn off all the lights on the lower level (because they are on, not because of the time of day). And, in the morning I’d like the button to turn on a subset of those lights (because all the lights are off). So, in one case, the button would turn off many lights, including the living and dining room (assuming they are on) but in the other case it would only turn on the kitchen and breakfast nook.This is the same idea as the other scenarios: the button does one thing if the lights it is controlling are on and a different thing if the lights are off, independent of the time of day.

    To elaborate on the dimming scenario ... if I have a press/hold button (or a dedicated button) defined for dimming, I’d like it to turn on and gradually brighten the lights if they are off and dim them if they are on. It’s like what a standard dim program does, where a second press (after timeout) will do the opposite of what it did on the previous press. The difference is that the action (brightening or dimming) doesn’t depend on the previous button press, but on the status of the lights. So, if lights were turned on by a schedule, or a scene or whatever, press/hold would dim the lights (because they are on).

    This brings me to a related question ... if I dim the lights, but not to zero, I’d want the system to know the lights are still on. Only if the dim level went to zero wound I want the variable to have the state “off”. That way, the first of two consecutive press/holds would partially dim, and the second could dim them further. Can this be done?

  7. #7
    Junior Member
    Join Date
    Jun 2019
    Posts
    14
    Comments or advice anyone?

  8. #8
    Senior Member
    Join Date
    Sep 2014
    Posts
    119
    Yes your button you want to press to get two actions is still a conditional button then. Time of day means nothing you want to do two actions based on the current level of the lighting in that room. Depending on the condition you will run one of two actions. See the attached screenshot links- I just mocked these up within a program I had open so may not represent your load names, but you get the idea. Your second dimming question is how the Cycle Dim button model checkbox works, so no need for conditional button here unless you want to have tighter control.
    https://pasteboard.co/JxqRdb2.jpg
    https://pasteboard.co/JxqQmKO.jpg
    https://pasteboard.co/JxqQxeC.jpg

  9. #9
    Junior Member
    Join Date
    Jun 2019
    Posts
    14
    Thanks, johnmax. Very helpful.

    On dimming, you're of course right that a press/hod with Cycle Dim works as I wanted (keep dimming if on). However, I sure wish I could eliminate the blinking LED and the time it takes before I can press the button a second time. Indeed, I'd love to be able to press/hold all through through OFF, and have the lights brighten again without having to press twice at all.

    I guess I will have to set or check a lot of variables in many cases, as some lights might be on due to (unrelated) button presses, scenes or schedules. I'll have a crack at it. Thanks

Similar Threads

  1. HQRD Keypad - LEDs flashing on button press
    By reesejacobs in forum Troubleshooting - HWQS
    Replies: 1
    Last Post: 06-22-2020, 02:53 PM
  2. Trigger phantom button press over telnet/RS232
    By joefiorini in forum 3rd-party Integration - RA2
    Replies: 1
    Last Post: 10-03-2017, 12:24 PM
  3. VCRX Input to Press a Button
    By Jeepdon in forum Programming - RA2
    Replies: 8
    Last Post: 09-16-2016, 07:24 PM
  4. Handle keypad button press from third party program?
    By ultravelocity in forum 3rd-party Integration - RA2
    Replies: 7
    Last Post: 08-03-2016, 08:05 PM
  5. Program Cycle Dim as a Conditional on a Button Press/Release
    By Armando B. in forum Programming - HWQS
    Replies: 1
    Last Post: 10-30-2015, 01:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •