homeassistant-roborock icon indicating copy to clipboard operation
homeassistant-roborock copied to clipboard

Integration is not working with HA 2023.10.1

Open MiguelCosta opened this issue 1 year ago • 117 comments

Version of the custom_component

1.0.12

What vacuum are you using?

Roborock S7

Describe the bug

The 1.0.12 integration version works with HA 2023.10.0, but after upgrade HA to 2023.10.1, the integration is not working anymore. The master version is also not working.

Debug log


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/roborock/__init__.py", line 44, in async_setup_entry
    user_data = UserData.from_dict(data.get("user_data"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/containers.py", line 90, in from_dict
    return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum]))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 68, in from_dict
    raise WrongTypeError(field_path=field.name, field_type=field.type, value=value)
dacite.exceptions.WrongTypeError: wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'XXXXXXXXXXXXX', 's': 'XXXXXXXX', 'h': 'XXXXXXXX', 'k': 'XXXXXXX', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-4.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"

MiguelCosta avatar Oct 10 '23 19:10 MiguelCosta

I have the same issue

subexx avatar Oct 11 '23 06:10 subexx

Same

matt1131 avatar Oct 11 '23 20:10 matt1131

Nevermind, updated version works

matt1131 avatar Oct 11 '23 20:10 matt1131

which updated version?

tretabyte avatar Oct 11 '23 21:10 tretabyte

Double nevermind, looks like it didn't. I'm on 1.0.12


This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/roborock/time.py:60
Integration: Roborock (documentation, issues)
First occurred: 21:19:18 (2 occurrences)
Last logged: 21:19:48

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 882, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 750, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
    state, attr = self._async_generate_attributes()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 820, in _async_generate_attributes
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 785, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/time/__init__.py", line 94, in state
    if self.native_value is None:
       ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/roborock/time.py", line 188, in native_value
    return self.entity_description.get_value(self.api.cache.get(self.entity_description.cache_key))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/roborock/time.py", line 60, in <lambda>
    get_value=lambda cache: datetime.time(
                            ^^^^^^^^^^^^^^
TypeError: 'NoneType' object cannot be interpreted as an integer

matt1131 avatar Oct 12 '23 01:10 matt1131

I am using HA 2023.10.3 and the integration continues with same error :-(

Logger: homeassistant.config_entries
Source: config_entries.py:399
First occurred: 16:44:18 (1 occurrences)
Last logged: 16:44:18

Error setting up entry [email protected] for roborock
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/roborock/__init__.py", line 44, in async_setup_entry
    user_data = UserData.from_dict(data.get("user_data"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/containers.py", line 90, in from_dict
    return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum]))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 68, in from_dict
    raise WrongTypeError(field_path=field.name, field_type=field.type, value=value)
dacite.exceptions.WrongTypeError: wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'XXXXXXX', 's': 'XXXXXXX', 'h': 'XXXXXXX', 'k': 'XXXXXXX', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-4.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"

MiguelCosta avatar Oct 13 '23 17:10 MiguelCosta

+1

TB-SE avatar Oct 14 '23 00:10 TB-SE

I think something changed in getting the robots in Home Assistant 2023.10 (.0 to .3)

I deinstalled this integration in HACS and rebooted the pi and tried it with the build integration which doesn't work either anymore (unknown error).

Then I installed this integration over HACS again and tried to add the robots. Here comes the message that no robot is assigned to the account:

Bildschirmfoto 2023-10-14 um 11 00 53

superpower10 avatar Oct 14 '23 09:10 superpower10

+1

ChristophGoth avatar Oct 14 '23 10:10 ChristophGoth

+1

image

eXenic avatar Oct 14 '23 22:10 eXenic

Same

mesut3000 avatar Oct 15 '23 08:10 mesut3000

same No device found error

jyug avatar Oct 15 '23 09:10 jyug

Same :(

rain82k avatar Oct 15 '23 17:10 rain82k

Mine seems to work randomly between reboots and generally tends to fix itself when I start the vacuum via the Roborock app on my phone.

TB-SE avatar Oct 15 '23 19:10 TB-SE

I updated HA and this integration today, HA kept rebooting and wouldn't load properly. I had to rename the Roborock folder to get it to load.

markrennie71 avatar Oct 17 '23 11:10 markrennie71

I installed the latest update via HACS that was posted today. Fixed the problem for me.

markaggar avatar Oct 17 '23 21:10 markaggar

No change for me with latest main "release"

ChristophGoth avatar Oct 18 '23 11:10 ChristophGoth

Working perfectly again for me now. Thank you

markrennie71 avatar Oct 18 '23 12:10 markrennie71

Does still not work for me.

Same log messages as @MiguelCosta and error "No device found within your Roborock account"

Nordikk avatar Oct 18 '23 16:10 Nordikk

I switched to the main branch, reboot, not working. Went back to the last (despite it was the one I was using) and reboot to make it work.

Never deleted the integration. I suspect that a sinple reinstall to force dependencies would had the same effect.

Edit: didn't survived a restart :(

neuroverflow avatar Oct 19 '23 06:10 neuroverflow

Same here. I installed last version from HACs and the problem persists.

fherreror avatar Oct 20 '23 18:10 fherreror

Also same problem.

Sirmike2 avatar Oct 21 '23 11:10 Sirmike2

I have the same issue! "No device found within your Roborock account"! I'm about to tear out my hair, at least what's left of it...

hyperpm avatar Oct 22 '23 16:10 hyperpm

Same Problem here :(

AlexHowser avatar Oct 23 '23 19:10 AlexHowser

Even with HA 2023.10.5, deleted and reinstalled integration and restart the whole serve the problem still exists.

Is it a HA problem? Because I can’t even get my robot in through the official integration.

Kesslermeinname avatar Oct 23 '23 20:10 Kesslermeinname

Still working for me. I'm wondering if the roborock region has something to do with the problem others are still having. I'm in the US, again works fine. The recent logs posted were connecting to the EU roborock cloud.

markaggar avatar Oct 23 '23 20:10 markaggar

I had the same issue and went back in HACS from "1.0.12" to version "main"; after reboot everything works as before. image

Bastian007 avatar Oct 23 '23 21:10 Bastian007

Still working for me. I'm wondering if the roborock region has something to do with the problem others are still having. I'm in the US, again works fine. The recent logs posted were connecting to the EU roborock cloud.

I’m a EU citizen…maybe the dev can tell us more about that. Like I said, even the HA own integration fails to initiate the robot.

Kesslermeinname avatar Oct 23 '23 22:10 Kesslermeinname

Updated to 1.0.12 and it started working for me.

subexx avatar Oct 23 '23 22:10 subexx

I had the same issue and went back in HACS from "1.0.12" to version "main"; after reboot everything works as before. image

Have you tried to upgrade to 1.0.12 again? Is it still working?

Anyhow, even downgrading to "main" doesn't fix the problem on my side...

bennipi1287 avatar Oct 24 '23 10:10 bennipi1287