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

First of all,

Massive shout out to anyone putting in time and effort to maintain code, write new code, design implementations, and helping others. Y’all the real hero’s here.

I’d like to start off with this wasn’t particularly easy to do, nor was it fast. Mainly this was the case due to the lack of concise information on how to connect your robovac to home assistant.

So, I’d like to do a wrap up of sorts to clear the air on how you to can get your Eufy robovac to work with home assistant.

First things first,

Requirements:
Android device with Eufyhome app installed, and the Robovac already paired to the app.
(I used an android emulator (Blue Stacks) to do this, as my phone was charging and didn’t feel like bothering with adb on my newish phone) Just know, if you use an emulator or phone, you have to turn on android debug bridge (adb) in the system settings (off by default, you also might want to turn it back off then ur done)
Adb on your host machine
There are lots of guides to using adb but essentially the break down is you download adb from the official website.
but then, you open the command line and change directory to the folder which you unzipped the program, no “install” needed. Once inside the adb folder in command prompt, you can run adb commands. Simple.

RoboVac Device Id 
RoboVac localKey

You can get both pieces of information by using logcat to “sniff” the data on an android phone OR emulator (like BlueStacks. This is known to work on Eufy Home v2.3.2 An example mirror link
More detailed steps on using logcat:
Close the app on your mobile device
Install and Login to the app on bluestacks
close the app
Open command prompt to your adb directory
Open ADB on the host machine (It’s open if you’re in the directory, in cmdprompt.)
Run adb logcat -e 'tuya.m.my.group.device.list'(assumes you have already installed the Android debug tools)((I had to run it as adb shell logcat -e 'tuya.m.my.group.device.list'
Launch the Eufy Home app
The output lines contain JSON, you're looking for the values of localKey (16 character hex string) and devId (20 character hex string).

Guide:
I followed this “simple” guide found Here on Git-hub to grab the information I needed from the robovac/eufy app.
BUT! I actually used [https://github.com/mitchellrj/eufy_robovac] for the component I grabbed for hass
This was kind of a pain, and I used the alternate command for finding the info. So, I had to sift through about 200 lines of code to find it, but it wasn’t that difficult honestly. And yes, this is the best way currently you can use to sniff the info you need to connect the vacuum (as of 11/14/20, the day I’m writing this) Blame Eufy/ Anker/ Tuya, I’m just a messenger.

Lastly, I had to make one small tweak to the existing code on git-hub.

Since the component is labeled as eufy_robovac in the file structure on git-hub, but the code says to use the folder name for the custom component as eufy_vacuum, you have to change the folder name when you drop it into the custom component folder of your server. The guide specifically says to do this, but I spent about 20 minutes trying to get it to work, when this was the problem, I didn’t read thoroughly.

If you are looking for it, you can find your Mac address in the settings inside the eufy app, in the three dots on the top right when you have the vacuum selected.

Hope this helps anyone trying to get eufy robovac to work with their home assistant install.

eufy_vacuum:
  devices:
  - name: Robovac
    address: !secret RobovacIP
    access_token: !secret LocalHassKey
    id: !secret EufyID
    type: T2118

Thanks for reading!
image

Last word of note. I believe there was a rolling code change within the API that causes us to have to run ADB again to grab the code and update ha. It’s only happened to me once in about six months of having this integration-ish, but if it happens just know running ADB again to grab your code is going to be your best bet.*

Edge Cleaning: https://github.com/RoldyBuffalo/eufy_robovac_edge_clean

9 Likes

My Robovac IP just changed and I have no idea what it is so that I can update it in HA.
The Eufy app shows blank ("") for the MAC address so I cannot map it to the list of IPs in my router (I have about 50 devices there)
Reinstalling the app did not help. Any other way I can find the IP/MAC of the vacuum? The MAC is not on the back where it should be either.

Could you clear and refresh your connected devices in your router, copy or export the connected IPs and their MAC addresses to a spreadsheet, then turn off the Eufy, refresh the connected devices list again, which should now be one less entry, then compare? The missing IP/MAC from the second list is your Eufy MAC.

Great idea, should be one missing and can catch it like that. :+1:

I have a 30C, and it shows up as ESP_ and the partial MAC address. Depending on which model you have, it may be similar and help narrow down your search.

Originally it showed the full MAC address but is blank now in the app.
Made a note of the MAC in my HA config also for future reference
Thanks for the suggestion above :slight_smile:

We’re looking into buying a Eufy, and I had a question. Once this is setup, can you still control it using the app?

Hi,

Any chance you can post your config?

Adding it to the post now.

Yup, this doesn’t bother the native control at all.

How long is the device ID typically? I have a short string and a longer one, 20 and 44 characters respectively.

Mine is 20, so I’d go with that one.

Thanks, I’m trying that but still running into issues with getting the dreaded decode error, and the vacuum ignoring commands, did the old version of EufyHome just to get the codes out of it. Does your vacuum show up as T2117 in the logcat output too, or T2118? I’ve tried both out, after adding a duplicate set of entries in the code for T2117, and I have the IP statically-assigned at my router. Have the folder named correctly, so it’s config/custom_components/eufy_vacuum/ with robovac.py, tuya.py, etc in there.

Not sure if it’s from firmware version, mine’s 1.1.1/1.0.6 in the app.

Shoot! Looks like some firmware has locked out most of the ID’s. Seems the workaround is to download the apk version 2.3.2 for eufy home and adb bridge that app instead of the google play one. Still testing on my end to see if this works!

Alright, Looks like I can confirm an older version of the eufo home app found Here - EufyHome 2.3.2 using the same steps to adb bridge into the device, I did NOT have to connect adb, it just worked. I ran one command in adb in windows

More detailed steps on using logcat:

Close the app on your mobile device or bluestacks

Connect the device to your laptop and enable USB debugging or ADB in bluestacks

Run

adb logcat -e 'tuya.m.my.group.device.list'

or

adb shell logcat -e 'tuya.m.my.group.device.list'

(assumes you have already installed the Android debug tools)

Launch the Eufy Home app

The output lines contain JSON, you’re looking for the values of

localKey (16 character hex string)
devId (20 character hex string).

Yep, those are the exact steps I followed to get those IDs, and loaded in. Still getting Decode error in the logs like follows (ID and IP obscured):

2020-04-21 12:39:39 ERROR (MainThread) [custom_components.eufy_vacuum.tuya] Expecting value: line 1 column 1 (char 0)
2020-04-21 12:39:39 ERROR (MainThread)[custom_components.eufy_vacuum.tuya] Failed to decrypt message from 12345678901234567890 (192.168.1.##:6668)

I even tried renaming the vacuum back to just ‘Robovac’ from the silly nickname I set, updating such in HA, but still get that. Is your vacuum running wi-fi 1.1.1 and MCU 1.0.6 for the firmware, or an older version? I doubt I can flash an older version unless there’s means to do so on the controller board and it’s easily accessed :<

Mines running up to date firmware…got to be something.

I found this helpful tip in the issue list on the github page. I have a Eufy vacuum 15c and was seeing the same errors as you. I followed this and it now works 100%:

Update:
For some reason, if you change the TuyaDevice default version to (3, 1) in line 438 of tuya.py it magically works 100%.

1 Like

What a WEIRD fix but it fixed it! Thank you!

I was able to get the key and the id… but I’m seeing this error. I’ve modified tuya.py also to have 3,1; Any Ideas? I’m on firmware wifi 1.1.3 MCU 1.1.1

2020-04-23 18:17:08 INFO (MainThread) [homeassistant.components.vacuum] Setting up vacuum.eufy_vacuum

2020-04-23 18:17:08 ERROR (MainThread) [homeassistant.components.vacuum] eufy_vacuum: Error on device update!

  File "/config/custom_components/eufy_vacuum/vacuum.py", line 75, in async_update
  File "/config/custom_components/eufy_vacuum/tuya.py", line 506, in async_get
  File "/config/custom_components/eufy_vacuum/tuya.py", line 352, in async_send
  File "/config/custom_components/eufy_vacuum/tuya.py", line 571, in _async_send
  File "/config/custom_components/eufy_vacuum/tuya.py", line 482, in async_connect