Eufy Robovac 35c Working with Home_Assistant - Updated 11/2020 - How To Guide - Now with Edge Cleaning!

if @emontes doesnt want to do all of them, feel free to message me!

1 Like

I’ve been trying to get the device id and local key for a new G30 Verge I picked up on clearance for the past week.

The Eufy 2.4.0 app method doesn’t seem to work for me, as I can’t pair the vacuum with that app since the G30 Verge isn’t an option in it. Pairing the vacuum in the current version of the app then signing into the 2.4.0 version tells me I have to update the app to see the vacuum.

Then I’ve been banging my head up against the wall with this python method and can’t get anything but an error when trying to run this script.

I love having a smart vacuum, but would love it more if I could integrate it into HA.

1 Like

This appears to be fixed in the latest version - it worked for me (had to reinstall cryptography and broadlink first)

You have probably figured it out by now, just for others that go down this path. Unless you have an old eufy robovac, don’t bother installing the old app and try to debug with adb. 1. The new robovacs are not listed as an option in the old app, 2. the information that is availble during the adb logcat session will not help you. Just download the python script from https://gitlab.com/Rjevski/eufy-device-id-and-local-key-grabber as has been mentioned above several time, follow instructions and you will get the info you need. This of course requires you have python installed on your computer. For the G30 verge and newer the json output maybe different than what the eufy_vacuum.py home assistant script is expecting, as others have stated it sort of works but with errors.

Hi. Has anyone managed to integrate a G20 hybrid please?

I recently purchased an LR30 Hybrid and managed to get it talking to Home Assistant via the key grabber linked above, and https://github.com/pbulteel/eufy_vacuum. However that didn’t seem to expose any of the room or zone cleaning features of my vacuum so I thought I’d dig into it.

I found that if you tap 5 times fast on the App Version in the About screen of Eufy Home, it enables a lot of logging to Android Logcat about the commands it sends to the vacuum for different features. It logs all the Tuya DP data, plus a lot of other info. I have a forked repro
https://github.com/belzedaar/eufy_vacuum, that I am using to control the room and zone features. It also includes a small demo app that lets you drive the robot with an Xbox controller (which was a feature request from my son)

I haven’t managed to get at the map data via a purely local API yet, it seems that only comes down from the server. But I am continuing to look into that. In the mean time, using the logcat output, you can determine the room IDs and any zones you might want to automate.

Then you can invoke the service to do specific things like:
Spot

service: vacuum.send_command
data:
  command: spotClean
  params:
    x: -1157
    y: -2020
    count: 2
target:
  entity_id: vacuum.eufy

Room

service: vacuum.send_command
data:
  command: roomClean
  params:
    roomIds:
      - 1
      - 2
    count: 1
target:
  entity_id: vacuum.eufy

Zone:

service: vacuum.send_command
target:
        entity_id: vacuum.eufy
data:
    command: zoneClean
    params:
      zoneList:
      - x0: -2702
        y0: -388
        x1: 188
        y1: -388
        x2: 188
        y2: -3369
        x3: -2702
        y3: -3369
     count: 2

One day I hope to find a way to extract the map data and let you select this kind of thing in the UI, but for now it’s still handy for automation (Rhasspy: “jarvis, vacuum the living room” works great)

I hope somebody finds this useful.

2 Likes

Over the last week Ive been disecting, and rewritting the scripts to control the Eufy. Ive had a fair bit of success and its looking a lot less complex now that the previous versions. There is some great info on here about the sucess and failures everyone has been having and that gave me some good pointers.

I have 3 eufy cleaners 15C, G30 and X8. Everything on the15C is working now, including Edge and Small Room and I have even integrated with the great animated vacuum card from Denys Dovhan.

All the basic features seem to work on the G30, I need to do a little more work to figure the differences with the 15C. The basics are also working well on the X8 (Start,stop,home, locate etc) but a little more work needed on some of the more advanced functions. It looks like Belzedaar may just have beaten me to some of :slight_smile:

I need a few more days to tidy things up and will make it available for installation by adding my repository to HACS.

I’ve got a G30 Edge that’s running but with errors - very interested to see your code!

Which errors are you seeing?

I don’t have any states for the parts information, and certain controls stop working after the device gets stuck/trapped, requiring a HA reboot. I also see the following errors in the logs:


Edit: Simple Vaccum Card status always shows “Error,” even when start/stop/home commands work.

I know that for my LR30 I had to remove the first two status options as they didn’t work on my device and always showed “error” status
See line 128 and following in https://github.com/belzedaar/eufy_vacuum/blob/dae43b375930c70efc677b71d66fa2d68520f8e7/custom_components/eufy_vacuum/vacuum.py

I also get the UTF8 error when the vacuum is just waiting, but it returns valid status codes when it’s off doing something. I haven’t dug into exactly why that is yet.

I fixed the issue with bad UTF8 decode in the latest version of my fork (https://github.com/belzedaar/eufy_vacuum)

It was a small bug where we were expecting to catch a specific error but it was throwing something else.

It’s been a while, I had meant to follow up once I gt my G30 Edge to work but somehow life got in the way.
Firstly It has been working rock solid, have a couple of automations that start the unit if nobody is home,
as soon as anybody comes back it skulks back into its corner.
Once the custom component was installed I kept getting errors, so modified the python script vacuum.py ( i think)
I did a file diff on the original and the one I modified, looks like i removed a few lines from the function “status” and
added a function “async_clean_edge” to get everything to work. mods below, hope it helps


  @property
    def status(self):
        """Return the status of the vacuum cleaner."""
       				  
        if self.robovac.work_status == robovac.WorkStatus.RUNNING:
            return STATE_CLEANING
        elif self.robovac.work_status == robovac.WorkStatus.CHARGING:
            return STATE_DOCKED
        elif self.robovac.work_status == robovac.WorkStatus.RECHARGE_NEEDED:
            # Should be captured by `go_home` above, but just in case
            return STATE_RETURNING
        elif self.robovac.work_status == robovac.WorkStatus.SLEEPING:
            return STATE_IDLE
        elif self.robovac.work_status == robovac.WorkStatus.STAND_BY:
            return STATE_IDLE
        elif self.robovac.work_status == robovac.WorkStatus.COMPLETED:
            return STATE_DOCKED
        elif self.robovac.go_home:
            return STATE_RETURNING


 async def async_clean_edge(self, **kwargs):
        """Perform a edge clean-up."""
        await self.robovac.async_set_work_mode(robovac.WorkMode.EDGE)

Excellent find. I have updated my repo with that as well

Time to unleash my code on the world. Let me know how you get on.

1 Like

Working beautifully! (G30 Edge)

New version 1.1.0 released that includes the X8 and also sending some Cleaning time, area and consumables stats to HA.

Thanks for putting this out and into HACS…I’ve got the repo added into HACS and the integration installed - rebooted HA and added the G30 code as listed in your instructions, however when running a check configuration before restarting HA again, I receive the below error…

Invalid config for [eufy_vacuum]: [fan_speeds] is an invalid option for [eufy_vacuum]. Check: eufy_vacuum->eufy_vacuum->devices->0->fan_speeds. (See /config/configuration.yaml, line 167).

My configuration yaml contains the below too…

Any ideas why it’s throwing the error? Many thanks in advance.

#Eufy
eufy_vacuum:
  devices:
    - name: G30
      address: 192.168.xxx.xxx
      access_token: myCode
      id: myID
      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

Couple of things I can see, but not sure which exactly is the issue.

  1. in the fan speeds section - try changing the double to single quotes - I dont think this is the main problem
  2. In the support section move the first entry down to the next line so it looks like
      support: 
        VacuumEntityFeature.BATTERY
        | VacuumEntityFeature.RETURN_HOME

Thanks for the suggestions and quick reply :slight_smile:

Unfortunately I still see the same error/issue. Code now looks as below…

I’m on HACS version 1.1.1 of your integration from what I can tell.

Thanks again

eufy_vacuum:
  devices:
    - name: G30
      address: 192.168.xxx.xxx
      access_token: myToken
      id: myID
      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