Ludy87 / xplora_watch

Xplora® Watch Home Assistant Integration
MIT License
49 stars 6 forks source link

🐛Config entry 'Xplora®' for xplora_watch integration not ready yet: 'text'; Retrying in background #164

Closed smarthomefamilyverrips closed 1 year ago

smarthomefamilyverrips commented 1 year ago

What version of Integration has the issue?

@Ludy87

I did install version 2.7.0 and set-up the integration but it not starts and I get following messages in my logs

Logger: homeassistant.config_entries Source: config_entries.py:424 First occurred: 21:21:24 (1 occurrences) Last logged: 21:21:24

Config entry 'Xplora®' for xplora_watch integration not ready yet: 'text'; Retrying in background

AND

This error originated from a custom integration.

Logger: custom_components.xplora_watch.coordinator Source: custom_components/xplora_watch/coordinator.py:130 Integration: Xplora® Watch (documentation, issues) First occurred: 21:21:24 (6 occurrences) Last logged: 21:24:18

Unexpected error fetching xplora_watch-5115 data: 'text' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data data = await self.data_loop(wuids, message_limit, remove_message) File "/config/custom_components/xplora_watch/coordinator.py", line 130, in data_loop res_chats = await self.controller.getWatchChatsRaw(wuid, limit=message_limit, show_del_msg=remove_message) File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 368, in getWatchChatsRaw result = ChatsNew.from_dict(result.get("chatsNew", None)) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/api.py", line 83, in from_dict return _decode_dataclass(cls, kvs, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 275, in _decode_generic res = _decode_generic(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 263, in _decode_generic res = _get_typecons(type)(xs) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 306, in items = (_decode_dataclass(type_arg, x, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 273, in _decode_generic res = _decode_dataclass(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 159, in _decode_dataclass field_value = kvs[field.name] KeyError: 'text'

System Health details

System Information

version core-2023.2.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.15.90
arch aarch64
timezone Europe/Bucharest
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4708 Installed Version | 1.30.1 Stage | running Available Repositories | 1203 Downloaded Repositories | 20
AccuWeather can_reach_server | ok -- | -- remaining_requests | 46
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | February 15, 2023 at 02:00 relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-4.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 9.5 -- | -- update_channel | stable supervisor_version | supervisor-2023.01.1 agent_version | 1.4.1 docker_version | 20.10.22 disk_total | 113.9 GB disk_used | 41.3 GB healthy | true supported | true board | odroid-n2 supervisor_api | ok version_api | ok installed_addons | Spotify Connect (0.12.2), Home Assistant Google Drive Backup (0.110.1), File editor (5.5.0), SSH & Web Terminal (13.0.2), Samba share (10.0.0), MariaDB (2.5.2), ESPHome (2022.12.8), Assistant Relay (0.7.4), Mosquitto broker (6.1.3), Zigbee2MQTT (1.30.1-1)
Dashboards dashboards | 1 -- | -- resources | 12 views | 11 mode | storage
Recorder oldest_recorder_run | February 3, 2023 at 14:24 -- | -- current_recorder_run | February 13, 2023 at 21:18 estimated_db_size | 1601.95 MiB database_engine | mysql database_version | 10.6.10
Sonoff version | 3.4.0 (5406fa7) -- | -- cloud_online | 10 / 10 local_online | 10 / 10
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

I did install version 2.7.0 and set-up the integration but it not starts and I get following messages in my logs

Logger: homeassistant.config_entries Source: config_entries.py:424 First occurred: 21:21:24 (1 occurrences) Last logged: 21:21:24

Config entry 'Xplora®' for xplora_watch integration not ready yet: 'text'; Retrying in background

AND

This error originated from a custom integration.

Logger: custom_components.xplora_watch.coordinator Source: custom_components/xplora_watch/coordinator.py:130 Integration: Xplora® Watch (documentation, issues) First occurred: 21:21:24 (6 occurrences) Last logged: 21:24:18

Unexpected error fetching xplora_watch-5115 data: 'text' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data data = await self.data_loop(wuids, message_limit, remove_message) File "/config/custom_components/xplora_watch/coordinator.py", line 130, in data_loop res_chats = await self.controller.getWatchChatsRaw(wuid, limit=message_limit, show_del_msg=remove_message) File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 368, in getWatchChatsRaw result = ChatsNew.from_dict(result.get("chatsNew", None)) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/api.py", line 83, in from_dict return _decode_dataclass(cls, kvs, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 275, in _decode_generic res = _decode_generic(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 263, in _decode_generic res = _get_typecons(type)(xs) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 306, in items = (_decode_dataclass(type_arg, x, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 273, in _decode_generic res = _decode_dataclass(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 159, in _decode_dataclass field_value = kvs[field.name] KeyError: 'text'

Reproduction steps

Not Available

Debug logs

Not Available
github-actions[bot] commented 1 year ago

:wave: @smarthomefamilyverrips, it is checked whether there is a bug. Please have some patience. This action was performed automatically.

smarthomefamilyverrips commented 1 year ago

@Ludy87 this did solve my problem, thanks!

Milenco commented 1 year ago

I'm having the same issue, with v2.7.0 as well as v2.7.1:

`Logger: custom_components.xplora_watch.coordinator Source: custom_components/xplora_watch/coordinator.py:136 Integration: Xplora® Watch (documentation, issues) First occurred: 21:19:57 (12 occurrences) Last logged: 21:26:03

Unexpected error fetching xplora_watch-66674 data: 'text' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/xplora_watch/coordinator.py", line 127, in _async_update_data self.watch_entry.update(await self.data_loop(wuids, message_limit, remove_message)) File "/config/custom_components/xplora_watch/coordinator.py", line 136, in data_loop res_chats = await self.controller.getWatchChatsRaw(wuid, limit=message_limit, show_del_msg=remove_message) File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 365, in getWatchChatsRaw result = ChatsNew.from_dict(result.get("chatsNew", None)) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/api.py", line 83, in from_dict return _decode_dataclass(cls, kvs, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 275, in _decode_generic res = _decode_generic(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 263, in _decode_generic res = _get_typecons(type)(xs) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 306, in items = (_decode_dataclass(type_arg, x, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass init_kwargs[field.name] = _decode_generic(field_type, File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 273, in _decode_generic res = _decode_dataclass(type_arg, value, infer_missing) File "/usr/local/lib/python3.10/site-packages/dataclasses_json/core.py", line 159, in _decode_dataclass field_value = kvs[field.name] KeyError: 'text'`

smarthomefamilyverrips commented 1 year ago

@Milenco I had to delete and add one of the 2 watches I had to my phone app, after that did work for me

Milenco commented 1 year ago

Thanks for your quick response @smarthomefamilyverrips. I've deleted the configuration and set-up again with my childs watch but received the same issue. I've removed the configuration, rebooted Home Asssistant and tried again, with the same result.

Will now try to completely remove the installation, re-install and re-configure it, with Home Assistant reboots in between.

smarthomefamilyverrips commented 1 year ago

@Milenco I did delete everything also actually, delete Integration, remove from HACS (custom component folder) reboot, delete watch from phone app so it does factory reset on watch, add watch again to app (logged in with my own phone number) after that installed xplora again with HACS, reboot and set up Integration using my phone number as account login

Ludy87 commented 1 year ago

if it doesn't work after the new installertion, then do the following:

go to custom_components/xplora_watch folder edit the manifest.json file

{
  "domain": "xplora_watch",
  "name": "Xplora® Watch",
  "version": "v2.7.1",
  "config_flow": true,
  "documentation": "https://github.com/Ludy87/xplora_watch/tree/main",
  "issue_tracker": "https://github.com/Ludy87/xplora_watch/issues",
  "dependencies": [],
  "requirements": [
    "pyxplora_api==2.5.20",
    "geopy==2.2.0",
    "dataclasses-json",
    "pydub"
  ],
  "codeowners": ["@Ludy87"],
  "iot_class": "local_polling",
  "integration_type": "device"
}

to

{
  "domain": "xplora_watch",
  "name": "Xplora® Watch",
  "version": "v2.7.1",
  "config_flow": true,
  "documentation": "https://github.com/Ludy87/xplora_watch/tree/main",
  "issue_tracker": "https://github.com/Ludy87/xplora_watch/issues",
  "dependencies": [],
  "requirements": [
    "pyxplora_api==2.5.21",
    "geopy==2.2.0",
    "dataclasses-json",
    "pydub"
  ],
  "codeowners": ["@Ludy87"],
  "iot_class": "local_polling",
  "integration_type": "device"
}
Milenco commented 1 year ago

Thanks for clarifying @smarthomefamilyverrips . I just deleted the integration and removed from HASC, made sure the custom component folder was empty, rebooted Home Assistant and added it again. Want to prevent having to factory reset the watch since it's not near me at the moment.

Thanks @Ludy87 for your response as well. Will try that and report back here.

Milenco commented 1 year ago

Yes, that did the trick @Ludy87: Updating the manifest to use API version 2.5.21 instead of 2.5.20 removed the issue. The integration seems to be fully working again :)

Thanks again!

github-actions[bot] commented 1 year ago

:wave: @smarthomefamilyverrips, we found the bug, it will be fixed shortly. This action was performed automatically.

smarthomefamilyverrips commented 1 year ago

@Ludy87 it did fix it for me also, actually when I did see this message and checked my devices I did see all is unavailable and doing a reload gave me again the "text" message, after the change in manifest.json and a HA restart all is back to normal again, thanks for the quick fix! 👍🏻

smarthomefamilyverrips commented 1 year ago

@Ludy87 and @Milenco can I ask if either of you uses a mesh network? I have the problem that my X6Play watches not see my ASUS aimesh network as a single network showing once the SSID but instead shows me every single node making it show the same SSID 4 times (once for each node/accesspoint) ... so was wondering if one of you experienced the same

Ludy87 commented 1 year ago

@smarthomefamilyverrips Please use the discussion area!