The timedOut (dzvents) is not the same as the HaveTimeout (API HTTP)
The right value is HaveTimeout (API HTTP): when the device widget is red, it return true.
The timedOut (dzvents) is random (sometime true, sometime false).
Here is my code for dzvents:
Code: Select all
return {
on = {
timer={ 'every minute'}
},
execute = function(domoticz, timer)
print('---------------------timeout veilleuse ' .. tostring(domoticz.devices('veilleuse').timedOut) .. ' timeout hue ' .. tostring(domoticz.devices('Hue').timedOut))
end
}http://192.168.0.4:8080/json.htm?type=devices&rid=139
Note: There is the same problem with last update.
LastUpdate (dzvents) return the device last update (with change of the value)
LastUpdate (API HTTP) return the widget last seen value (with or without value change)
Both value should be the same. Last seen and last update are 2 différents concepts. In my opinion, last seen and last update should be avaiable in dzvents and API HTTP.
Note2: In the past, it was nécessary to activate HTTP Fetching according to this (line timedout)
https://github.com/dannybloe/dzVents
Is HTTP fetching enabling still necessary (I don't know how to do this).