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

After HA reboot, Integration don't work - they are no devices assigned to my account

Open Housemann opened this issue 1 year ago • 17 comments

On Saturday I reboot my HA an after that the roborock integration don't work. I remove all entities an reinstall the integration. if I would login, I become a message that are no device is assigned to my account My roborock app is still functionary.

`2023-11-20 14:12:45.468 ERROR (MainThread) [custom_components.roborock.config_flow] wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': '77YtaIunG2r6nS2PUCehwQ', 's': 'T5i3dS', 'h': 'FaGdwvKDAT', 'k': 'BhOU6zDo', '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" Traceback (most recent call last): File "/config/custom_components/roborock/config_flow.py", line 239, in _pass_login login_data = await self._client.pass_login(password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 628, in pass_login return UserData.from_dict(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': '77YtaIunG2r6nS2PUCehwQ', 's': 'T5i3dS', 'h': 'FaGdwvKDAT', 'k': 'BhOU6zDo', '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"

2023-11-20 14:13:29.565 ERROR (MainThread) [custom_components.roborock.config_flow] wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': '77YtaIunG2r6nS2PUCehwQ', 's': 'gx0F8i', 'h': 'lpwUPLeMVG', 'k': 'kHMTBKTG', '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" Traceback (most recent call last): File "/config/custom_components/roborock/config_flow.py", line 228, in _code_login login_data = await self._client.code_login(code) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 660, in code_login return UserData.from_dict(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': '77YtaIunG2r6nS2PUCehwQ', 's': 'gx0F8i', 'h': 'lpwUPLeMVG', 'k': 'kHMTBKTG', '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"

2023-11-20 14:13:32.093 ERROR (MainThread) [custom_components.roborock.config_flow] Invalid code - check your code and try again. Traceback (most recent call last): File "/config/custom_components/roborock/config_flow.py", line 228, in _code_login login_data = await self._client.code_login(code) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 649, in code_login raise RoborockInvalidCode("Invalid code - check your code and try again.") roborock.exceptions.RoborockInvalidCode: Invalid code - check your code and try again.

2023-11-20 14:22:50.181 ERROR (MainThread) [custom_components.roborock.config_flow] wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': '77YtaIunG2r6nS2PUCehwQ', 's': 'q07sry', 'h': 'bqMuYE6Z0R', 'k': '0ojh0Y3F', '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" Traceback (most recent call last): File "/config/custom_components/roborock/config_flow.py", line 239, in _pass_login login_data = await self._client.pass_login(password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 628, in pass_login return UserData.from_dict(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': '77YtaIunG2r6nS2PUCehwQ', 's': 'q07sry', 'h': 'bqMuYE6Z0R', 'k': '0ojh0Y3F', '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" `

Housemann avatar Nov 20 '23 13:11 Housemann

Got the exact same problem since yesterday.

currydani avatar Nov 20 '23 13:11 currydani

same here...

I think is HA upgrade because also frigate has same trouble

goodsale avatar Nov 20 '23 20:11 goodsale

Same issue here.

TBTHEDBA avatar Nov 21 '23 03:11 TBTHEDBA

I got the same issue since a few days

commanderf avatar Nov 22 '23 07:11 commanderf

Hi, since yesterday after HA Update I can integrate my roborock again. All is fine.

Housemann avatar Nov 23 '23 05:11 Housemann

no for me same issuing also after HA update.

goodsale avatar Nov 24 '23 09:11 goodsale

I have 2 robots configured on the same account this is the problem:

image

I tried to reconfigure everything and log in with the code via email and user password but the same result

The HUB is recognized correctly but the entities are not loaded.

Before, everything worked fine.

Thanks!

goodsale avatar Nov 24 '23 11:11 goodsale

For me it was again the dacite error mentioned in another Issue. Following temporarily fixes that for me, until something else installs it wrong again:

  1. Turn on advanced mode for your user (if you don’t have that turned on already)

  2. Install the SSH & Web Terminal addon (https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_ssh) (the one in community add-ons not the official one)

  3. Disable protection mode on the ssh add-on and start it

  4. Enter: docker exec -it homeassistant bash

  5. Enter: Pip uninstall dacite

  6. Enter: Pip install dacite==1.8.0

  7. Restart and retry installing roborock integration

currydani avatar Nov 24 '23 11:11 currydani

I had the same issue, but it seems fixed in the newest release (1.0.13). I did have to remove my vacuum (which also removed my integration) and add it again for it to start working.

catshapednoodles avatar Nov 24 '23 15:11 catshapednoodles

For me it was again the dacite error mentioned in another Issue. Following temporarily fixes that for me, until something else installs it wrong again:

  1. Turn on advanced mode for your user (if you don’t have that turned on already)
  2. Install the SSH & Web Terminal addon (https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_ssh) (the one in community add-ons not the official one)
  3. Disable protection mode on the ssh add-on and start it
  4. Enter: docker exec -it homeassistant bash
  5. Enter: Pip uninstall dacite
  6. Enter: Pip install dacite==1.8.0
  7. Restart and retry installing roborock integration

no entity also after solving dacite error and version 10.0.13

goodsale avatar Nov 24 '23 16:11 goodsale

with official integration the entities are ok.

image

image

goodsale avatar Nov 25 '23 18:11 goodsale

Looking at the LOGs maybe I understood the problem.

My 2 robots are in two different networks.

The original integration does not download the map, while this one downloads the map to the local network via IP.

From the logs we can see that it crashes when trying to download data from a local address retrieved by the robot but if the robot is not in the local network it is unable to retrieve the information and does not load the entities.

It would be possible to insert a control so that if the robot is not in the local network it is excluded (or the map is not managed as in the original integration) but instead the entities of the robots in the local network are loaded.

Thank you!!

goodsale avatar Nov 26 '23 11:11 goodsale

I have this rerro no matter what I do. I even uninstalled and reinstalled the component

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 22, in extract_origin_collection return collection.extra ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'extra'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/roborock/init.py", line 68, in async_setup_entry raise e File "/config/custom_components/roborock/init.py", line 58, in async_setup_entry home_data = await api_client.get_home_data(user_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 746, in get_home_data return HomeData.from_dict(home_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/containers.py", line 92, 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 64, in from_dict value = build_value(type=field_type, data=field_data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 97, in _build_value data = build_value_for_collection(collection=type, data=data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 154, in build_value_for_collection return data_type(build_value(type=item_type, data=item, config=config) for item in data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 154, in return data_type(build_value(type=item_type, data=item, config=config) for item in data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 99, in build_value data = from_dict(data_class=type, data=data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 64, in from_dict value = build_value(type=field_type, data=field_data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 101, in build_value if is_subclass(type, cast_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 168, in is_subclass if is_generic_collection(sub_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 147, in is_generic_collection origin = extract_origin_collection(type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 24, in extract_origin_collection return collection.origin ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'origin'

iceman73 avatar Nov 29 '23 14:11 iceman73

homeassistant:/config# pip show dacite Name: dacite Version: 1.8.0 Summary: Simple creation of data classes from dictionaries. Home-page: https://github.com/konradhalas/dacite Author: Konrad Hałas Author-email: [email protected] License: MIT Location: /usr/local/lib/python3.11/site-packages Requires: Required-by: brother, gios, govee-api-laggat, home-assistant-chip-clusters, nettigo-air-monitor, python-matter-server, python-roborock homeassistant:/config#

iceman73 avatar Nov 29 '23 14:11 iceman73

This fixed my issue: Do the following and it should fix it:

uninstall govee hacs restart

*** Roborock started working ***

install latest govee hacs restart Configure govee

all is working again

iceman73 avatar Nov 29 '23 15:11 iceman73

and now its back again

iceman73 avatar Dec 06 '23 01:12 iceman73

This issue continues in both the standard and HACS integrations. Currently attempting on the HACS ver 1.0.13 and currently running HA 2023.11.3. Any time I log in, I just get that there are no devices assigned to my account. However, there is a device showing in my Roborock app and it works perfectly fine in there.

This error originated from a custom integration.

Logger: custom_components.roborock.config_flow Source: custom_components/roborock/config_flow.py:239 Integration: Roborock (documentation, issues) First occurred: 09:20:06 (1 occurrences) Last logged: 09:20:06

'types.UnionType' object has no attribute 'origin' Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 22, in extract_origin_collection return collection.extra ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'extra'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/roborock/config_flow.py", line 239, in _pass_login login_data = await self.client.pass_login(password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 663, in pass_login return UserData.from_dict(user_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/roborock/containers.py", line 92, 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 64, in from_dict value = build_value(type=field_type, data=field_data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/core.py", line 101, in build_value if is_subclass(type, cast_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 168, in is_subclass if is_generic_collection(sub_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 147, in is_generic_collection origin = extract_origin_collection(type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 24, in extract_origin_collection return collection.origin ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'origin'

afsabresfan avatar Dec 13 '23 14:12 afsabresfan