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:
Items:
Switch AeonMS6MotionS1 "Basement Workshop MS Motion [MAP(motion.map):%s]" <motion> (gB, Sensors, Motion_Chart, Motion) {channel="zwave:device:controller:node32:sensor_binary"}
Switch AeonMS6MotionS "Basement Workshop MS Motion [MAP(motion.map):%s]" <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(vibration.map):%s]" <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"]}
Log:
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?