Announcement

Collapse
No announcement yet.

Syncing Virtual devices with stand alone switches

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

  • Syncing Virtual devices with stand alone switches

    Something I've always struggled with i'm trying to do right in my new place.

    I created VDs for each of my rooms. "On" runs an event in that room setting several lights to set levels.... "Off" does the Opposite. I have the VD setup with voice command that works perfectly with Alexa.

    But what happens when, for example, someone turns on a light using a wall switch in that room - say the overhead light in the kitchen?

    So when I say, "Alexa, turn off the kitchen lights", nothing happens because the actual VD is still OFF. Just the one light was turned on manually.

    One way would be to Not use VDs, and just have voice commands for both of the events. Doesn't seem the right way to me - is there a better/easier way of doing this?

    thanks

  • #2
    You could set up an event that detects that a switch was turned on and then set the status of the VD. But that might cause other issues. Let's say only one light is on but you try to switch the others on via the VD nothing will happen (based on your experience) because the VD is already on.
    So why not just have the events and then trigger those events via Alexa using Routines? I don't see anything wrong with that except that Alexa sometimes has issue seeing those events.

    Comment


    • #3
      Originally posted by Tomgru View Post
      Something I've always struggled with i'm trying to do right in my new place.

      I created VDs for each of my rooms. "On" runs an event in that room setting several lights to set levels.... "Off" does the Opposite. I have the VD setup with voice command that works perfectly with Alexa.

      But what happens when, for example, someone turns on a light using a wall switch in that room - say the overhead light in the kitchen?

      So when I say, "Alexa, turn off the kitchen lights", nothing happens because the actual VD is still OFF. Just the one light was turned on manually.

      One way would be to Not use VDs, and just have voice commands for both of the events. Doesn't seem the right way to me - is there a better/easier way of doing this?

      thanks
      Tom I have a plugin in beta called Links, if you are up for trying something new it might help your case. It simplifies creating, well links, between different devices. In this case you could have any of your kitchen lights easily set the state of the VD to on if they are turned on. You could do the same with events, but this (imho) is simplier/faster than that.

      Comment


      • #4
        I haven’t looked but is there any chance an Alexa command “sets” a device. To test give a command to set the VD to its current value and see if the date updates (make sure the box “Do not update device last change time if device value does not change:” is not selected”.If the date changes it has been set”. If the date doesn’t change, it might be an enhancement request to support@homeseer.com.

        As a workaround have two events triggered by the virtual device, then give Echo two commands. If only one light is on and you want them all on you would give the off command followed by the on command. Clumsy, but it will end up with the desired result.

        If Alexa “sets” a device then your two events would be triggered by “set” instead of “changes and becomes”.
        Randy Prade
        Aurora, CO
        Prades.net

        PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

        Comment


        • #5
          This sounds like a good use case for EasyTrigger groups.

          The problem you raise with one or more lights being manually controlled is something I have tried to solve several ways over the years. The current strategy is working well, however it does rely on dimmers. Generally, the strategy is that when the lights are controlled by events, they are set to a known dim level (I use 95). Subsequent events are looking for the condition that the light is at 95 dim level (or not). If someone manually controls them, the level will very likely be something other than 95 so it is easy to know it was a manual control. Events can now know the difference between event set levels and manual controls. In several rooms, the lights are automatically controlled based on entry to the room as recognized by a motion sensor. The lights come on and go off automatically after some period of time. The special case is when someone enters the room and wants the lights to stay on. They can tap the switch and override the timers thus setting to level to a non 95 level and the OFF event doesn't run.

          Long winded but maybe there is something there that might be of use.

          Comment


          • #6
            I think Easy Trigger is the answer.

            First add a third value of "Some" to your Virtual Device. Note that the "Control Use" is only for On and Off.

            Click image for larger version  Name:	Capture.PNG Views:	0 Size:	49.6 KB ID:	1326468

            Create a pair of events to set your lights that are triggered by the device

            Click image for larger version  Name:	Capture2.PNG Views:	0 Size:	87.4 KB ID:	1326470

            Then create an Easy Trigger Group of the lights

            Click image for larger version  Name:	Capture1.PNG Views:	0 Size:	6.4 KB ID:	1326469


            And three Events to control the Virtual device. These Events will look at the group and set the status of the virtual device. If the lights are all off the Virtual Device is set to Off, If all are On the VD is set to On. If a light has manually been controlled to be On or Off, out of sync with the rest of the group, the VD is set to Some. Note the 1 second Cannot Re-Run value on each. This will help prevent them repeatedly firing as you manually adjust the lights, though I doubt that could happen..

            Click image for larger version  Name:	Capture3.png Views:	0 Size:	99.9 KB ID:	1326471
            Click image for larger version  Name:	Capture3a.png Views:	0 Size:	46.8 KB ID:	1326472

            This way the voice command should always work,

            The last thing I might do just to assure the virtual device doesn't get falsely set due to timing of the On and Off control Events, I would add a check at the end to make sure the VD matches after the lights have settled

            Click image for larger version  Name:	Capture4.png Views:	0 Size:	136.1 KB ID:	1326473

            I don't see any timing conflicts, but it could depend on any system latency in the lights settling to their values.
            Randy Prade
            Aurora, CO
            Prades.net

            PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

            Comment


            • #7
              Shouldn’t you create an event to where if the light changes and becomes on the VD is changed to on.

              Comment


              • #8
                Originally posted by tome10 View Post
                Shouldn’t you create an event to where if the light changes and becomes on the VD is changed to on.
                He was talking about a group of lights.

                But what happens when, for example, someone turns on a light using a wall switch in that room - say the overhead light in the kitchen?
                In Event 05 the VD will be set to On if all lights in the group are other than Off. Echo can set all lights to presets with an On command or all to Off with an Off command. If someone manually turns a single light Off or On the VD is set to Some, allowing either voice command to work.
                Randy Prade
                Aurora, CO
                Prades.net

                PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                Comment


                • #9
                  rprade great idea... Will try it.
                  bsobel, happy to beta as well!

                  Comment


                  • #10
                    on thought that occurred to me Is how I also represent this on my Imperihome dashboard, as there are only two states (on/off) for a light switch, which is the widget I use for VDs.

                    Comment

                    Working...
                    X