Did someone knows how to retrieve the values of the log of temperature in a "device lua script" ?
I'm looking to check on the 20 last statements if the temperature has gone under 0°C. (It's a condition to use a rolling shutter for veranda roof)
I planned to decode Json of http://127.0.0.1:8081/json.htm?type=gra ... &range=day
But I didn't succeed with this script. (as I have explaned here : viewtopic.php?f=23&t=9662)
Code: Select all
commandArray={}
if (devicechanged['ManualLaunchScript'] == 'On' and otherdevices['ManualLaunchScript'] == 'On') then
commandArray['ManualLaunchScript']='Off'
local handle=assert(io.popen("curl.exe http://127.0.0.1:8081/json.htm?type=graph&sensor=temp&idx=69&range=day"))
local JMLresponse = handle:read('*all')
handle:close()
print(JMLresponse) --debug
end
return commandArray