MultiSwitch Plugin

I’m glad you are finding it useful.

It would be nice to have the status of a button be able to trigger a scene.
You can trigger a scene from Multiswitch by using the scene editor's [i]TRIGGERS[/i] tab. Click [i]Add Trigger[/i], select the Multiswitch device and then select the event from the sixteen possibilities ( eight switches, on or off ). If you want your scene to run when the switch changes state, set two triggers - one for [i]turned on[/i] and the other for [i]turned off[/i].
Also when setting the status in a scene you can't specify if you are turning the button on or off, which could get messy if the button was in the incorrect state to begin with.
When you have set the action to a Multiswitch button in the scene editor, click on the [i]ADVANCED[/i] tab and change the value of [i]newStatus[/i] from -1 (toggle) to 0 for off or 1 for on.

Woops. I didn’t see that earlier. Maybe something was screwie. Maybe me.

When you have set the action to a Multiswitch button in the scene editor, click on the [i]ADVANCED[/i] tab and change the value of [i]newStatus[/i] from -1 (toggle) to 0 for off or 1 for on.

Nice! Thanks for the tip! And the plugin.

short question, if i have radio defined (single choice) and update a variable via Luup
the other selections do not change.

is there a action call to do this ?

luup.variable_set("urn:dcineco-com:serviceId:MSwitch1", "Status1",1, 3)

works but not really call the plugin to update the others.

Try :

luup.call_action(“urn:dcineco-com:serviceId:MSwitch1”,“SetStatus1”,{newStatus1=1},3)

LG

Yes you need to call an action (as shown by @LG) to get the radio logic to work. Directly changing the state-variable bypasses the logic although the individual button will reflect the change - as I think you have discovered.

newStatus1

The “1” there i failed , i try a million combinations before posting here … But it never came to my mind the set command has a target number as well. Thanks for the hint.

Hi, am i being silly ? I cannot find the plugin in the app store ?

I won’t say you are being silly but if you look at the first post, the second last paragraph and the last word being MSwitch is the hyperlink to the file location. Maybe I am just be silly as you find the link in the first post

Oooops. Thanks. Have not properly looked at the post… just looked at it to see what it is called and then tried to find it in the app store… pays off to read through

I have downloaded and installed the 5 multi switch files from your link into Vera, restarted luup, but no device is showing up. Normally after installing the files and restarting luup the new device should show up in devices or have i forgotten something ?

Yes, you’ll need to manually create the device.
Follow the logic here - change the file names to match the ones downloaded.

http://wiki.micasaverde.com/index.php/Create_Virtual_Switch_Manually

Got it, that was fairly easy.

Thanks

;D

Everyday is a school days - always learning. Have fun with it now.

Or, i thought i did…

It is there, but there is something wrong. I have this status message in the top and it does not disappear lile they normally do:

MultiSwitch[248] : Running Lua startup

When i try to enter anything in the buttons or press any buttons, i get device not ready

First the details entered must be exact. No additional white spaces at the end etc.

Several way to try and remediate it.
In the Advance Tab:
Ensure the device_file is D_MSwitch.xml
Delete entry from Impl_file
Save and it will restart.

Try uninstall and then repeat the install process but enter D_MSwitch.xml

Follow the procedure below as contained in a earlier post in this thread.

The recreation process involves generating new D_MSwitchxxx.xml and D_MSwitchxxx.json files and then changing the existing device to use D_MSwitchxxx.xml as its device_file. This all happens automatically. All you do is enter the text you want to see on the buttons and hit Save/Reload. The device could be reset to the initial state, if required, by simply changing device_file back to D_MSwitch.xml in the Advanced tab.

http://forum.micasaverde.com/index.php/topic,14453.msg110172.html#msg110172

Did you notice the file MultiSwitch.rtf in the set you downloaded? It contains instructions for installing the plugin…

I did notice it but i thought it was part of the files to be uploaded to Vera and installed… So that obviously was wrong… i also ticked restart luup… so trying to uninstall and reinstall now

All working fine now. So lesson for next time: Do not upload .rtf files, but instead read them…

I learned too: I’ve replaced the rtf with a pdf which may be a little more noticeable. ;D

You can have yourself a coldie then.