Skip to content

netRunner0/homebridge-xiaomi-roborock-vacuum

 
 

Repository files navigation

PayPal Donate GitHub last commit npm npm version dependencies Status

homebridge-xiaomi-roborock-vacuum

Homebridge plugin for Xiaomi / Roborock Vacuum Cleaner's

With this homebridge plugin can you control the xiaomi vacuum robots as fan in your Apple Home App (HomeKit).

This plugin use the new miio version 0.15.6 or newer, not like the old ones 0.14.1. Timeouts and API errors are a thing of the past!

Xiaomi Mi Robot 1st Generation (Roborock Vacuum V1)   Roborock S50 2nd Generation   Roborock S55 2nd Generation Black   Roborock S6/T6 3nd Generation   Roborock Xiaowa Lite C10   Roborock S5 Max

Features

  • Fan as On-/Off-Switch. When switching off, directly back to the charging station.
  • Battery status and condition in the device details. Low battery alert.
  • Pause switch (optional).
  • Occupancy sensor (similar to motion sensor) for dock status (optional).
  • Seconds Fan for water box modes (optional).

Screenshot Apple HomeKit with homebridge-xiaomi-roborock-vacuum

Screenshot Elgato Eve App with homebridge-xiaomi-roborock-vacuum

Instructions

  1. Install git packages first with sudo apt install git.
  2. Install the plugin as root (sudo su -) with npm install -g homebridge-xiaomi-roborock-vacuum@latest --unsafe-perm.
  3. Customize you homebridge configuration config.json.
  4. Restart homebridge, ggf. service homebridge restart.
  • Example config.json with one vacuum and room cleaning:
"accessories": [
 {
  "accessory": "XiaomiRoborockVacuum",
  "name": "Xiaomi Mi Robot Vaccum 1st Generation",
  "ip": "192.168.1.150",
  "token": "abcdef1234567890abcdef1234567890",
  "pause": false,
  "dock": true,
  "waterBox": false,
  "cleanword": "cleaning",
  "rooms": [
    {
      "id": 16,
      "name": "Livingroom"
    },
    {
      "id": 17,
      "name": "Kitchen"
    }
  ]
 }
],
  • Example config.json with two vacuums:
"accessories": [
 {
  "accessory": "XiaomiRoborockVacuum",
  "name": "Xiaomi Mi Robot Vaccum 1st Generation",
  "ip": "192.168.1.150",
  "token": "abcdef1234567890abcdef1234567890",
  "pause": false,
  "dock": true,
  "waterBox": false
 },
 {
  "accessory": "XiaomiRoborockVacuum",
  "name": "Xiaomi Roborock S50 Vaccum 2nd Generation",
  "ip": "192.168.1.151",
  "token": "1234567890abcdef1234567890abcdef",
  "pause": false,
  "dock": true,
  "waterBox": false
 }
],

Optional parameters

Name of parameter Default value Notes
pause false when set to true, HomeKit shows an additional switch for "pause" - switch is on, when pause is possible
dock false when set to true, HomeKit shows an occupancy sensor, if robot is in the charging dock
waterBox false when set to true, HomeKit shows an additional slider to control the amount of water released by the robot (only selected models like S5-Max). Currently in a beta state.
cleanword cleaning used for autonaming the Roomselectors
rooms false Array of ID / Name for a single Room. If set you have another switch for cleaning only this room
autoroom false set to true to generate rooms from robot (only S6) or set to array of room name strings (see semi automatic below)

AutoRoom Generation

Fully automatic

This feature seems to be working only on the S6 Model. We figured out this is why the Api call only delivers the mapping when the Rooms are named in the Xioami / Roborock App.

So when you have an S6 but not named the Rooms in your App this function will not work! Thanks @domeOo

Semi automatic

This feature seems to work with all models which offer room cleaning. To use it, in the config set autoroom to an array of room names. Then in the app, setup a timer at midnight (00:00 or 12:00am). Enable Select a room to divide. Then on the map select the rooms in the order as they appear in the homebridge config. The order is important as this is how the plugin maps the room names to IDs. Finally submit the timer and deactivate it. Then restart homebridge.

Xiaomi Token

To use this plugin, you have to read the "token" of the xiaomi vacuum robots. Here are some detailed instructions:

About

A Xiaomi Roborock vaccum plugin (1st, 2nd and 3rd generation) for homebridge.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%