I'm using the current ZigBee2MQTT plugin and a bunch of Xiaomi Aqara sensors. The sensors send a heartbeat approximately every 50 minutes. This heartbeat updates the Last Seen time, so I want to write a script similar to the "Dead Devices" script I found in this forum to send a notification if a sensor hasn't been heard for (say) 3 x 50 minute heartbeat.
The problem is that all the scripts seem to use lastUpdate e.g.:
Code: Select all
local minutes = domoticz.devices(name).lastUpdate.minutesAgo
I get a huge list of properties... but the only timestamp in there is the useless (to me anyway) "lastUpdate" time. How do I use dzVents to access "Last seen"?