Ludy87 / xplora_watch

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

🐛 When adding device with Admin user, entities never work and create JSON error in logs #145

Closed FattusMannus closed 1 year ago

FattusMannus commented 1 year ago

What version of Integration has the issue?

2.5.7

System Health details

System Information

version core-2023.1.4
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.76-v8
arch aarch64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4993 Installed Version | 1.29.1 Stage | running Available Repositories | 1203 Downloaded Repositories | 10
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.4 -- | -- update_channel | stable supervisor_version | supervisor-2022.12.1 agent_version | 1.4.1 docker_version | 20.10.19 disk_total | 28.5 GB disk_used | 6.6 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | CEC Scanner (3.0), File editor (5.4.2), Check Home Assistant configuration (3.11.0), Terminal & SSH (9.6.1), AirCast (3.5.1)
Dashboards dashboards | 1 -- | -- resources | 0 mode | auto-gen
Recorder oldest_recorder_run | 4 January 2023 at 15:26 -- | -- current_recorder_run | 13 January 2023 at 10:10 estimated_db_size | 85.79 MiB database_engine | sqlite database_version | 3.38.5
Solcast PV Forecast can_reach_server | ok -- | -- remaining_requests | 9 rooftop_site_count | 1 polling_hours | 6 -> 17 and once at midnight
Sonoff version | 3.3.1 (b20e33c) -- | -- cloud_online | 2 / 2 local_online | 0 / 0
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

I added the integration through HACS and entered admin details for the integration.

The integration finds the watch, but the entities never update. The log shows:

Error requesting xplora_watch- data: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://api.myxplora.com/api')

Reproduction steps

  1. Install integration
  2. Connect with Admin User
  3. Entities dont get values and error message in logs

Debug logs

have enabled debug logs as per intruction but cannot see any output in normal logs - please tell me if they should seomwhere else
github-actions[bot] commented 1 year ago

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

Ludy87 commented 1 year ago

Hi unfortunately this is a problem of Xplora. I can't handle the exception because the service goes down mostly at night.

github-actions[bot] commented 1 year ago

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

FattusMannus commented 1 year ago

@Ludy87 anything else I can do here to help? Not sure about your comment about the API going down at night, i have tried several time to start or restart the connection but it never gets data and always presents the same error message

Ludy87 commented 1 year ago

please wait until the new update is released.

FattusMannus commented 1 year ago

After update: No error message in logs but still doesnt update entities - how can I debug this?

FattusMannus commented 1 year ago

Not fixed in 2.7.0

To be clear, password is accepted, the name of the watch loads correctly so I can be sure that login works.

However, the entities never get a real value: image

I have tested logging in with phone number or email, as well as leaving timezone options as default or changing to my region (London).

It is the same in all cases.

Ludy87 commented 1 year ago

@FattusMannus Hi, you are using an account without admin rights.

FattusMannus commented 1 year ago

@Ludy87 this is the admin account.

Ludy87 commented 1 year ago

Is there a debug output?

FattusMannus commented 1 year ago

Debug logging is enabled There's nothing in the "home assistant core" logs.

If I need to look somewhere else, please tell me.

Thanks Andrew

Ludy87 commented 1 year ago

ha_

  1. search for "xplora"
  2. click "load full log"
  3. post the content here, please DO NOT remove your private content, but anonymize it with fake data.
  4. Please no image but as text, if necessary you can also attach the log file here, note point 3!
Ludy87 commented 1 year ago

If no data is available, the debugging mode is not active

FattusMannus commented 1 year ago

Screenshot shows the option to "disable debug logging" so I assume it's enabled - plus a copy of my log. If I need to look somewhere else, please tell me where

image image

Ludy87 commented 1 year ago

this is not the right mode, you have to enter this in the configuration.ymal: https://github.com/Ludy87/xplora_watch#debug

bubez81 commented 10 months ago

hello, I can add the integration but no entities are created

2023-11-21 21:42:49.664 DEBUG (MainThread) [custom_components.xplora_watch.switch] {'typename': 'Child', 'id': '10fb383d0889d11eebe5d9b070c2251a7', 'guardian': {'typename': 'User', 'id': None, 'userId': None, 'name': None, 'nickname': None, 'gender': None, 'birth': None, 'birthStr': None, 'weight': None, 'height': None, 'firstName': None, 'lastName': None, 'countryCode': None, 'city': None, 'address1': None, 'address2': None, 'zipCode': None, 'emailAddress': None, 'countryPhoneCode': None, 'phoneNumber': None, 'mobilePhoneNumber': None, 'faxNumber': None, 'emailConfirm': None, 'description': None, 'status': None, 'file': None, 'lastLoginDate': None, 'changePasswordDate': None, 'loginFailCount': None, 'extra': None, 'xcoin': None, 'currentStep': None, 'totalStep': None, 'create': None, 'update': None, 'roles': None, 'children': None, 'contacts': None}, 'ward': {'typename': 'User', 'id': '0111003b103a5f5f775f5f7369671633', 'userId': 'w__sikey_194c358d0889c11ee8fd0074e4b1b6a16', 'name': 'Alice', 'nickname': 'Alice', 'gender': 'UNKNOWN', 'birth': 0, 'birthStr': '', 'weight': '', 'height': '', 'firstName': '', 'lastName': '', 'countryCode': 'it', 'city': '', 'address1': '', 'address2': '', 'zipCode': '', 'emailAddress': '', 'countryPhoneCode': '+39', 'phoneNumber': 'xxxxx', 'mobilePhoneNumber': 'xxxxx', 'faxNumber': '', 'emailConfirm': 'NO', 'description': '', 'status': 'ENABLE', 'file': {'__typename': 'File', 'id': '1a9a981e0889f11ee8e9d192d0dbd70fd', 'name': 'file.jpg', 'origName': 'file.jpg', 'contentType': 'image/jpeg', 'description': '', 'ipaddress': '', 'extra': {}, 'create': 1700592982, 'update': 1700592987}, 'lastLoginDate': 0, 'changePasswordDate': 1700591658, 'loginFailCount': 0, 'extra': {'lang': 'it', 'timeZone': 'Europe/Rome'}, 'xcoin': 0, 'currentStep': 0, 'totalStep': 0, 'create': 1700591658, 'update': 1700592994, 'roles': [], 'children': [], 'contacts': []}, 'flag': 'SECOND', 'approval': 'COMPLETE', 'listOrder': 0, 'create': 1700591864} b34cf1b8a458d70d00450885314d4ff3 - no config options 2023-11-21 21:42:49.665 DEBUG (MainThread) [custom_components.xplora_watch.notify] init Notify Service