Momentary Rocker Switch - Virtual

Having a momentary rocker switch would solve and/or simplify several logic problems.

The idea is to have a switch with both an On and Off action but the switch is always in a Neutral position. You can turn it off or on but it immediately returns to neutral. It only has two actions and looks and acts like a switch but it would not a have a On of Off state.

It would be the perfect device as activator of the new Room Lighting app. You could command it off or on without concern of current state and always know that the Room app would trigger. Currently a room app can be in a partial state and will not complete the full configuration state due to the state of the activator switch.

This momentary rocker switch would also be useful in controlling groups or scenes as they have the same state issue. There are many other times that having a stateless switch would be a useful trigger for rules as well as the ease with which controlling switches exists throughout all apps.

This issue can be partially solved today with a 2 button device used with the Room Lighting app but would be much more convenient if the app simply created an Activator switch as this type of device so it could be used to more completely and correctly control the app.

1 Like

Why can't you just use the virtual device that is within Room Lighting? Put that on a dashboard and you have the ability to turn the RL "scene" on and off with a simple switch?

1 Like

The Zooz ZAC99 is a momentary Decora style switch that sells for like $8. I use them with Zooz 3-way dimmer switches to do dimming from the remote dumb switch. It may work for what you're trying to do.

Yes, the activator device works fine for the simple case. However there are too many scenarios where it doesn't work.

Say you have three lights in a Room Lighting group. If one of those lights is changed independently, either manual or digital, then the activator device will fail in one direction depending on the settings for that group. The app state (and activator state) is either on or off so you cannot command it to that same state in attempting to put the scene/group into the desired off or activated configuration.

If you set both the "Turn on when partially ON" and "Turn off even if partially off" settings in RL, and then hit either ON or OFF on the activator it will work as you are asking. At that point it should not matter if the app is in active state or not, it should always do what you command from the activator. Unless I am not understanding what you mean by a momentary switch?

EDIT: I think I understand now, you are concerned about the activator as well being in the on or off states. I would have to test it, but I think even if the activator is already on and you tell it ON again, it should still activate the RL if the settings I mentioned are set.

EDIT2: Just tested it with one I had setup similar. I turned the activator off, all lights went off. I then turned ONE light back on manually. The activator stays off in this case with my settings. I press OFF again on the activator. It turned the light back off.

1 Like

Thanks for investigating. The situation that failed for me is similar to your last test but the activator switch was being commanded digitally from a rule.

So I've now gone back to test and with a setup similar to yours the activator switch is behaving as you have seen and in the manner I would hope and it seems to work from a rule too. So why did it fail for me before???

TLDR: The only difference I know of is that the scenario was a bit more complicated as the Room group was also using modes. The lights in question were the outside front lights (door, 2 spots, street, plug). I set them up so that if any of the switches were held (ie button hold) then all of these front lights would turn on (or off). The door light would not turn off in the evening mode group of the Room group as I want that always on in the evening. The other modes allowed turning off the door light.

My automation for when night mode occurred then switched off the activator for the group which should have turned off the front door (all other lights are off). This did not work and after several nights of seriously bad WAF reviews and numerous testing I had concluded that the activator was not triggering when commanded off if it was already in the off state. In past testing of switches this is how they behaved in rules and triggers so it seemed reasonable that this was true too.

I used to have all of this setup in rules and it was quite complicated so I jumped on this Room app as soon as it came out. It was buggy at first so I backed off and waited until things stabilized and didn't retry this until v 2.3.2.134. Now testing on v135 and it seems to work as I would want for the simpler scenarios. Testing with modes is a bit more time consuming so not sure I want to go back there right now.

Question I'm curious about now is does a virtual activator device work differently than other virtual switches? Switches generally cannot be turned off if they are already off or on when already on. Pretty sure triggers won't detect those since there is no change of state. So do these activator devices work differently or is the Room app doing something special with these devices?

Usually when a switch driver gets an "off" event back from the device (or in this case you press the off button) it will send an "off" event to the hub backend. If it is a duplicate event the hub will basically hide it. In driver code there is a way to force the event to be logged even if a duplicate. It DOES NOT look like the activator device is using that though. Since the activator is a child device of the RL app it is probably directly telling the app of the on/off event regardless if it was a change in state or not (separate from the process of sending the event to the hub backend).