Support for Xiaomi Vacuum S20+ to Xiaomi Miio integration

Hi, I bought a Xiaomi Vacuum S20+ and tryed the Xiaomi Miio integration, but it says it is not supported.

i have found Xiaomi Miot Auto Hacs integration, but it doesn’t support all features

the exact model is: “xiaomi.vacuum.b108gl”

I’m in the same situation. I’m interested in a solution. Thank you

Hello,

I was able to integrate my S20+ thanks to the Miiot Auto integration and thank this file :

You need to add the lines of code corresponding to xiaomi.vacuum.b108gl in your device_customizes.py file (custom_components/xiaomi_miot/core/device_customizes.py).

Hi @AppleBe,
It seems like the code you are suggesting to use has been merged into master. Am I seeing that right?

I have installed the latest versions of HACS and Xiaomi Miot Auto. However, when I click “add integration” and fill in my credentials it’s not showing the device. Was there anything you had to do to make it work beyond those steps?

Any update on this? The S20+ is working fine with the HACS Miot-integration, but it doesn’t seem to support rooms and can only clean the whole map.

I have figured out how to send the robot to a room.

From miot specs:

ssid: 2
aid:13
params: [“{"room":[5]}”]

For S20+

*** Start cleaning with the active room parameters in square brackets ***

action: xiaomi_miot.call_action
data:
  entity_id: vacuum.xiaomi_b108gl_ca95_robot_cleaner
  siid: 2
  aiid: 13
  params:
    - "{\"room\":[9,12]}"

*** Set up rooms cleaning ***

action: xiaomi_miot.call_action
data:
  entity_id: vacuum.xiaomi_b108gl_ca95_robot_cleaner
  siid: 2
  aiid: 10
  params:
    - "{\"room_attrs\":[{\"id\":8,\"room_name\":\"Alex\",\"fan_level\":2,\"water_level\":1,\"clean_mode\":1,\"clean_times\":1,\"mop_mode\":0,\"on\":true}]}"

*** Start custom cleaning***

action: xiaomi_miot.call_action
data:
  entity_id: vacuum.xiaomi_b108gl_ca95_robot_cleaner
  siid: 6
  aiid: 7
  params: []

Did you fix it? I have the same problem. I do not know if it is related to 2Factor Authentification too.

I downloaded Xiaomi Miot from HACS. When I try to add it within the integrations menu and fill in my credentials and try to add the account, first time always fails. Second time works kind of (I do not get an error message directly) but there are no devices discovered.

Do I have to do some kind of setup in the App too to make it accessible?

Token Extractor doesn’t work too…

It works for me now!
Maybe this helps some of you:

I do not know why, but the automatic mode (when choosing between Local or Cloud) does not work for me. It failed every time as described previously.

I managed to get it working using the Local method. Afterwards the Automatic mode still doesn’t work, but the Cloud method works just fine.

Besides that I had the problem that the common Token retrieval tools did not work either. After I added the Cloud integration, the Token Scripts work too.

@jumate
Basic questions but how do you find out the room ids?

In attributes , vacuum_extend.room_info

Any chance of helping me out a bit more. If I take your first example, I get this error:

Any help would be greatly appreciated.

You need to add backslashes before room like this, and change the " as it copy pastes incorrectly. Here is a working automation YAML you can start from

action: xiaomi_miot.call_action
data:
  entity_id: vacuum.xiaomi_b108gl_2dd7_robot_cleaner
  siid: 2
  aiid: 13
  params:
    - "{\"room\":[4]}"

For yours it would be

action: xiaomi_miot.call_action
data:
  entity_id: vacuum.xiaomi_b108gl_8afe_robot_cleaner
  siid: 2
  aiid: 13
  params:
    - "{\"room\":[9,12]}"

Any access extracting the map from the S20+?
I tried Xiaomi Cloud Map Extractro but it fails.

Thank you so much for you help.
I have now got it working, but I am trying to be more fancy and set additional parameters. When I use the following:

It does run, but it doesnt clean 3 times. Any ideas what Im doing wrong?

I have a Xiaomi S20+ robot vacuum cleaner that works correctly with the Mi Home app. I have 2 maps configured with this application, one for the ground floor and one for the upper floor. In each map I have several rooms
I want to use Home Assistant to control it
I use the Xiaomi Miot Auto integration for this and I manage to launch the robot thanks to the explanations of “Jumate”, specialy the “set up rooms cleaning” followed by “start custom cleaning” Problem: it does not go to the right room when launching. I checked the attribute in vacuum_extend.room_info
I think it keeps the settings of the Mi Home application. Is there a prior initialization command ?

Nothing.

The S20+ doesn’t support that, there’s no option to set cleaning per room twice, like S10+ had in the app.

See also: https://www.reddit.com/r/RobotVacuums/comments/1hcy8j1/xiaomi_s20_owners_is_there_a_twice/

No.
Copy & paste the attributes and the actions here.

You must be doing something wrong.

I just bought the S20+ and setup the integration with individual room cleaning per button. Works without issues.

it’s (still) not supported, see: Request for Xiaomi S20+ ( xiaomi.vacuum.b108gl ) · Issue #563 · PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor · GitHub

Thank you “susko” for your message and help. I first started by cleaning room 4 Salon with the Mi Home app, then the robot returned to the base. I then wanted to send it to clean room 7 Couloir with the following script in home assistant. It returned to room 4
Script :

clean_couloir:
  sequence:
    # 1️⃣ Configure les paramètres de nettoyage pour le couloir
    - service: xiaomi_miot.call_action
      target:
        entity_id: vacuum.xiaomi_b108gl_8568_robot_cleaner
      data:
        siid: 2
        aiid: 10
        params:
          - "{\"room_attrs\":[{\"id\":7,\"room_name\":\"Couloir\",\"fan_level\":1,\"water_level\":1,\"clean_mode\":1,\"clean_times\":1,\"mop_mode\":0,\"on\":true}]}"

    # 2️⃣ Démarre le nettoyage avec les paramètres définis
    - service: xiaomi_miot.call_action
      target:
        entity_id: vacuum.xiaomi_b108gl_8568_robot_cleaner
      data:
        siid: 6
        aiid: 7
        params: []

Attribut from Home Assistant is : `
vacuum_extend.status_extend: 0
vacuum_extend.room_info: {"version":2,"room_attrs":[["id","room_name","fan_level","water_level","clean_mode","clean_times","mop_mode","on"],[3,"Couture",2,1,3,1,0,false],[4,"Salon",2,1,1,1,0,true],[5,"Cuisine",2,2,1,1,0,false],[6,"Wc vestiaire",2,2,1,1,0,false],[7,"Couloir",2,1,1,1,0,false]]}