The cleaning#last_clean_start_time and cleaning#last_clean_end_time should display the correct timestamps of the last cleaning operation.
Current Behavior
After upgrading from openHAB v4.1.3 to v4.2.1, the times cleaning#last_clean_start_time and cleaning#last_clean_end_time both display 01.01.70 01:33:44, which is incorrect.
In the cleaning#last_clean_record, the following data is observed:
It appears that the Unix timestamps from the XiaomiRobotVacuumProtocol (as seen in the debug log below) are not being parsed correctly. Instead of being fully interpreted, only the year is extracted, which is then incorrectly treated as a timestamp. This results in the channels not displaying the correct datetime.
The associated debug log shows:
Received response for device 0F989D8D type: CLEAN_RECORD_GET, result: [[1724174413,1724174459,46,770000,0,0,2,3,60]], fullresponse: {"result":[[1724174413,1724174459,46,770000,0,0,2,3,60]],"id":7028}
Possible Solution
It seems the issue might be related to the way the start and end fields are parsed as timestamps. In the debug log, the CLEAN_RECORD_GET response contains two Unix timestamps, 1724174413 and 1724174459, which should be correctly parsed. These correspond to the dates:
1724174413 -> 2024-08-20 14:46:53
1724174459 -> 2024-08-20 14:47:39
Adjusting the parsing logic to correctly handle these values should resolve the issue.
Steps to Reproduce (for Bugs)
Upgrade openHAB from v4.1.3 to v4.2.1.
Start and complete a cleaning operation with the Roborock S5 Max.
Check the cleaning#last_clean_start_time and cleaning#last_clean_end_time after the cleaning operation.
Your Environment
Version used: openHAB v4.2.1, [miio] binding
Model ID: roborock.vacuum.s5e
Environment name and version: OpenJDK 17.0.12 (2024-07-16)
Expected Behavior
The
cleaning#last_clean_start_time
andcleaning#last_clean_end_time
should display the correct timestamps of the last cleaning operation.Current Behavior
After upgrading from openHAB v4.1.3 to v4.2.1, the times
cleaning#last_clean_start_time
andcleaning#last_clean_end_time
both display01.01.70 01:33:44
, which is incorrect.In the
cleaning#last_clean_record
, the following data is observed:It appears that the Unix timestamps from the XiaomiRobotVacuumProtocol (as seen in the debug log below) are not being parsed correctly. Instead of being fully interpreted, only the year is extracted, which is then incorrectly treated as a timestamp. This results in the channels not displaying the correct datetime.
The associated debug log shows:
Possible Solution
It seems the issue might be related to the way the
start
andend
fields are parsed as timestamps. In the debug log, theCLEAN_RECORD_GET
response contains two Unix timestamps,1724174413
and1724174459
, which should be correctly parsed. These correspond to the dates:1724174413
->2024-08-20 14:46:53
1724174459
->2024-08-20 14:47:39
Adjusting the parsing logic to correctly handle these values should resolve the issue.
Steps to Reproduce (for Bugs)
cleaning#last_clean_start_time
andcleaning#last_clean_end_time
after the cleaning operation.Your Environment
roborock.vacuum.s5e