This project allows to integrate basic features of a Roborock vacuum into Homeassistant via Google Home.
Roborock is really bad at providing an open API. They only provide Alexa and Google Home integration.
There are, however, options to extract authorization keys from Xiaomi's home app but this usually ends in not being able to use the robot in the Roborock app anymore.
The approach of this project takes another angle. Instead of communicating with the robot directly, we use Google Home as a middle man. We send commands, that you would normally send via voice, by text to the Google Home API endpoint and interpret the result. The results are mapped to Home Assistants vacuum mqtt integration Home Assistant Vacuum State Configuration.
- Roborock S6 MaxV
- Cleaning
- Selective room cleaning
- Pausing/Stopping cleaning
- Send to charger
- Robot state (cleaning, idle, docked, returning)
- Locating (robot say's hi)
- Map cannot be shown in HA
- Battery state is not available
- Fan speed adjustment
First we have to get credentials to authenticate towards our Google account's Google Home
- Follow the steps of How to build your own smart speaker until you get your credentials.json file
- Copy credentials.json next to ha-vacuum.py
We now build a virtual environment with all dependencies using python's venv module.
python3 -m venv .venv
We need to load the virtual env
source .venv/bin/activate
Now we can install the dependencies into the virutal environment using pip.
pip install -r requirements.txt
Now we can run the service.
python ha-vacuum.py
If everything is correctly set up, Home Assistant should automatically show the robot as a vacuum and a list of rooms to clean.
- Fix documentation, there is details missing how to configure the service
- Add parameters to the docker container
- Add documentation how to use the docker version