al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
5k stars 709 forks source link

unable to clean single room with S20+ #2037

Closed lucasabba closed 1 month ago

lucasabba commented 1 month ago

Hi, I'm trying to clean a single room (ID 3) with my Xiaomi S20+.

HA version: 2024.12.1 (same problem with older version) hass-xiaomi-miot version: latest available Xiaomi model: Xiaomi S20+

I tried the following action, but the robot starts cleaning all rooms:

data:
  entity_id: vacuum.xiaomi_b108gl_c0c0_robot_cleaner_2
  siid: 2
  aiid: 3
  params:
    - "3"
    - 0
    - 1
action: xiaomi_miot.call_action

Any idea?

jumate commented 1 month ago

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

From miot specs: https://home.miot-spec.com/spec/xiaomi.vacuum.b108gl

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

imagen

lucasabba commented 1 month ago

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

From miot specs: https://home.miot-spec.com/spec/xiaomi.vacuum.b108gl

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

imagen

Thanks! This work. How can I set Sweep e Mop setting for each room?

jumate commented 1 month ago

For S20+

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: [ ]
Mykls1 commented 5 days ago

dreame.vacuum.p2009.json Can someone make a json file with scripts for s20+ similar to this file? For mi home vevs version scenaries https://mi.vevs.me/mihome/files/old/MiHome_10.0.706_79976_vevs.apk