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

I receive the following error:

Please post the url, as we can not see the full url.

I use exactly the url i supplied with no issues.

http://192.168.100.8:3480/data_request?id=action&output_format=xml&DeviceNum=486&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0

remove output_format=xml, it’s not necessary. if you still have problems, I will add a new feature to have a short url to update these virtual devices in my backlog and add it in a future release - or over the week-end, depending on how fast I am to fix other things I have in my pipeline.

I find it strange that i am able to use a url of that length with no issues.

It doesn’t work, the same error tells me that the url is too long.
Thanks for the quick answers.

try rebooting device, and if that fails reset to factory and reinclude

Ps/ this is different topic , to update device set Status not SetTarget, if you set target the virtual http device will send the request to the shelly.
edit/ just noticed that you are using action
not variableset also,

http://192.168.100.8:3480/data_request?id=variableset&DeviceNum=486&serviceId=urn:upnp-org:serviceId:SwitchPower1&Variable=Status&Value=0
1 Like

The accepted url length is up to 127 characters.

Where are you getting that info as i am using 148 characters

Edit-
255 is the most it will let me enter.
As soon as i enter 256 the text turns red.

I tested.
If I use url like this: http://192.168.100.8:3480/data_request?id=variableset&output_format=json&DeviceNum=486&serviceId=urn:upnp-org:serviceId:SwitchP
I have no error

If I add only one character I have an error.

Are you running the latest firmware? 20200320-123430/v1.6.2@514044b
what device are you using android,ios,pc or mac
If so have you tried factory reset and re-including

The current Firmware version of your Shelly device is 20200309-104051/v1.6.0@43056d58 No newer firmware available.

must be your shelly version mine is V3

I also tried resetting …

You will have to wait for @therealdb to find time to add a short url fix, or maybe contact shelly support they may have a fix.

Thanks. I will wait.

While I integrate it in the plug-in, just place this in your startup code:

 -- /port_3480/data_request?id=lr_updateSwitch&device=170&status=0
function lr_updateSwitch(lul_request, lul_parameters, lul_outputformat)
	local devNum = tonumber(lul_parameters["device"], 10)
	local status = tonumber(lul_parameters["status"] or "0")
	luup.variable_set("urn:upnp-org:serviceId:SwitchPower1", "Status", status or "1", devNum)
end

luup.register_handler("lr_updateSwitch", "updateSwitch")

and call it via

http://192.168.1.3:3480/data_request?id=lr_updateSwitch&device=214&status=0

Status could be 0 or 1, to turn off/on. I just added it to the doc anyway, and I will add this feature in the next update of the plug-in, probably. You don’t need to call the SetTarget action, as @ElCid suggested, because you are actually just updating a variable. If you call SetTarget, it will go into a loop - the device trying to update the Shelly and so on - and it’s not what you want :slight_smile:

It works, thank you very much.

I have 8 Shelly double relays, can I make them all work?

Works …
I tried two relays.

@therealdb thousands of thanks

1 Like

I just released a minor version to GitHub. Just code cleaning and stabilization. I will not push it to the Store soon, so grab it if you want.

1 Like