- Notifications
You must be signed in to change notification settings - Fork47
Add a Eufy RoboVac easily to Home Assistant
License
CodeFoodPixels/robovac
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A brand new version Eufy RoboVac integration for Home Assistant that includes a Config Flow to add your RoboVac(s) and the local key and ID required. All you need to do is enter your Eufy app credentials and the Config Flow will look up the details for you. After the initial config use the configuration button on the Integration to enter the RoboVac IP address when prompted.
This work has evovled from the original work by Richard Mitchellhttps://github.com/mitchellrj and the countless others who have contributed over the last couple of years. It also builds on the work done by Andre Boriehttps://gitlab.com/Rjevski/eufy-device-id-and-local-key-grabber to get the required local ID and key.
This project has been forked many times since the I am building upon the original work done by Richard and attempting to simplfy the operation and number of files involved.
Couple of Pre-reqs
- Make sure your Home Assistant Core is up to date
- Remove any previous Eufy or RoboVac installation including entries in the configuration.yaml
If you want you can clone this repo manually, oterwise use HACS (Recommended).
- In HACS add this repo as an integration additional repository.
- Then install it.
- Restart Home Assistant
- Go to the Integrations Page and Click +Add Integration button
- Search for Eufy Robovac and select it
- Enter your Eufy username and password (The ones you use to login to the add with) and submit
- If youve done it correctly you should get a success dialoge and option to enter an Area for each RoboVac you have
- Click Finish
- On the Integrations Screen Locate your Eufy Robovac card and click the configure button
- Select the Radio button beside the Vacuum name and type its IP addess in the box and press Submit(You need to repeat steps 9 and 10 for each RoboVac you have)
- Enjoy
Please note: You may have to get a new version of the access key for your vacuum from time to time if Eufy change it. Worst case you have to Delete the integration and re add it to get the new key.
The integration is designed to work with the standard Home Assistant Lovelace card but that doesnt support all the options of your Robovac. I have created some scripts to send the relevant commands to the Robovac.
Add the below text to your scripts.yaml file for a xxC RoboVAC. It should be in the same folder as your configuration.yaml
15c_smallroomclean: alias: 15C_smallRoomClean sequence: - action: vacuum.send_command data: command: smallRoomClean target: entity_id: vacuum.15c mode: single15c_edgeclean: alias: 15C_edgeClean sequence: - action: vacuum.send_command data: command: edgeClean target: entity_id: vacuum.15c mode: single15c_dock: alias: 15C_dock sequence: - action: vacuum.return_to_base target: entity_id: vacuum.15c mode: single
If you have a Gxx add this to your scripts.yaml
g30_autoclean: alias: G30_autoClean sequence: - action: vacuum.send_command data: command: autoClean target: entity_id: vacuum.g30 mode: singleg30_autoreturn: alias: G30_autoReturn sequence: - action: vacuum.send_command data: command: autoReturn target: entity_id: vacuum.g30 mode: singleg30_donotdisturb: alias: G30_do_Not_Disturb sequence: - action: vacuum.send_command data: command: doNotDisturb target: entity_id: vacuum.g30 mode: singleg30_dock: alias: G30_dock sequence: - action: 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: - action: vacuum.send_command data: command: boostIQ target: entity_id: vacuum.x8 mode: singlex8_autoclean: alias: x8_autoClean sequence: - action: vacuum.send_command data: command: autoClean target: entity_id: vacuum.x8 mode: singlex8_autoreturn: alias: X8_autoReturn sequence: - action: vacuum.send_command data: command: autoReturn target: entity_id: vacuum.x8 mode: singlex8_donotdisturb: alias: X8_do_Not_Disturb sequence: - action: vacuum.send_command data: command: doNotDisturb target: entity_id: vacuum.x8 mode: singlex8_dock: alias: X8_dock sequence: - action: 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.
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.
Edit the lovelace vaccum card and add the following to the cards yaml if you have a xxC.
type: custom:vacuum-cardentity: vacuum.15cimage: defaultshow_name: trueshow_status: trueshow_toolbar: trueshortcuts: - 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 Gxx you will add these lines to the cards yaml.
type: custom:vacuum-cardentity: vacuum.g30image: defaultshortcuts: - 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-offstats: 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-cardentity: vacuum.x8image: defaultstats: 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
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.robovac.vacuum: debug custom_components.robovac.tuyalocalapi: debug
About
Add a Eufy RoboVac easily to Home Assistant