This returns:
Code: Select all
{"temp":26.5,"hum":49.3,"ppmw":10853,"Speed status":44,"Internal fault":0,"Frost cycle":0,"Filter dirty":0,"AirQuality (%)":"not available","AirQbased on":0,"CO2level (ppm)":"not available","Indoorhumidity (%)":49,"Outdoorhumidity (%)":"not available","Exhausttemp (°C)":"not available","SupplyTemp (°C)":"not available","IndoorTemp (°C)":"not available","OutdoorTemp (°C)":"not available","SpeedCap":63488,"BypassPos (%)":"not available","FanInfo":"auto","ExhFanSpeed (%)":44,"InFanSpeed (%)":0,"RemainingTime (min)":0,"PostHeat (%)":"not available","PreHeat (%)":"not available","InFlow (l sec)":"not available","ExhFlow (l sec)":"not available","Ventilation setpoint (%)":44,"Fan setpoint (rpm)":1113,"Fan speed (rpm)":1116,"Error":0,"Selection":7,"Startup counter":16,"Total operation (hours)":184,"Absence (min)":0,"Highest CO2 concentration (ppm)":"not available","Highest RH concentration (%)":49,"RelativeHumidity":49.29,"Temperature":26.52}The temperature and humidity is not a problem, but the speed status is, since I don't know how to deal with spaces.
domoticz.log(item.json.Speed status) doesn't work
replacing "speed status" by "speed" using a local variable doesn't work also
does anyone has the
I wrote this script:
Code: Select all
return {
on = {
timer = {
'every 2 minutes',
},
httpResponses = { 'trigger' }
},
logging = {
-- level = domoticz.LOG_STATUS,
level = domoticz.LOG_DEBUG,
marker = 'itho-status',
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.1.220/api.html?get=ithostatus',
callback = 'trigger'
})
end
if (item.isHTTPResponse) then
if (item.ok) then
if (item.isJSON) then
local speed = "Speed status"
domoticz.log(item.json.temp)
domoticz.log(item.json.hum)
domoticz.log(item.json.speed)
end
end
end
end
}