Virtual HTTP Light Devices, supporting RGB(WW), Dimmers, Switch and much more (Tasmota, ESP*, Shelly)

@therealdberro%202

In the ip field you need to add the ip address of the device you are trying to control.

You have two devices with wrong impl file, as stated in the error.

@HeMaSe in order to fix these errors, please try this code (under Apps, Develop Apps, then Test Lua Code)

luup.attr_set('impl_file', 'I_VirtualBinaryLight1.xml', 379)
luup.attr_set('impl_file', 'I_VirtualBinaryLight1.xml', 380)
luup.reload()

and try again. I will add this to the initialization code in an upcoming release on the store. GitHub code has already been fixed.

@therealdb Friend perform the procedure and it still does not work. Place the device’s ip in advance. I ask you should replace device_file D_BinaryLight1.xml with the I_VirtualBinaryLight1.xml. Because even with the luup code it didn’t work.

Nope. This should be impl_file.

I already posted some code to fix it. Find your device id and try to execute the previous code.

Hi All,
first of all: Thank you for this Plugin.
I had installed it today, it worked only manually installed.
Tomorrow i will test the Status Change as described above.
Because i’m using 4CH Sonoff with Tasmota Software my Question is: whether it is possible to create 1 Device with up to 4 Switches, Maybe with more switches to Group them. Hope you understand me, cause school is a long time ago.
Thanks
Tom

Unfortunately vera doesn’t support multiswitch. You have to map 4 distinct devices. There’s a multiswitch plugin, but you’ll probably need to write some code in order to achieve your desired behavior.

Works very good now!

Blockquote
Rule1
on Power1#State=0 do WebSend [192.168.123.73:3480] /data_request?id=action&output_format=json&DeviceNum=226&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0 endon
on Power1#State=1 do WebSend [192.168.123.73:3480] /data_request?id=action&output_format=json&DeviceNum=226&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 endon

Attention you have to change the Bold one!
I’ve first get an error because my Rule was too long. So i splitted into 2 Rules.
:smiley::smiley:
Tom

2 Likes

@therealdb I did again and without results. I would like you to help me set this up. I saw your Gihub account and I ask you the truth, should UPNP be activated to work? Place the lua code as you indicated but it does not work. My Shelly are original you have the exact procedure of how to add this app. I always do it for the APP-Install APP and I search for the application. Sorry but I wish I could solve this problem. Thank you so much.

1 Like

No need to install or activate anything. I re-assure that i’m using them with shellies with no issue at all.

@therealdb I send you the prints of how it is and what you told me but it still doesn’t work, could you please tell me what’s wrong? Could you send me a print of your configuration.

2

sorry, there was a typo on my code. Please use something like that

luup.attr_set('impl_file', 'I_VirtualBinaryLight1.xml', 380)
luup.reload()

note the .xml part missing from the previous one. I also updated the plugin, I suggested to download it from GitHub (I will update the store soon).

@therealdb Perform all the steps you indicated without success.

Please post the variables here.

@therealdb

I tell you that my Shelly is not flashed. Then Install the app from App Vera, download it from GitHub and upload them to Luup files. Assign the IP of my shelly 1, then I ran the code Lua

luup.attr_set (‘impl_file’, ‘I_VirtualBinaryLight1.xml’, 22)
luup.reload ()

And it didn’t work. Tell me if there is something I am doing wrong. Because I did everything you indicated.

Thank you so much.

you have to set the endpoints. For Shellies, please set

Under advanced, variables. It is not automatically configured and mydevice is your IP address.

More info here:

@therealdb I already got the plugins to work. I just want to confirm with you that the variables are fine. In a moment it worke

d but then it stopped working. If I want to know the status of the device is it possible?

The SetPowerUrl is not valid. You should set it as
http://192.168.22.107/relay/0?turn=%25s
Exactly like that.

Yes, you can easily poll the device for status. I will implement later, or you can just send it via a shelly.

Just go to your shelly admin page, then to actions:

Set it to
http://Y.Y.Y.Y:3480/data_request?id=variableset&output_format=json&DeviceNum=XXX&serviceId=urn:upnp-org:serviceId:SwitchPower1&Variable=Status&Value=0

for switched OFF, and just use Value=1 for switched ON.

You have to replace placeholders, where XXX is the device ID in vera, and Y.Y.Y.Y your Vera IP.

@therealdb It is strange that with the previous url it worked. with which you indicate replacing with on or off does not work. Because you say replace% s with On or Off, but only one should work and I want to do it on and off.

http://192.168.22.107/relay/0?turn=+on
http://192.168.22.107/relay/0?turn=+off