Skip to content

What are the differences between REST‐API "lastseen", "lastupdated" and "lastannouced" ?

BabaIsYou edited this page Sep 12, 2023 · 1 revision

What are the differences between lastseen, lastupdated and lastannouced ?

Let's take an example with this SonOff temperature sensor :

   "lastannounced": "2023-09-10T09:19:03Z",
   "lastseen": "2023-09-10T09:19Z",
   "manufacturername": "eWeLink",
   "modelid": "TH01",
   "name": "Sensor",
   "state": {`
       "lastupdated": "2023-08-20T15:24:41.090",
       "temperature": 2602
   },
   "swversion": "20201026",
   "type": "ZHATemperature",

lastannounced is the time when deCONZ last received a Device Announcement from the device. Typically devices send this on firmware boot (i.e. after power cycle) and when paired to a network.

lastseen is the time when deCONZ last received any message from the device. To limit the update rate, this field uses a resolution of one minute.

lastupdated is the time when deCONZ last received a Report Attributes message (or Read Attributes Response message with a new value) from the device, for the Zigbee attribute corresponding to the state item (in our example it's "temperature").

In our example, the state hasn't been updated for quite some time. This might indicate a misconfigured binding or attribute reporting, or an almost empty battery (causing the device no longer to take or communicate measurements).

When lastseen is a long time ago, the device might have dropped off the network.

When lastannounced is updated often spontaneously, it could indicate faulty device firmware, causing a reboot. You would expect this to be updated regularly on lights behind traditional 20th century wall switched, cutting the power to the light.

Please note that most timestamps have a resolution of one second except lastupdated that uses a resolution in milliseconds for handling multiple button events in the same second and lastseen has a resolution of one minute because we don’t want to issue too many notifications.

Also note that use of reacheable is deprecated (#2590)

Clone this wiki locally