(23.11.2020, 08:08)admin Wrote: This method won't work with TCP-RTU gateway. One solution is to check updatetime value of a linked object periodically and set status if it was not updated for a certain time.
ok, cool it's a way I could do it !
Maybe, put a tag like 'towatch', and check difference betaween date now and uptime
Something like this:
obj1 = grp.find('x/x/x')
objError= grp.find('x/x/x')
now = os.time() -- current timestamp in seconds
delta1 = now - obj1.updatetime -- last object update relative time
if (delta1 > 240) then
objError:write(true)
end
DO you know why it's not implemented ? It works for rtu, and if the gateaway don't respond...
Thank you for helping
TIPS: https://forum.logicmachine.net/showthrea...updatetime
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT