Ludy87 / xplora_watch

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

Smartwatch unavailable seit 0.0.25 #21

Closed Puddingpanzer closed 2 years ago

Puddingpanzer commented 2 years ago

Hi,

seit dem Wechsel auf 0.0.25 ist unsere Smartwatch nicht mehr verfügbar. Auch wenn ich die watch_id in der config einfüge. Was mache ich falsch?

xplora_watch:
  country_code: "+49"
  phonenumber: "1xxxxxx"
  password: "xxxxxx"
  userlang: "de-DE"
  timezone: "Europe/Berlin"
  child_phonenumber:
    - "1xxxxxx"
  watch_id:
    - 0xxxxxxxxxxxx1
  types:
    - "battery"
    - "xcoin"
    - "state"
    - "safezone"
    - "charging"
    - "silents"
    - "alarms"
    - "dt_watch"
  safezones: "show"
  scan_interval: 300
  tracker_scan_interval: 60

Log:

Logger: homeassistant.components.binary_sensor
Source: custom_components/xplora_watch/binary_sensor.py:71
Integration: Binärsensor (documentation, issues)
First occurred: 12:09:35 (1 occurrences)
Last logged: 12:09:35

Error while setting up xplora_watch platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/xplora_watch/binary_sensor.py", line 71, in async_setup_platform
    client_name = await controller.getWatchUserName_async(watch_id)
  File "/usr/local/lib/python3.9/site-packages/pyxplora_api/pyxplora_api_async.py", line 177, in getWatchUserName_async
    raise Exception("Child phonenumber not found!")
Exception: Child phonenumber not found!
Logger: homeassistant.components.device_tracker
Source: custom_components/xplora_watch/device_tracker.py:136
Integration: Geräte-Tracker (documentation, issues)
First occurred: 12:09:37 (1 occurrences)
Last logged: 12:09:37

Error setting up platform legacy xplora_watch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 251, in async_setup_legacy
    setup = await self.platform.async_setup_scanner(
  File "/config/custom_components/xplora_watch/device_tracker.py", line 107, in async_setup_scanner
    return await scanner.async_init()
  File "/config/custom_components/xplora_watch/device_tracker.py", line 136, in async_init
    username = await self._controller.getWatchUserName_async(id)
  File "/usr/local/lib/python3.9/site-packages/pyxplora_api/pyxplora_api_async.py", line 177, in getWatchUserName_async
    raise Exception("Child phonenumber not found!")
Exception: Child phonenumber not found!
Logger: homeassistant.components.switch
Source: custom_components/xplora_watch/switch.py:43
Integration: Schalter (documentation, issues)
First occurred: 12:09:37 (1 occurrences)
Last logged: 12:09:37

Error while setting up xplora_watch platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/xplora_watch/switch.py", line 43, in async_setup_platform
    name = f'{await controller.getWatchUserName_async(id)} Watch Silent {silent["start"]}-{silent["end"]} {id}'
  File "/usr/local/lib/python3.9/site-packages/pyxplora_api/pyxplora_api_async.py", line 177, in getWatchUserName_async
    raise Exception("Child phonenumber not found!")
Exception: Child phonenumber not found!
Logger: homeassistant.components.sensor
Source: custom_components/xplora_watch/sensor.py:67
Integration: Sensor (documentation, issues)
First occurred: 12:09:47 (1 occurrences)
Last logged: 12:09:47

Error while setting up xplora_watch platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/xplora_watch/sensor.py", line 67, in async_setup_platform
    client_name = await controller.getWatchUserName_async(watch_id)
  File "/usr/local/lib/python3.9/site-packages/pyxplora_api/pyxplora_api_async.py", line 177, in getWatchUserName_async
    raise Exception("Child phonenumber not found!")
Exception: Child phonenumber not found!
Ludy87 commented 2 years ago

Hi @Puddingpanzer

ist die watch_id die richtige? Funktioniert die Integration, wenn du den Eintrag watch_id: .... entfernst? Wenn das der Fall sein sollte, dann hast du eine falsche watch_id eingepflegt.

Puddingpanzer commented 2 years ago

Ich gehe davon aus dass die ID der langen Ziffer am Ende der Entity-ID entspricht? Wenn nicht, wo finde ich die ID noch? Auch ohne watch_id gemäß der alten config funktioniert es nicht mehr. Wenn ich auf 0.0.24 downgrade funktioniert es wieder.

image

Ludy87 commented 2 years ago

Ja, das ist die watch_id! Wie schaut die Sache mit der Version v0.0.27 aus?

Puddingpanzer commented 2 years ago

Mit 0.0.27 leider dasselbe Problem

Ludy87 commented 2 years ago

Das verstehe ich absolut nicht, aktiviere den debugger https://github.com/Ludy87/xplora_watch#debug und schau dort nach der id Es kann nur ein Fehler in der id sein - sie muss 32 Zeichen lang sein

Puddingpanzer commented 2 years ago

Nach kompletter Neuinstallation der Integration scheint es jetzt zu funktionieren. Allerdings sind alle Entities jetzt doppelt vorhanden, einmal funktional und einmal weiterhin als unavailable. Habe diese nun händisch gelöscht, passt.

image