CodeFoodPixels / robovac

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

Please add support for Model X8 Pro SES #T2276113 or #T2276 #46

Open wywy1234 opened 10 months ago

wywy1234 commented 10 months ago

Not sure if this is because I am new or if I am doing something wrong but no matter what I can not add my X8 to home assistant. Does it make a difference that mine is the Model X8 Pro SES? I keep getting errors in the logs similar to some other issues I have read here. I have attempted to mess with the code a bit but I'm a python noob and mainly attempted to have ChatGPT fix it. I have removed and re-added the vacuum countless times to the network and home assistant. I have been attempting to get this vacuum integrated for like 4 days now and keep coming up empty. Any help would be greatly appreciated. Logs: 2024-01-08 23:09:59.432 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up robovac platform for vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/robovac/vacuum.py", line 116, in async_setup_entry entity = RoboVacEntity(item) ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/vacuum.py", line 284, in init self._attr_supported_features = self.vacuum.getHomeAssistantFeatures() ^^^^^^^^^^^ AttributeError: 'RoboVacEntity' object has no attribute 'vacuum' 2024-01-08_23-32-33

wywy1234 commented 10 months ago

Did some more tinkering and was able to get the vacuum to show up! The only thing I did that seemed to work was add T2276113 and T2276 to the model list in robovac.py. I think my issue is with the cyptography part of it all in the tuyalocalapi.py file. At the point I guess I am just pleading for some support for this model. lol I know its dumb but this is like the last device I need to integrate into HA. Anyway all comments are welcome! Errors and photos below.

ERROR: 2024-01-09 22:33:10.334 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/robovac/tuyalocalapi.py", line 758, in _async_handle_message response_data = await self.reader.readuntil(MAGIC_SUFFIX_BYTES) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/streams.py", line 637, in readuntil raise exceptions.IncompleteReadError(chunk, None) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes 2024-01-09_22-57-03

RoadXY commented 10 months ago

I have the Robovac X8 Pro (non-SES, just the charger) and I'm also trying to add it to HomeAssistant. One part I don't have clear is if I need to install another integration for the Tuya local integration? Where can I find this?

RoadXY commented 10 months ago

@wywy1234 Maybe you know if I need the Tuya local integration?

wywy1234 commented 10 months ago

@RoadXY Sorry I have no clue. I am still trying to figure out what I am missing in the code to allow full integration.

martijnpoppen commented 10 months ago

Take a look here ;) https://github.com/CodeFoodPixels/robovac/issues/28

X8 Pro and X9 are different in their communication

daschick111 commented 9 months ago

hi, are there any news? or hints i can contribute?

mainTAP commented 7 months ago

X8 Pro integration would be greatly appreciated.

maximoei commented 4 months ago

I added a basic config for T2276 (X8 Pro SES), based on the config of my L60 SES to the forked branch here. Context

Happy to hear if it works and if any of you can support bringing it back into the main branch here

Daafip commented 4 months ago

@maximoei I tried it with the non-ses X8 pro (T2266), but that didn't work.


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/robovac/vacuum.py", line 116, in async_setup_entry
    entity = RoboVacEntity(item)
             ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/vacuum.py", line 284, in __init__
    self._attr_supported_features = self.vacuum.getHomeAssistantFeatures()
                                    ^^^^^^^^^^^
AttributeError: 'RoboVacEntity' object has no attribute 'vacuum'
maximoei commented 4 months ago

@Daafip That's because there was no config file yet for T2266. I've added it now, feel free to try.

Daafip commented 4 months ago

@Daafip That's because there was no config file yet for T2266. I've added it now, feel free to try.

How do I ensure the correct branch is downloaded in hacs? I tried the link: https://github.com/maximoei/robovac/tree/L60-support ,but it seems to prefer the main branch. I tried manually running git clone https://github.com/maximoei/robovac -b 'L60-support', but doesn't seem to run correctly. How do you test your code?

roan111 commented 3 months ago

I added a basic config for T2276 (X8 Pro SES), based on the config of my L60 SES to the forked branch here. Context

Happy to hear if it works and if any of you can support bringing it back into the main branch here

I tried to add the x8 pro ses, however this is not going quite right yet.

The log shows this

[custom_components.robovac.tuyalocalapi..........] Incomplete read

afbeelding

maximoei commented 3 months ago

If you can set the loglevel to debug, can you share some log messages of the tuya state before, during and after cleaning?

Messages like this, but with more parameters

{'151': True, '156': True, '158': 'Standard', '159': True, '160': False, '161': 40, '163': 100}

roan111 commented 3 months ago

afbeelding afbeelding

If you can set the loglevel to debug, can you share some log messages of the tuya state before, during and after cleaning?

Messages like this, but with more parameters

{'151': True, '156': True, '158': 'Standard', '159': True, '160': False, '161': 40, '163': 100}

M1cN commented 2 months ago

Is there any progress on this:

image

I'm glad the vacume cleaner is finally reconized, one step in the right direction. Is there any way i can help? By providing logging for example.

mkampstra commented 2 months ago

I have the X8 Pro (non SES) T2266, and i don't get it running. Same as the above.

In Debug it is trying to connect some times, and after a different connect it says "Incomplete read" alot! And then starts over. Same before, during and after cleaning.

image

LOG1.txt

Is there someone who can get us going?

Daafip commented 13 hours ago

I figure out how to clone the repo correctly and do get further now, but get stuck same as @roan111. image

Logger: homeassistant.components.vacuum
Source: helpers/entity_platform.py:595
integration: Vacuum (documentation, issues)
First occurred: 9:29:24 PM (1 occurrences)
Last logged: 9:29:24 PM

Error adding entity vacuum.robovac for domain vacuum with platform robovac
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/locks.py", line 386, in acquire
    await fut
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/robovac/tuyalocalapi.py", line 911, in async_recieve
    await self._recieve_task
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1365, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/robovac/vacuum.py", line 366, in async_added_to_hass
    await self.async_forced_update()
  File "/config/custom_components/robovac/vacuum.py", line 395, in async_forced_update
    await self.async_update_vacuum()
  File "/config/custom_components/robovac/vacuum.py", line 391, in async_update_vacuum
    await self.vacuum.async_get()
  File "/config/custom_components/robovac/tuyalocalapi.py", line 763, in async_get
    response = await self.async_recieve(message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/tuyalocalapi.py", line 923, in async_recieve
    raise ResponseTimeoutException(
custom_components.robovac.tuyalocalapi.ResponseTimeoutException: Timed out waiting for response to sequence number 199912