New Plugin: Switchboard -- Virtual Switches Re-imagined

Well, that wasn’t the original request! :joy: But I can certainly see the logic in doing it the way you suggest. But now I have the problem that somebody may rely on the current behavior. So…

Will anybody care if tri-state switch is modified so it can timer-reset to void from both on and off modes? For clarity, that would be a change from the current behavior, where tri-states will only timer-reset to void when set on (off mode does not run the timer). Speak now or forever hold the pieces; if there are no objections, I will make the change.

This is a limitation of the way the involved subsystems work on Vera. The Scene Wizard uses the UI definition defined in the static JSON file D_TriStateSwitch1.json for tri-state switches, so in this case, I can affect what is shown for scene setup. When you go the Advanced Editor, however, it only shows what the related service defines as acceptable values, and since the service is the system-standard urn:upnp-org-serviceId:SwitchPower1 that only knows “on” and “off”, there is no way for me to tell it to also allow “void” and what value “void” would be. To change the service, I would have to change the device type, and if I do that, the device loses compatibility with the Vera mobile apps, Imperihome, voice assistances, and other facilities. It is a design guideline of Switchboard that these devices maintain compatibility with these facilities, so as a result, it requires that the system-standard device types be used. This then introduces the trade-off that all limitations inherited by the use of those types apply. I’m afraid there is no 100% solution that works for everyone and everything in the Vera world.

Not that I am using your version ATM, but it is the way I had set up the original Tri-State Switch. Once you make the changes then I can move over to your version!!! n:)
FWIW, I haven’t been following the development of this but what you have asked for is exactly how I would expect the Tri-State to work.
So please go ahead and make it what it should be…

1 Like

Concur (as in, I vote “Yea”).

1 Like

Question: Could “Blinds” be used as the base Device type for tri-state switches?
They have Up, Down and Stop!

The Up & Down needs to be momentary for that to work, I’m not sure if that could be programmed into the switch?
Better still to add a timer option to the Up & Down which would allow it to stop at predefined levels.
While we are at it make it Up - Stop - Down or On-Void-Off and go that extra step and allow your own text.

I installed Switchboard last week and migrated all my VSwitches. I am not using the tri-switch option so any change will be ok with me. But I reserve the right to bitch about it later :roll_eyes:

3 Likes

Me too, no objection as I have a fairly complex set of scenes that I use to work around the current behaviour. Thanks

Tried searching this tread but it wasnt working very well - at least using control F in the browser. Would there be any way to easily change the virtual switch type - for example, from a light bulb to a switch?

Are you talking about just changing the icon? Or are you asking if you can change a dimmer to a switch? (A “light bulb” can still be a switch)

P.S. The search you should be using is the magnifying glass icon in the forum header on the right, near your avatar/profile image.

You are right, the dimmer can still be used as a switch. Suppose the question then relies upon changing the icon without modifiying the operation.

OK. So to the first, there are ways to change the device type, but I do not recommend it, as any error made in the process runs the risk of the device becoming invisible and then a real tangle to fix, or in some cases, you can put your Vera into a reload loop. The safest way is to create a new device of the type you want and switch over to it.

With regard to the icon, this is a pretty widely discussed topic here on the forums, and the substance of it is simply changing the “subcategory_num” attribute in the device control panel Advanced > Params. Here’s some recent info on the category and subcategory icon relationship for binary light (category 3) devices: Making sockets not a light

If you have a dimmer device, you will need to recreate it as a binary light, as the only available icon for this device type (which is category 2) is a bulb in varying degrees of illumination.

You’ve got me wondering now, can a virtual switch be “associated” with a physical z-wave switch in such a way that turning on the physical one makes the virtual one respond, without any programming on Vera?

You can use logic to make them mirror each other, and people have done this, but it’s not something Vera does natively.

1 Like

I was thinking along the lines of zWave Associations that one can employ with physical devices, giving master control to, say, one switch in a room that then turns on/off all the others. Would be neat if virtual switches could respond to that (rarely used?) setting.

Perhaps the more apt term is “Group” (see https://www.vesternet.com/pages/z-wave-groups-scenes-associations).

ZWave associations are implemented in the mesh… they are specifically an instruction for a device in the mesh to send a message to another identified device in the mesh. Once configured, that occurs without the involvement/awareness of the controller, so aside from the fact that we can’t (easily, in a Vera-supported and -endorsed way) intercept and handle ZWave messages in current firmware, there would be no message to intercept.

As I later realized, the more apt term may be ‘Group’ - see https://www.vesternet.com/pages/z-wave-groups-scenes-associations - but your point is well taken!

I have vera (actually openLuup) connected to Home Assistant through the Vera integration. The switchboard devices show up in Home Assistant but do not function (no control and do not reflect current status). Is there a way to make them work?

Switchboard 1.7 is now released and will shortly be available in the Vera App Marketplace and AltAppStore.

This version contains two feature enhancements:

  1. Tri-state switches can now have the delay-reset timer reset the switch to any of the three possible states by setting TimerResetState (0=off, 1=on, 2=void) on the device.
  2. Support for virtual scene controllers. Please see the README.

image

Hello @rigpapa what is the url so i can change the selected scene with HTTP call?

This is an exciting update. Although I haven’t yet found a use for the Scene Controller aspect, I do like that its state can be set a number of ways, including a bit mask. I hope users read the documentation on that and ponder some innovative use cases for us to explore.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules