I am trying to figure out how to use the openurl() command. How is this suppose to work?
I want to fetch a status for a wifi device by this command (http://10.0.0.99/json?cmd=status) This is not the Domoticz server.
When doing this in a browser i get:
"{"successful": true, "name": "430x", "status": {"status": 2, "stopped": false, "duration": 592, "mode": 0, "battery": 55, "hours": 773}, "timer": {"status": 1}, "wlan": {"signal": -70}}"
To debug i´ve tried this:
Code: Select all
local url = 'http://10.0.0.99/json?cmd=status'
local urlReply = domoticz.openURL(url)
domoticz.log("Status URL" .. urlReply)
"attempt to concatenate local 'urlReply' (a nil value)"
"Error opening url: http://10.0.0.99/xml?cmd=status"
Am I trying the impossible here?
(running on Raspi3 and latest beta)