Beta and Pre-Release (Public) > Beta Testing (Public)

UI7 additional virtual switch

(1/3) > >>

Damian R:
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.

Damian R:
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

Rayvino:
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?

Damian R:

--- Quote from: 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?

--- End quote ---

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.

mszewcz:
To reload lua just go to Apps > Develop apps > Test luup code (Lua), enter following code:

--- Code: ---luup.reload()
--- End code ---
and hit Go (this works only in UI6 & UI7).

You can also do it by using an http request. The url is:

--- Code: ---http://ip_address:3480/data_request?id=reload
--- End code ---
Just replace the ip_address with your Vera's one.

Navigation

[0] Message Index

[#] Next page

Go to full version