Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
FattusMannus opened this issue Jan 14, 2023 · 16 comments · Fixed by #148, #161 or #171
Closed
2 tasks done
Labels
Bug: Confirmed! Something isn't working Bug Version 2

Comments

@FattusMannus
Copy link

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

  • I have enabled debug logging for my installation.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).

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
Copy link
Contributor

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

@github-actions github-actions bot added check for Bug it is checked whether there is an Bug wait in examination labels Jan 14, 2023
@Ludy87
Copy link
Owner

Ludy87 commented Jan 17, 2023

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

@Ludy87 Ludy87 added Bug: Confirmed! Something isn't working and removed check for Bug it is checked whether there is an Bug labels Jan 17, 2023
@github-actions
Copy link
Contributor

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

@FattusMannus
Copy link
Author

@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
Copy link
Owner

Ludy87 commented Jan 17, 2023

please wait until the new update is released.

@Ludy87 Ludy87 linked a pull request Jan 23, 2023 that will close this issue
@FattusMannus
Copy link
Author

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

@Ludy87 Ludy87 reopened this Feb 5, 2023
@Ludy87 Ludy87 linked a pull request Feb 8, 2023 that will close this issue
@Ludy87 Ludy87 removed wait in examination in progress labels Feb 10, 2023
@FattusMannus
Copy link
Author

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
Copy link
Owner

Ludy87 commented Feb 11, 2023

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

@FattusMannus
Copy link
Author

@Ludy87 this is the admin account.

@Ludy87
Copy link
Owner

Ludy87 commented Feb 11, 2023

Is there a debug output?

@FattusMannus
Copy link
Author

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
Copy link
Owner

Ludy87 commented Feb 11, 2023

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
Copy link
Owner

Ludy87 commented Feb 11, 2023

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

@FattusMannus
Copy link
Author

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
Copy link
Owner

Ludy87 commented Feb 11, 2023

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

@Ludy87 Ludy87 reopened this Feb 11, 2023
@Ludy87 Ludy87 linked a pull request Feb 20, 2023 that will close this issue
@bubez81
Copy link

bubez81 commented Nov 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed! Something isn't working Bug Version 2
Projects
None yet
3 participants