Closed createeve closed 4 years ago
Yuuuup they've gone and changed the message encryption. This is going to take some digging...
codetheweb/tuyapi#175 should provide the necessary info if they get there first. The Eufy Tuya API has been upgraded to version 3.3 from 3.1. The pre-encryption is all wrapped up in a native, compiled library now.
Is it working now on 1.1.2? Anyone tried it yet?
I'm taking a look at this now, I'll post further updates as I make progress. Thanks for the update @6a61636b.
I've added the compatibility for Tuya 3.3, but it doesn't seem to work. I'll keep poking it, but it's possible Eufy are doing something a little different.
Any updates on this? I was planning on purchasing a Robotic 15C MAX but found this and now I'm having second thoughts :(.
Sorry @raulfunkie, I've not had the time lately and I'm not likely to for 2 months or more.
Alright, I think I've cracked it. Try using the code from the tuya_3_3
branch. Once I've got another confirmation, I'll merge it.
Playing with it. Seems like there's communication now but it fails to complete the demo. What happens to me is as follows:
This is the log I'm getting:
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:eufy_robovac.tuya:Connecting to 60608308ecfabc982fba (192.168.7.248:6668)
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0x9, b'', 0)
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0xa, {'gwId': '60608308ecfabc982fba', 'devId': '60608308ecfabc982fba'}, 1557224820)
ERROR:eufy_robovac.tuya:Connection to 60608308ecfabc982fba (192.168.7.248:6668) failed
DEBUG:eufy_robovac.tuya:Disconnected from 60608308ecfabc982fba (192.168.7.248:6668)
Starting cleaning...
DEBUG:eufy_robovac.tuya:Connecting to 60608308ecfabc982fba (192.168.7.248:6668)
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0x7, {'devId': '60608308ecfabc982fba', 'uid': '', 't': 1567821883, 'dps': {'5': 'auto'}}, 1557225821)
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0x9, b'', 0)
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0xa, {'gwId': '60608308ecfabc982fba', 'devId': '60608308ecfabc982fba'}, 1557225848)
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x9, b'', 0)
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x7, b'', 1557225821)
Cleaning started.
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0xa, {'devId': '60608308ecfabc982fba', 'dps': {'1': True, '2': False, '3': 'forward', '5': 'Nosweep', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}}, 1557225848)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': False, '3': 'forward', '5': 'Nosweep', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'5': 'auto'}, 't': 1567821883}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': False, '3': 'forward', '5': 'auto', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'2': True}, 't': 1567821883}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': True, '3': 'forward', '5': 'auto', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'15': 'Running'}, 't': 1567821883}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': True, '3': 'forward', '5': 'auto', '15': 'Running', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
Pausing...
DEBUG:eufy_robovac.tuya:Sending to 60608308ecfabc982fba (192.168.7.248:6668): Message(0x7, {'devId': '60608308ecfabc982fba', 'uid': '', 't': 1567821888, 'dps': {'2': False}}, 1557230853)
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x7, b'', 1557230853)
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'2': False}, 't': 1567821888}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': False, '3': 'forward', '5': 'auto', '15': 'Running', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'15': 'standby'}, 't': 1567821888}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': False, '3': 'forward', '5': 'auto', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
DEBUG:eufy_robovac.tuya:Received message from 60608308ecfabc982fba (192.168.7.248:6668): Message(0x8, {'devId': '60608308ecfabc982fba', 'dps': {'5': 'Nosweep'}, 't': 1567821888}, 0)
INFO:eufy_robovac.tuya:Received updated state 60608308ecfabc982fba (192.168.7.248:6668): {'1': True, '2': False, '3': 'forward', '5': 'Nosweep', '15': 'standby', '101': False, '102': 'Max', '103': False, '104': 98, '106': 'no_error'}
Disconnecting...
DEBUG:eufy_robovac.tuya:Disconnected from 60608308ecfabc982fba (192.168.7.248:6668)
That's the full extent of the demo, were you expecting it to do anything further, or do any of the steps you listed fail?
Correct me If I'm wrong but shouldn't it:
The demo starts, but the vacuum only "cleans" for 1sec, then suddenly disconnects and does nothing. It does not return home (no matter how much time I wait).
The demo used to do that, but I changed it at some point, I'm not sure why. https://github.com/mitchellrj/eufy_robovac/commit/aa063a43a34eb867043d09654f1f87d4190a7949#diff-e845259df144dbc96b1cea727a8f0ed9
I'll take that as confirmation and get this merged and closed 👍
@raulfunkie Does this now work for you on your 15C MAX?
All was working until I upgraded firmware in Robovac 30c from 1.1.1 to 1.1.2 I've checked key and uuid in the adb - still the same as before update. From the original app all is working as before.
HA gives this output:
Traceback (most recent call last): File "/root/.homeassistant/custom_components/eufy_vacuum/tuya.py", line 533, in _async_handle_message response_data = await self.reader.readuntil(MAGIC_SUFFIX_BYTES) File "/usr/lib64/python3.6/asyncio/streams.py", line 578, in readuntil raise IncompleteReadError(chunk, None) asyncio.streams.IncompleteReadError: 0 bytes read on a total of None expected bytes
: (