eufy_robovac icon indicating copy to clipboard operation
eufy_robovac copied to clipboard

Support for 15c (T2120)

Open rmountjoy92 opened this issue 4 years ago • 10 comments

Hello, I've done a bunch of research on how to control the Robovac 15c (T2120) with home assistant and I keep getting pointed to here. I have gotten the localKey and devId from the abd commands - which was quite easy. But when I run the demo I get:

DEBUG:asyncio:Using selector: EpollSelector DEBUG:eufy_robovac.tuya:Connecting to 66878020807d3a3b614b (192.168.39.139:6668) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x9, b'', 0, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0xa, {'gwId': '66878020807d3a3b614b', 'devId': '66878020807d3a3b614b'}, 405717436, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) ERROR:eufy_robovac.tuya:Connection to 66878020807d3a3b614b (192.168.39.139:6668) failed: [Errno 104] Connection reset by peer DEBUG:eufy_robovac.tuya:Disconnected from 66878020807d3a3b614b (192.168.39.139:6668) Starting cleaning... DEBUG:eufy_robovac.tuya:Connecting to 66878020807d3a3b614b (192.168.39.139:6668) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x7, {'devId': '66878020807d3a3b614b', 'uid': '', 't': 1579179104, 'dps': {'5': 'auto'}}, 405718437, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x9, b'', 0, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0xa, {'gwId': '66878020807d3a3b614b', 'devId': '66878020807d3a3b614b'}, 405718447, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) ERROR:eufy_robovac.tuya:Connection to 66878020807d3a3b614b (192.168.39.139:6668) failed: [Errno 104] Connection reset by peer DEBUG:eufy_robovac.tuya:Disconnected from 66878020807d3a3b614b (192.168.39.139:6668) Pausing... DEBUG:eufy_robovac.tuya:Connecting to 66878020807d3a3b614b (192.168.39.139:6668) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x7, {'devId': '66878020807d3a3b614b', 'uid': '', 't': 1579179109, 'dps': {'2': False}}, 405723453, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x9, b'', 0, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0xa, {'gwId': '66878020807d3a3b614b', 'devId': '66878020807d3a3b614b'}, 405723461, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) ERROR:eufy_robovac.tuya:Connection to 66878020807d3a3b614b (192.168.39.139:6668) failed: [Errno 104] Connection reset by peer DEBUG:eufy_robovac.tuya:Disconnected from 66878020807d3a3b614b (192.168.39.139:6668) Disconnecting... DEBUG:eufy_robovac.tuya:Disconnected from 66878020807d3a3b614b (192.168.39.139:6668)

I ran nmap on the IP and it is the correct IP and port 6668 is open. Any ideas of where the problem might be coming from? I'm gonna keep trying to figure it out (mainly because these things dropped to $80 open box from amazon and I bought 3 of them lol) but if someone could point me in the right direction it would be much appreciated!

edit: When I force closed the Eufy app and reran the demo, the output looked like this: DEBUG:asyncio:Using selector: EpollSelector DEBUG:eufy_robovac.tuya:Connecting to 66878020807d3a3b614b (192.168.39.139:6668) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x9, b'', 0, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0xa, {'gwId': '66878020807d3a3b614b', 'devId': '66878020807d3a3b614b'}, 605228873, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) DEBUG:eufy_robovac.tuya:Received message from 66878020807d3a3b614b (192.168.39.139:6668): Message(0x9, b'', 0, None) DEBUG:eufy_robovac.tuya:6461746120666f726d6174206572726f72 ERROR:eufy_robovac.tuya:Expecting value: line 1 column 1 (char 0) ERROR:eufy_robovac.tuya:Failed to decrypt message from 66878020807d3a3b614b (192.168.39.139:6668) Starting cleaning... DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x7, {'devId': '66878020807d3a3b614b', 'uid': '', 't': 1579180817, 'dps': {'5': 'auto'}}, 605229875, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) Pausing... DEBUG:eufy_robovac.tuya:Sending to 66878020807d3a3b614b (192.168.39.139:6668): Message(0x7, {'devId': '66878020807d3a3b614b', 'uid': '', 't': 1579180822, 'dps': {'2': False}}, 605234880, <Device 66878020807d3a3b614b (192.168.39.139:6668)>) Disconnecting... DEBUG:eufy_robovac.tuya:Disconnected from 66878020807d3a3b614b (192.168.39.139:6668) Just to see, I put the custom component into HA, here's what it looks like (note: I had to leave the model as T2118 because if I put T2120 it says 'unsupported model' and doesn't load at all into HA): image

None of the buttons do anything

Here's the logs from HA: image

rmountjoy92 avatar Jan 16 '20 13:01 rmountjoy92

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

rmountjoy92 avatar Jan 19 '20 20:01 rmountjoy92

Thanks a lot that change on the tuya.py work on my 35C. I was looking for a fix for weeks now never had been able to make it work with home assistant till now.

scoobypt avatar Jan 19 '20 21:01 scoobypt

I'm trying to do the same for the RoboVac 15C MAX but the above change doesn't seem to work. Any ideas?

aptonline avatar Jun 03 '20 15:06 aptonline

getting the following error:

  File "/config/custom_components/eufy_vacuum/__init__.py", line 17, in <module>
    from .robovac import Robovac
  File "/config/custom_components/eufy_vacuum/robovac.py", line 20, in <module>
    from .tuya import TuyaDevice
  File "/config/custom_components/eufy_vacuum/tuya.py", line 438
    gateway_id=None, version=(3, 1, timeout=10):
                                           ^
SyntaxError: invalid syntax

EDIT: The demo works as expected.

aptonline avatar Jun 11 '20 14:06 aptonline

Leaving the model as T2118 and making the changes to tuya.py proposed by @rmountjoy92 made it work on my side with the 15C on WiFi Version 1.1.1 and MCU Version 1.1.4 on the 15C. Thanks a ton!

lennartgrunau avatar Aug 03 '20 15:08 lennartgrunau

If anyone wants to submit a pull-request to make this more easily configurable, I'd gladly accept it.

mitchellrj avatar Sep 08 '20 17:09 mitchellrj

getting the following error:

  File "/config/custom_components/eufy_vacuum/__init__.py", line 17, in <module>
    from .robovac import Robovac
  File "/config/custom_components/eufy_vacuum/robovac.py", line 20, in <module>
    from .tuya import TuyaDevice
  File "/config/custom_components/eufy_vacuum/tuya.py", line 438
    gateway_id=None, version=(3, 1, timeout=10):
                                           ^
SyntaxError: invalid syntax

EDIT: The demo works as expected.

@aptonline You have a typo, the line should read:

gateway_id=None, version=(3, 1), timeout=10):

clarkd avatar Oct 14 '20 21:10 clarkd

FYI - I just set up the configuration and it did not working using Tuya (3,1). Reverting back to (3,3) works as expected.

clarkd avatar Oct 14 '20 22:10 clarkd

Hi all,

my turn to try get this working, i have tried all the above and still no luck! even tried higher versions.

'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte' this is what shows up in the log

Anyone else recently done the integration?

thanks

Sloshmold avatar Jan 07 '22 17:01 Sloshmold

Hi all,

my turn to try get this working, i have tried all the above and still no luck! even tried higher versions.

'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte' this is what shows up in the log

Anyone else recently done the integration?

thanks

After I removed line 116,117,118 and updated 119 in the vacuum.py my G10 is working now

But I get following error. Did you manage to solve the docoding error? [custom_components.eufy_vacuum.tuya] 'utf-8' codec can't decode byte 0x86 in position 3: invalid start byte [custom_components.eufy_vacuum.tuya] Failed to decrypt message from xxx

h4nnes avatar Sep 14 '22 13:09 h4nnes