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

Yes, all the controls work. I’d never been able to see the status before - it always said ‘error’ - and the battery indicator only worked intermittently.

No idea why a full reset of the Robovac worked. I’d been putting it off for a long time - but I’m glad I did a hard reset.

The only thing I had to change in Home Assistant was the new access token - all worked after that.

I also no longer get any errors in the log.

Thank you! That did the trick for me as well.

Few Notes:

  1. I did not use the tuya.ph update on line 438 to (3,1). I used the original (3,3).
  2. I had tried the Edge directory at one point during my previous testing, and that did not work.

After reverting my directory to the OG post info, doing a hard reset to get a new access code, I am all good to go.

Is there a way to add this integration without messing with adb and an android device or blue stacks?

I’ve seen this here which seems to get the details with just a username and password.

Looking for some advice please. Try as I might, I can’t seem to get this integration to properly function with my two G30 Edge RoboVacs (named Lilo and Stitch :slight_smile: ). Both devices are physically seen within HA, however they’re not working as expected.

So far I’ve tried the following

  1. Followed the instructions in post 1 (using Bluestacks and the Eufy 2.3.2 apk). (See yaml at the end of this post for final config)
  2. Double checked instructions against the ones found at https://github.com/RoldyBuffalo/eufy_robovac_edge_clean (note, the services don’t show up as outlined in the post)
  3. Issued a hard reset on both Vacuums and re-added (as per previous advice)

Both vacuums are seen within HA

and can be manually operated, but both display errors when selected.

image

Issuing any command generates a ValueError: 0 is not a valid ErrorCode response. Full log is below.

Logger: homeassistant
Source: custom_components/eufy_vacuum/property.py:36
First occurred: 14:49:50 (9 occurrences)
Last logged: 14:52:30
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 621, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 282, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 277, in state_attributes
    data = super().state_attributes
  File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 178, in state_attributes
    data[ATTR_BATTERY_ICON] = self.battery_icon
  File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 268, in battery_icon
    if self.status is not None:
  File "/config/custom_components/eufy_vacuum/vacuum.py", line 116, in status
    if self.robovac.error_code != robovac.ErrorCode.NO_ERROR:
  File "/config/custom_components/eufy_vacuum/property.py", line 36, in __get__
    value = self.type_cast(value)
  File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.8/enum.py", line 662, in __new__
    raise ve_exc

ValueError: 0 is not a valid ErrorCode

Configuration files as below, which allow both devices to be seen (so have assumed that is ok).

vacuum:
- platform: eufy_vacuum

plus

eufy_vacuum:
  devices:
  - name: Lilo
    address: !secret EufyIP_01
    id: !secret EufyDevID_01
    access_token: !secret EufyLocalKey_01
    type: T2118
  - name: Stitch
    address: !secret EufyIP_02
    id: !secret EufyDevID_02
    access_token: !secret EufyLocalKey_02
    type: T2118

Obviously the G30’s (or Edge variant) may not be fully supported, but if anyone has one working, would be good to know how you did it.

The only thing I would say is that the Eufy G30 Edge has a model number of: T2251 rather than T2118 - perhaps this has something to do with it maybe?

Yup, am aware of the different model number, but the code only allows for T2118 as a valid entry (any other results in the module not working at all)

See here for the code

1 Like

My G30 is actually 2252 so there are likely different generations or regions at play with regards to the model number.

Hi guys,

I just wanted to point everyone to my repo which you can import into HACS and has all the bits needed to keep on working after 2021.6 comes along.

I’m not claiming any credit for writing this code. It’s based off of the two projects mentioned in OPs instructions and forked off of eufy_vacuum by snopeonarope.

I’ll try to see if I can help out with any of the other people attempting to use this with their different model Robovacs. I only have 1 - a 30c or 35c (not sure which one) but I got it working with OPs instructions. I have found some interesting bits of code that I am going to see how I can incorporate it which means we won’t need to get the code from the Eufy App, etc. (Someone posted this above as well - @eximo84 - thanks for that.)

And, if anyone else wants to help with this, please feel free to contribute. That’s what Open Source is all about right?

I’m not sure what I need to do to have this show in HACS as a new repo (maybe it picks is up automatically) but you can import it as a repository if you go into Integrations and click on the 3 dots → add repository.

Any comments, suggestions are welcome! And as with a lot of projects, I’m doing this in my spare time. (Early in the morning or late in the afternoon UK time.)

Enjoy!


Patrick

5 Likes

From what I can tell the G30 models are coded as follows

T2250 = G30 (no edge detection)
T2251 = G30 Edge (comes with 2 boundary strips)
T2252 = G30 Verge (same specs as T2251, but only comes with 1 boundary strip)
T2253 = G30 Hybrid (mops & vacuums, comes with 1 boundary strip)

1 Like

I started investigating further and these are the models I’ve found.

Models / Number
G30 Hybrid T2253
G30 Edge T2251
G30 T2250
G10 Hybrid T2150
30C Max T2130
15C Max T2128
15C White T2120
11S Plus T2119
30C T2118
35C T2117
30 T2116 - remote only
11S MAX T2126 - remote only
11S T2108 - remote only
25C T2123
11C T2103
12 T2109 - remote only

Obviously, the ones with remote only can’t work with this. But I listed them for completeness.

Some are listed in the UK pages, others in the US pages. I’m sure there are models elsewhere that I haven’t put in here. I mainly want to figure what each one does and see how I can build this integration to cover as many models as possible.

3 Likes

Many thanks to Patrick - I now have something that mostly works instead of nothing at all.

p4mr: I’ve added a few comments on the Github issue you raised. Commenting a few lines out of one file and modifying another line should get Lilo and Stitch working a little better for you - Link. It has worked well with Puck the G30 at least.

Thanks for all the additional work. I’ve got an additional fix that I need to address so I’ll see what you’ve changed and add it to the code. Did you do a pull request? Nevermind - I can just check.

Thanks!

-P

Just commenting out the troublesome part - not worth a PR, needs fixing properly :slight_smile:

Looking forward to seeing what you’ve done.

Great work! It would be great if you were able to implement the battery info so that it works on HomeKit. I submitted an enhancement request last year to the original git

I’m trying to setup my Eufy Robavac C35 to HA, But I am struggling to get the device_id and de Local_key. I used a Samsung A20e and Bluestack but I did succeed yet.

I used adb logcat and searched for the id and key I found the key but did succeed to find the local_Key. If I search for local_code the value is empty

I tried multiple versions of the app 2.3.1/2.3.2/2.4.0.

Output (*** == hide value) (### == find the device id here)

OkHttp : {"res_code":1,"message":"","devices":[{"id":"(###","sn":"","name":"35C","alias_name":"***","bluetooth":null,"wifi":{"mac":"E0:98:06:06:20:0A","wifi_ssid":"***","lan_ip_addr":"***"},"product":{"id":"cbbebfbb-67f5-11e8-a09e-0242ac130017","name":"35C","region":"US","default_name":"RoboVac","icon_url":"https://d1teb1w17vl5yo.cloudfront.net/eufyhome/products/T2117_addProduct.png","category":"Home","appliance":"Cleaning","connect_type":1,"pictures":[{"code":"addProductIcon","url":"https://d1teb1w17vl5yo.cloudfront.net/eufyhome/products/T2117_addProduct.png","description":""},{"code":"selectDeviceImage","url":"https://d1teb1w17vl5yo.cloudfront.net/eufyhome/products/T2117_selectProduct.png","description":""},{"code":"feedbackImage","url":"https://d1teb1w17vl5yo.cloudfront.net/eufyhome/products/T2117_feedback.png","description":""}],"description":"T2117 RoboVac 35C, connected via EufyHome","product_code":"T2117","wifi_ssid_prefix":"eufy RoboVac 35C","wifi_ssid_prefix_full":"eufy RoboVac 35C-","index":15,"create_time":1493114110,"update_time":1528774126,"is_show":false,"tuya_pid":""},"user_id":"***","owner_info":null,"home_id":"a0c216eb-f229-4576-aeae-1cd520ce43f1","home_name":"","room_id":"***","room_name":"***Room","connect_type":1,"grant_by":0,"software_version":"1.1.5","index":0,"device_key":"","create_time":1626370028,"update_time":***,"hardware_version":"","local_code":"","needUpdate":false,"setting":{"id":"","device_id":"","is_default":true},"update_packages":[]}],"groups":[]}

It took me quite a long time to get right - it’s fiddly.

The first point is that you need to use Eufy Home Android 2.3.2 - later versions will not work because the JSON isn’t logged anymore - but I can see that you have tried that at least.

I used the ADB tools from xda-developers to connect to my phone. I didn’t use Bluestacks. The platform-tools and instructions for Windows 10 are here:

I used the command: adb logcat -e 'tuya.m.my.group.device.list’

This actually didn’t produce any output on screen until I had written out the logfile using:

adb logcat -d > myfile

where ‘myfile’ is whatever filename you want. If you find that you can’t use the ‘-e’ option for whatever reason, the logfile will write to the screen and you can then cut and paste the log to Notepad or NotePad++

I’ve used this method 3-4 times and it took a lot of trial and error to get the output containing the keys.

The ‘LocalKey’ is 16 characters long, the ‘devID’ is 21 characters long.

I have my RoboVac within HA and all the functions work perfectly - so it’s definitely worth doing.

2 Likes

i passed the output to a file, opened it with studio code and found it :slight_smile:

I tried all of the above. I am not able to find the device ID an local key. I use bluestacks ona a Mac, adb installed. I use version 2.3.2 of the app. When I open the app I see a lot going on in the terminal window, but the local key am devID are not there.
One thing that I notice: the robovac is shown as offline when I start the app in bluestacks (it is shown properly on my iPhone). But as soon as I login to the Eufy app in bluestacks it is shown as offline. Could that be the problem and has anyone else experienced this?

Greetings,
Pete

I think that this is your problem… The Eufy app needs to connect to your account to gather the tokens etc. If your bluestacks app is showing offline then I’m guessing the app cannot communicate with the Robovac and therefore you’re not seeing anything.

Have you ever been able to connect to the Robovac using the app on bluestacks?

Yeah I though so. No, I have newer been able to connect to the Robovac via Bluestacks. The Bluestacks App itself has a internet connection (Chrome etc. works fine). I also tried to install the latest Version of the eufy app (just to see whether I can connect to the robovac there) but it also says “offline”. I also tried to add the Robovac as a new device right inside of BlueStacks.

Any other ideas?