I’m not familiar with espunta, but if it have the ability to read the status of the device, you can update the device back in Vera. What are you using and which device are you trying to update?
I have a section in the lua file that will retrieve status but nothing happened.
The string for retrieving status is correct and works: http://192.168.11.35/api/relay/0?apikey=AD85853842A75C69&status
0 is off
1 is on
I must have written something wrong … that I do not see …
in your code, you’r looking for status = 0, but it’d be better to look for httpStatusCode (3rd param). the first parameter is not the content.
try this in GetRemoteStatus:
local status, result, statusCode = luup.inet.wget(url,6)
if statusCode == 200 then
luup.variable_set("urn:upnp-org:serviceId:SwitchPower1", "Status", result, parentDevice)
end
So greatful for your help, but…
Your suggested solution does not work
The online status works which is annoying because the on/off-status is more important.
I can control these switches via external buttons and after external change the status is no longer correct
doesn’t work is too generic. start with executing the code directly and by logging each variable. when the code is working, you can start integrating it back into the plug-in,
Best Home Automation shopping experience. Shop at Ezlo!