Closed DanielHabenicht closed 1 year ago
Not getting further with debugging I compared your library with the official one and it seems like they have a try...catch
statement to retry a failed request once and it seems like it is really needed:
Well, I removed this to fix the problem with reauthentification. At least now I know why it was in there. I can only guess that this is required for the v1 shc but breaks for v2.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4937 Installed Version | 1.32.1 Stage | running Available Repositories | 1339 Downloaded Repositories | 4Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 10.4 -- | -- update_channel | stable supervisor_version | supervisor-2023.08.1 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 116.7 GB disk_used | 19.5 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Let's Encrypt (4.12.9), NGINX Home Assistant SSL proxy (3.5.0), File editor (5.6.0), Terminal & SSH (9.7.1), Home Assistant Google Drive Backup (0.111.1), Mosquitto broker (6.2.1), deCONZ (6.20.0), AppDaemon (0.13.4), Studio Code Server (5.10.1), InfluxDB (4.7.0), ESPHome (2023.8.2), Grafana (9.0.3), MQTT Explorer (browser-1.0.1)Dashboards
dashboards | 2 -- | -- resources | 0 views | 1 mode | storageRecorder
oldest_recorder_run | August 19, 2023 at 02:03 -- | -- current_recorder_run | August 28, 2023 at 04:03 estimated_db_size | 241.11 MiB database_engine | sqlite database_version | 3.41.2Checklist
Describe the issue
For me, the integration fails to initialize because the server (Zentrale 1.Generation, Version 1.914 - 3.1.1088.0). Seems to disconnect on the second request.
I already tried to debug but wanted to ask if you already encountered the same problem, or if you can reproduce it?
While debugging it is showing me that the second request is failing:
http://192.168.178.141:8080/auth/token
workshttp://192.168.178.141:8080/status
does notInterestingly, if I have some debug points enabled and there is some time between the requests it is more likely to not break up. However, it does not seem to be a time-related problem as the custom script I wrote to find out if it is timing-related works just fine (without any wait between the API calls).
The official integration also works fine.
Reproduction steps
Debug logs