Ludy87 / xplora_watch

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

sensor and device_tracker states reporting as "unknown" with X5 Play🐛 #174

Closed mspinapolice closed 1 year ago

mspinapolice commented 1 year ago

What version of Integration has the issue?

issue 1st seen in 2.7.3 upgraded to 2.7.5 this morning. no change.

System Health details

System Information

version core-2023.2.5
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.84-v8
arch aarch64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4525 Installed Version | 1.30.1 Stage | running Available Repositories | 1223 Downloaded Repositories | 24
AccuWeather can_reach_server | ok -- | -- remaining_requests | 27
Home Assistant Cloud logged_in | false -- | -- 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 | 28.6 GB disk_used | 8.6 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Check Home Assistant configuration (3.11.0), Samba share (10.0.0), File editor (5.5.0), Terminal & SSH (9.6.1), Mosquitto broker (6.1.3), Glances (0.17.2), Z-Wave JS (0.1.76), Duck DNS (1.15.0), Home Assistant Google Drive Backup (0.110.1), TasmoAdmin (0.23.0), Z-Wave JS UI (1.6.3), HassOS SSH port 22222 Configurator (0.9.1a), ESPHome (2023.2.4)
Dashboards dashboards | 3 -- | -- resources | 12 views | 23 mode | storage
Recorder oldest_recorder_run | February 23, 2023 at 4:23 PM -- | -- current_recorder_run | February 24, 2023 at 9:59 AM estimated_db_size | 65.48 MiB database_engine | sqlite database_version | 3.38.5

Checklist

Describe the issue

multiple sensor state values are either "unknown" or incorrect. only sensors correct appear to be step count, safe zones names, and alarm controls.

xplora

Reproduction steps

  1. Install latest version from HACS (2.7.5)
  2. Add Integration
  3. Configure Integration
  4. Integration successfully starts and discovers X5 Play watch
  5. run xplora_watch.see service ...

Debug logs

2023-02-24 09:45:26.607 DEBUG (MainThread) [custom_components.xplora_watch] Set up the Xplora® Watch Version 2 component.
2023-02-24 09:45:26.815 DEBUG (MainThread) [custom_components.xplora_watch] Configure based on config entry.
2023-02-24 09:45:34.036 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] pyxplora_api lib version: 2.5.21-1287
2023-02-24 09:45:47.786 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Fetch data from Xplora: [WATCH_ID]
2023-02-24 09:45:49.768 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Finished fetching xplora_watch-87451 data in 19.260 seconds (success: True)
2023-02-24 09:45:51.233 DEBUG (MainThread) [custom_components.xplora_watch.helper] services.yaml path: /config/custom_components/xplora_watch/services.yaml
2023-02-24 09:45:51.258 DEBUG (SyncWorker_4) [custom_components.xplora_watch.notify] init Notify Service
2023-02-24 09:45:51.385 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: X5_PLAY Watch Battery | battery | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.395 DEBUG (MainThread) [custom_components.xplora_watch.binary_sensor] Updating binary_sensor: X5_PLAY Watch Charging | charging | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.521 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: X5_PLAY Watch Step Day | step_day | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.532 DEBUG (MainThread) [custom_components.xplora_watch.binary_sensor] Updating binary_sensor: X5_PLAY Watch Safezone | safezone | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.560 DEBUG (MainThread) [custom_components.xplora_watch.switch] Updating switch: X5_PLAY Watch Alarm 07:05 | alarms | Watch_ID [WATCH_ID]
2023-02-24 09:45:51.662 DEBUG (MainThread) [custom_components.xplora_watch.binary_sensor] Updating binary_sensor: X5_PLAY Watch State | state | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.668 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: X5_PLAY Watch Xcoin | xcoin | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.813 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: X5_PLAY Watch Message | message | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.833 DEBUG (MainThread) [custom_components.xplora_watch.switch] Updating switch: X5_PLAY Watch Silent 08:30-13:20 | silents | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:51.945 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: X5_PLAY Watch Distance | distance | 1 Watch_ID [WATCH_ID]
2023-02-24 09:45:52.047 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] pyxplora_api lib version: 2.5.21-1287
2023-02-24 09:45:53.485 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Fetch data from Xplora: [WATCH_ID]
2023-02-24 09:45:55.199 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Finished fetching xplora_watch-87451 data in 3.364 seconds (success: True)
2023-02-24 09:46:27.113 DEBUG (MainThread) [custom_components.xplora_watch.services] update all information: {'[WATCH_UID]
2023-02-24 09:46:27.696 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] pyxplora_api lib version: 2.5.21-1287
2023-02-24 09:46:29.481 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Fetch data from Xplora: [WATCH_ID]
2023-02-24 09:46:31.420 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] pyxplora_api lib version: 2.5.21-1287
2023-02-24 09:46:32.857 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Fetch data from Xplora: [WATCH_ID]
2023-02-24 09:46:34.653 DEBUG (MainThread) [custom_components.xplora_watch.coordinator] Finished fetching xplora_watch-87451 data in 3.441 seconds (success: True)
Ehlz77 commented 1 year ago

Check the new beta, I am sure that you will remove the existing bug.

Still not working at my end. Brand new X5 not updating sensors.

image

Ludy87 commented 1 year ago

@Ehlz77 give me more information

Ehlz77 commented 1 year ago

@Ehlz77 give me more information

image

On latest HA version

image

Battery updating untill he went to school and again after he returned home. No updates while in School

What else do you need from me?

Ludy87 commented 1 year ago

you have them updated, by service or automation or by the integration itself. is there a log entry when debug mode is on?

Ehlz77 commented 1 year ago

you have them updated, by service or automation or by the integration itself. is there a log entry when debug mode is on?

Updated by integration itself (180s.) Yes debug logger is turned on but not sure where to find the logs

Ludy87 commented 1 year ago

Settings -> System -> Logs

Search xplora and open LOAD FULL LOGS

Ehlz77 commented 1 year ago

Settings -> System -> Logs

Search xplora and open LOAD FULL LOGS

2023-03-02 15:57:46.338 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xplora_watch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-03-02 16:03:58.164 ERROR (MainThread) [custom_components.xplora_watch.config_flow] Phone Number or Email address not exist File "/config/custom_components/xplora_watch/config_flow.py", line 174, in async_step_user_phone File "/config/custom_components/xplora_watch/config_flow.py", line 106, in validate_input pyxplora_api.exception_classes.PhoneOrEmailFail: Phone Number or Email address not exist 2023-03-02 16:04:24.323 ERROR (MainThread) [custom_components.xplora_watch.config_flow] Phone Number or Email address not exist File "/config/custom_components/xplora_watch/config_flow.py", line 174, in async_step_user_phone File "/config/custom_components/xplora_watch/config_flow.py", line 106, in validate_input pyxplora_api.exception_classes.PhoneOrEmailFail: Phone Number or Email address not exist 2023-03-02 16:05:04.418 ERROR (MainThread) [custom_components.xplora_watch.config_flow] Phone Number or Email address not exist File "/config/custom_components/xplora_watch/config_flow.py", line 174, in async_step_user_phone File "/config/custom_components/xplora_watch/config_flow.py", line 106, in validate_input pyxplora_api.exception_classes.PhoneOrEmailFail: Phone Number or Email address not exist 2023-03-03 02:01:09.547 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error:

Log says login Error but i am logged in using E-mail (experimental). The login errors from yesterday is because i experimented logging in with phonenumber instead. That did however not work

EDIT: Now i managed to log in with my phonenumber instead of Email. The phonenumber of the account is not the same as the number of the watch that needs to be tracked (Dont suspect that is an issue). Watch updates fine in Xplora APP. and a lot of the sensors updates fine in HA (Steps, Safezone, Battery etc.)

bergfalk commented 1 year ago

In my case everything except longitude and latitude is updating when running Track watch service. Even the address field is updated. If I reload the integration longitude and latitude updates but not otherwise.

smarthomefamilyverrips commented 1 year ago

@bergfalk that sounds exactly same as at me, did you try the 2.7.8 beta version? this did solve my issue.

bergfalk commented 1 year ago

@smarthomefamilyverrips I’m using HACS to download and selected “main” from the version dropdown list. I ended up with the latest commit (a20a0ca) from yesterday and now the latitude and longitude is updating again. Have not used it long enough to now if the other parameters are updated as expected.

smarthomefamilyverrips commented 1 year ago

@bergfalk maybe at latest commit the fix used in beta version is added to main by @Ludy87 I am still on the 2.7.8 beta version now.

Ludy87 commented 1 year ago

I just released a new version. https://github.com/Ludy87/xplora_watch/releases/tag/v2.7.10

smarthomefamilyverrips commented 1 year ago

I just released a new version. https://github.com/Ludy87/xplora_watch/releases/tag/v2.7.10

Great, I will update to that one then @Ludy87 .... Thanks! 👍🏻

MrHashimoto commented 1 year ago

No change for me. Tracker still doesn't work...

bergfalk commented 1 year ago

With version 2.7.10 the coordinates are updating for me again. Thanks Ludy87!

Ludy87 commented 1 year ago

No change for me. Tracker still doesn't work...

check your settings or your login data.

MrHashimoto commented 1 year ago

No change for me. Tracker still doesn't work...

check your settings or your login data. Done. All settings and login seems to be correct. I get correct data for the watch, except for the tracking related...

MrHashimoto commented 1 year ago

2023-03-04 18:42:57.207 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration xplora_watch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-03-05 02:01:49.441 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error: 2023-03-05 02:02:59.429 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error: 2023-03-05 13:37:41.520 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Error requesting xplora_watch- data: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://nominatim.openstreetmap.org/reverse?lat=51.090421&lon=6.952083&format=jsonv2&accept-language=en') 2023-03-05 14:09:00.181 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Timeout fetching xplora_watch- data 2023-03-06 02:01:37.537 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error: 2023-03-06 02:02:47.531 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error: 2023-03-06 02:55:08.589 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Error requesting xplora_watch- data: [Errno 104] Connection reset by peer

Ehlz77 commented 1 year ago

Same issue as Mr Hashimoto, watch tracking still not working. Logs says the same, invalid login. I am logged in however and other things like battery etc. is updating as supposed

Ludy87 commented 1 year ago

I am logged in however and other things like battery etc. is updating as supposed

it doesn't make sense that it only affects the coordinates, because since the last update, the same instance is used.

Ludy87 commented 1 year ago

2023-03-05 02:01:49.441 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error: 2023-03-05 02:02:59.429 ERROR (MainThread) [custom_components.xplora_watch.coordinator] Unexpected error fetching xplora_watch- data: Login error: File "/config/custom_components/xplora_watch/coordinator.py", line 123, in _async_update_data File "/config/custom_components/xplora_watch/coordinator.py", line 106, in init File "/usr/local/lib/python3.10/site-packages/pyxplora_api/pyxplora_api_async.py", line 71, in init pyxplora_api.exception_classes.LoginError: Login error:

This will always occur because around this time Xplora appears to be refreshing the server

Ehlz77 commented 1 year ago

I am logged in however and other things like battery etc. is updating as supposed

it doesn't make sense that it only affects the coordinates, because since the last update, the same instance is used.

It might not make sense, but the Log saying invalid login credentials does not make sense either when other sensors are updating

Ludy87 commented 1 year ago

it makes sense because the session can be reset by a second instance. It is a general login error that occurs without further description. Ignoring it wouldn't make sense, so I didn't omit it.

MrHashimoto commented 1 year ago

So is there any recommendation / anything that we can do to make the integration work for us?

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.