device last update wrong - is this a bug?

Moderator: leecollings

Post Reply
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

device last update wrong - is this a bug?

Post 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?

Image
Image
(in the second screen shot the wrong sensor is marked, but you get the idea)
User avatar
jvdz
Posts: 2332
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: device last update wrong - is this a bug?

Post by jvdz »

What does the log show for this device?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: device last update wrong - is this a bug?

Post by renerene »

here is the log:
Image
User avatar
Siewert308SW
Posts: 290
Joined: Monday 29 December 2014 15:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: device last update wrong - is this a bug?

Post by Siewert308SW »

If you run the script again does the time update?
Looks like it aint triggered.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: device last update wrong - is this a bug?

Post 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
Image
Image

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest