/homebridge-xiaomi-roborock-vacuum

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

Primary LanguageJavaScriptMIT LicenseMIT

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).

Thus 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

Features

  • Fan as On-/Off-Switch. When switching off, directly back to the charging station.
  • Fanspeed levels adjustable via 3D Touch / Force Touch.
    • Xiaomi Mi Robot 1st Generation (Roborock Vacuum V1), Roborock S6/T6 3nd Generation (Roborock Vacuum S6/T6) and Xiaowa Lite C10
      • Off (0%)
      • Quiet (1-38%)
      • Balanced (39-60%)
      • Turbo (61-77%)
      • Max Speed (78-100%)
    • Roborock S50 2nd Generation and S55 2nd Generation
      • Off (0%)
      • Mopping (1-15%)
      • Quiet (16-38%)
      • Balanced (39-60%)
      • Turbo (61-75%)
      • Max Speed (76-100%)
  • Battery status and condition in the device details. Low battery alert.
  • Pause switch (optional).
  • Occupancy sensor (similar to motion sensor) for dock status (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:
"accessories": [
 {
  "accessory": "XiaomiRoborockVacuum",
  "name": "Xiaomi Mi Robot Vaccum 1st Generation",
  "ip": "192.168.1.150",
  "token": "abcdef1234567890abcdef1234567890",
  "pause": false,
  "dock": true
 }
],
  • 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
 },
 {
  "accessory": "XiaomiRoborockVacuum",
  "name": "Xiaomi Roborock S50 Vaccum 2nd Generation",
  "ip": "192.168.1.151",
  "token": "1234567890abcdef1234567890abcdef",
  "pause": false,
  "dock": true
 }
],

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

Xiaomi Token

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

Changes

0.6.2

  • Feature: Add support for Mi Robot 1S
  • Improve: Controlled Connection Retries PR

0.6.1

  • Feature: Add support for Roborock T6

0.6.0

  • Improve: Support for Roborock S6
  • Improve: More generic logic on the different model's speed modes definition

0.5.1

  • Feature: Add support for Roborock S6

0.5.0

  • Refactoring by @afharo
    • re-connection mechanism
    • javascript promises (async/await)

0.4.2

  • Feature: Add support for homebridge-config-ui-x - thx @pisikaki

0.4.1

  • Update engine versions from homebridge and node

0.4.0

  • Feature: Mopping is now supported. #31
  • Feature: Slightly different Speedmodes between Gen1 and Gen2 considered.
  • Bugfix: Initializing status values to variables at startup, there were problems when the robot was not docked when starting homebridge. #15 & #30
  • Bugfix: pause functionality improved. #15 & #30
  • Bugfix: Logging improved.

0.3.2

  • Bugfix: "Unknown error" with meaningful error message.

0.3.1

  • README customized (root with sudo su -).

0.3.0

  • Feature: Additional characteristics (4) for care indicator of sensors, side brush, main brush and filter added (Eve App).

0.2.2

  • Bugfix: Own Fork from "miio" with fixed for #5, #6 and #7.

0.2.1

  • Bugfix: Fanspeed levels over HomeKit improved.

0.2.0

  • Rewrite plugin, changed logic.
  • Bugfix: Connection establishment improved.
  • Bugfix: UnhandledPromiseRejectionWarning

0.1.5

  • Feature: ERRORs from miio-API added.

0.1.4

  • Bugfix: If pause / dock in config.json enabled.
  • Bugfix: cannot read property getCharacteristic of undefined.

0.1.3

  • Feature: Logging added.
  • Bugfix: UnhandledPromiseRejectionWarning.
  • README customized.

0.1.2

  • Feature: Deviceinfos (model, serial and firmware version) shows at startup.
  • Bugfix: UnhandledPromiseRejectionWarning.
  • README customized.

0.1.1

  • README typo.

0.1.0

  • First version.