Giter Site home page Giter Site logo

homebridge-xiaomi-roborock-vacuum / homebridge-xiaomi-roborock-vacuum Goto Github PK

View Code? Open in Web Editor NEW
369.0 24.0 79.0 2.78 MB

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

License: MIT License

JavaScript 40.31% TypeScript 59.69%
homebridge-plugin xiaomi mi-robot-vacuum roborock-vacuum verified-by-homebridge homebridge homekit

homebridge-xiaomi-roborock-vacuum's Introduction

verified-by-homebridge GitHub last commit npm npm version dependencies Status codecov

homebridge-xiaomi-roborock-vacuum

Homebridge plugin for Xiaomi / Roborock Vacuum Cleaner's

This homebridge plugin allows you to control the Xiaomi vacuum robots in your Apple Home App (HomeKit).

It is currently presented in the Home App in the form of a Fan because Apple don't officially support Vacuums in Homekit (we can't wait for this moment to arrive)!

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   Roborock S6 MaxV

For the underlying communication layer, it uses a port of the no-longer maintained library miio. You'll find the code in the directory ./miio.

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).
  • Room cleaning (optional): Read Room cleaning to understand how it works.
  • Zone cleaning (optional).
  • Occupancy sensor (similar to motion sensor) for dock status (optional).
  • Second 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 the plugin as root (sudo su -) with npm install -g homebridge-xiaomi-roborock-vacuum@latest --unsafe-perm.
  2. Customize you homebridge configuration config.json.
  3. 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",
  "serviceType": "fan",
  "pause": false,
  "dock": true,
  "waterBox": false,
  "cleanword": "cleaning",
  "rooms": [
    {
      "id": 16,
      "name": "Livingroom"
    },
    {
      "id": 17,
      "name": "Kitchen"
    }
  ],
  "zones": [
    {
      "name":"Family Room (x2)",
      "zone":[[25000,25000,32000,32000,2]]
    },
    {
      "name":"Bedroom",
      "zone":[[21000,32000,24000,37000,1]]
    },
    {
      "name":"Bedroom & Family Room",
      "zone":[ [21000,32000,24000,37000,1],  [25000,25000,32000,32000,1]]
    }
  ]
 }
],
  • 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
silent false when set to true, it will log only warning and error messages (hiding info and debug messages even when running homebridge -D
serviceType "fan" Defines the type of service of how the accessory is exposed.
When set to "fan" (default), ON/OFF controls and speed selection can be controlled by sliding the fan speed in the Home app.
When set to "switch", only ON/OFF controls are allowed (no speed selection).
pause false when set to true, HomeKit shows an additional switch for "pause" - switch is on, when pause is possible
pauseWord "pause" used for naming the Pause comment
findMe false when set to true, HomeKit shows an additional switch for "find me" - if switched on, the vacuum will say "Hi, I am over here"
findMeWord "where are you" used for autonaming the "find me" command. E.g: Hey Siri, NameOfYourVacuum where are you
goTo false when set to true, HomeKit shows an additional switch for "go to" - if switched on, you will be able to send your vacuum to the specified location
goToWord "go to coordiantes" used for autonaming the "go to" command. E.g: Hey Siri, NameOfYourVacuum to to coordinates
goToX 25500 x-coordinate of the specified location
goToY 25500 y-coordinate of the specified location
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
dustBin false when set to true, HomeKit shows a lock that is secured whenever the robot throws the dust-bin full error. Currently in a beta state.
dustCollection false when set to true, HomeKit shows an additional switch to control the dust collection with the auto-empty dock (only selected models like S7+ or S7 with additional dock). Currently in a beta state
disableCareServices false when set to true, HomeKit doesn't shows additional Care Services
cleanword "cleaning" used for autonaming the Roomselectors
rooms [] Array of ID / Name for a single Room. If set you have another switch for cleaning only this room
zones [] Array of name / zone coordinates for a single zone group. A zone group may contain multiple zone squares, each with its own value for number of cleanings. Coordinates are laid out as bottom-left-x, bottom-left-y, top-right-x, top-right-y, number-of-cleanings. A separate tile in Home will be created for each zone group. Figuring out coordinates will take some trial and error. Each zone should be surrounded by brackets: [], with the entire value also surrounded by brackets
autoroom false set to true to generate rooms from robot (only S6) or set to array of room name strings (see semi automatic below)
roomTimeout 0 when set to anything above 0 - will initiate room cleaning for multiple rooms automatically after the given time in seconds

Room cleaning

This plugin supports Room cleaning (only models that support room cleaning via the Xiaomi Mi Home app). Keep reading to understand how it works and how to set it up.

How it works

To start the Room Clean Mode, you can enable/disable the room switches in the order that they need to be cleaned. Then turn on the main Fan switch to start the actual cleaning.

If you want your robot to start cleaning after you enable/disable the room switches, use the config parameter roomTimeout to set the number of seconds the robot should wait before starting (this is to allow you to find the other rooms you want to set ON/OFF).

How can I set it up

Semi automatic

This feature seems to work with all models which offer room cleaning, but may not work on newer firmware versions (3.5.8_0358 or newer). To use it:

  1. Set the autoroom property in the config to an array of room names (["my room 1", "my room 2", "my room 3"].
  2. In the Xiaomi Mi app, setup a timer at midnight (00:00 or 12:00am).
  3. Enable Select a room to divide.
  4. On the map select the rooms in the order as they appear in the config set in step 1. The order is important as this is how the plugin maps the room names to IDs.
  5. Submit the timer and make sure it's deactivated.
  6. Restart homebridge.

Fully automatic

This feature seems to be working on models that support naming the rooms in the Xiaomi / Roborock App. This is known to include the Roborock S6 as well as the S4 with firmware version 3.5.8_0358 or newer.

Even if you have one of these models but you haven't named the Rooms in your App yet, this function will not work! Thanks @domeOo

Go to Location

This plugin allows you to send your vacuum to a specific point on the map. As there is no easy way of figuring out the coordinates of your desired location, here are some steps to help you find the right spot.

  1. The base location (typically the position of the dock when the map was created) is at [25500,25500] where these values are in the format [x-axis/horizontal, y-axis/vertical].
  2. Increasing the first value results in going to the top of the map, increasing the second value results in going to the right of the map (as displayed inside the app). The value seems to be in Millimeters.
  3. Knowing this you can approximate the desired location and change it as follows. In our example we want to go one meter up and three meters to the right: [25500,25500] --> [26500,28500].
  4. While testing this location you can review the position in your app under Go To to fine tune it.

Xiaomi Token

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

NOTE: We are not currently aware of how to retrieve the token from the Roborock App. Please, share any findings in the issue #104.

Is my model supported?

As new users join our community, and use this plugin, we try to learn from their device, and keep up with the new devices Xiaomi releases. However, the main developer @afharo, only owns the model S5, and he can't test the features on other models. If you wonder whether your device is supported, please:

  1. Check the models.ts file to see if your device is already in the explicit list.
  2. If not, maybe it matches the default behaviour (just try running the plugin and see if it works).
    1. If it works, but the vacuum modes (aka speeds) are wrong: add your model to the list in 1 with the right mapping.
    2. If it doesn't work, please, try making sure the IP and token are correct, by running the command miio-vacuum inspect id-or-address --token tokenAsHex.
      HINT: Try a couple of times, just in case there's a network glitch.
    3. If you can connect and see the details of your robot, try running the manual commands like explained in here.
      HINT: You can find the list of commands for your device in the Python project python-miio.

My model is, allegedly, supported, but it fails to connect

Run the command miio-vacuum inspect id-or-address --token tokenAsHex, replacing id-or-address with your vacuum's IP address and the tokenAsHex with a HEX representation of the token obtained earlier.

homebridge-xiaomi-roborock-vacuum's People

Contributors

afharo avatar baggns avatar bedrin avatar c-o-m-m-a-n-d-e-r avatar charlesvestal avatar dependabot[bot] avatar gothma avatar gundika avatar ileodo avatar jasper-seinhorst avatar khad avatar l-c-p avatar luc-ass avatar mkormendy avatar nicoh88 avatar nicoodeimos avatar normen avatar renovate[bot] avatar skjall avatar steverice avatar therealsimon42 avatar tman785 avatar yoerivd avatar zlldnv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-xiaomi-roborock-vacuum's Issues

Error: Could not connect to device, handshake timeout

@nicoh88

Hello Nico.
I'd like some help with another homebridge plugin which relies on miio for device connection and control. Sorry for posting an issue here, but that's the only way I could a message to you.

My issue:

  1. I have managed to get a valid/working token for my Xiaomi device and can connect and control the device via the latest version of miio when using cli.
  2. When running homebridge with the hoomebridge-xiaomi-humidifier. This plugin relies on miio being installed globally, which goes against the advice of the miio creator. I suspect that might be the source of the problem.
    https://github.com/acc-ua/homebridge-xiaomi-humidifier
    the plugin initializes but I keep getting an connection error in homebridge
    acc-ua/homebridge-xiaomi-humidifier#12

So basically I can connect and control via miio cli, but not viathe homebridge plugin mentioned above.

While I realize this isn't an issue with your plugin, I'm hoping you can help me fix this issue as you seem far more knowledgeable than I am.

Your insight would be much appreciated 🙂

Robot still running - changedCharging / changedCleaning

Hi, thank you for the new version with the fix for the running status.
However I still seem to have some problem with status after the cleaning job is completed.
Basically when the roborock S50 finishes full house clean and returns to the dock station, HomeKit thinks it's still running until either 1) I manually turn the fan off (but it gives issue next time when I start cleaning from Homekit) or 2) restart HomeBridge service. I did several tests recently, same behaviour regardless if I start cleaning from Homekit or Mi Home. If I start clean and stop manually in HomeKit (turn off the fan), everything works as expected.
To conclude: it looks to me that the plugin cannot detect when the cleaning job is finished (and the roborock returns to the dock station) and think it's still running (forever).

Roborock s6

To add Support for the roborock s6 Just put this lines in the Folder For example usr/local/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/miio/lib/models.js

'roborock.vacuum.s6': Vacuum,

Under the line
'roborock.vacuum.s5': Vacuum,
(Line 44)

Einen vorher konfigurierten Bereich abfahren.

Hallo,
gibt es die Möglichkeit über Miio vorher eine Karte für meine Wohnung zu erstellen, so dass nur diese beim reinigen abgefahren wird?
Letztendlich genau wie im App nur dass diese nur einmal eingestellt werden müsste.

Mopping

Hi,
Thanks for the plugin, works really well!
I've got the new gen Roborock, which does mopping as well as vacuuming. Is it possible to build a mop function to the plugin?
Thanks,

The requested accessory '" + name + "' was not registered by any plugin

Guten Morgen,

habe vorhin dein Plugin entdeckt und wollte es direkt mal ausprobieren. Leider erhalte ich diesen standard Fehler beim starten der Homebridge Instanz.

Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] ERROR LOADING PLUGIN homebridge-xiaomi-mi-robot-vacuum:
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] Error: Cannot find module 'miio'
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module._resolveFilename (module.js:543:15)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module._load (module.js:470:25)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module.require (module.js:593:17)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at require (internal/module.js:11:18)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object. (/usr/lib/node_modules/homebridge-xiaomi-mi-robot-vacuum/index.js:1:74)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module._compile (module.js:649:30)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object.Module._extensions..js (module.js:660:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at tryModuleLoad (module.js:501:12)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module._load (module.js:493:3)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module.require (module.js:593:17)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at require (internal/module.js:11:18)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:72:22)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Server. (/usr/lib/node_modules/homebridge/lib/server.js:142:14)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Array.forEach (:null:null)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:138:22)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at new Server (/usr/lib/node_modules/homebridge/lib/server.js:56:24)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module._compile (module.js:649:30)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object.Module._extensions..js (module.js:660:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module.load (module.js:561:32)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at tryModuleLoad (module.js:501:12)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module._load (module.js:493:3)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module.runMain (module.js:690:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at startup (bootstrap_node.js:194:16)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at bootstrap_node.js:666:3
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] ====================
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] Loaded config.json with 1 accessories and 0 platforms.
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] ---
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] Loading 0 platforms...
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: [2018-3-23 08:30:55] Loading 1 accessories...
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: /usr/lib/node_modules/homebridge/lib/api.js:64
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: ^
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: Error: The requested accessory 'XiaomiRoborockVacuum' was not registered by any plugin.
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module._compile (module.js:649:30)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Object.Module._extensions..js (module.js:660:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Module.load (module.js:561:32)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at tryModuleLoad (module.js:501:12)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module._load (module.js:493:3)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at Function.Module.runMain (module.js:690:10)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at startup (bootstrap_node.js:194:16)
Mär 23 08:30:55 HomeBridgeServer homebridge[23811]: at bootstrap_node.js:666:3
Mär 23 08:30:55 HomeBridgeServer systemd[1]: homebridge-test.service: Main process exited, code=exited, status=1/FAILURE
Mär 23 08:30:55 HomeBridgeServer systemd[1]: homebridge-test.service: Unit entered failed state.
Mär 23 08:30:55 HomeBridgeServer systemd[1]: homebridge-test.service: Failed with result 'exit-code'.
^C

Ich habe es als root installiert und zusätzlich die schreibrechte umgangen mit:
sudo npm install -g --unsafe-perm homebridge-xiaomi-roborock-vacuum -g

Die Installation war auch erfolgreich ohne Fehler:

root@HomeBridgeServer:/home/pi# sudo npm install -g --unsafe-perm homebridge-xiaomi-mi-robot-vacuum -g

root@HomeBridgeServer:/home/pi# sudo npm list -g --depth=0
/usr/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Anschließend habe ich noch einen npm rebuild durchgeführt in der Hoffnung das es dadurch behoben wird, leider auch ohne Erfolg.

Hast du eine Idee wo das Problem sein könnte?

Ps: In deiner Beispiel Config ist ein kleiner Fehler, bei der ersten }, Klammer ist das Komma zu viel:

"dock": true
},
],

Gruß Nastra

Return to dock

Hi,
is it possible to let the Vacuum return to the dock the it is turned off?

Remote-Zugriff auf Homebridge-Plugin über LTE

Hallo zusammen,

das Homebridge-Plugin funktioniert einwandfrei, solange ich mich im internen WLAN befinde. Sobald ich versuche, die Homebridge-Geräte remote über LTE zu steuern, ist der Saugroboter nicht mehr erreichbar. Ich habe ein Apple TV 4K als Steuerzentrale und kann Geräte mit HomeKit Zertifizierung (Eve, Hue) ohne Probleme remote über LTE steuern. Leider funktioniert es nicht bei der Homebridge.

Gibt es hierzu Lösungsansätze?

No git binary found in $PATH

root@raspberrypi:~# npm -g i --unsafe-perm homebridge-xiaomi-roborock-vacuum
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t git://github.com/nicoh88/miio.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

Permission denied

Hi!
Ich bekomme beim Installieren einen Permission denied Error. Wie kann ich das beheben?

Mein Log:

pi@raspberrypi:~ $ sudo npm install -g homebridge-xiaomi-roborock-vacuum --unsafe-perm
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/git-clone-c87a3272
npm ERR! /root/.npm/_cacache/tmp/git-clone-c87a3272/.git: Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-10-03T16_52_50_472Z-debug.log
pi@raspberrypi:~ $ nano /root/.npm/_logs/2018-10-03T16_52_50_472Z-debug.log

GNU nano 2.7.4 File: /root/.npm/_logs/2018-10-03T16_52_50_472Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'homebridge-xiaomi-roborock-vacuum',
1 verbose cli '--unsafe-perm' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 0e43bd550682c482
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/homebridge-xiaomi-roborock-vacuum 681ms (from cache)
8 silly pacote tag manifest for homebridge-xiaomi-roborock-vacuum@latest fetched in 802ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule [email protected] checking installable status
14 silly fetchPackageMetaData error for miio@git://github.com/nicoh88/miio.git#master Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nic$
14 silly fetchPackageMetaData /root/.npm/_cacache/tmp/git-clone-c87a3272/.git: Permission denied
15 verbose stack Error: Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/git-clone-c87a3272
15 verbose stack /root/.npm/_cacache/tmp/git-clone-c87a3272/.git: Permission denied
15 verbose stack
15 verbose stack at ChildProcess.exithandler (child_process.js:273:12)
15 verbose stack at ChildProcess.emit (events.js:180:13)
15 verbose stack at maybeClose (internal/child_process.js:936:16)
15 verbose stack at Socket.stream.socket.on (internal/child_process.js:353:11)
15 verbose stack at Socket.emit (events.js:180:13)
15 verbose stack at Pipe._handle.close [as _onclose] (net.js:541:12)
16 verbose cwd /home/pi
17 verbose Linux 4.14.50-v7+

UnhandledPromiseRejectionWarning: Error: Could not complete call to device

Ich erhalte folgende Meldung im Log
homebridge-miio musste ich deinstallieren, da es sich wohl nicht mit node 9.10.0 verträgt

Ggf. hängt das Problem damit zusammen, dass man jetzt auch beim Vacuum Zonen definieren kann.

[2018-4-4 10:26:32] [Staubsauger] ACTION | Start cleaning.
[2018-4-4 10:26:33] [Staubsauger] MONITOR | ChargingState has changed, is now false
[2018-4-4 10:26:33] [Staubsauger] INFO | Charging was canceled.
[2018-4-4 10:26:33] [Staubsauger] MONITOR | CleaningState has changed, is now true
[2018-4-4 10:26:33] [Staubsauger] INFO | Cleaning was started.
(node:31863) UnhandledPromiseRejectionWarning: Error: Could not complete call to device
at checkResult (/usr/local/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/miio/lib/devices/vacuum.js:13:9)
at
(node:31863) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31863) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

pi@raspberrypi:~ $ list-versions
###############################################
Plugin Versionen:
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

NPM-Version
5.8.0
Node-Version
v9.10.0
Roboter-Firmware
3.3.9_003194

Roborock won't appear in Home app

Hi,
My problem is the Vacuum doesn't appear in the home app, although the homebridge debug log shows it correctly:
[3/5/2019, 11:31:34 PM] [Roborock] Discovered Mi Robot Vacuum at 192.168.88.10
[3/5/2019, 11:31:34 PM] [Roborock] Model : roborock.vacuum.s5
[3/5/2019, 11:31:34 PM] [Roborock] State : charging
[3/5/2019, 11:31:34 PM] [Roborock] Fan Speed : 91
[3/5/2019, 11:31:34 PM] [Roborock] Battery Level : 100
[3/5/2019, 11:31:34 PM] [Roborock] Cleaning State -> false
[3/5/2019, 11:31:34 PM] [Roborock] Charging State -> true
[3/5/2019, 11:31:34 PM] [Roborock] Fan Speed -> 91
[3/5/2019, 11:31:34 PM] [Roborock] Battery Level -> 100
[3/5/2019, 11:31:34 PM] [Roborock] Charging State -> true
[3/5/2019, 11:31:34 PM] [Roborock] Battery Level -> 100
[3/5/2019, 11:31:34 PM] [Roborock] Fan Speed -> 91

What could be the problem?

Edit: all the accessories from domoticz show up and update correctly, and if I add the roborock to domoticz it also appears in the home app.

Xiaowa (Xiaomi roborock e20)

When i press on of the fan, it says not responding but when i reopen home app it says its on. The same with stop the vacuum cleaner. When i turn it off, it turn off but app said not responding. I need to reopen it for check status. Its very annoying. Can you update it in new version?

Installation auf Raspberry Pi nicht möglich

Hallo, ich bekomme leider Probleme mit der Berechtigung beim Installieren auf einem Raspberry Pi.
Ohne sudo ist eine installation global generell nicht möglich. Falls ich aber nun mit sudo oder sudo su arbeite, bekomme ich folgende Ausgabe:

root@raspberrypi:/home/pi# npm install -g homebridge-xiaomi-roborock-vacuum --unsafe-perm
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/git-clone-96e7cb85
npm ERR! fatal: Konnte führende Verzeichnisse von '/root/.npm/_cacache/tmp/git-clone-96e7cb85' nicht erstellen.: Keine Berechtigung
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-14T14_05_42_510Z-debug.log

Gibt es noch andere Alternativen das Plugin zu installieren?

Stati werden nicht aktualisiert, wenn pause:true

Hallo!

Die Stati werden nicht korrekt aktualisiert. Aktuell zeigt der Sauger an, er würde mit 90% saugen und die Dockingstation hat nicht ausgelöst:

May 17 15:05:42 HomeKitPi homebridge[14310]: [2018-5-17 15:05:42] [Xiaomi Roborock S50] Pause possible true.
May 17 15:05:42 HomeKitPi homebridge[14310]: [2018-5-17 15:05:42] [Xiaomi Roborock S50] Cleaning is true.
May 17 15:05:42 HomeKitPi homebridge[14310]: [2018-5-17 15:05:42] [Xiaomi Roborock S50] Fanspeed is 90%.
May 17 15:05:42 HomeKitPi homebridge[14310]: [2018-5-17 15:05:42] [Xiaomi Roborock S50] Docked is false.

Das ist aber nicht der Fall. Der Sauger steht auf der Dockingstation und ist nicht wirklich am saugen :-)
Starte ich homebridge neu, passt es wieder:

May 17 15:12:12 HomeKitPi homebridge[540]: [2018-5-17 15:12:12] [Xiaomi Roborock S50] Pause possible false.
May 17 15:12:12 HomeKitPi homebridge[540]: [2018-5-17 15:12:12] [Xiaomi Roborock S50] Fanspeed is 90%.
May 17 15:12:12 HomeKitPi homebridge[540]: [2018-5-17 15:12:12] [Xiaomi Roborock S50] Cleaning is false.
May 17 15:12:12 HomeKitPi homebridge[540]: [2018-5-17 15:12:12] [Xiaomi Roborock S50] Docked is true.

Meist wird schon nach dem ersten Saugvorgang das ganze nicht mehr richtig aktualisiert.

Debug-Log folgt in Kürze.

Error Codes im Journalctl entschlüsseln

Hallo @nicoh88

ich habe heute das erstemal seit dem ich dein Plugin nutze von einem meiner Sauger im Journalctl einen Fehler ausgeworfen bekommen da er ein Problem beim Reinigungsvorgang hat.

Mai 03 10:20:21 HomeBridgeServer homebridge[2653]: Code { id: 2, description: 'Unknown error 2' }
Mai 03 10:20:21 HomeBridgeServer homebridge[2653]: [2018-5-3 10:20:21] [Sauger Garage] MONITOR | CleaningState has changed, is now false
Mai 03 10:20:21 HomeBridgeServer homebridge[2653]: [2018-5-3 10:20:21] [Sauger Garage] INFO | Cleaning was stopped.

Im Journalctl ist mit dem Fehler Code so wie er jetzt erscheint, leider nichts anzufangen. Ist es möglich das du diese gemäß der angehängten Tabelle entschlüsselst bzw. ausgibt?

Fehlercodes.pdf

Gruß Nastra

Vacuum not discovered

Homebridge shows the following error message while trying to discover the S50:

[3/8/2019, 10:09:38 AM] [Roborock] ERR getCleaning | No vacuum cleaner is discovered.
[3/8/2019, 10:09:38 AM] [Roborock] ERR getSpeed | No vacuum cleaner is discovered.
[3/8/2019, 10:09:38 AM] [Roborock] ERR getDocked | No vacuum cleaner is discovered.
[3/8/2019, 10:09:38 AM] [Roborock] ERR getBatteryLow | No vacuum cleaner is discovered.
[3/8/2019, 10:09:43 AM] [Roborock] ERR getDevice | miio.device, next try in 2 minutes | Error: Could not connect to device, token might be wrong

while mirobo has no issues with the same IP and token:

State: Charging
Battery: 100 %
Fanspeed: 60 %
Cleaning since: 0:02:55
Cleaned area: 4.1475 m²

The Debug log does not show any additional information, plugin is at version 0.4.2

Error: Could not connect to device, handshake timeout

I get this after setting up your plugin:

[Xiaomi Roborock] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout

I did verifiy that I got the correct token:

mirobo --ip 192.168.178.72 --token $MyToken
State: Charging
Battery: 100 %
Fanspeed: 100 %
Cleaning since: 0:34:54
Cleaned area: 33.4125 m²

I'm happy to supply more information, but as far as I can tell, the debug log doesn't even show the error message shown above, let alone the any more info. Running homebridge via https://github.com/oznu/docker-homebridge

{
"bridge": {
"name": "Homebridge",
"username": "$Username",
"port": 51826,
"pin": "031-45-154"
},
"description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.",
"accessories": [
{
"accessory": "XiaomiRoborockVacuum",
"name": "Xiaomi Roborock",
"ip": "192.168.1.72",
"token": "$MyToken",
"pause": false,
"dock": true
}
],
"platforms": [
{
"platform": "MaxCubePlatform",
"name": "MaxCube Platform",
"ip": "192.168.178.71",
"port": 62910
}
]
}

Greetings
David

Roborock S50 / „keine Antwort“ @ HomeKit

Hallo Zusammen,

in HomeKit bekomme ich für den S50 „keine Antwort“. Ich habe sowohl die Gen1 im Einsatz. Hierfür funktioniert es einwandfrei (Danke dafür!).

Was mich etwas irritiert ist, dass ich bei Nutzung von „miio discover“ zwei mal die Rückmeldung bekomme:

Model Info: rockrobo.vacuum.v1

Natürlich andere device ID und IP. Beide Staubsauger sind im Netzwerk und können auch über die MI Home App gestartet werden.

Wäre für jede Hilfe dankbar.

Gruß
Peter

Button statt Ventilator

Mein Roborock S6 wird als Button statt als Ventilator angezeigt und kann nicht gesteuert werden. Was kann ich tun?
9D9ED5F4-3195-4FB0-A362-5E77925B456C

Roboter aus - Ventilator läuft weiter

Hey,

ja ich weiß, das ist Bequemlichkeit, aber ich nutze keine Szene um den Roboter zu steuern sondern sage "Staubsauger an/aus" leider wird bei deinem Plugin nur das Saugen beendet, der Ventilator bleibt aber an weil er weiterhin auf 90% steht.
Kannst du das vielleicht anders lösen, das wenn der Roboter aus geht, die Anzeige in der Home-App auch "aus" anzeigt?

Some feature ideas

First of all, thank you so much for this plugin!

Now that I've lived with this HomeKit integration for a couple of months, I started to generate some ideas on how this could be extended. I would dump these ideas here, if you care for one or more of these, I can create proper issues afterwards 😉.

I really like the map that is generated during cleanup. I also know that these maps are lying around somewhere on the robot. Maybe we could extend the Dock sensor thingy with the IP-Camera accessory and feed that with either the live map or the finished cleanup.
It'd be easier to find the robot if it dies in the middle of the cleaning process that way.

The thing is that I don't really get yet how this HomeKit stuff is structured. I know that the bridge is connected to accessories. All of which have several characteristics. But I don't really know how these can be combined. I am not super happy about having one robot, but 3 buttons in HomeKit. I have seen other accessories that combine functionality, like the fan and the on/off switch into one accessory. However I don't know if that is possible with Homebridge, or if I just do something wrong on my side here.

The last thing would require quite some work for each user, but this could be super convenient. It'd be fun to be able to define switches for spot cleaning with the associated coordinates so that one could have a switch in every HomeKit room. After activating that switch, the robot would then spot-clean just that room. Add Siri to the game and you get some real magic there 😉

Error: Could not connect to device, handshake timeout

[Xiaomi Roborock S50 Vaccum 2nd Generation] ERR getDevice | miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout.
wifi not changes, token same too. before all works as well. all packages version is last. What's wrong?

Roborock S6 | standby?! | sometimes starts only on the second try

Hi

Habe noch was festgestellt.
Ich lasse meinen Roboter bei Abwesenheit fahren ODER täglich um 17 Uhr. Habe dafür n Fakeschalter gemacht, der halt an geht sobald er losfährt. Also alle sind weg - 30 Minuten läuft auf - Staubsauger an, fakeschalter an
Und 17 Uhr - wenn Fake Schalter aus dann - Staubsauger an, Fake Schalter an
(Wird um 0 Uhr wieder aus gestellt der Fake Schalter)

Soweit so gut. Habe jetzt festgestellt, dass es nicht funktioniert. Nichtmal immer mit der Testfunktion von Home (Fake Schalter geht an aber Roboter macht nix, wenn man das wiederholt gehts, sprich Standby.)
Und zwar immer nach ca 2 Stunden.
Gehen die Roboter nach einer Zeit in den Standby?! Lasse den Roboter jetzt einfach mal minütlich anpingen. Vielleicht bringt es was (werde berichten)

UnhandledPromiseRejectionWarning: Error: Could not complete call to device

Hi all,
i've got a problem with my vacuum. Firmware is 3.3.9_003170 / Miio 15.6. Only every 2 command will execute by the vacuum.

Jun 14 17:57:35 homebridgepi homebridge[1835]: (node:1835) UnhandledPromiseRejectionWarning: Error: Could not complete call to device
Jun 14 17:57:35 homebridgepi homebridge[1835]: at checkResult (/usr/local/lib/node_modules/miio/lib/devices/vacuum.js:13:9)
Jun 14 17:57:35 homebridgepi homebridge[1835]: at
Jun 14 17:57:35 homebridgepi homebridge[1835]: (node:1835) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Jun 14 17:57:35 homebridgepi homebridge[1835]: (node:1835) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Cannot update plugin:

I have updated my plugins without any problem, except Xiaomi... :(
I thought it maybe was git, but it's installed and working.

pi@raspberrypi:~ $ sudo npm install -g -unsafe-perm homebridge-xiaomi-roborock-vacuum@latest -g
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/git-clone-50f943cd
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-50f943cd': Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-23T08_27_35_646Z-debug.log
pi@raspberrypi:~ $ sudo npm outdated -g
Package                            Current  Wanted  Latest  Location
homebridge-xiaomi-roborock-vacuum    0.4.0   0.4.2   0.6.0
npm                                  6.4.1   6.9.0   6.9.0
pi@raspberrypi:~ $ sudo npm install -g -unsafe-perm homebridge-xiaomi-roborock-vacuum@latest -g
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/git-clone-5b419228
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-5b419228': Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-23T08_29_13_953Z-debug.log
pi@raspberrypi:~ $ npm install -g homebridge-xiaomi-roborock-vacuum@latest --unsafe-perm
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/inherits
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ms
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/process-nextick-args
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/miio
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754'
npm ERR!  { Error: EACCES: permission denied, access '/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/ieee754' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-06-23T08_30_40_816Z-debug.log

Clean Zones implementation

Hi Nicoh88, Congratulations for the plugin, you plan to implement cleaning zones in the same way as the plugin "homebridge-xiaomi-roborock-vacuum-zones 0.3.7"?

Thanks for all!!

Can`t install npm

Hallo,
ich kann leider Dein Homebridge-Plugin nicht installieren.
In der CLI kommt folgende Meldung:

pi@raspberrypi:~ $ sudo npm install -g homebridge-xiaomi-roborock-vacuum --unsafe-perm
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git / root/.npm/_cacache/tmp/git-clone-bbcf07fc
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-bbcf07fc': Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-10-28T07_35_59_619Z-debug.log
pi@raspberrypi:~ $

Hier noch das Logfile:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'homebridge-xiaomi-roborock-vacuum',
1 verbose cli '--unsafe-perm' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 27c70362197b3c0b
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/homebridge-xiaomi-roborock-vacuum 2199ms
8 silly pacote tag manifest for homebridge-xiaomi-roborock-vacuum@latest fetched in 2775ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule [email protected] checking installable status
14 silly fetchPackageMetaData error for miio@git://github.com/nicoh88/miio.git#master Command failed: /usr/bin/git clone --de$
14 silly fetchPackageMetaData fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-bbcf07fc': Pe$
15 verbose stack Error: Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.np$
15 verbose stack fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-bbcf07fc': Permission deni$
15 verbose stack
15 verbose stack at ChildProcess.exithandler (child_process.js:273:12)
15 verbose stack at ChildProcess.emit (events.js:127:13)
15 verbose stack at maybeClose (internal/child_process.js:936:16)
15 verbose stack at Socket.stream.socket.on (internal/child_process.js:353:11)
15 verbose stack at Socket.emit (events.js:127:13)
15 verbose stack at Pipe._handle.close [as _onclose] (net.js:558:12)
16 verbose cwd /home/pi
17 verbose Linux 4.14.71+
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-xiaomi-roborock-vacuum" "--unsafe-perm"
19 verbose node v9.7.1
20 verbose npm v5.6.0
21 error code 128
22 error Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/nicoh88/miio.git /root/.npm/_cacache/tmp/$
22 error fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-bbcf07fc': Permission denied
23 verbose exit [ 1, true ]

Token auslesen ist nicht mehr möglich

Hallo zusammen,

ich würde gerne dieses Plugin nutzen. Leider ist es mir nicht gelungen, das Token für den Cleaner der ersten Generation auszulesen (Firmware: 339_003170, iOS App 4.7.18).

Ein unverschlüsseltes iOS Backup enthält leider keinen Eintrag mit AppDomain-com.xiaomi.mihome, sodass ich das Token nicht finden konnte.

Der Befehl miio discover lieferte leider nur 3 Fragezeichen für das Token.

Gibt es eine andere Möglichkeit, das Token auszulesen?

Vielen Dank im Voraus

[suggestion] Valetudo compatibility

#1 congrats for the plugin
#2 the vacuum was "rooted" and shell (e.g. ssh) is now available. Dustcloud and Dummycloud offer solutions to use the vacuum without xiaomi cloud. Valetudo (https://github.com/Hypfer/Valetudo) offers a (best!) solution to use the vacuum fully without any of xiaomi's stuff. It would therefore be great to have your plugin support valetudo using its own exported API.

Cannot install last version

Hello,

Sorry to bother you but I did a clean install of my homebridge server and now when I tried to reinstall your plugin i got this error using this command sudo npm install -g homebridge-xiaomi-roborock-vacuum@latest --unsafe-perm :

pm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t git://github.com/nicoh88/miio.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.

Something you can fix and am I the only one getting this error ?
Thank you for your work, pretty good btw 👍

Resume im Zoned Cleanup-Mode startet komplettes Cleanup

Hallo,

beim Testen ist mir Folgendes aufgefallen:

-Zoned Cleanup über MiHome gestartet
-Pause über HomeKit ausgelöst
-Resume über HomeKit löst dann einen kompletten Cleanup aus (müsste eigentlich ein "Resume Zoned Cleanup" auslösen

Nach 1. Benutzung 'handshake timeout'

Hi, ich hab das Plugin auf meinem Pi3 laufen (NPM 6.0, Node 8.11.1, Plugin 0.3). Nach der Installation als root und Aufnahme in der Config war die Anzeige in der Home und EVE App erfolgreich. Auch ein erstes Starten und bewegen des Sliders liefen problemlos. Allerdings ließ sich der Sauger (v1) nicht mehr stoppen. Ich habe dann den Button an der Oberseite gedrückt um ihn auszuschalten. Jetzt bekomme ich nach dem Start der Homebridge nur noch diese Fehler und kann den Sauger nicht mehr ansprechen.

[2018-5-9 22:50:11] [Staubi] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout
[2018-5-9 22:52:13] [Staubi] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout
[2018-5-9 22:54:15] [Staubi] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout
[2018-5-9 22:56:17] [Staubi] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout
[2018-5-9 22:58:19] [Staubi] ERROR, miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout
[2018-5-9 23:00:10] [Staubi] ERROR, getCleaning | No vacuum cleaner is discovered.
[2018-5-9 23:00:10] [Staubi] ERROR, getCleaning | No vacuum cleaner is discovered.
[2018-5-9 23:00:10] [Staubi] ERROR, getBatteryLow | No vacuum cleaner is discovered.
[2018-5-9 23:00:10] [Staubi] ERROR, getDocked | No vacuum cleaner is discovered.

Any idea?

"DeprecationWarning - unhandled promise" still being triggered

Plugin: 0.1.4
Miio: 0.15.6
Node v8.10
Checked token (iOS backup method)

Debug output is largely similar

"[Xiaomi Mi Robot Vaccum 1st Generation] ERORR GetDevice | No correct API answer from xiaomi/roborock
(node:981) UnhandledPromiseRejectionWarning: undefined
(node:981) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:981) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."
and later down the line:
"[2018-3-25 18:55:41] [Xiaomi Mi Robot Vaccum 1st Generation] ERORR GetDevice | No correct API answer from xiaomi/roborock
[2018-3-25 18:55:41] [Xiaomi Mi Robot Vaccum 1st Generation] ERROR, Watch | No vacuum cleaner is discovered.
[2018-3-25 18:56:09] [Xiaomi Mi Robot Vaccum 1st Generation] Discovering vacuum cleaner"

Any idea what might be wrong?

Zoned Cleaning

First of all, love this plugin and love your work on it so far.

I would really love to see zone cleaning integrated into this plugin. The people using HA have been able to use the coordinates of zones on the map to designate zoned rooms and can activate a clean in the bedroom for example.

I am wondering if we can get this added to the plugin and integrate it into the config.json file by entering the coordinates into the config for each room. Then a button can be pressed on HomeKit or Siri can be used to initiate a clean for that one room only. Love to hear your thoughts :)

No vacuum cleaner is discovered.

Hi, I can't find the error. Do you have any idea what is the cause of these error messages when homebridge is running?

ERR getBatteryLow | No vacuum cleaner is discovered.
ERR getSpeed | No vacuum cleaner is discovered.
ERR getCleaning | No vacuum cleaner is discovered.
ERR getDocked | No vacuum cleaner is discovered.
ERR getDevice | miio.device, next try in 2 minutes | Error: Could not connect to device, token might be wrong

{ "accessory": "XiaomiRoborockVacuum", "name": "Staubi", "ip": "ip-of-staubi", "token": "32-alphanumeric-code", "pause": false, "dock": true },

Token: I used the token months ago with an other plugin and it worked for some time. So I assume the token is correct.

Vacuum Firmware 3.3.9_003466
NPM 6.7.0
Homebridge 0.4.46
node 8.15.0

ERROR LOADING PLUGIN homebridge-xiaomi-roborock-vacuum

Hey guys,
The accessory does not load when I restart home bridge since editing my config file.

Jan 25 19:39:34 raspberrypi homebridge[31946]: [2019-1-25 19:39:34] ====================
Jan 25 19:39:34 raspberrypi homebridge[31946]: [2019-1-25 19:39:34] ERROR LOADING PLUGIN homebridge-xiaomi-roborock-vacuum:
Jan 25 19:39:34 raspberrypi homebridge[31946]: [2019-1-25 19:39:34] TypeError: Path must be a string. Received undefined
Jan 25 19:39:34 raspberrypi homebridge[31946]: at assertPath (path.js:28:11)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Object.join (path.js:1233:7)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at userData (/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node
_modules/appdirectory/lib/appdirectory.js:21:29)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at AppDirectory._setTemplates (/usr/lib/node_modules/homebridge-xiaomi-ro
borock-vacuum/node_modules/appdirectory/lib/appdirectory.js:134:34)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at new AppDirectory (/usr/lib/node_modules/homebridge-xiaomi-roborock-vac
uum/node_modules/appdirectory/lib/appdirectory.js:129:10)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Object. (/usr/lib/node_modules/homebridge-xiaomi-roborock-v
acuum/node_modules/miio/lib/tokens.js:8:14)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Module._compile (module.js:653:30)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Object.Module._extensions..js (module.js:664:10)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Module.load (module.js:566:32)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at tryModuleLoad (module.js:506:12)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Function.Module._load (module.js:498:3)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Module.require (module.js:597:17)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at require (internal/module.js:11:18)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Object. (/usr/lib/node_modules/homebridge-xiaomi-roborock-vacuum/node_modules/miio/lib/network.js:9:16)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Module._compile (module.js:653:30)
Jan 25 19:39:34 raspberrypi homebridge[31946]: at Object.Module._extensions..js (module.js:664:10)
Jan 25 19:39:34 raspberrypi homebridge[31946]: [2019-1-25 19:39:34] ====================
Jan 25 19:39:34 raspberrypi homebridge[31946]: [2019-1-25 19:39:34] Loading 3 platforms...

"accessories": [
{
"accessory": "XiaomiRoborockVacuum",
"name": "Dirty Debbie",
"ip": "192.168.0.2",
"token": "token_No",
"pause": false,
"dock": true
}
]

Why is it not loading? I've reinstalled the app a couple of times now with no change.

Please help!

Verschleißanzeige

Die Werte die du ausgegeben bekommst sind das die Prozente wie in der Mi App oder wie in deinem Beispiel 12345 Std noch übrig bis zum Wechsel?

Pause button is the wrong way round

At present
when I start the vacuum, the pause button is highlighted and says on

when I press the pause button it dims/greys out and says off

I think it should work like this
when I start the vacuum the pause button dims/greys out and say off

when I press the pause button it dims/greys out and say on

Or is this by design for some reason that I can not figure out?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.