Page 1 of 1
device last update wrong - is this a bug?
Posted: Saturday 28 January 2017 12:06
by renerene
I've bought a contact switch that sends ON signals to two sensors in Domoticz. When writing a Lua scipt to set a variable (open/close) I found this strange bug. For one of the two devicees the update time is correct under 'setup -> devices' and 'switches' but wrong in the 'show current states' LUA section.
Is this a bug?

(in the second screen shot the wrong sensor is marked, but you get the idea)
Re: device last update wrong - is this a bug?
Posted: Saturday 28 January 2017 12:13
by jvdz
What does the log show for this device?
Jos
Re: device last update wrong - is this a bug?
Posted: Saturday 28 January 2017 13:27
by renerene
here is the log:

Re: device last update wrong - is this a bug?
Posted: Saturday 28 January 2017 13:32
by Siewert308SW
If you run the script again does the time update?
Looks like it aint triggered.
Re: device last update wrong - is this a bug?
Posted: Saturday 28 January 2017 13:48
by renerene
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.