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

Well, I have to call it for now. I’ve messed with a ton of backend stuff, but just narrowed it down to one single error I believe. I essentially, copy pasted from the home assistant source code for the vacuum base integration into the custom components folder of hacs. Hassio takes the files, and uses them as if they were part of the base system. This allowed me to get this close as having the clean edge option of the service for vacuums.

My only problem now is getting the eufy integration itself working with that particular custom integration, which I’m in over my head already.

I have tried several different revisions none of them working except the most recent pull from the github noted in the OP as the repo to include in hacs.

If you have the time, and a little known how of python/yaml It’s worth a look, but I need a break, will hit it with fresh eyes again soon.

I got it, it wasn’t even that hard, just needed fresh eyes. I was beat last night working on it, but it’s functional, working as expected, and doing an edge clean right now.

Here is the repo

I also just implemented it into the vacuum card I use. It edge cleans now instead of spot cleans for that icon. That’s actually easier then all of this was, literal find and replace in a single file.

I’ll give that a shot when I get home later and report back :slight_smile:
Thanks for looking into it

Ok @VarenDerpsAround about to test this out, I assume I just need to replace my existing eufy_vacuum folder with the one from that repo and restart right?

Works fine.
Thanks a lot for getting that added, would be nice if this made it into the HA as an official integration :slight_smile:

Would it be possible to add another icon for edge mode on its own card?
image

I can attempt to add another icon to the card, but I just modified my card to to edge clean, instead of the spot clean (we never use spot clean, I don’t think it worked anyway)

I can give you my files for that too if you like.

I’ve successfully been using the original integration for a fair few months now. Everything had been working fine, but since I tried the “Edge Clean” folder, I can’t connect to my 30C. I tried to revert back to the original Mitchell version, but it still says it’s unavailable and I get this error on restarting of my Home Assistant.

“2020-07-14 22:16:44 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform eufy_vacuum.vacuum: Platform not found (cannot import name ‘VacuumEntity’ from ‘homeassistant.components.vacuum’ (/usr/src/homeassistant/homeassistant/components/vacuum/init.py)).”

Any ideas as to what I’m doing wrong? I’m obviously doing something but can’t figure it out. Any help would be much appreciated! xXx

edit:

Nevermind! I actually managed to fix it by changing VacuumEntity to VacuumDevice in vacuum.py, which is actually the opposite to what was mentioned earlier on in the thread. xXx

Thanks for testing it! I’m not exactly sure why it works when changing that, but if it works so be it. I’m going to leave my code the way it is unless I get another report of it not working with that code. Mines working, but glad yours is working as well. Strange that mine is a literal drop of my files into github, and it’s opposite of the previous solution for you. Quite strange!

Also, apologies for the multiple pings, but did you say the edge cleaning is working with a 30c as well? I’d love to add more working models to my list, but all I know for sure that works is the 35c. Let me know if the edge cleaning repo works for your 30c as well.

No problem. Yeah, it seems to work perfectly with the 30c. I haven’t changed it in the Lovelace card to have edge cleaning, but going through services activates it, as well as an automation through Node Red, that I’m going to double check this evening, but appears to be working.
I noticed that in the original github, the VacuumEntity/Device was changed about a month ago, so it was still working for me, as I already had the old version installed, so I’m not sure why mine’s working okay.
If anyone does have any issues with it not working, that’s a good place to start, but it might just be my Home Assistant installation. Who knows!? As long as it works, who am I to complain. xXx

1 Like

Also, to add, I’ve possibly got the g30 working too, which I got a few days ago. I’ve not had time to test edge cleaning, as I’m just going into work, but it stops, starts and heads home. I’ll test it when I get home, but that’s looking promising. xXx

1 Like

Nice about the g30 (semi-jealous, I had a $150 off ticket I let go) I just double checked the vacuum.py file in the repo, it’s set to VacuumEntity not VacuumDevice, and you said you had to set it to VacuumDevice, from VacuumEntity? Just trying to make sure the repo is accurate, and functional.

Welcome to the home assistant community forums by the way, saw you had just joined. Always nice to see fresh faces around here, keeps everyone in their toes. Cheers.

1 Like

Interested in this. Let me know what you discover.

My wife found some deal on a Coredy R750(?) vacuum that is based on the Tuya platform and purchased it a couple of days ago. We have yet to receive it but I am now left with the responsibility of integrating it into Home Assistant when it arrives. Is the integration in this thread limited to the Eufy brand of Tuya based vacuums, or should it work with any Tuya vac?

Good question, I’d guess with the right know how it would be possible as the integration itself is as you said a tuya vacuum component. Good luck! If you need help, shout out here, no issues with that.

1 Like

Thanks! I’ll do that if I run into any problems. Vacuum isn’t supposed to be here until Friday, so I have several days to read through this thread and Github to prepare.

1 Like

could you get it to work on the 25C?

I am able to control my robovac via HA but I dont get any feedback, I get error when a command is sent, and the command sent does work, just nothing reporting back. The status always hows error and battery percentage always hows unknown. Any ideas or fixes down the line?

Sorry let met give more details. This is the Eufy G30 (non edge) and here are the logs that are showing.

ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved


ValueError: 0 is not a valid ErrorCode




During handling of the above exception, another exception occurred:




Traceback (most recent call last):


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 583, in _update_entity_states


    await asyncio.gather(*tasks)


  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 268, in async_update_ha_state


    self._async_write_ha_state()


  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 307, 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 304, in __call__


    return cls.__new__(cls, value)


  File "/usr/local/lib/python3.8/enum.py", line 595, in __new__


    raise exc


  File "/usr/local/lib/python3.8/enum.py", line 579, in __new__


    result = cls._missing_(value)


  File "/usr/local/lib/python3.8/enum.py", line 608, in _missing_


    raise ValueError("%r is not a valid %s" % (value, cls.__name__))


ValueError: 0 is not a valid ErrorCode
1 Like

Thanks @VarenDerpsAround for your great work. It works flawlessly with my 35C !

Do you know if it is possible in the TuyAPI to also direct (steer) the Robovac? I just had a great idea to use Home Assistant to guide the Robovac to a certain room and start spot cleaning there…

Would that be even possible? :thinking: