The Vera Community forums have moved!

Beta and Pre-Release (Public) => Beta Testing (Public) => Topic started by: Damian R on September 13, 2014, 08:50:35 pm

Title: UI7 additional virtual switch
Post by: Damian R on September 13, 2014, 08:50:35 pm
Hey guys, I've search the forum and google, and I know I've seen the post somewhere before, I just can't seem to locate it anymore.. But how the hell do I add another virtual switch instance in UI7.. I'm already using 1 and I see no place to create a new virtual switch device.
Title: Re: UI7 additional virtual switch
Post by: Damian R on September 13, 2014, 09:05:34 pm
Scratch that.. I figured it out..

For anyone else having the same problem:

Apps -> Develop apps -> Create device

Set a room if you want to and then click Create device. Now go to your devices tab, and click on the device just created.


Now the part that took me forever to realize. You MUST reload the Lua engine for this to work properly.

Apps -> Develop apps -> Edit Startup Lua -> and just click GO. Wait for the engine to reload, and then go back to your device list and force reload the page.

Hope this helps someone
Title: Re: UI7 additional virtual switch
Post by: Rayvino on September 20, 2014, 04:53:13 pm
Thanks for the tip but when I get to your last step and click Go under Edit Startup Lua, it gives me a message to fill in required field.  It's looking for something in Edit Startup Lua code box?  The switch appears in device list but doesn't work?

Also how do you know when the Lua engine has reloaded?
Title: Re: UI7 additional virtual switch
Post by: Damian R on September 22, 2014, 05:29:13 pm
Thanks for the tip but when I get to your last step and click Go under Edit Startup Lua, it gives me a message to fill in required field.  It's looking for something in Edit Startup Lua code box?  The switch appears in device list but doesn't work?

Also how do you know when the Lua engine has reloaded?

There are a few ways to reload lua, one is the step I use, or editing a scene with lua (almost anyplace lua is used) or by using an http request, which I forget the exact url at the moment... I actually have an ssh session open to tail the logs, but if you scroll all the way to the top, there will be a blue bar that says like 'Reloading lua engine.. Please wait..', 'Configuring your Z-Wave devices' and whatnot. Once the blue bar disappears the engine has been reloaded.

And of course if all else fails, just power cycle your vera.
Title: Re: UI7 additional virtual switch
Post by: mszewcz on September 22, 2014, 06:08:06 pm
To reload lua just go to Apps > Develop apps > Test luup code (Lua), enter following code:
Code: [Select]
luup.reload()and hit Go (this works only in UI6 & UI7).

You can also do it by using an http request. The url is:
Code: [Select]
http://ip_address:3480/data_request?id=reloadJust replace the ip_address with your Vera's one.
Title: Re: UI7 additional virtual switch
Post by: legend99 on December 05, 2014, 03:40:05 pm
Thanks for the tip, but that makes no sense why you would have to go through all that to add a 2nd switch.

Scratch that.. I figured it out..

For anyone else having the same problem:

Apps -> Develop apps -> Create device
  • Device type: urn:schemas-upnp-org:device:VSwitch:1
  • Description: whatever you wanna call it
  • Upnp Device Filename: D_VSwitch.xml
  • Upnp Implementation Filename: I_VSwitch.xml

Set a room if you want to and then click Create device. Now go to your devices tab, and click on the device just created.

  • Set device_json: D_VSwitch.json

Now the part that took me forever to realize. You MUST reload the Lua engine for this to work properly.

Apps -> Develop apps -> Edit Startup Lua -> and just click GO. Wait for the engine to reload, and then go back to your device list and force reload the page.

Hope this helps someone
Title: Re: UI7 additional virtual switch
Post by: RichardTSchaefer on December 06, 2014, 09:55:57 am
@legend99
This work around is ONLY needed if you loaded the Multi-Switch (or any other Plugin) during an earlier release of UI7 where it did not have the "Add Another Device" button.

If you loaded a plugin earlier than when MCV made the fix, Not only did it not have the button, but it failed to add the button on later versions of UI7 where they (MCV) fixed the problem.

Another solution is to uninstall the plugin ... then re-installl it ... then you will be able to create multiple instances with a single click.
Title: Re: UI7 additional virtual switch
Post by: Clems on October 05, 2017, 06:02:42 am
This way is ok on UI7, but I cant use the switch in Vera Mobile app.

Is there any way to use this switch in mobile app ?


Thank you !
Title: Re: UI7 additional virtual switch
Post by: michaelhinchey on October 14, 2017, 12:16:06 pm
What is the reasons for the virtual switch?  Just for testing?
Title: Re: UI7 additional virtual switch
Post by: Clems on October 14, 2017, 12:34:37 pm
What is the reasons for the virtual switch?  Just for testing?
It is to add button to launch scene
Title: Re: UI7 additional virtual switch
Post by: Forzaalfa on November 03, 2017, 03:12:24 am
They can also be handy for preventing scene collision (running conflicting scenes at the same time).
Title: UI7 additional virtual switch
Post by: CharlesDak on September 27, 2018, 12:50:06 pm
Good luck with this, I cant view the vids as im at work but will look later.

You have set yourself a monumental challenge just from looking at the pics. Do you have a timescale?
Title: UI7 additional virtual switch
Post by: Timothybaddy on February 01, 2019, 05:24:09 am
Just curious, Will SmartDVB run if installed on a Virtual Box installation of windows XP running on a Linux system?

has anyone done it? and, are there any tricks to getting it to work?

I want to stay away from windows, but I want to run windows programs