Miio , Roborock S5 Max , no auto discovery

Hi all,

I started playing around with integrating my Roborock S5 Max vacuum cleaner into openHAB.

After installing the binding, and getting the token from the device, I got stuck now as the vacumm cleaner is not showing up in my inbox of openHAB…

Any hint what I’m doing wrong here?

  • I was expecting that openHAB at least discovers the device by itself…
  • I disabled the local firewall temporarily, with no change…

When adding the S5Max to a things file manually, I immediately get the error:

“Handler MiIoVacuumHandler of thing miio:vacuum:rrs5maxog tried updating channel consumables#consumable_reset although the handler was already disposed.”

How is discovery working for the miio binding?

  • I also doublechecked the output of “avahi-browse -a -t” , but could not find the vacuum cleaner in the list…
  • I also tried python “mirobo discover” without success…

Seems something general is wrong with my setup :frowning: .

=> Any hint would be greatly appreciated!

PS: Searching through many many sites didn’t take me toward fixing it…

Thanks and regards

Hi all,

although I was hesitating to move from the Roborock app to the Xiaomi Mi Home app I finally gave it a try. Especially after reading some posts on another forum, where people reported problems with loosing the connection from day to day while using the Roborock app, I decided to switch over.

Immediately after registering the vacuum cleaner with the Mi Home app, things started to work out way better :slight_smile:

=> For whatever reason I don’t know yet, the S5 Max seems to behave differently when registered within the Mi Home app.

Differences I found are:

  • it showed up in the list of avahi-browse (mDNS)
  • It showed up in the inbox of openHAB
  • I was able to integrate it into openHAB by using a things file successfully

Now it seems to work and I look forward for some more adjustments of my configuration soon…

Few things I want to write down here for all those struggling with similar issues:

  • Although intensively trying for many days, I had no chance to get it working while the S5 Max was registered with the Roborock app

  • It was not listed with mDNS and therefore not shown, e.g. on the output of avahi-browse

  • Although I had extracted the token successfully, with a method that is applied during the WiFi setup of the vacuum cleaner, it was not accessible with the python-miio tools, e.g. mirobo —ip x.x.x.x —token xxxxx status

  • Nor it was auto-detected by openHAB with the miio binding installed

  • After deleting from the Roborock app and adding it to the Mi Home app, it immediately showed up in mDNS

  • It immediately was added to the inbox of openHAB

  • (And I took a note of the deviceID shown in the openHAB inbox to add it to the things file later)

  • It was pretty easy to extract the token from the .sqlite file of the smartphone backup, following one of the various descriptions found on the Internet, including using the python miio-extract-token tool against the file

  • With the token the S5 Max became accessible within openHAB and also with the python-miio tools

  • While registering the vacuum cleaner multiple times in the apps I found it to have a different token each time! (Just want to mention this as it did not become clear to me from all the infos I read.)

However, it seems to work for me now :slight_smile:

I just wonder why the S5 Max seems to behave so different on the network, and would greatly appreciate any comment that clarifies this finding.




thanks for sharing your experience… I think it is really helpful for others.
Quick hint on the tokens: adding your cloud userId/pwd in Openhab will pull the token automatically without the need for tool to pull it from sqlite

1 Like

Thank you.
can you share the things and item files?
I’m having problems with configuring the thing.
I tried this:
Thing miio:vacuum:s50 “vacuum” @ “livingroom” [ host=“”, token=“xxxxxxx”, deviceId=“0470DDAA”, model=“roborock.vacuum.s5e”, communication=“cloud”]

The errors are:
no viable alternative at input ‘model’
no viable alternative at input ‘communication’


Hi Ahiel,
sorry for my late reply :frowning: … I was pretty busy the last weeks.

However, here is what I have in my things file:

Thing miio:vacuum:rrs5max01 "RR-S5Max-01" @ "City" [ host="192.168.xxx.yyy", token="12345678901234567890123456789012", deviceId="12345678", model="roborock.vacuum.s5e" ]

And this is what I have in my items file:

// Xiamo Roborock - GRUPPEN allgemein
Group  gVac                         "Xiaomi Robot Vacuum"                                               <fan>           (gKomponenten)

// Roborock S5Max 01
// Xiamo Roborock - GRUPPEN
Group  gRRS5Max01_Vac               "RR-S5Max-01 Staubsauger"                                           <fan>           (gVac)
Group  gRRS5Max01_VacStat           "RR-S5Max-01 Status (Details)"                                      <status>        (gRRS5Max01_Vac)
Group  gRRS5Max01_VacCons           "RR-S5Max-01 Verbrauchsmaterial"                                    <line-increase> (gRRS5Max01_Vac)
Group  gRRS5Max01_VacDND            "RR-S5Max-01 'Nicht-Stören'"                                        <moon>          (gRRS5Max01_Vac)
Group  gRRS5Max01_VacHist           "RR-S5Max-01 Reinigungsverlauf"                                     <calendar>      (gRRS5Max01_Vac)
Group  gRRS5Max01_VacLast           "RR-S5Max-01 Reinigungsverlauf (zuletzt)"                           <calendar>      (gRRS5Max01_Vac)
Group  gRRS5Max01_VacNetwork        "RR-S5Max-01 Netzwerk Details"                                      <network>       (gRRS5Max01_Vac)

// Xiamo Roborock - CONTROL
String RRS5Max01_actionControl      "Steuerung"                                                                         (gRRS5Max01_Vac)                         {channel="miio:vacuum:rrs5max01:actions#control" }
String RRS5Max01_actionCommand      "Befehl"                                                                            (gRRS5Max01_Vac)                         {channel="miio:vacuum:rrs5max01:actions#commands" }
Number RRS5Max01_actionFan          "Saugstärke [MAP(xiaomi_roborock_fanpower.map):%s]"                                 (gRRS5Max01_Vac)                         {channel="miio:vacuum:rrs5max01:actions#fan"}
Switch RRS5Max01_vacONOFF           "Staubsauger AN/AUS"                                                                (gRRS5Max01_Vac)   [ "Switchable" ]      {channel="miio:vacuum:rrs5max01:actions#vacuum" }

// Xiamo Roborock - STATUS
Number RRS5Max01_statusBat          "Akku [%1.0f %%]"                                                   <battery>       (gRRS5Max01_Vac,gRRS5Max01_VacStat)      {channel="miio:vacuum:rrs5max01:status#battery" }
Number RRS5Max01_statusArea         "Gereinigte m2 [%1.0f m²]"                                          <zoom>          (gRRS5Max01_Vac,gRRS5Max01_VacStat)      {channel="miio:vacuum:rrs5max01:status#clean_area" }
Number RRS5Max01_statusTime         "Reinigungszeit [%1.0f Min.]"                                       <clock>         (gRRS5Max01_Vac,gRRS5Max01_VacStat)      {channel="miio:vacuum:rrs5max01:status#clean_time" }
String RRS5Max01_statusError        "Fehler [MAP(xiaomi_roborock_error.map):%s]"                        <error>         (gRRS5Max01_Vac,gRRS5Max01_VacStat)      {channel="miio:vacuum:rrs5max01:status#error_code" }
Number RRS5Max01_statusFanPow       "Saugstärke [%1.0f %%]"                                             <signal>        (gRRS5Max01_VacStat)                     {channel="miio:vacuum:rrs5max01:status#fan_power" } 
Number RRS5Max01_statusClean        "Status Reinigung [%1.0f]"                                          <switch>        (gRRS5Max01_VacStat)                     {channel="miio:vacuum:rrs5max01:status#in_cleaning" }
Switch RRS5Max01_statusDND          "'Nicht-Stören' aktiv"                                                              (gRRS5Max01_VacStat)                     {channel="miio:vacuum:rrs5max01:status#dnd_enabled" }
Number RRS5Max01_statusStatus       "Status [%1.0f]"                                                    <status>        (gRRS5Max01_VacStat)                     {channel="miio:vacuum:rrs5max01:status#state"} 

// Xiamo Roborock - VERBRAUCH
Number RRS5Max01_consumableMain     "Hauptbürste verbleibend [%1.0f Std.]"                                              (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#main_brush_time"}
Number RRS5Max01_consumableMainP    "Hauptbürste [%1.0f %%]"                                                            (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#main_brush_percent"}
Number RRS5Max01_consumableSide     "Seitenbürste verbleibend [%1.0f Std.]"                                             (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#side_brush_time"}
Number RRS5Max01_consumableSideP    "Seitenbürste [%1.0f %%]"                                                           (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#side_brush_percent"}
Number RRS5Max01_consumableFilter   "Filter verbleibend [%1.0f Std.]"                                                   (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#filter_time" }
Number RRS5Max01_consumableFilterP  "Filter [%1.0f %%]"                                                                 (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#filter_percent" }
Number RRS5Max01_consumableSensor   "Sensoren verbleibend [%1.0f Std.]"                                                 (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#sensor_dirt_time"}
Number RRS5Max01_consumableSensorP  "Sensoren [%1.0f %%]"                                                               (gRRS5Max01_VacCons)                     {channel="miio:vacuum:rrs5max01:consumables#sensor_dirt_percent"}

// Xiamo Roborock - DND - Do not Disturb
Switch RRS5Max01_dndFunction        "Modus 'Nicht-Stören'"                                              <moon>          (gRRS5Max01_VacDND)                      {channel="miio:vacuum:rrs5max01:dnd#dnd_function"}
String RRS5Max01_dndStart           "'Nicht-Stören' Start [%s]"                                         <clock>         (gRRS5Max01_VacDND)                      {channel="miio:vacuum:rrs5max01:dnd#dnd_start"}
String RRS5Max01_dndEnd             "'Nicht-Stören' Ende [%s]"                                          <clock-on>      (gRRS5Max01_VacDND)                      {channel="miio:vacuum:rrs5max01:dnd#dnd_end"}

// Xiamo Roborock - HISTORY
Number RRS5Max01_historyArea        "Gesamtbereich m2 [%1.0f m²]"                                       <zoom>          (gRRS5Max01_VacHist)                     {channel="miio:vacuum:rrs5max01:history#total_clean_area"}
String RRS5Max01_historyTime        "Gesamtzeit [%1$tH:%1$tM h]"                                        <clock>         (gRRS5Max01_VacHist)                     {channel="miio:vacuum:rrs5max01:history#total_clean_time"}
Number RRS5Max01_historyCount       "Gesamtreinigungen [%1.0fx]"                                        <office>        (gRRS5Max01_VacHist)                     {channel="miio:vacuum:rrs5max01:history#total_clean_count"}

String RRS5Max01_lastStart          "Startzeit letzte Reinigung [%1$tA, %1$td.%1$tm.%1$ty %1$tH:%1$tM]" <clock>         (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_start_time"}
String RRS5Max01_lastEnd            "Endzeit letzte Reinigung [%1$tA, %1$td.%1$tm.%1$ty %1$tH:%1$tM]"   <clock>         (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_end_time"}
Number RRS5Max01_lastArea           "Zuletzt gereinigte m2 [%1.0f m²]"                                  <zoom>          (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_area"}
Number RRS5Max01_lastTime           "Dauer letzte Reinigung [%1.0f Min.]"                               <clock>         (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_duration"}
Number RRS5Max01_lastError          "Fehler [MAP(xiaomi_roborock_error.map):%s]"                        <error>         (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_error" }
Switch RRS5Max01_lastCompleted      "Letzte Reinigung abgeschlossen [%s]"                                               (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#last_clean_finish" }

// Xiamo Roborock - NETWORK
String  RRS5Max01_miNetSSID         "Netzwerk SSID [%s]"                                                                (gRRS5Max01_Vac,gRRS5Max01_VacNetwork)   {channel="miio:vacuum:rrs5max01:network#ssid" }
String  RRS5Max01_miNetBSSID        "Netzwerk BSSID [%s]"                                                               (gRRS5Max01_Vac,gRRS5Max01_VacNetwork)   {channel="miio:vacuum:rrs5max01:network#bssid" }
Number  RRS5Max01_miNetRSSI         "Netzwerk RSSI [%1.0f]"                                                             (gRRS5Max01_Vac,gRRS5Max01_VacNetwork)   {channel="miio:vacuum:rrs5max01:network#rssi" }
Number  RRS5Max01_miNetLife         "Uptime [%1.0f]"                                                                    (gRRS5Max01_Vac,gRRS5Max01_VacNetwork)   {channel="miio:vacuum:rrs5max01:network#life" }

// Xiamo Roborock - Cleaning Map
Image RRS5Max01_map                 "Karte"                                                                             (gRRS5Max01_VacLast)                     {channel="miio:vacuum:rrs5max01:cleaning#map"}

Mapping files (transforms) referred to are as follows:

  • xiaomi_roborock_error.map
No\ error=keine Fehler
0=keine Fehler
0.0=keine Fehler
Laser\ distance\ sensor\ error=Fehler Laserdistanzsensor
Collision\ sensor\ error=Fehler Kollisionssensor
Wheels\ on\ top\ of\ void,\ move\ robot=Räder ohne Haftung, Roboter bewegen
Clean\ hovering\ sensors,\ move\ robot=Schwebesensoren reinigen
Clean\ main\ brush=Hauptbürste reinigen
Clean\ side\ brush=Seitenbürste reinigen
Main\ wheel\ stuck?=Hauptrad blockiert?
Device\ stuck,\ clean\ area=Staubsauger festgefahren
Dust\ collector\ missing=Staubbehälter fehlt
Clean\ filter=Filter reinigen
Stuck\ in\ magnetic\ barrier=in Magnetschranke festgefahren
Low\ battery=Akkustand niedrig
Charging\ fault=Ladefehler
Battery\ fault=Akkufehler
Wall\ sensors\ dirty,\ wipe\ them=Wandsensoren verschmutzt
Place\ me\ on\ flat\ surface=auf flachem Untergrund platzieren
Side\ brushes\ problem,\ reboot\ me=Fehler Seitenbürste
Suction\ fan\ problem=Fehler Sauggebläse
Unpowered\ charging\ station=Ladestation ohne Strom
Unknown\ Error=unbekannter Fehler
NULL=Status unbekannt
  • xiaomi_roborock_fanpower.map
106=Angepasst (Auto)
106.0=Angepasst (Auto)
NULL=Status unbekannt

My sitemap file contains the following section for the RR-S5max:

Frame label="Roborock S5 Max 01" {
	Switch item=RRS5Max01_actionControl mappings=[vacuum="Saugen", pause="Pause",spot="Spot", dock="Dock"]
	Switch item=RRS5Max01_actionFan mappings=[38="Leise", 60="Normal", 77="Turbo",90="Max", -1="Angepasst"]
	Default item=RRS5Max01_statusBat 
	Default item=RRS5Max01_statusArea 
	Default item=RRS5Max01_statusTime 
	Group  item=gRRS5Max01_VacStat
	Group  item=gRRS5Max01_VacCons
	Group  item=gRRS5Max01_VacDND
	Group  item=gRRS5Max01_VacHist
	Group  item=gRRS5Max01_VacLast
	Group  item=gRRS5Max01_VacNetwork

Content mentioned above is probably not perfectly cleaned up. However, working for months now…

=> Hope this helps, if not too late :wink:


Thank you very much!
Just got my S5 Max two days ago, this is a very big help!

1 Like