Table of Contents
eufy_robovac
This is a cli script adapted from Richard Mitchell's work. It abandons all the code for integrating with homeassistant in lieu of creating a portable binary to control the thing - either manually or with cron job.
Requirements
- git
- python 3.12 or higher
- python-cryptography package
- docker to compile (alternatively: pipenv and pyinstaller)
- device credentials
Obtaining device credentials
tl;dr
use this repo and follow the instructions.
Instructions:
You'll need to install git, python3, build-essential, pipenv, libffi-dev, python3-dev, and libssl-dev with your package manager. Then you can do
git clone https://github.com/markbajaj/eufy-device-id-python
cd eufy-device-id-python
pipenv install
pipenv shell
python -m eufy_local_id_grabber "YOUR_EUFY_EMAIL" "YOUR_EUFY_PASSWORD"
This might not work and requires installing packages you may or may not want/need on your base os. We can do better.
With docker
1. Enter a shell within an ubuntu docker container
docker run -it ubuntu:latest bash
2. Set up your environment
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y git python3 python3-venv python3-pip build-essential pipenv libffi-dev python3-dev libssl-dev
3. Clone the repo
git clone https://github.com/markbajaj/eufy-device-id-python.git
cd eufy-device-id-python
4. Install requirements
pipenv install
5. Get your credentials
pipenv shell
python -m eufy_local_id_grabber "YOUR_EUFY_EMAIL" "YOUR_EUFY_PASSWORD"
Output:
Home: <home ID>
Device: RoboVac, device ID <DEVICE_ID>, local key <LOCAL_KEY>
Configuration
The device ID, ip address, and local code are required for this to work. They may be passed as arguments, or through a config file. The defalt path for the config file is /etc/robovac.conf. This can be altered with the -c or --config flags.
Examples
- arbitrary config file:
robovac --config=/home/user/robovac.conf - argments:
robovac --device_id=DEVICE_ID --ip=192.168.1.1 --local_code=LOCAL_CODE
Config file
[robovac]
device_id=DEVICE_ID
ip=192.168.1.1
local_code=LOCAL_CODE
Usage
usage: vac [-h] [-c CONFIG] [--device_id DEVICE_ID] [--ip IP] [--local_code LOCAL_CODE] [--time TIME] [--pause] [--home] [--debug] [--verbose] [--quiet]
Control a Robovac device.
options:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Path to config file
--device_id DEVICE_ID
Device ID
--ip IP Device IP address
--local_code LOCAL_CODE
Secret key obtained from eufy
--time TIME, -t TIME Cleaning time in minutes
--pause, -p Pause vacuum
--home, -b Go home
--debug, -d Enter debugging mode (won't send commands to vacuum)
--verbose, -v Enable verbose logs
--quiet, -q Quiet logs