CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
147 stars 32 forks source link

Unable to use together with localtuya integration #58

Closed vmartinv closed 9 months ago

vmartinv commented 9 months ago

Bug

The Localtuya integration complains that the ports 6666/6667 are already in use by this other integration. These ports are used to discover new Tuya devices so they are only needed when adding a new device. Additionally I'm sometimes not able to control the vacuum when localtuya is enabled, I'm not sure why. Note: Except for discovery, localtuya works fine with robovac enabled. robovac has issues with localtuya.

Logs

I start getting these errors often:

2024-02-27 22:46:52.960 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/robovac/tuyalocalapi.py", line 816, in _async_handle_message
    response_data = self._response_task.result()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.InvalidStateError: Result is not set.

Possible solutions

  1. Fix this integration so it can coexist with localtuya. I'm not sure why this integration needs keep using the discovery port even though I'm not adding any device.
  2. If my understanding is correct, then my Eufy Vacuum is also a Tuya device so if I manage to get the id/localkey I should be able to add it to localtuya. But I'm not sure if it's possible to get that.
CodeFoodPixels commented 9 months ago

There's nothing to fix in this integration with regards to the localtuya stuff. I made a pull request to the localtuya repo with a fix as it was hogging the port, and it has been accepted and merged, there just hasn't been a localtuya release since then.

With regards to that error, please ensure that you're on the latest version.