02.03.2016, 08:46
Another approach is to map a specific read-only group address and send read requests from LM to check if the device is alive. This will work even over IP networks.
Code:
addr = '1/1/1'
-- send read request and wait for reply
grp.read(addr)
os.sleep(2)
-- get time difference between now and last telegram
obj = grp.find(addr)
delta = os.time() - obj.updatetime
if delta < 10 then
alert('Check OK')
else
alert('Check FAIL')
end