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)
github-actions[bot] commented 1 year ago

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

gllmlbrt commented 1 year ago

Hi, I have had the same issue (With the ability to install the integration perfectly) for a while since update after 2.6.1 (With the ability to install the integration perfectly). Exact same sensor showing "Unknown". I revert to 2.6.1 and it is OK. I tried again to upgrade to 2.7.5 today but the issue remains.

mspinapolice commented 1 year ago

Hi, I have had the same issue (With the ability to install the integration perfectly) for a while since update after 2.6.1 (With the ability to install the integration perfectly). Exact same sensor showing "Unknown". I revert to 2.6.1 and it is OK. I tried again to upgrade to 2.7.5 today but the issue remains.

how do you revert to 2.6.1? through HACS, the lowest version I can download is 2.7.0.

xplora2
smarthomefamilyverrips commented 1 year ago

@Ludy87 I have the same error but also in the app it says my 2 X6 Play watches are unavailable if I wanna check location (see below)

Warning:

This watch can be unavailable because it is shut down or without network connection, please check and try again later.

gllmlbrt commented 1 year ago

how do you revert to 2.6.1? through HACS, the lowest version I can download is 2.7.0. >

I download the source code after selecting the right tag: image

smarthomefamilyverrips commented 1 year ago

@mspinapolice if you try to rollback back to 2.6.1 and works please let me know, myself I not can imagine that this is the issue as

A. It did work for me till about a hour ago on version 2.7.5 B. I also can not see or update location in the Xplora App (giving me message watches are unavailable)

gllmlbrt commented 1 year ago

IN my case, it is very clear, multiple times: Works on 2.6.1, stops working after upgrade to anything >> 2.6.1, and works again immidiately after downgrade again to 2.6.1. While all the time checking that all is good in the app as well...

smarthomefamilyverrips commented 1 year ago

@gllmlbrt but you also have other sensors unknown and watch distance on a -1m or -3ft value, or is it only the tracker entity that is unknown? At me it shows exactly the same as picture from original post. And I not had any issues on any version untill 1 hour ago

I will await first for location being available again in the xplora app, if after that I keep having same issue I will roll back to 2.6.1 and give that a try.

gllmlbrt commented 1 year ago

Yes, all the same: image

smarthomefamilyverrips commented 1 year ago

Yes, all the same: image

@gllmlbrt thanks for confirming, like I said above will await till locations are avaliable again in Xplora Android App and after that do a roll back also if issue still exists 👍🏻🙏

smarthomefamilyverrips commented 1 year ago

Actually now I double check for me just the distance is -1 and tracker unknown, I do still see watches are charging and batteries are 100% ..... state is also disconnected but think for me is related that they also not are available in the mobile app.... will post a update if anything changes for me 😊

smarthomefamilyverrips commented 1 year ago

@mspinapolice is for you the app working? You can see and refresh location there?

mspinapolice commented 1 year ago

@mspinapolice is for you the app working? You can see and refresh location there?

Yes. App works exactly as expected.

smarthomefamilyverrips commented 1 year ago

@mspinapolice at me I get message they have server problems and that location and chat functions are affected, so will await when this get solved first

smarthomefamilyverrips commented 1 year ago

Screenshot_20230225_145031_Xplora

mspinapolice commented 1 year ago

interesting @smarthomefamilyverrips. Thanks for letting me know about that! I'm over in the US and don't currently see that message in the app, but if the integration is attempting to connect to EU based servers that are experiencing issues, that could be a possible cause. for now I'm good with the app working, but definitely want to be able to get some stuff working in HA down the line.

smarthomefamilyverrips commented 1 year ago

@Ludy87 my app location is working again now only the location of the watches not get updated with service call, all other entities including distance do update when changed but the location tracker stays on last known position..

If I reload the integration the tracker position does update to last known position.

smarthomefamilyverrips commented 1 year ago

interesting @smarthomefamilyverrips. Thanks for letting me know about that! I'm over in the US and don't currently see that message in the app, but if the integration is attempting to connect to EU based servers that are experiencing issues, that could be a possible cause. for now I'm good with the app working, but definitely want to be able to get some stuff working in HA down the line.

@mspinapolice the app now works again, but as you can read above the tracker not update changes in position when I use the watch.see service call, while all other sensors get updated.... only a reload of integration make the tracker sensor update to last position.

Ludy87 commented 1 year ago

the location is available with me, but not up to date. A location is also not possible, battery status is unchanged.

smarthomefamilyverrips commented 1 year ago

@Ludy87 so there is some kind of error?

Ludy87 commented 1 year ago

everything works for me again! All data has been updated.

smarthomefamilyverrips commented 1 year ago

@Ludy87 I will try today when going out if watch tracker updates again on watch.see service calls

smarthomefamilyverrips commented 1 year ago

@Ludy87 with 2.7.5 and 2.7.6 my watch tracker entity not updates to last known position in xplora app when using the watch.see update service call, it only updates if I reload the integration but after that again not shows new locations when watches change position..... there is nothing in logs... I rolled back to 2.7.2 and then the location updates show again when using watch.see service call

All the other sensors do update, battery, charging, distance, etc.

Ludy87 commented 1 year ago

check the update interval of the integration.

if a service is activated, regardless of whether it is a message or a shutdown, the integration interval is interrupted, so a separate automation for see should be created.

smarthomefamilyverrips commented 1 year ago

check the update interval of the integration.

if a service is activated, regardless of whether it is a message or a shutdown, the integration interval is interrupted, so a separate automation for see should be created.

@Ludy87 I have a automation running the watch.see service on a time trigger interval of 3 minutes, this worked/works on 2.7.2, only not works on 2.7.5/2.7.6

And how I check the update interval of the integration itself?

Ludy87 commented 1 year ago

in the configuration of the integration.

smarthomefamilyverrips commented 1 year ago

@Ludy87 is the scan_interval? I did think this was opencage related, this is on 180s

Ludy87 commented 1 year ago

Is the default for integration when no service is started. Yes, the overview is not good, but there is no other way to present it differently.

smarthomefamilyverrips commented 1 year ago

@Ludy87 OK so that means that I actually not need to have the automation running to call the watch.see service to update location of watch tracker entity? It will update location by scan_interval already every 180s ..... this assumptionis correct?

Ludy87 commented 1 year ago

That's right, but no other service that uses Xplora watch must be running.

smarthomefamilyverrips commented 1 year ago

@Ludy87 OK thanks for clearing that up, but what can be the reason then for not updating locations upon watch.see service call (by automation) in version 2.7.5 and 2.7.6 if it does work in previous versions?

Ludy87 commented 1 year ago

My guess is that it was a sham topicality, old values were restored.

smarthomefamilyverrips commented 1 year ago

My guess is that it was a sham topicality, old values were restored.

@Ludy87 Ok but still not works for me, I just tryed again driving around, 2.7.2 all OK, watch tracker entity update its location on the map within HA when added as device tracker to a person, when am home, says home, when leave home changes to away, when entering a active zone updates to zone name, all working as expected and changes to latest location at scan_interval update.... version 2.7.3, 2.7.5, 2.7.6 watch tracker entity not updates location at scan_interval update nor at watch.see service call on map within HA, and state stays at last known location (for example home, while in the xplora app location already long did change) while all other sensors do update (also distance sensor updates, that to me also seems related to location) so it just not works anymore for me after 2.7.2 ..... any idea?

I kind of have the feeling maybe something changed at the side of xplora after their server update and connect problems afterwards from Friday/Saturday all trouble for me started at Friday at 21:30 until that moment all worked fine for me on v2.7.5 after the problems started with xplora app not being able to see the location anymore (see above my post from 2 days ago) now in app all seems to work again but now lost location updates above version 2.7.2 😢

mspinapolice commented 1 year ago

Upgraded to 2.7.6. Step counter gets updates but is delayed. Other entities are either incorrect or still “unknown”.

Tried downgrading to 2.7.2. No change.

gllmlbrt commented 1 year ago

Upgraded to 2.7.6. Step counter gets updates but is delayed. Other entities are either incorrect or still “unknown”.

Tried downgrading to 2.7.2. No change.

Hi, I just came here to reconfirmed that the issue I have is all identical to the one described in the OP by @mspinapolice (with the exception that the watch model is a XGO3. Hihgly reproduceable, and it not associated with a XGO server side. Really it is only appearing after upgrade to any version above 2.6.1.

While on the other hand the error described by @smarthomefamilyverrips seems to be a different issue than the one for which @mspinapolice opened this thread...

Ludy87 commented 1 year ago

Try the beta version if it fixes the bug.

Unlock the Beta Channel:

  1. Go to HACS
  2. Integrations
  3. Xplora® Watch
  4. Overflow Menu (top right three dots)
  5. Redownload
  6. switch "Show beta versions"
  7. choose the v2.7.7
smarthomefamilyverrips commented 1 year ago

@Ludy87 did install now, will let you know within a hour if solves my issue

gllmlbrt commented 1 year ago

Downloaded the 2.7.7-beta and it solve the issue for me. All sensors are updating as expected. No more "unknown". Thanks a lot for this. Let us see if it solves it for the others too.

smarthomefamilyverrips commented 1 year ago

@Ludy87 unfortunately it did not solve my issue, the tracker location still not updates at scan_interval or at watch.see service call, but it does update all my other sensors including distance, see picture one where tracker still says watches are home but distance did update and watches actually are over 2 km. from home.

After I do reload of the integration then the location tracker updates to.the correct location, you can see this on picture two, but after this again it not updates tracker location on scan_interval or upon watch.see service call

So last working version that does update location tracker is v2.7.2 for me Screenshot_20230227_113038_Home Assistant Screenshot_20230227_113205_Home Assistant

smarthomefamilyverrips commented 1 year ago

@Ludy87 still did try other versions again but latest version that not have the issue for me is still 2.7.2 everything above that not updates location tracker at interval or service call, only updates on complete reload of integration.

Ludy87 commented 1 year ago

@smarthomefamilyverrips do you use the app at the same time with the same login?

The last update date is displayed in device_tracker.xxx_watch_tracker_0110xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Please check this to determine whether the service has set a trigger.

smarthomefamilyverrips commented 1 year ago

@Ludy87 yes I do use the app with same login but have app closed.

It also does trigger the updates of the watch tracker entity, only it not updates, as said now I did go back to v2.7.2 and it works

Ludy87 commented 1 year ago

The date and time depend on the tracking, so I can't understand why it's not updated.

watch_20230227

smarthomefamilyverrips commented 1 year ago

@Ludy87 I also not understand, as explained all did was fine on v2.7.5 till Friday 21:30 EET, then did change to unknown, BUT also the location did not update in xplora app anymore, I got message in app that on Saturday 25th from 6:00-7:00 server would be shut down maintenance but at Friday evening already location in app stopped working for me, later on Saturday I got a message in app that there are problems with server and chat and location functions where affected, from Saturday evening everything in the app was working normal again, and also did see again location in your integration but when I did go out then I noticed that watch location tracker not updated anymore with set intervals/service call.... and from all I tryed only roll back to v2.7.2 solves this..... but like I said till the moment problems started with the xplora app all also was working fine on 2.7.5 .... so not know why ???? I did hope you would be able to solve it

smarthomefamilyverrips commented 1 year ago

@Ludy87 The last tracking says at me

February 27, 2023 at 16:12:28 while now is 16:33 and I just did do a service call for the xplora.watch.see service

But I think this time is the last time position changed in the xplora app, watches are now home and have low network coverage so position not updates that often in the app

I am on v2.7.2 now by the way, the still working version for me

gllmlbrt commented 1 year ago

Just coming back here to report that now I have the same issue as reported by @smarthomefamilyverrips whereby the tracker of position does not update the position (eventhough the kids has moved location entirely) when making a call xplora.watch.see service. However, a intergration reload does the trick and the location is then updated.

On 2.7.7-beta

smarthomefamilyverrips commented 1 year ago

@gllmlbrt I am kind of happy I am not the only one having this 🙈 .... hopefully @Ludy87 will figure out the issue 👍🏻

Ludy87 commented 1 year ago

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

smarthomefamilyverrips commented 1 year ago

Ok will install now and let you know @Ludy87 👍🏻

smarthomefamilyverrips commented 1 year ago

@Ludy87 with the beta version 2.7.8 everything seems to be working again as expected for me 👍🏻