[SOLVED] ZWave Item Last Update Time (DateTime) - is this broken or has syntax changed?

  • Platform information:
    • Hardware: Raspberry Pi 4/4GB
    • OS: OpenHabian
    • openHAB version: 2.5M1

I’ve been trying to create a DateTime Item to monitor the last update time for a ZWave sensor item (Aeotec Multisensor 6).

OpenHAB, documentation (here: https://docs.openhab.org/v2.1/addons/bindings/zwave1/readme.html#aeotec-multi-sensor-6) suggests this is the format for the DateTime Item in the .items file:

DateTime LastUpdatedTime "Last update [%1$tH:%1$tM]" (GroupName) { zwave="<zwave_device_ID>:command=info,item=LAST_UPDATE" }

My actual entry is:

DateTime LastUpdatedTime "Last update [%1$tH:%1$tM]" {zwave="1139f694:command=info,item=LAST_UPDATE"}

My sitemap file contains this line:

Text item=LastUpdatedTime icon="time"

However, in my rendered sitemap I only get “Last update -:-”. No errors in the log.

Other items from the same sensor are updating and displaying OK.

Any ideas?

I don’t think that this has ever been possible to do this in the OH2 ZWave binding.

I think this is probably the openHAB V1 binding that is documented in the link you reference since it states “There is also a binding specifically for openHAB 2.”

The /zwave1 in the URL indicates the v1 binding.

Yes, it looks like ‘LAST_UPDATE’ was part of the ‘INFO’ Command class in the V1 binding.

There’s no mention of an equivalent in the V2 binding, unless it simply has not been documented yet.

Chris, the primary developer said he did not think it is possible in the v2 binding. That is a pretty definitive answer.

No - there is nothing equivalent in OH2. These sorts of items are left to the OH core - if OH wants to have a “time of last update” for an item, then it should be available for all items on all bindings. Therefore it was not added to ZWave.

1 Like

It does now (as of 2.5 M4 I think). There is a new Profile that you can use for this now. See Design Pattern: Time of Last Update.


@rlkoshak Thanks for that. I tried it and it works a treat!

In case it helps someone else, the Item entry needs to look like this:

DateTime DeviceLastUpdate   "Last update [%1$tH:%1$tM %1$td/%1$tm/%1$ty]"   <time>  {channel="zwave:device:1139f694:node13:sensor_temperature" [profile="timestamp-update"]}

My device is an Aeotec Multisensor so has several sensor data values. It looks like you need to specify the actual endpoint (i.e. after ‘node13’) above. If this isn’t specified the Item is NULL.