CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
129 stars 28 forks source link

Error message not working #5

Closed ea5522 closed 1 year ago

ea5522 commented 1 year ago

Hello,

Thanks for taking over this project. Since the update, the buttons started working. However, the Status just shows as "Error" where before it would actually say what the error was, for example: Rolling Brush Stuck. I have the 30C Max models.

cdn4lf commented 1 year ago

@CodeFoodPixels I'm having this issue as well. The credentials from #2 now authenticate properly, but I'm getting error messages when attempting to execute and commands and the vacuum is showing a status of "Error" as well.

hugalafutro commented 1 year ago

I am as well running into this issue after sorting the login credentials from the other issue the vacuum gets detected, but is in error state and no commands respond, in HA log I see:

2023-08-14 20:04:49.611 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547997037504] [Errno 111] Connection refused
Traceback (most recent call last):
File "/config/custom_components/robovac/tuyalocalapi.py", line 762, in _async_send
await self.async_connect()
File "/config/custom_components/robovac/tuyalocalapi.py", line 679, in async_connect
sock.connect((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/robovac/vacuum.py", line 326, in async_start
await self.vacuum.async_set({"5": self.mode}, None)
File "/config/custom_components/robovac/tuyalocalapi.py", line 705, in async_set
await message.async_send(self, callback)
File "/config/custom_components/robovac/tuyalocalapi.py", line 529, in async_send
await device._async_send(self)
File "/config/custom_components/robovac/tuyalocalapi.py", line 768, in _async_send
await self.async_connect()
File "/config/custom_components/robovac/tuyalocalapi.py", line 679, in async_connect
sock.connect((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused

this is with main branch installed via hacs

hugalafutro commented 1 year ago

SOLVED! Click configure, add your vacuum's ip everything (i tried so far) works!

image

cdn4lf commented 1 year ago

Confirmed. This fixed it.

pbuckley4192 commented 1 year ago

This also worked for me.

CodeFoodPixels commented 1 year ago

Because of the update to use the VacuumStateEntity, we can only set the status to certain values. The error itself is reported in the Attributes drop down.

I've also found out that there's a way to do autodiscovery of Robovacs, so I'm going to try and implement that so we don't keep having issues with the IP not being set!

CodeFoodPixels commented 1 year ago

Latest beta has autodiscovery in it and also different reporting of the current state: https://github.com/CodeFoodPixels/robovac/releases/tag/v1.1.0.beta.1

CrazyLlamaMan commented 1 year ago

Latest beta fixed all error reporting on my X8.

Thank you for your great efforts.

cdn4lf commented 1 year ago

Beta throws an error when trying to use discovery to configure a device setup with IP address. @CodeFoodPixels , let me know if you want this as a new issue.

CodeFoodPixels commented 1 year ago

@cdn4lf Yeah, can you raise it as a separate issue please