Profile Timestamps not updating

I am on OH 3.1, and I have found that many of my DateTime items using [profile="system:timestamp-update"] are not updating. I have seen this in mqtt and zwave bindings:

Here are example mqtt items:

/*printer Updates */
String dp200_status                     "Status [%s]"                                   <msg>           (g3DWOX)        { channel="mqtt:topic:dp200:status" }
String dp200_print_status               "Print Status [%s]"                             <msg>           (g3DWOX)        { channel="mqtt:topic:dp200:print_status" }
String dp200_last_print                 "Last Print [%s]"                               <msg>           (g3DWOX)        { channel="mqtt:topic:dp200:last_print" }
String dp200_print_name                 "Print Name [%s]"                               <msg>           (g3DWOX)        { channel="mqtt:topic:dp200:print_name" }
String dp200_completion_time            "Completion Time [%s]"                          <clock>         (g3DWOX)        { channel="mqtt:topic:dp200:completion_time" }
String dp200_remaining_time             "Remaining Time [%s]"                           <clock>         (g3DWOX)        { channel="mqtt:topic:dp200:remaining_time" }
Number:Temperature dp200_nozzel_temp    "Nozzle temperature [%d °C]"                    <temperature>   (g3DWOX)        { channel="mqtt:topic:dp200:nozzel_temp" }
Number:Temperature dp200_bed_temp       "Bed temperature [%d °C]"                       <temperature>   (g3DWOX)        { channel="mqtt:topic:dp200:bed_temp" }
Number dp200_failures                   "Detected Failures [%d]"                        <error>         (g3DWOX)        { channel="mqtt:topic:dp200:failures" } 
Number dp200_spag_threshold             "Detection Threshold [%.3f]"                                    (g3DWOX)        { channel="mqtt:topic:dp200:spag_threshold" }
Number dp200_progress                   "% complete [%d%%]"                             <number>        (g3DWOX)        { channel="mqtt:topic:dp200:progress" }
Dimmer dp200_progress_bar               "% complete [%d%%]"                             <3dprinter>     (g3DWOX)        { channel="mqtt:topic:dp200:progress_bar" }
DateTime dp200_last_update              "Last Update [%1$ta %1$tR]"                     <clock>         (g3DWOX)        { channel="mqtt:topic:dp200:progress" [profile="system:timestamp-update"], channel="mqtt:topic:dp200:print_status" [profile="system:timestamp-update"] }

The issue is with item dp200_last_update which should show the date/time of the last progress update or status update.

This is the log output:

2021-10-29 11:25:59.299 [DEBUG] [.thing.internal.CommunicationManager] - Received not accepted type 'DateTimeType' for channel 'mqtt:topic:dp200:progress'
2021-10-29 11:25:59.299 [DEBUG] [.thing.internal.CommunicationManager] - Received event '2021-10-29T11:25:59.299169-0400' (DateTimeType) could not be converted to any type accepted by item 'dp200_last_update' (DateTime)

However it doesn’t seem to be confined to the MQTT binding, as I get this also for some zwave devices:


Switch  AeonMS6MotionS1 "Basement Workshop MS Motion [MAP(]" <motion> (gB, Sensors, Motion_Chart, Motion) {channel="zwave:device:controller:node32:sensor_binary"}
Switch  AeonMS6MotionS "Basement Workshop MS Motion [MAP(]" <motion> (gB, Sensors, Motion_Chart, Motion) {channel="zwave:device:controller:node32:alarm_motion"}
Number  AeonMS6BatteryS   "Basement Workshop MS Battery [%d%%]" <battery>  (gB, Sensors, Battery) {channel="zwave:device:controller:node32:battery-level"}
Number:Temperature  AeonMS61S "Temperature [%.1f °C]" <temperature> (gB, Sensors, Max_Temperature) {channel="zwave:device:controller:node32:sensor_temperature"}
Number  AeonMS62S "Humidity [%.1f%%]" <humidity> (gB, Sensors) {channel="zwave:device:controller:node32:sensor_relhumidity"}
Number  AeonMS63S "Lux [%.1f Lux]" <sun> (gB, Sensors) {channel="zwave:device:controller:node32:sensor_luminance"}
Number  AeonMS64S "UV [%.1f UV]" <sun> (gB, Sensors) {channel="zwave:device:controller:node32:sensor_ultraviolet"}
Switch  AeonMS65S "Vibration [MAP(]" <motion> (gB, Sensors, Vibration_Chart) {channel="zwave:device:controller:node32:alarm_tamper"}
DateTime AeonMS6LastUpdatedS "Last Update [%1$ta %1$tR]"    <clock>   {channel="zwave:device:controller:node32:sensor_temperature" [profile="system:timestamp-update"], channel="zwave:device:controller:node32:alarm_motion" [profile="system:timestamp-update"]}


2021-10-29 11:25:58.786 [DEBUG] [rnal.profiles.TimestampUpdateProfile] - Received state update from Handler, sending timestamp to callback
2021-10-29 11:25:58.787 [DEBUG] [.thing.internal.CommunicationManager] - Received not accepted type 'DateTimeType' for channel 'zwave:device:controller:node32:alarm_motion'
2021-10-29 11:25:58.788 [DEBUG] [.thing.internal.CommunicationManager] - Received event '2021-10-29T11:25:58.787008-0400' (DateTimeType) could not be converted to any type accepted by item 'AeonMS6LastUpdatedS' (DateTime)
2021-10-29 11:25:58.789 [DEBUG] [pdb.internal.MapDbPersistenceService] - store called for AeonMS6LastUpdatedS
2021-10-29 11:25:58.789 [DEBUG] [pdb.internal.MapDbPersistenceService] - Stored 'AeonMS6LastUpdatedS' with state '2021-10-29T11:25:58.787008-0400' as '{"name":"AeonMS6LastUpdatedS","state":"org.openhab.core.library.types.DateTimeType@@@2021-10-29T11:25:58.787008-0400","timestamp":"Oct 29, 2021, 11:25:58 AM"}' in MapDB database

Any idea what is wrong?

The logs indicate an error converting to DateTime. Maybe this link will help:

I have never seen anyone try to put two timestamp channels into a single item. I suspect that this is the problem.

Does everything work as expected when you have only one profile configured for each of these items?

I suggest that a better way to achieve what you are hoping for (one item that shows the most recent timestamp from several channels) is to set up each channel timestamp with it’s own item and then put all those items into a group. A group with DateTime items in it can have an aggregation function that sets the group’s state to either the earliest or latest member DateTime value.

There was a problem with this in OH2 and OH 3.0, but the fix should be in 3.1

Looks like a more recent change has broken something different.