sometime the lua table (button 'show current states, bottom right in events) updates the values, but the shown table is not in sync with the table under 'devices'. The update time under 'devices' is correct.
Here another example. Time between screenshots is ca. 5 secondes,with no fysical change of the sensor in the meanwhile
This script gets triggered after every sensor state, verything ok in the log.
O've tried both
otherdevices_lastupdate[sensor] and
devicechanged methods, but because of the sync problem they do not work reliable.
Code: Select all
so = 'deurBrittOpen'
sc = 'deurBrittClosed'
tc = next(devicechanged)
v = tostring(tc)
if v ==so then print ('deur open')
elseif v==sc then print ('deur dicht') end
I've succesfully made ca. 20 LUA scripts, this is the first time this has happened to me. It is the first time is use Lightning4 protocol, which is needed to read this KeruiD026 doorswitch.