Incorrect lastUpdate.minutesAgo value in DzVents – 2025.2 (build 17252)

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
tomes
Posts: 32
Joined: Saturday 07 July 2018 22:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Incorrect lastUpdate.minutesAgo value in DzVents – 2025.2 (build 17252)

Post by tomes »

Domoticz version: 2025.2 (build 17252)
Platform: (Raspbian 13.2)

After upgrading to the latest beta version 2025.2 (build 17252), I noticed an issue with the lastUpdate.minutesAgo parameter in DzVents.

I am using OWFS 1-Wire temperature sensors.
The sensors update correctly — at least once per minute (confirmed in the device log and hardware level).

In my DzVents scripts, I check:

device.lastUpdate.minutesAgo

Since the last update, even though the sensor was updated less than a minute ago, Domoticz shows an increasing minutesAgo value indefinitely for randomly selected sensors.

The value keeps increasing as if the device had not been updated at all, while in reality:

The device value is changing correctly.

The device “Last Update” timestamp in the UI appears correct.

Only lastUpdate.minutesAgo in DzVents is incorrect.

The issue does not affect all sensors at once — it appears randomly on different OWFS devices.


The same scripts worked correctly in previous versions.
User avatar
gizmocuz
Posts: 2712
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Incorrect lastUpdate.minutesAgo value in DzVents – 2025.2 (build 17252)

Post by gizmocuz »

In the current beta, non-switch-alike sensors are now checked if the value has changed.
If it has not changed, then no even is fired.
I think in the OWFS code (but please check this!), the data is directly written into the database and bypasses the normal event routes.

I don't know the reason why you work with last_update, but you could maybe use the global data to store things.

If it is an issue, please open a github issue and mention this topic

The reason why I skip same values is that there are users (with ESPHome for instance) that receives many updates with the same value, sometimes multiple updates in a second. This caused the whole system to degrate.
I had a Zigbee wallplug that (for a still unknown reason) was spamming my zigbee network with 20 messages a second...

Most (if not all) scripts react on a 'state', if this state is not changed, there should be no reason to fire a script, last value should always be good as well.
Quality outlives Quantity!
meal
Posts: 114
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: France
Contact:

Re: Incorrect lastUpdate.minutesAgo value in DzVents – 2025.2 (build 17252)

Post by meal »

Hello,

To complement the information shared on the subject my understanding is the following:
- Domoticz does not update the LastUpdate information used by LUA or dzvent and does not fire event if the value has not changed. Thus saving CPU usage.
- However the LastUpdate information in domoticz.db is updated.

In my domoticz application I implemented the following use case:
I have installed ZWAVE plugs which are always activated to monitor the power consumed by water pumps.
Every 10 s the plug sends the current power to Domoticz.
- Power is null when the pump is not running .
- Power > 0 when the pump is activated in case of flood.
It allows also to know if the plug is alive by raising an alarm if no power information is submitted within a 30s delay. In that case it means either the power supply is down or the Zwave connection is down.

To achieve the last requirement I cannot use the "otherdevices_lastupdate" LUA function because it is updated only when power data changes but I read the LastUpdate data in the domoticz.db "DeviceStatus" table.

One improvement could be to have both information in LUA
- LastUpdate information showing the date of the last change (as currently)
- LastWriteDate information showing the latest writing date in the DB (improvement)

BR
meal
User avatar
gizmocuz
Posts: 2712
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Incorrect lastUpdate.minutesAgo value in DzVents – 2025.2 (build 17252)

Post by gizmocuz »

And what triggers your script? A timer?
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: Doler and 1 guest