MIIO Binding - Roborock S4Max no longer getting Last Cleaning Details

I’ve been using openHAB with the MIIO binding for years with my Roborock S4Max vacuum. Recently I noticed that the items under the Last Cleaning Details are no longer getting updates:

  • Cleaning Start
  • Cleaning End
  • Cleaning Area
  • Cleaning Duration
  • Error
  • Cleaning Finished

All of these items just stay set as “NULL”. Everything else that I have items linked to seems to be fine.

I’m running openHAB 4.1.1 on openhabian on an RPI4.

Does anyone know if something change with the recently released versions of OH?

the roborock vacuums have multiple versions of last cleaning details responses.
Can you please send a debug log with a full refresh (preferably the first full refresh after binding (re)start) so I can see the exact responses your vacuum gives (and if there is some error shown)

Hi @marcel_verpaalen

Thanks for getting back to me on this. I’m not sure what it means for a full refresh, but I logged after starting a cleaning of a small room and let it finish and go back to the dock. I figured it should have sent the last cleaning details at the end of this. Log here:

Thanks for the log…
yes I can see the issue. Something wonky is happening with the date parsing.This will be fixable.

18:06:06.386 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Could not inform listener org.openhab.binding.miio.internal.handler.MiIoVacuumHandler@c8a451: 2024-02-05T18:05:35-05:00[America/New_York] is not in a valid format.: 
java.lang.IllegalArgumentException: 2024-02-05T18:05:35-05:00[America/New_York] is not in a valid format.

@marcel_verpaalen - this is great. Thanks for the super fast fix! LMK if you need me to test out anything. I don’t have a build env set up anymore, but if you have a jar for me to drop in and test out, I’m more than happy to do that.

sure. You can find the jar here


Thanks for this!

I’m running 4.1.1 on openhabian.

I removed the current binding and then dropped .jar you linked into /usr/share/openhab/addons.

I then restarted OH and am getting some errors. Not sure if there are other changes targeted for 4.2 which make this incomparable with 4.1.1 or if there is an issue. Logs here: 2024-02-06 13:52:32.821 [ERROR] [ernal.basic.MiIoDatabaseWatchService] - bundle - Pastebin.com

yes, that looks ugly. Most of the times the next version snapshots just work on the earlier version.
As the change is already merged, can you try tomorrows ‘official’ snapshot build (to exclude it was my complile that went wrong). If it is relate to 4.2 snapshot not being compatible, we can maybe try to build it on top of the 4.1 release.

So this morning I pulled down the latest snapshot of the addons, extracted out the miio .jar and dropped it into /usr/share/openhab/addons. This time it worked and I immediately got new values for all of my Last Cleaning Details. So there must have been some build issue that lead to those errors before.

Anyway, thanks for the help on this and the quick fix!


Actually looks like I am not getting Cleaning End - that is staying at NULL. LMK if you need me to post log.

yes pls


I stopped the binding and captured debug log on the restart. I don’t see a big error this time. I do see a response to CLEAN_SUMMARY_GET on line 29 with a bunch of unit time stamps, not sure how these map out to the different values. Maybe there is an issue getting this parsed and mapped the Cleaning End?

Got it…


Today I grabbed the latest .jar and dropped it in my /usr/share/openhab/addons dir and restarted the binding. I now get a date filled in for Last Cleaning End, but it appears that both last cleaning start and last cleaning end are both set to (about) the unix epoch

2024-02-10 12:17:14.208 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘lastEnd’ changed from NULL to 1970-01-01T00:33:44.000+0000

I ran a cleaning cycle and this did not change.

The .jar I grabbed I extracted from this .kar:

It appears to be dated after your changes were incorporated, but is it possible this doesn’t have the latest change?

Thanks again for your work on this!

I’m not sure . I think that is updated after every PR. I have multiple parallel .

I’ll sure not check the coming week as I’m on holidays.
But based on the change, both the start and end date should have changed.

The issue was that I filled the start field twice, first with the start date and then overwritten it with the end date. Result… End date was never updated, start date was updated with the end date.

Suggest to pull in from the snapshot build in a few days once more. If the issue remains ill need to look but deeper. Let me know than

1 Like