Closed LarveyOfficial closed 9 months ago
Are you using the localtuya integration too?
Please try beta 4
That seems to have fixed it! Although I had to manually configure the IP by going to configure. Thanks!
After further testing, it seems it now does not update its status unless I manually reload the integration. It should be noted I am using localtuya
I've been using this fork I made: https://github.com/LarveyOfficial/robovac Which seems to not have any issues at all sending commands and receiving updates.
Although recently I've switched to Home Assistant OS instead of docker, and now even my fork is having issues. Seems my localtuya is causing issues with it. Is there a work around? Maybe disable localtuya's discovery in some way?
Seems Localtuya is causing issues with the newest version for me.
I've also run into the issue with my fork (which is probably irrelevant but maybe it will provide some more context). But whenever I restart home assistant I have to re-configure the vacuum as it gives a "Connection refused" error. I at least can use it this for now. Thanks for the work!
Yeah, localtuya will be clashing with the autodiscovery at the moment. They've recently merged a PR that I made so hopefully that sorts it.
Nice!
Was able to get it to somewhat work with the newest version of LocalTuya (main branch) but I have to disable autodiscovery and manually set the IP. if not it just states "IP Address not set". Maybe I didn't wait long enough, but I'm just going to leave it how it is for now. (This is on main, if I don't reply after this assume its the same behavior on beta 4 as I am about to test it now)
*Same behavior on beta 4. Noticed that if you enable auto discovery, and manually type in an IP address, the IP address is not saved. But I waited about 5 minutes for auto discovery to kick in, no luck.
If you enable debug logging and change the IP manually, you should get a message like "Updated ip address of XXX to XXX" in the logs if autodiscovery is working
So, I noticed even with autodiscovery off, and manually setting the IP address. The status of the vacuum does not update, unless I reload the integration.
I have enabled de-bugging. It does not say "Update IP Address of XX to XXX", it just says "disconnected from XXX" when I enable auto discovery. When disabling Auto discovery and manually setting the IP address it says "Connecting to XXX (IP:6668)" in the logs, and seems to connect fine.
When sending a command, it states "Sending to XXX (IP:6668)" and the vacuum does start, but then the logs say "Received message from XXX (IP:6668): Message(0x8, {'dps': {'15': 'Running'}, 't': 1695146056}, 0, None)" and then it says "Received updated state XXXX (IP:6668): {'2': False, '5': 'auto', '15': 'Running', '101': False, '104': 81, '106': 0, '107': False, '109': 60, '110': 1, '111': 45, '118': True, '122': 'Nosweep', '129': False, '130': 'Standard', '131': False, '135': True, '137': 30, '115': 'REALLYLONGSTRING', '139': 'STRING'}""
and the Home assistant status does not update. Unless I reload the integration.
It looks like sometimes it updates the status, but sometimes it does not. I got it to say cleaning once after about 5 minutes (which is a bit late but understandable), and when doing return to dock I got: [custom_components.robovac.vacuum] Return home Pressed, with multiple "sending" and "receiving" logs, Yet no update on the status.
Slowly getting closer to getting it working fully. I wanted to say thanks for working on this.
Latest Log is really long, hopefully nothing incriminating, but ill put it here
2023-09-19 14:00:31.495 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state eb4a4307033ae601d9u2ag (192.168.50.203:6668): {'2': True, '5': 'auto', '15': 'Running', '101': False, '104': 80, '106': 0, '107': False, '109': 0, '110': 0, '111': 45, '118': True, '122': 'Continue', '129': False, '130': 'Standard', '131': False, '135': True, '137': 30, '115': 'eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTE1LCJyZXN1bHQiOiJPIn0sImhhcmR3YXJlIjp7InZvbHRhZ2UiOjE1LjQyNzAwMDA0NTc3NjM2N30sInZhbHVlIjpbXX0=', '139': 'eyJkSW5mbyI6eyJ2YWx1ZSI6W119LCJ2YWx1ZSI6W119', '112': 'eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTEyLCJyZXN1bHQiOiJPIn0sInZhbHVlIjpbeyJsZXZlbCI6IkxvdyIsIm1vZGUiOiJ3YXRlck1vZGUifSx7ImxldmVsIjoiUXVpZXQiLCJtb2RlIjoiY2xlYW5MZXZlbCJ9LHsibGV2ZWwiOiIxIiwibW9kZSI6IkNvbGxlY3RNb2RlIn0seyJsZXZlbCI6IkNoYXJnZUJhc2UiLCJtb2RlIjoiRG9ja1R5cGUifSx7ImxldmVsIjoiU3dlZXAiLCJtb2RlIjoiY2xlYW5Nb2RlIn0seyJsZXZlbCI6Ik9GRiIsIm1vZGUiOiJhdXRvVVZDIn0seyJsZXZlbCI6IkR1c3RUYW5rIiwibW9kZSI6IkJveFR5cGUifV19', '113': 'eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTEzLCJyZXN1bHQiOiJPIn0sInZhbHVlIjpbeyJtb2RlIjoiY29sbGVjdFN3aXRjaCIsInN3aXRjaCI6ZmFsc2V9LHsibW9kZSI6ImNoaWxkU3dpdGNoIiwic3dpdGNoIjpmYWxzZX0seyJtb2RlIjoibGFzZXJBdm9pZGFuY2UiLCJzd2l0Y2giOmZhbHNlfSx7Im1vZGUiOiJVSUxFRCIsInN3aXRjaCI6dHJ1ZX0seyJtb2RlIjoiVVZDIiwic3dpdGNoIjpmYWxzZX1dfQ==', '117': 'eyJDbG91ZFN5bmMiOiJPIiwiTXVsdGlNYXBzIjoiT0ZGIiwiZEluZm8iOnsiaW5mb1R5cGUiOjExN319', '114': 'eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTE0LCJyZXN1bHQiOiJPIn0sInZhbHVlIjpbeyJ0eXBlIjoiQWxsVGltZSIsInZhbHVlIjo1NzAzNzN9LHsidHlwZSI6IkFsbEFyZWEiLCJ2YWx1ZSI6ODA1M30seyJ0eXBlIjoiQ2xlYW5Db3VudCIsInZhbHVlIjozNTF9XX0=', '116': 'eyJjb25zdW1hYmxlIjp7ImR1cmF0aW9uIjp7IkZNIjo2MywiUkIiOjY2LCJTQiI6NjcsIlNTIjoyMn19LCJkSW5mbyI6eyJpbmZvVHlwZSI6MTE2LCJyZXN1bHQiOiJPIn19', '142': 'eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTQyfSwic3dpdGNoIjoiT04ifQ=='}
For context: vacuum was docked in this state, for about 5 minutes after pressing return home.
I tested with my branch I currently have forked. https://github.com/LarveyOfficial/robovac And it seems to not have the same issue, so maybe something between then and now has changed. But I notice that when I push start or clean, it usually updates within 15-30 seconds. Unless I do it from home assistant itself, then its instant and states the status was update by me pushing start.
I did notice it spitting out a
2023-09-19 14:13:57.714 ERROR (MainThread) [custom_components.robovac] failed to set up discovery
Traceback (most recent call last):
File "/config/custom_components/robovac/__init__.py", line 54, in async_setup
await tuyalocaldiscovery.start()
File "/config/custom_components/robovac/tuyalocaldiscovery.py", line 28, in start
self._listeners = await asyncio.gather(listener, encrypted_listener)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1386, in create_datagram_endpoint
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1370, in create_datagram_endpoint
sock.bind(local_address)
OSError: [Errno 98] Address in use
error, but I don't know if that is due to just how old it is.
That error is due to the localtuya stuff.
But I notice that when I push start or clean, it usually updates within 15-30 seconds. Unless I do it from home assistant itself, then its instant and states the status was update by me pushing start.
What do you mean doing it from Home Assistant itself? As opposed to doing it in the home assistant app?
Yeah I fixed the localtuya errors on my branch already. What I mean by that, is on my branch, I can press start or run or return home, either on the actual eufy app, or on home assistant, and both are instant. The only time it isn't instant is sometimes there is a 20 second delay between me pressing run on the Eufy App and home assistant updating.
On the newest version, (main) I run into the issue in which it either takes a minute to update. OR it just doesn't update at all unless I reload the integration. This happens when activating the vacuum on home assistant AND the Eufy app. The only times it updates without a reload is when starting the vacuum. But it's rare, and most of the time it requires a reload.
Please try beta 5, it should be much quicker to update and should have less errors
Should be fixed in v1.1.0, please reopen if not
Since updating to beta 3. My LR20's IP Address is no longer found (In attributes) and I can no longer manually configure it.
Log spits this out: