New Plugin: Switchboard -- Virtual Switches Re-imagined

Yeah, that did cross my mind but have no idea how code this. I have written some very basic lua using examples from the community but that is about it. I can alway use party volume but that would include zone 3 which I hardly use.

Who maintains that plugin? Maybe the missing action can be addressed. Seems like a nice-to-have.

a-lurker for the http plugin. The thing is it seems like the actions are there and Reactor picks up the current value in conditions i.e -70 but applying an action and value in activities yields no change. Tried running man too as well as native Vera scene. The thought was was to have condition on main zone volume value changed, any value to any value along with a condition on binary switch to turn on/off . Have an expression for main zone volume value and apply to Zone 2 volume in activities. I thought problem had been addressed in the plugins thread and installed latest from Github but it did not help. It turn it I actually lost one of the additions I added myself years ago to Set HDMI output on/off. Needed to restore Vera to earlier date from backup to retrieve edited plugin. Then restore back to current. Will check the plugin thread and see if support is still available. The plugin is quite old.

Shallowearth, any way to round value to nearest .5? i.e. 34.65 to 34.5

Hi.

Can someone help me with my difficulty:

I’m using the last tri-state version of the switch to control a rolling shutter with a toggle scene button.

Manually the switch works great: on → open the shutter | void → stops the shutter on the current position | Off → close the shutter.

When using the toggle state “ToggleState” rather in HaDevice1 or VSwitch1 (on the scene advanced editor code) it only toggle between on and off, without going throw void.

I was trying to configure only one button that could control the shutter… Pressing it once the shutter stats to open, pressing it again the shutter stops and pressing one more time the shutter stats to close and so on. (trying to find a solution for this at almost a year now…).

I also think that, for this to work, it will need to be a “four-state switch” so that the toggle could work like this: on → void1 → off → void2 → on → void1 → off → void 2… and so on so on… I think that with a normal cicle it will always skip a void state rather in on → off toggle or off → on (one of them).

Thanks you for your time in advanced.

The tri-state switch should work for you

Don’t use advanced editor.

Set up 3 scenes this way

Add a device triggered scene.

Select tri-switch as device

click Staus changes radio button

Scene1 Whenever tri-switch is turned on.
Scene2 Whenever tri-switch becomes void
Scene3 Whenever tri-switch is turned off.

Have you considered using Reactor vs a a native Vera scene?

I’ve modified the stable branch version of Switchboard on Github so that the ToggleState action now rolls through the states: on → void → off → void → on → etc. I don’t believe this change will disrupt anyone, but if it does, let me know and I’ll make the legacy behavior configurable. I think this behavior is a useful improvement.

Instructions for installing from the Github stable branch can be found in post 63 of this topic.

Patrick, is there any insight on the formatting issue I am seeing on my switches that I posted a while back?

Sorry, I’m just back from three weeks traveling out of just over four, most of it with sketchy Internet and no access to code, and I’m having a devil of a time reconciling all of my threads and making sure I’ve gotten back to everyone (I also have truckloads of email on these subjects to boot). So, please, refresh my memory… if you posted here, can you link me back to that post?

Is that “Binary Switch” text/legend something you added to the image, or is it shown on the device? If it’s the latter, where did you set it?

The binary switch virtual device in Switchboard uses the Vera-native device type and UI (from /etc/cmh-lu/D_BinaryLight.json.lzo). That UI does not show any text. Is it possible that you replaced that file with a modified version or added a modified version to /etc/cmh-ludl when you were using the old VirtualSwitch plugin/devices? There should not be any text displayed.

No, alterations to image, just added trough the plugins main console Text1 Binary Text2 Switch.

OK.

  1. Check the device attribute device_json. It should be D_BinaryLight1.json.
  2. Look in your /etc/cmh-ludl/ subdirectory. There should not be a D_BinaryLight1.json or D_BinaryLight1.json.lzo

Coming up with this

binary

OK. Looks like your previous install of the old VSwitch plugin, or maybe some other plugin (less likely) has given you an overriden version of the system standard file(s), and that displays that text. The only suggestion I can offer you there is to remove those overrides so the standard UI is exposed.

Edit: it’s also possible you may yourself have installed these files from the openLuup subdirectory of the Github repo… could that be? They should not be installed on Vera. If you have S_SwitchPower1.xml in /etc/cmh-ludl/, that should also be removed.

I was not aware that the plugin was in the vera marketplace. I originally downloaded from github and uploaded thru luup files.

I guess the question is will manually deleting associated files and reinstalling via vera apps solve the issue and if so is there a way to save my current configuration?

Ah. OK. Then you’ll need to track the releases on your own, but in any case, the contents of the files in the openLuup subdirectory on Github should only be installed on openLuup, because it is missing those files entirely and Switchboard needs them. They were never meant to be used on Vera Luup.

If you want to get on the App Market version while preserving your existing switches:

  1. Go into the Advanced tab of your existing Switchboard master device and note its device number.
  2. Install Switchboard from the App Marketplace.
  3. Hard-refresh your browser.
  4. Find the newly created (and now duplicate) Switchboard master device and delete it. It will have a different device number from that which you established in step 1.
  5. In Apps > Develop apps > Test Lua run the following code, putting the device number from step 1 in where indicated:
luup.attr_set( 'plugin', 9194, step_one_device_number )
luup.reload()
  1. Hard-refresh your browser again.

Then, if you go into “My apps” and into Switchboard, you should see that the app is connected to your previously-existing master device from step 1, and it should be the only device.

Yeah, I used the link you posted at the very top of this thread. Will follow your instruction after backing up and see how that goes.

Will let you know.

So I followed instructions, vera apps switchboard details shows my old device id. The master shows all my previous switches under status and seem to be working. Control tab has new options Add One and Add Five. I don’t see any options for dimmer or tri-switch. Adding one seems to hang on creating children. Rebooting Vera shows new switch but comes up with cannot cannot connect device error code 1. Formatting issue is still there. I can always go back via backup since it all worked, just a visual issue with the formatting.

Just install the stable branch over the App Market version for the moment–it won’t disrupt the connection to the App Market install. I will be pushing a new version up tonight, so by sometime tomorrow, everything will track to what you are used to using and you’ll be connected to the marketplace.

1 Like