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!
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