[miio binding] Last Clean summary

Hello!

There might be something changed in Roborock S5 max version about last clean summary.
With debug i can see that:

Command added to Queue {"id":3934,"method":"get_clean_summary","params":[]} -> ...

But when the result returns it’s not json and openhab can’t “unpack” it …

2022-02-05 20:19:53.039 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for rocky type: CLEAN_SUMMARY_GET, result: [193607,3242590000,204,[1644084330,1644080461,1643910871,1643910588,1643734119,1643733920,1643654195,1643653431,1642944480,1642868801,1642772591,1642339681,1642338785,1642335327,1642335219,1642266702,1642181741,1642181566,1639229381,1639228742]], fullresponse: {"result":[193607,3242590000,204,[1644084330,1644080461,1643910871,1643910588,1643734119,1643733920,1643654195,1643653431,1642944480,1642868801,1642772591,1642339681,1642338785,1642335327,1642335219,1642266702,1642181741,1642181566,1639229381,1639228742]],"id":3992}

Info about environment:
Device: Roborock S5 max (Rocky :slight_smile: )
Firmware: 3.5.8_1566
Model: roborock.vacuum.s5e
Binding version: 2.5.12 (from bundle:list)
Openhab2 version: 2.5.12

Is there anything i’m missing or that’s “known problem” ?

Regards,
Martin

The first part of the debug information seems to be an extract / parsed part of the JSON that is returned.
The second part ( fullresponse ) is the JSON answer that is returned.
Checking the JSON fullresponse in a JSON checker it shows that it is valid JSON code that is returned.

Searching for get_clean_summary e.g. the page XiaomiRobotVacuumProtocol/clean_summary+record.md at master · marcelrv/XiaomiRobotVacuumProtocol · GitHub
is returned. An example there shows exact the same layout of the JSON answer.
So I would conclude the JSON returned part is correct.

How do you know that openhab can’t unpack / parse it ?

Hi! I was looking only items and totally forgot events :frowning:.

Now when i looked events all should be ok, but still Last clean record in frontend is empty :frowning:

In events i do have:

2022-02-06 14:01:26.581 [vent.ItemStateChangedEvent] - RockyLastCleanRecord changed from {"start":"2022-02-05T20:05:30+02:00[Europe/Tallinn]","end":"2022-02-05T20:08:05+02:00[Europe/Tallinn]","duration":2,"area":2.9025,"error":0,"finished":1} to {"start":"2022-02-06T13:58:56+02:00[Europe/Tallinn]","end":"2022-02-06T14:01:22+02:00[Europe/Tallinn]","duration":2,"area":2.8425,"error":0,"finished":1}

What seem’s correct.
As i remember i had the same value in frontend as text and dates as welll but now they seem empty :frowning:

So this was the main idea behind my question …

And my items file is:

DateTime    RockyLastCleanStartTime     "Cleaning start"             (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_start_time"}
DateTime    RockyLastCleanEndTime       "Cleaning end"               (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_end_time"}
Number      RockyLastCleanArea          "Cleaning area"              (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_area"}
Number      RockyLastCleanDuration      "Cleaning duration"          (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_duration"}
Number      RockyLastCleanError         "Error"                      (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_error"}
Switch      RockyLastCleanFinish        "Cleaning finished []"	     (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_finish"}
String      RockyLastCleanRecord        "Cleaning record"            (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_record"}

What seems to bo ok as well …

I have no idea wehre to look or what might be wrong …

Regards,
Martin

After waiking up i figured out what was wroong with my config.

DateTime    RockyLastCleanStartTime     "Cleaning start [%s]"             (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_start_time"}
DateTime    RockyLastCleanEndTime       "Cleaning end [%s]"               (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_end_time"}
Number      RockyLastCleanArea          "Cleaning area "              (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_area"}
Number      RockyLastCleanDuration      "Cleaning duration"          (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_duration"}
Number      RockyLastCleanError         "Error"                      (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_error"}
Switch      RockyLastCleanFinish        "Cleaning finished [%s]"	     (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_finish"}
String      RockyLastCleanRecord        "Cleaning record [%s]"            (gVacHist)         {channel="miio:vacuum:rocky:cleaning#last_clean_record"}

i was missing [%s] and that was the reason of my problem.

Thanks for awesome binding!

1 Like