Announcement

Collapse
No announcement yet.

Right way to toggle with external control possible

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Right way to toggle with external control possible

    I have Lutron Ra2 lighting. I'm using the Lutron Ra2 plug-in. It's been working nicely.

    The Lutron system supports a 'Timeclock Mode' on it's repeater (the LAN to RF bridging device). By default it has values of Normal, Away and Alternate (but can have others). I'm only using Normal and Away.

    I'd like to be able to toggle between Normal and Away mode. This to allow the events and scenes that exist on the Repeaters to be able operate accordingly (independent of HS3).

    The mode can be set from within HS3 (of course) but can also be set externally, like through the Lutron apps. In HS3 it shows a drop-down with the mode choices as they currently exist on the repeater.

    What's the least troublesome way to set up HS3 events to allow changing a virtual On/Off device and have it tracked with the actual Normal and Away modes?

    Ideally I'd like to be able to say "Alexa, turn on Home Mode" where "Home Mode" is an on/off 'light'. I'd also like to be able to say "Alexa, turn on Vacation Mode" and accomplish the same thing. Toggle between Normal and Away on the repater.

    To make matters more interesting, I'd like to have the IFTTT service be able to detect the on/off state change for this "Away Mode" device and take actions accordingly. Mainly to put my NuHeat floor thermostat zone into Away mode (as it has no local or direct cloud API). I'm not going back/forth between home and away that often to make the latency woes of IFTTT a problem.

    I'm guessing this is going to require two virtual devices, one named "Home Mode" and the other named "Away Mode". Correct?

    I'm always unclear on how HS3 handles the changing of device values and find myself wasting a lot of time banging my head against my misunderstandings of it.

    Someone want to point me in the right direction (and perhaps warn me what not to do?).

    #2
    If you change it with the Lutron App, is the change reflected in the HS Device? In other words, does the HS device always reflect the current state, regardless of the method you use to change it?
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Originally posted by wkearney99 View Post
      I'm guessing this is going to require two virtual devices, one named "Home Mode" and the other named "Away Mode". Correct?
      I do it with one virtual device I call 'Occupancy'. It has two value-status pairs, 1-Home, 100-Away. Make sure it's not set as a 'Status Only' device so that it will have controls. You can then control it as you like (device screen, HSTouch button, or within events) and also use its current status in events for decision making.

      Mike


      Comment


        #4
        Originally posted by rprade View Post
        If you change it with the Lutron App, is the change reflected in the HS Device? In other words, does the HS device always reflect the current state, regardless of the method you use to change it?
        Yes, the Lutron device populated by the plug-in almost instantaneously reports the value if it's set by anything else. Device 1153 in this screen grab:
        Click image for larger version

Name:	timeclock mode.png
Views:	188
Size:	39.1 KB
ID:	1276212

        Note, it's not a toggle, but a multiple choice string. The plug-in will properly populate these values if I add/edit/remove any of them from within the external Ra2 editing software.

        Comment


          #5
          Originally posted by Mike Johnson View Post
          I do it with one virtual device I call 'Occupancy'. It has two value-status pairs, 1-Home, 100-Away. Make sure it's not set as a 'Status Only' device so that it will have controls. You can then control it as you like (device screen, HSTouch button, or within events) and also use its current status in events for decision making.
          Makes sense. I'm not specifically looking to address this as an 'occupancy' situation, at least not with regard to motion sensors and room convenience lighting. But as a toggle for larger vacation mode changes for otherwise scheduled events (floor heat, security lighting randomization, other IoT services, etc).

          What I want to avoid is setting myself up for a loop of events. I can't address the native Timeclock Modem device directly via on/off kinds of controls. For those I'll need to set up a virtual device. Which is fine. But if I'm going to have external controls involved how do I avoid that change causing a device changed loop?

          I get confused on the 'manually triggered' thing.

          "external phone/tablet app changes Timeclock Mode to 'Away'. HS3 detects Timeclock Mode change and sets virtual device "Vacation Mode" to On"
          "voice control or external cloud interface changes virtual device "Vacation Mode" to off. HS3 detects this and changes Timeclock Mode to 'Normal'

          I don't presently make use of the ability to choose from among multiple Timeclock Mode values. Doing so engages what could be separate Events on the Lutron repeater. The Lutron software lets you set Events to be included/excluded from each Mode, using checkboxes. So an event could be set up to activate only during a particular mode, or perhaps during more than one. Kinda handy as a way to avoid having to duplicate a lot of events. Just make the event once and toggle what modes can use it.

          But if I did want to use multiple Timeclock Mode values, but still use on/off virtual devices then I'd have to create multiple virtual devices for each mode and then have a bunch of additional THEN clauses to any HS events. I'd rather plan whatever devices and events I set up NOW to not have to be completely redone LATER if I want to use multiple modes.

          Again, looping/triggering confuses me, probably more than it should.

          Comment


            #6
            This is how the Ra2 software allows selecting Modes for an event:
            Click image for larger version

Name:	ra2 event and modes.JPG
Views:	181
Size:	26.6 KB
ID:	1276219

            Comment


              #7
              When using voice I'd like to maintain some flexibility on how to command the change. "Alexa, turn on Home Mode" or "Alexa, turn off Vacation Mode". That's two different On/Off toggle devices. How should I properly structure my events so that changes detected on one are properly reflected on the others WITHOUT causing an excessive amount of events being fired, with potential unwanted side-effects?

              I say this thinking back to reading other posts about motion control timers and leaving the wife out in the yard in the dark.

              Or maybe there's a different way to 'skin this cat'? I'm open to suggestions.

              Comment


                #8
                Originally posted by wkearney99 View Post
                Again, looping/triggering confuses me, probably more than it should.
                I'll start with this easier part. The rest I'll have to study a bit to understand how your stuff works. Others, like rprade, with a lot more experience than me may jump in with thoughts.

                I use 'Manually Triggered' quite a bit. If I have a 'scene' or group of commands that I want to take place all together, but want to trigger the scene various ways, I create a manually triggered event, then trigger it from other events. So, for example, I have an 'Approach' event. It's manually triggered and turns on various lights inside and out that we want on when coming home at night, but don't want to leave on while we're gone. I can then trigger that from other events, like when I push a Homelink button in my car or when geofencing detects my arrival (still working on that one!) or from a button in HSTouch. Most of my scenes are created this way unless I absolutely only need to run the scene from one, exclusive trigger. The main reason for this approach is so that I don't have to duplicate event actions for multiple triggers.

                Looping can often be controlled by how you initially call an event action. 'Is set to' and 'changes and becomes' are sometimes used interchangeably, but are actually very different. Using 'changes and becomes' is how you avoid looping. You can set a device many times from many different sources (buttons, events, etc.) and nothing will happen if the state does not change, but an action will be triggered if the state changes.

                Mike

                Comment


                  #9
                  Originally posted by wkearney99 View Post

                  Makes sense. I'm not specifically looking to address this as an 'occupancy' situation, at least not with regard to motion sensors and room convenience lighting. But as a toggle for larger vacation mode changes for otherwise scheduled events (floor heat, security lighting randomization, other IoT services, etc).
                  Same here. I call it 'Occupancy', but it's manually set when we leave for extended periods. It's one virtual device, either Home or Away, and many other things look at its status before executing, and certain things execute when it changes from Home to Away and vice versa ('changes and becomes').

                  Originally posted by wkearney99 View Post

                  What I want to avoid is setting myself up for a loop of events. I can't address the native Timeclock Modem device directly via on/off kinds of controls. For those I'll need to set up a virtual device. Which is fine. But if I'm going to have external controls involved how do I avoid that change causing a device changed loop?
                  Why not? Event actions can select from pulldown lists.

                  Mike

                  Comment


                    #10
                    Originally posted by wkearney99 View Post
                    When using voice I'd like to maintain some flexibility on how to command the change. "Alexa, turn on Home Mode" or "Alexa, turn off Vacation Mode". That's two different On/Off toggle devices.
                    Unless I'm misunderstanding, it only needs to be one device. Instead of On/Off, you change it to Home/Away. Again, my device is called 'Occupancy' and I set it for Home or Away.

                    Originally posted by wkearney99 View Post
                    How should I properly structure my events so that changes detected on one are properly reflected on the others WITHOUT causing an excessive amount of events being fired, with potential unwanted side-effects?

                    I say this thinking back to reading other posts about motion control timers and leaving the wife out in the yard in the dark.

                    Or maybe there's a different way to 'skin this cat'? I'm open to suggestions.
                    So events look something like this: If device 'Occupancy' is set for Home AND motion is detected in the Kitchen, turn the kitchen light on. Or, If device 'Occupancy' changes and becomes 'Away', trigger 'Away' event (which contains floor heat, security lighting randomization, other IoT services, etc).

                    Mike


                    Comment


                      #11
                      Originally posted by wkearney99 View Post
                      The Lutron software lets you set Events to be included/excluded from each Mode, using checkboxes. So an event could be set up to activate only during a particular mode, or perhaps during more than one. Kinda handy as a way to avoid having to duplicate a lot of events. Just make the event once and toggle what modes can use it.
                      I think this is much the same approach that I use with Manually triggered events, as described in my post #8.

                      Mike

                      Comment


                        #12
                        Originally posted by wkearney99 View Post

                        Yes, the Lutron device populated by the plug-in almost instantaneously reports the value if it's set by anything else. Device 1153 in this screen grab:
                        Click image for larger version

Name:	timeclock mode.png
Views:	188
Size:	39.1 KB
ID:	1276212

                        Note, it's not a toggle, but a multiple choice string. The plug-in will properly populate these values if I add/edit/remove any of them from within the external Ra2 editing software.
                        Why can't this be your 'Home' or 'Away' device instead of a separate virtual device?

                        Mike

                        Comment


                          #13
                          Originally posted by Mike Johnson View Post
                          Why can't this be your 'Home' or 'Away' device instead of a separate virtual device?
                          Because if I want to use voice control or external triggering via IFTTT then I need an on/off device. Correct me if I'm wrong, but this as a multi-value string isn't going to qualify as such, right?

                          What would "on" be? Or "off"? And even if that was possible I'd then be stuck with only the two Modes, not more (or Suspend which I do use during parties).

                          Comment


                            #14
                            Originally posted by Mike Johnson View Post
                            Why not? Event actions can select from pulldown lists.
                            External or voice control typically allows only on/off or a value range.

                            I'd like to have some flexibility for toggling the home or vacation modes. Home On or Off, Vacation On or Off.

                            I don't see using a percentage to fake out a mode as a viable wife-friendly approach. As faking it as a dimmer as a way to use a value from a list.

                            So I get into having a virtual Mode device for any of the timeclock modes I'd like to trigger. This would, presumably, also mean having a truth table for the other virtual modes. It's a cascade of setting one, that sets others that always confuses me a bit. Because if I set "Home Mode" to On then there'd have to be logic that set the others to Off, along with the Timeclock mode itself.

                            But if I'm missing something staggeringly obvious, please, point it out!

                            Comment


                              #15
                              Originally posted by Mike Johnson View Post
                              Looping can often be controlled by how you initially call an event action. 'Is set to' and 'changes and becomes' are sometimes used interchangeably, but are actually very different. Using 'changes and becomes' is how you avoid looping. You can set a device many times from many different sources (buttons, events, etc.) and nothing will happen if the state does not change, but an action will be triggered if the state changes.
                              Yes, that's part of what I struggle wrapping my head around all the time.

                              Now let's say I have four modes. Home, Vacation, Alternate and Suspend (as those are the default ones set up by Lutron). And let's say I create four virtual devices for each of them, as on/off light devices (so voice and IFTTT control will accept using them). Then I use a command that turns any one of those four modes "on". I'm thinking I need to have one event for EACH virtual device, correct?

                              If "home mode" changes and becomes on
                              set timeclock mode to "Normal" (from the drop-down)
                              set 'away mode' to off
                              set 'alternate mode' to off

                              repeating those for each of the other virtual modes.

                              But that would only handle turning each virtual device ON. I'd then also need to have a set of events for OFF, correct? That's where I was getting concerned about possible looping or cascading triggers. Because there I'd be assuming "Alexa, turn Vacation Mode off" would mean changing to the Normal mode and setting the Home Mode virtual device to On.

                              Then have an event that tracks each mode of the repeater itself, to properly handle an app or anything else changing the mode externally from Homeseer.

                              if "timeclock mode" changes and becomes "Normal" (from the drop-down).
                              set 'home mode' to on
                              set 'away mode to off
                              set 'alternate mode' to off

                              And one each of this for all of the potential modes.

                              Comment

                              Working...
                              X