I'm new to Domoticz, and also LUA. What i'm trying is overlaying multiple temperature (sensors) data in a single graph, including the setpoint temp of my Toon thermostat.
I tried building a (what should be) really easy script including the dummy sensor described in multiple topics. I tried to follow the Weatherunderground temperature scraping example, and modified it slightly in which I thought it should work.... however it doens't.
Can somebody please advice me/looking at this script? As can be seen in the attachment it is printing the input ( Room Setpoint --> sWeathertemp ), however it does not update the dummy temp sensor Setpoint ( idx 18 ).
Looking at the script it's also repeating once triggered, how can I stop it after 1 cycle?
( For me it would be easier if this would have been possible in blockly )
Code: Select all
local sensorwu = 'Room Setpoint' --sensor from wunderground
local idx = 1 --idx of your virtual temp sensor of wunderground
commandArray = {}
if devicechanged[sensorwu] then
sWeatherTemp = otherdevices_svalues[sensorwu]:match("([^;]+)")
sWeatherTemp = tonumber(sWeatherTemp)
commandArray['UpdateDevice'] = idx .. '|18|' .. tostring(sWeatherTemp)
print(sWeatherTemp)
print(sens_temp)
end
return commandArray