Please use the latest version here: https://github.com/bmccluskey/robovac
This project has been forked many times since the original work by Richard Mitchell https://github.com/mitchellrj and the countless others who have contributed over the last couple of years. I am building upon the original work done by Richard and attempting to simplfy the operation and number of files involved.
The first thing you need to do is get the Eufy Vacuum ID and a unique Access Code for your vacuum. There are a couple of ways of doing this
-
Use an old version of the EufyHome app on Android or an android emulator. This wont work for newer vacuums like the X8.
-
Use this python script and short guide to read the details directly from the Eufy website. It returns the details for all the vacuums on your account. https://gitlab.com/Rjevski/eufy-device-id-and-local-key-grabber
Please note: You may have to get a new version of the access code for your vacuum from time to time if Eufy change the key. The Vacuum ID remains the same for the life of the device but the key can and probably will change from time to time. Each vacuum has its own ID and key pair. If your key does change you will have to update your configuration.yaml file and restart Home Assistant.
If you want you can clone this repo manually, oterwise use HACS.
- In HACS add this repo as an integration additional repository.
- Then install it.
- Restart Home Assistant before adding the below to your configuration.yaml. Note that indentation is VERY important.
#Eufy
eufy_vacuum:
devices:
- name: 15C
address: YOUR EUFY IP ADDRESS
access_token: YOUR 16 DIGIT VACUUM ACCESS CODE
id: YOUR 20 DIGIT VACUUM ID
fan_speeds:
'No_suction': 'Off'
'Standard': 'Standard'
'Max': 'Max'
'Boost_IQ': 'Boost IQ'
support:
VacuumEntityFeature.BATTERY
| VacuumEntityFeature.RETURN_HOME
| VacuumEntityFeature.CLEAN_SPOT
| VacuumEntityFeature.PAUSE
| VacuumEntityFeature.LOCATE
| VacuumEntityFeature.STATUS
| VacuumEntityFeature.SEND_COMMAND
| VacuumEntityFeature.FAN_SPEED
| VacuumEntityFeature.TURN_ON
| VacuumEntityFeature.TURN_OFF
for the G30 change the fan_speeds section changes to
#Eufy
eufy_vacuum:
devices:
- name: G30
address: YOUR EUFY IP ADDRESS
access_token: YOUR 16 DIGIT VACUUM ACCESS CODE
id: YOUR 20 DIGIT VACUUM ID
fan_speeds:
"Standard": "Standard"
"Turbo": "Turbo"
"Max": "Max"
"Boost_IQ": "Boost IQ"
support: VacuumEntityFeature.BATTERY
| VacuumEntityFeature.RETURN_HOME
| VacuumEntityFeature.CLEAN_SPOT
| VacuumEntityFeature.PAUSE
| VacuumEntityFeature.LOCATE
| VacuumEntityFeature.STATUS
| VacuumEntityFeature.SEND_COMMAND
| VacuumEntityFeature.FAN_SPEED
| VacuumEntityFeature.TURN_ON
| VacuumEntityFeature.TURN_OFF
for the X8 change the fan_speeds section changes to. Note that Boost IQ is now an toggle option and not selectable from the drop down.
eufy_vacuum:
devices:
- name: X8
address: YOUR EUFY IP ADDRESS
access_token: YOUR 16 DIGIT VACUUM ACCESS CODE
id: YOUR 20 DIGIT VACUUM ID
fan_speeds:
'Quiet': 'Pure'
'Standard': 'Power'
'Turbo': 'Turbo'
'Max': 'Max'
support:
VacuumEntityFeature.BATTERY
| VacuumEntityFeature.RETURN_HOME
| VacuumEntityFeature.CLEAN_SPOT
| VacuumEntityFeature.PAUSE
| VacuumEntityFeature.LOCATE
| VacuumEntityFeature.STATUS
| VacuumEntityFeature.SEND_COMMAND
| VacuumEntityFeature.FAN_SPEED
| VacuumEntityFeature.TURN_ON
| VacuumEntityFeature.TURN_OFF
- Reboot Home Assistant again and hopefully you have a new Entity with the value you entered in the name field (15C and/or G30 in the examples above).
- Optional: Search in HACS for the Vacuum Card by Denys Dovhan and install it and configure it in lovelace to use you vacuum. Note there is a minor "feature" in the vacuum card where it doesnt show the correct values in toolbar when they update and there is a template adjusting what is being displayed. A screen refresh shows the correct vaules. Hopefully this will be fixed soon.
5a. Add the below text to your scripts.yaml file for a 15C. It should be in the same folder as your configuration.yaml
15c_smallroomclean:
alias: 15C_smallRoomClean
sequence:
- service: vacuum.send_command
data:
command: smallRoomClean
target:
entity_id: vacuum.15c
mode: single
15c_edgeclean:
alias: 15C_edgeClean
sequence:
- service: vacuum.send_command
data:
command: edgeClean
target:
entity_id: vacuum.15c
mode: single
15c_dock:
alias: 15C_dock
sequence:
- service: vacuum.return_to_base
target:
entity_id: vacuum.15c
mode: single
If you have a G30 add this to your scripts.yaml
g30_autoclean:
alias: G30_autoClean
sequence:
- service: vacuum.send_command
data:
command: autoClean
target:
entity_id: vacuum.g30
mode: single
g30_autoreturn:
alias: G30_autoReturn
sequence:
- service: vacuum.send_command
data:
command: autoReturn
target:
entity_id: vacuum.g30
mode: single
g30_donotdisturb:
alias: G30_do_Not_Disturb
sequence:
- service: vacuum.send_command
data:
command: doNotDisturb
target:
entity_id: vacuum.g30
mode: single
g30_dock:
alias: G30_dock
sequence:
- service: vacuum.return_to_base
target:
entity_id: vacuum.g30
mode: single
If you have an X8 add this to your scripts.yaml
x8_boostiq:
alias: x8_boostIQ
sequence:
- service: vacuum.send_command
data:
command: boostIQ
target:
entity_id: vacuum.x8
mode: single
x8_autoclean:
alias: x8_autoClean
sequence:
- service: vacuum.send_command
data:
command: autoClean
target:
entity_id: vacuum.x8
mode: single
x8_autoreturn:
alias: X8_autoReturn
sequence:
- service: vacuum.send_command
data:
command: autoReturn
target:
entity_id: vacuum.x8
mode: single
x8_donotdisturb:
alias: X8_do_Not_Disturb
sequence:
- service: vacuum.send_command
data:
command: doNotDisturb
target:
entity_id: vacuum.x8
mode: single
x8_dock:
alias: X8_dock
sequence:
- service: vacuum.return_to_base
target:
entity_id: vacuum.x8
mode: single
The facilities in the script options above only work on the those model series. i.e. You cant do edge cleaning on the G30 and you cant do the autoreturn on the 15C.
5b. Edit the lovelace vaccum card and add the following to the cards yaml if you have a 15C.
type: custom:vacuum-card
entity: vacuum.15c
image: default
show_name: true
show_status: true
show_toolbar: true
shortcuts:
- name: Dock
service: script.15c_dock
icon: mdi:home-map-marker
- name: Edge Cleaning
service: script.15c_edgeclean
icon: mdi:square-outline
- name: Small Room
service: script.15c_smallroomclean
icon: mdi:timer-cog-outline
Again if you have the G30 you will add these lines to the cards yaml.
type: custom:vacuum-card
entity: vacuum.g30
image: default
shortcuts:
- name: Dock
service: script.g30_dock
icon: mdi:home-map-marker
- name: Auto Clean
service: script.g30_autoclean
icon: mdi:caps-lock
- name: Auto Return
service: script.g30_autoreturn
icon: mdi:arrow-u-down-left-bold
- name: Do Not Disturb
service: script.g30_donotdisturb
icon: mdi:volume-off
stats:
default:
- attribute: cleaning_area
unit: sq meters
subtitle: Cleaning Area
- attribute: cleaning_time
value_template: '{{ (value | float(0) / 60) | round(1) }}'
unit: minutes
subtitle: Cleaning time
- attribute: auto_return
subtitle: Auto Ret
value_template: '{% if (value == true) %}On{% else %}Off{% endif %}'
- attribute: do_not_disturb
subtitle: Dnd
value_template: '{% if (value == true) %}On{% else %}Off{% endif %}'
Again if you have the X8 you will add these lines to the cards yaml.
type: custom:vacuum-card
entity: vacuum.x8
image: default
stats:
default:
- attribute: cleaning_area
unit: sq meters
subtitle: Cleaning Area
- attribute: cleaning_time
value_template: '{{ (value | float(0) / 60) | round(1) }}'
unit: minutes
subtitle: Cleaning time
- attribute: boost_iq
subtitle: Boost IQ
value_template: '{% if (value == true) %}On{% else %}Off{% endif %}'
- attribute: auto_return
subtitle: Auto Ret
value_template: '{% if (value == true) %}On{% else %}Off{% endif %}'
- attribute: do_not_disturb
subtitle: Dnd
value_template: '{% if (value == true) %}On{% else %}Off{% endif %}'
shortcuts:
- name: Dock
service: script.x8_dock
icon: mdi:home-map-marker
- name: Auto Clean
service: script.x8_autoclean
icon: mdi:caps-lock
- name: Boost IQ
service: script.x8_boostiq
icon: mdi:bootstrap
- name: Auto Return
service: script.x8_autoreturn
icon: mdi:arrow-u-down-left-bold
- name: Do Not Disturb
service: script.x8_donotdisturb
icon: mdi:volume-off
The original version of the scripts had a type entry on the configuration file. This was used to look up fan speeds and supported features of the vacuum. I have implemented this in the configuration.yaml instead as it makes for easier updating and makes it clearer how the information is used. The example of fan speeds anf support above are for a 15C and should work for most models. As I get information for other models I shall include here and you can update your configuration.yaml.
The fan speeds section links the internal vacuum command to a more fiendly display name for the fan modes within the vacuum. different models have different options available, so this list can change by model.
The support section is used to describe the functions and data that can be exchanged with the standard vacuum integration in home assistant and what options will be available on the default vacuum card. It really doesnt do much else.
I have left quite a few debug statements in the code and they may be useful to see whats happening by looking in the System Log files. The Log Viewer Addon available in the Home Assistance store can be very useful to watch the logs being updated in real time. To get the debugging to add to the logs you need to add the below text to your configuration.yaml
logger:
default: warning
logs:
custom_components.eufy_vacuum.vacuum: debug
custom_components.eufy_vacuum.tuya: debug