New Plugin: Switchboard -- Virtual Switches Re-imagined

I can, but it will be for Vera only at this time. Does that work for you?

Does that mean it will not work with openLuup and / or AltUI?

Also GitHub changed a few things with their own security so some of the older Veras now can’t engage with the Alt Store, so that’s a separate problem in itself.

All up, no big deal.

Hi,
I’ve been experimenting with a Aeotec Wallmote Quad and Multi-Channel Associations. I doubt it, but would it be possible to have a virtual switch that pretends it’s a Zwave switch or dimmer that could be associated to the device in order to somehow use the swiping features of the Wallmote on non-Zwave devices?
Thanks

[quote=“a-lurker, post:10, topic:200515”]

I can, but it will be for Vera only at this time. Does that work for you?

Does that mean it will not work with openLuup and / or AltUI?

Also GitHub changed a few things with their own security so some of the older Veras now can’t engage with the Alt Store, so that’s a separate problem in itself.

All up, no big deal.[/quote]

The code works fine. The problem is that openLuup does not have its own set of default device files like those that Vera ships with (specifically device file D_BinaryLight1.xml and static JSON D_BinaryLight1.json to create the UI). So while using Vera’s canned device and service files fixes many of the problems with virtual devices on Vera, it creates new problems on openLuup. The device file is easily derived from the UPnP standards (Vera’s are almost identical, and the differences are not meaningful). I need to recreate the static JSON file, and get the deployment squared away so it’s clear that those files should not be installed on Veras, but must be installed on openLuup.

[quote=“Quixote, post:11, topic:200515”]Hi,
I’ve been experimenting with a Aeotec Wallmote Quad and Multi-Channel Associations. I doubt it, but would it be possible to have a virtual switch that pretends it’s a Zwave switch or dimmer that could be associated to the device in order to somehow use the swiping features of the Wallmote on non-Zwave devices?
Thanks[/quote]

What state does the Wallmote change when you do things with it?

There are several settings you can apply, but the one I’m interested in is tapping a button to toggle a light on/off, and tap, hold and swipe up or down to brighten or dim the light. I can set any of the other 4 buttons to trigger scenes.
I think this may be impossible though since it seems the multi-channel association is looking for direct communication with a Zwave device.

[quote=“a-lurker, post:10, topic:200515”]

I can, but it will be for Vera only at this time. Does that work for you?

Does that mean it will not work with openLuup and / or AltUI?[/quote]

OK. I think I’ve got everything sorted. It’s in the AltAppStore. Additional files are installed for openLuup.

The current Github master release also has my effort at support for tri-state switches, but there’s no UI yet to create one. So, to create a tri-state switch, you do this:

[ol][li]Add a new virtual switch on the Switchboard control panel; it will be created as a binary switch;[/li]
[li]Go into the control panel for the new switch, Advanced tab to get to its attributes;[/li]
[li]Convert the switch by setting its “device_json” attribute to [tt]D_TriStateSwitch1.json[/tt] and its “model” attribute to [tt]Switchboard Virtual Tri-state Switch[/tt]. I recommend copy-paste, as the particular/peculiar capitalization is important.[/li]
[li]Reload Luup and hard-refresh your browser.[/li][/ol]

The new switch should then have a three-button UI, and clicking on the switch icon in the Switchboard control/status panel should roll it through off-on-void states. The values and actions are the same as those used for the old Virtual Switch plugin (specifically target/status “2” is the void/third state).

There is a bug in current ALTUI that affects the UI for the tri-state switch type, so void state is not accessible here on ALTUI. I’ve made amg0 aware and he’ll get to it when he’s able; it’s not critical.

Also note that both UI7 and ALTUI require page refreshes when you change visibility to get a display consistent with settings. It’s just a thing you need to do.

Edit: fix filename (2019-02-18)

Rigpapa,
Great work. I’ve used Virutal Switch for a couple of things, but I agree that’s a bit antiquated. Question; after I created a switch, I see the switch name, the on/off slider, and Text1 Text2. What’s the purpose of the two text elements and can they be hidden? I really only need the on/off slider.

[quote=“tamorgen, post:16, topic:200515”]Rigpapa,
Great work. I’ve used Virutal Switch for a couple of things, but I agree that’s a bit antiquated. Question; after I created a switch, I see the switch name, the on/off slider, and Text1 Text2. What’s the purpose of the two text elements and can they be hidden? I really only need the on/off slider.[/quote]

Never mind, I figured it out. I just needed to delete the text from the status menu.

Hi patrick, I didnt realise this needed openLuup to run and as a result It doesnt work and throws this error at statup

System error : Device: 197. Fail to load implementation file D_Switchboard1.xml

How do I remove it?

[quote=“dJOS, post:18, topic:200515”]Hi patrick, I didnt realise this needed openLuup to run and as a result It doesnt work and throws this error at statup

System error : Device: 197. Fail to load implementation file D_Switchboard1.xml

How do I remove it?[/quote]

nevermind, I found the answers via google. 8)

PS, it’d be great if this worked natively on Vera.

[quote=“dJOS, post:19, topic:200515”][quote=“dJOS, post:18, topic:200515”]Hi patrick, I didnt realise this needed openLuup to run and as a result It doesnt work and throws this error at statup

System error : Device: 197. Fail to load implementation file D_Switchboard1.xml

How do I remove it?[/quote]

nevermind, I found the answers via google. 8)

PS, it’d be great if this worked natively on Vera.[/quote]

This is working on my Vera without any issues… maybe try to re-install it?

[quote=“sebby, post:20, topic:200515”][quote=“dJOS, post:19, topic:200515”][quote=“dJOS, post:18, topic:200515”]Hi patrick, I didnt realise this needed openLuup to run and as a result It doesnt work and throws this error at statup

System error : Device: 197. Fail to load implementation file D_Switchboard1.xml

How do I remove it?[/quote]

nevermind, I found the answers via google. 8)

PS, it’d be great if this worked natively on Vera.[/quote]

This is working on my Vera without any issues… maybe try to re-install it?[/quote]

Hmm ok ill do that.

Lol, I installed the files from the OpenLuup folder by mistake - installing the files from SRC works just fine. 8)

[quote=“a-lurker, post:10, topic:200515”]

I can, but it will be for Vera only at this time. Does that work for you?

Does that mean it will not work with openLuup and / or AltUI?

Also GitHub changed a few things with their own security so some of the older Veras now can’t engage with the Alt Store, so that’s a separate problem in itself.

All up, no big deal.[/quote]

This may be what is happening to me, although, I hardly think of my VeraPlus as an ‘older device’. When I click on the ‘Alt’ button on the Alt Store, it just turns red and changes to ‘Failure’ Same on my VeraLite. I installed it manually OK but would really like to install it from the Alt Store instead. Any idea how to fix this??

While I’m on the subject…
It would be nice if there were a checkbox I could click that would make a switch be ‘state agnostic’. By that I mean if the switch is off and you turn if off again it will still fire it’s off trigger anyway.
If I have a switch that triggers an ‘All Lights On’ scene when turned on and an ‘All Lights Off’ scene when turned off I might want to turn the switch/trigger off and a few hours later turn it off again to turn off any lights that have been turned on in the interim.
Sound interesting? Do-able?
And BTW, thanks for the plugin. I’m finding it very useful.

[quote=“Jim McGhee, post:23, topic:200515”][quote=“a-lurker, post:10, topic:200515”]

I can, but it will be for Vera only at this time. Does that work for you?

Does that mean it will not work with openLuup and / or AltUI?

Also GitHub changed a few things with their own security so some of the older Veras now can’t engage with the Alt Store, so that’s a separate problem in itself.

All up, no big deal.[/quote]

This may be what is happening to me, although, I hardly think of my VeraPlus as an ‘older device’. When I click on the ‘Alt’ button on the Alt Store, it just turns red and changes to ‘Failure’ Same on my VeraLite. I installed it manually OK but would really like to install it from the Alt Store instead. Any idea how to fix this??[/quote]

No idea, and I’m not in a position to troubleshoot it; I don’t use ALTUI/AltAppStore on any of my Vera systems. It works under openLuup, so I’m assuming it’s a platform-specific issue.

Edit: let me add to this. IMPORTANT INFO FOR ALTUI/ALTAPPSTORE USERS ON GENUINE VERA SYSTEMS (this info does not apply to openLuup ALTUI/AltAppStore users). Installing this particular plugin using the AltAppStore to a Vera system is actually something you should not do–again, with this particular plugin. There are certain device and service files that exist on Vera that the plugin requires, that do not exist on openLuup. For this reason, the Vera install (via Vera Plugin Marketplace) and openLuup install (via AltAppStore) are different–the openLuup install has to include those missing files as extra installed resources. There is no way that I’m aware of in the AltAppStore to set different file/resource sets for Vera targets vs openLuup targets, so any install using the AltAppStore is assumed to be an openLuup target and will install those extra files. So if you use the AltAppStore on Vera to install this plugin, you will get the additional files intended only for openLuup that will thus duplicate existing Vera system files and may override the Vera versions of those files. That might be bad. It might change all of your binary switch UI behaviors system-wide. It might mask future changes Vera makes to their files. You don’t want any of that, so don’t do that.

If you are installing this plugin to Vera, use only the Vera Plugin Marketplace, or a manual install (and omit the files in the openLuup subdirectory). If you are installing to openLuup, use the AltAppStore, or manual install (and in this case include the files in the openLuup subdirectory). Don’t cross the streams.

While I'm on the subject.. It would be nice if there were a checkbox I could click that would make a switch be 'state agnostic'. By that I mean if the switch is off and you turn if off again it will still fire it's off trigger anyway. If I have a switch that triggers an 'All Lights On' scene when turned on and an 'All Lights Off' scene when turned off I might want to turn the switch/trigger off and a few hours later turn it off again to turn off any lights that have been turned on in the interim. Sound interesting? Do-able? And BTW, thanks for the plugin. I'm finding it very useful.

Done. Install the stable branch version, direct link to it here: GitHub - toggledbits/Switchboard-Vera at stable

I know you already installed yours manually (so you know how), but for the benefit of others reading: to update an existing install, click the green “Clone or download” button at the above-linked page, and choose “Download ZIP”. Then unzip the contents of the file, and upload the files to Vera using the uploader at Apps > Develop apps > Luup files (better to turn off the “Restart Luup after upload” checkbox until you get to the last file). Do a full browser refresh with cache flush as well.

[quote=“rigpapa, post:24, topic:200515”]If you are installing this plugin to Vera, use only the Vera Plugin Marketplace, or a manual install (and omit the files in the openLuup subdirectory). If you are installing to openLuup, use the AltAppStore, or manual install (and in this case include the files in the openLuup subdirectory). Don’t cross the streams.

While I'm on the subject.. It would be nice if there were a checkbox I could click that would make a switch be 'state agnostic'.

Done. Install the stable branch version, direct link to it here: https://github.com/toggledbits/Switchboard-Vera/tree/stable[/quote]
Wow, that was a quick turnaround! The State Agnostic switch works great!!

But on the install, I searched for ‘Switchboard’ in ‘Apps’/‘Install Apps’ and in ‘Settings’/‘Customer Care’/‘faq’/‘Apps’/‘Vera Plugins’/‘Mios Marketplace’ and couldn’t find it. Am I looking in the wrong place? Should I be searching for something else? I am obviously missing something.
I would like to use the Vera install on my VeraPlus and I’m not using openLuup.

[quote=“rigpapa, post:24, topic:200515”][quote=“Jim McGhee, post:23, topic:200515”]

While I’m on the subject…
It would be nice if there were a checkbox I could click that would make a switch be ‘state agnostic’. By that I mean if the switch is off and you turn if off again it will still fire it’s off trigger anyway.
If I have a switch that triggers an ‘All Lights On’ scene when turned on and an ‘All Lights Off’ scene when turned off I might want to turn the switch/trigger off and a few hours later turn it off again to turn off any lights that have been turned on in the interim.
Sound interesting? Do-able?
And BTW, thanks for the plugin. I’m finding it very useful.

Done. Install the stable branch version, direct link to it here: [url=https://github.com/toggledbits/Switchboard-Vera/tree/stable]https://github.com/toggledbits/Switchboard-Vera/tree/stable[/url][/quote]

Brilliant, this was what was missing from making a “nothing” virtual switch, not I can replace the 2 memeory consuming ones I have.[/quote]

[quote=“rigpapa, post:24, topic:200515”][quote=“Jim McGhee, post:23, topic:200515”]While I’m on the subject…
It would be nice if there were a checkbox I could click that would make a switch be ‘state agnostic’. By that I mean if the switch is off and you turn if off again it will still fire it’s off trigger anyway.[/quote]

Done. Install the stable branch version, direct link to it here: https://github.com/toggledbits/Switchboard-Vera/tree/stable[/quote]

Ok, I’m POSITIVE this was working yesterday but today I reinstalled the stable version and every thing works except the ‘state agnostic’ part. No matter which way I set the new box under ‘options’, it doesn’t trigger a scene unless the state changes.
I’m sure this was working before I re-uploaded the plugin.
Not sure if this is connected, but is it ok that the created switches have two variables named trigger and two variables named status?

Not sure what to expect here.
I installed the updated version and was expecting to see 3 switch positions similar to the “nothing virtual switch”
Maybe I’m expecting that this version is like this.

[quote=“zedrally, post:28, topic:200515”]Not sure what to expect here.
I installed the updated version and was expecting to see 3 switch positions similar to the “nothing virtual switch”
Maybe I’m expecting that this version is like this.[/quote]

There’s no UI for creating a tri-state switch yet. I still consider it an experimental feature. Steps for creating a tri-state switch are in this post: http://forum.micasaverde.com/index.php/topic,120149.msg441404.html#msg441404