lastUpdate from triggered device is now (0 seconds ago)  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Tjalling94
Posts: 4
Joined: Sunday 25 August 2019 14:54
Target OS: -
Domoticz version:
Contact:

lastUpdate from triggered device is now (0 seconds ago)

Post by Tjalling94 »

I'm running some dzVents scripts that use the 'lastUpdate' from the triggeredDevice. For some months the lastUpdate is the current time (or 1-2 sec old) while expect it to be the time it was updated before this script was called. I can't figure out what's wrong.

When I call the device using domoticz.devices('name').lastUpdate I get the same result. When calling another device, that is not triggered on that time, the lastUpdate is the time it was lastUpdated.

Code: Select all

return {
	on = {
		devices = {
			'Motion *',
			'MC *'
		}
	},
	execute = function(domoticz, device)
	    local lastTime = device.lastUpdate.minutesAgo; -- 0

Relevant log:

Code: Select all

Status: dzVents: Info: Handling events for: "MC bergkamer", value: "Open"
Status: dzVents: Info: ------ Start internal script: PIR notification when no phone: Device: "MC bergkamer (Zigbee2MQTT)", Index: 106
Status: dzVents: Info: ------ Finished PIR notification when no phone
Status: dzVents: Info: ------ Start internal script: Bergkamer: Device: "MC bergkamer (Zigbee2MQTT)", Index: 106
Status: dzVents: Info: ------ Finished Bergkamer
Edit: Domoticz Version: 2020.2, dzVents Version: 3.0.2
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: lastUpdate from triggered device is now (0 seconds ago)  [Solved]

Post by waaren »

Tjalling94 wrote: Tuesday 22 September 2020 22:01 I'm running some dzVents scripts that use the 'lastUpdate' from the triggeredDevice. For some months the lastUpdate is the current time (or 1-2 sec old) while expect it to be the time it was updated before this script was called. I can't figure out what's wrong.
This is a bug in latest Stable. It was fixed in build 12002
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest