Viomi Vacuum: remaining bits to polish
# Updated description

There are some bits yet to be completed for this model to be fully operational:

- [X] Dock sensor
- [X] Battery level
- [ ] Care services: Main brush, side brush, filter, etc. (Note: We might be able to fix it by calling `get_consumables`).
- [ ] Serial Number fails to be retrieved (it only logs the warning and does not crash but it's scary to see such error).
- [ ] Automatic/semi-automatic room feature does not work: `get_timer` method does not work for this model. (#221).

This other issue and comments might help with finding the list of supported commands and properties: https://github.com/rytilahti/python-miio/issues/550#issuecomment-570808184

# Original description

Great! I've been testing and, for now, the main issues are with the sensor and battery level not working.

I've been testing the fan speeds, for what I can see, 25% Silent, 50% is Standard, 75% Medium, 100% Turbo.

Here is the log:

```
[26/05/2020, 13:03:55] [Xiaomi Mi Robot Vaccum 1st Generation] INF getSpeed | viomi.vacuum.v8 | Fanspeed is 2 over miIO "Medium" > HomeKit speed 75%
[26/05/2020, 13:04:07] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:04:09] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 0 over miIO for "Silent".
[26/05/2020, 13:04:09] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setCleaning | viomi.vacuum.v8 | Start cleaning, not charging.
[26/05/2020, 13:04:09] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 0%
[26/05/2020, 13:04:09] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 0% (Silent), for HomeKit 25%
[26/05/2020, 13:04:10] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:04:10] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is ON.
[26/05/2020, 13:04:10] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused possible
[26/05/2020, 13:04:10] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 0 over miIO for "Silent".
[26/05/2020, 13:04:16] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 1 over miIO for "Standard".
[26/05/2020, 13:04:16] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 1%
[26/05/2020, 13:04:16] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 1% (Standard), for HomeKit 50%
[26/05/2020, 13:04:19] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 2 over miIO for "Medium".
[26/05/2020, 13:04:19] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 2%
[26/05/2020, 13:04:19] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 2% (Medium), for HomeKit 75%
[26/05/2020, 13:04:19] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 2 over miIO for "Medium".
[26/05/2020, 13:04:21] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 2 over miIO for "Medium".
[26/05/2020, 13:04:21] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 2 over miIO for "Medium".
[26/05/2020, 13:04:23] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 2 over miIO for "Medium".
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is OFF.
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 3 over miIO for "Turbo".
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setCleaning | viomi.vacuum.v8 | Start cleaning, not charging.
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 3%
[26/05/2020, 13:04:24] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 3% (Turbo), for HomeKit 100%
[26/05/2020, 13:04:25] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:04:25] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is ON.
[26/05/2020, 13:04:25] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused possible
[26/05/2020, 13:04:25] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 1 over miIO for "Standard".
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 1%
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 1% (Standard), for HomeKit 50%
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to 0 over miIO for "Silent".
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | viomi.vacuum.v8 | FanSpeed is now 0%
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | viomi.vacuum.v8 | Speed was changed to 0% (Silent), for HomeKit 25%
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setSpeed | viomi.vacuum.v8 | FanSpeed set to -1 over miIO for "Off".
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] INF setSpeed | viomi.vacuum.v8 | FanSpeed is -1 => Calling setCleaning(false) instead of changing the fan speed
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setCleaning | viomi.vacuum.v8 | Stop cleaning and go to charge.
[26/05/2020, 13:04:26] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is OFF.
```

Now, I I know it is a bit "advanced", but when using rooms (wich is possible, the vacuum knows the rooms through ID), sometimes it switches on all of them, other times, when I pick more than one room, It switches on, and them off, and only cleans the. first chosen room, is it normal?
Here is the log, only assuming one room:

```
[26/05/2020, 13:07:47] [Xiaomi Mi Robot Vaccum 1st Generation] ACT setCleaning | viomi.vacuum.v8 | Start cleaning Room ID 10, not charging.
[26/05/2020, 13:07:49] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:07:49] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is ON.
[26/05/2020, 13:07:49] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused possible
[26/05/2020, 13:07:49] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:07:54] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | viomi.vacuum.v8 | Cleaning is OFF.
[26/05/2020, 13:07:54] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning

[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getDocked | viomi.vacuum.v8 | Robot Docked is false (Status is unknown-97)
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | viomi.vacuum.v8 | Cleaning is false
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getBatteryLow | viomi.vacuum.v8 | Batterylevel is 0%
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getSpeed | viomi.vacuum.v8 | Fanspeed is 0 over miIO. Converting to HomeKit
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getSpeed | viomi.vacuum.v8 | Fanspeed is 0 over miIO "Silent" > HomeKit speed 25%
[26/05/2020, 13:07:58] [Xiaomi Mi Robot Vaccum 1st Generation] INF getPauseState | viomi.vacuum.v8 | Pause possible is false
[26/05/2020, 13:08:07] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedPause | viomi.vacuum.v8 | Paused not possible, no cleaning
```

Regarding the actual state of the plugin, it's the dock sensor not working and the battery level the main "flaws".

_Originally posted by @ojoaosemtil in https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/pull/212#issuecomment-633986402_