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

fix boot sequence #525

Merged
merged 1 commit into from
Jan 5, 2025
Merged

fix boot sequence #525

merged 1 commit into from
Jan 5, 2025

Conversation

prvakt
Copy link
Collaborator

@prvakt prvakt commented Jan 5, 2025

just a try to have a partial update during boot, and full update afterwards instead of reverting back in #524

For some reason full update is now triggered right after boot even its not called from the code
Also implemented check to prevent duplicate execution

@WebSpider - can you please test it on your place?

@prvakt prvakt requested a review from WebSpider January 5, 2025 17:06
@prvakt
Copy link
Collaborator Author

prvakt commented Jan 5, 2025

Log is below - as you can see, start is very fast

2025-01-05 18:11:52.942 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://identity.vwgroup.io/signin-service/v1/signin/xxxxxxx - response: 200 (67606 bytes) 
2025-01-05 18:11:53.284 DEBUG (MainThread) [myskoda.myskoda] Trace: POST https://identity.vwgroup.io/signin-service/v1/xxxxxxxx-xxxx- - response: 302 (0 bytes) 
2025-01-05 18:11:53.344 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://identity.vwgroup.io/oidc/v1/oauth/sso?clientId=xxxxx - response: 302 (0 bytes) 
2025-01-05 18:11:53.491 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://identity.vwgroup.io/signin-service/v1/consent/users/ - response: 302 (0 bytes) 
2025-01-05 18:11:53.673 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://identity.vwgroup.io/oidc/v1/oauth/client/callback/su - response: 302 (0 bytes) 
2025-01-05 18:11:53.876 DEBUG (MainThread) [myskoda.myskoda] Trace: POST https://mysmob.api.connect.skoda-auto.cz/api/v1/authenticati - response: 200 (4352 bytes) 
2025-01-05 18:11:53.876 DEBUG (MainThread) [myskoda.myskoda] IDK Authorization was successful.
2025-01-05 18:11:53.876 DEBUG (MainThread) [myskoda.myskoda] MySkoda ready.
2025-01-05 18:11:54.186 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/garage?conne - response: 200 (543 bytes) 
2025-01-05 18:11:54.187 DEBUG (MainThread) [custom_components.myskoda.coordinator] Performing initial data fetch for vin TMBxxxxxxxxxxxxxx
2025-01-05 18:11:54.356 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/users - response: 200 (596 bytes) 
2025-01-05 18:11:54.639 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/garage/vehic - response: 200 (5855 bytes) 
2025-01-05 18:11:55.067 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v3/vehicle-main - response: 200 (1823 bytes) 
2025-01-05 18:11:55.067 DEBUG (MainThread) [custom_components.myskoda.coordinator] Finished fetching myskoda data in 0.881 seconds (success: True)
2025-01-05 18:11:55.074 DEBUG (MainThread) [custom_components.myskoda.coordinator] Finished fetching myskoda data in 0.000 seconds (success: True)
2025-01-05 18:11:55.077 DEBUG (MainThread) [custom_components.myskoda.device_tracker] Main render not found, choosing composite render instead.
2025-01-05 18:11:57.749 DEBUG (MainThread) [custom_components.myskoda.coordinator] MySkoda has finished starting up. Scheduling post-start tasks for vin TMBxxxxxxxxxxxxxx.
2025-01-05 18:11:57.749 DEBUG (MainThread) [custom_components.myskoda.coordinator] Connecting to MQTT.
2025-01-05 18:11:57.923 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/users - response: 200 (596 bytes) 
2025-01-05 18:11:58.156 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/garage?conne - response: 200 (543 bytes) 
2025-01-05 18:11:58.156 INFO (MainThread) [myskoda.mqtt] Connecting to MQTT with xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/['TMBxxxxxxxxxxxxxx']
2025-01-05 18:11:58.156 DEBUG (MainThread) [myskoda.mqtt] Starting _connect_and_listen
2025-01-05 18:11:58.238 DEBUG (SyncWorker_2) [myskoda.mqtt] Sending CONNECT (u1, p1, wr0, wq0, wf0, c1, k60) client_id=b'Idxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
2025-01-05 18:11:58.259 DEBUG (MainThread) [myskoda.mqtt] Received CONNACK (0, 0)
2025-01-05 18:11:58.259 INFO (MainThread) [myskoda.mqtt] Connected to MQTT
2025-01-05 18:11:58.259 DEBUG (MainThread) [myskoda.mqtt] using MQTT client <aiomqtt.client.Client object at 0x7f267411b4d0>
2025-01-05 18:11:58.260 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m1) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/set-air-conditioning-at-unlock', 0)]
2025-01-05 18:11:58.279 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m2) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/set-air-conditioning-seats-heating', 0)]
2025-01-05 18:11:58.300 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m3) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/set-air-conditioning-timers', 0)]
2025-01-05 18:11:58.319 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m4) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/set-air-conditioning-without-external-power', 0)]
2025-01-05 18:11:58.338 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m5) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/set-target-temperature', 0)]
2025-01-05 18:11:58.356 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m6) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/start-stop-air-conditioning', 0)]
2025-01-05 18:11:58.375 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m7) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/auxiliary-heating/start-stop-auxiliary-heating', 0)]
2025-01-05 18:11:58.393 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m8) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/start-stop-window-heating', 0)]
2025-01-05 18:11:58.410 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m9) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/air-conditioning/windows-heating', 0)]
2025-01-05 18:11:58.432 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m10) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/start-stop-charging', 0)]
2025-01-05 18:11:58.454 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m11) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-battery-support', 0)]
2025-01-05 18:11:58.475 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m12) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-auto-unlock-plug', 0)]
2025-01-05 18:11:58.496 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m13) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-care-mode', 0)]
2025-01-05 18:11:58.516 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m14) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-charge-limit', 0)]
2025-01-05 18:11:58.536 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m15) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-charge-mode', 0)]
2025-01-05 18:11:58.559 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m16) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-charging-profiles', 0)]
2025-01-05 18:11:58.589 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m17) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/charging/update-charging-current', 0)]
2025-01-05 18:11:58.614 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m18) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/departure/update-departure-timers', 0)]
2025-01-05 18:11:58.633 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m19) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/departure/update-minimal-soc', 0)]
2025-01-05 18:11:58.765 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m20) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/vehicle-access/honk-and-flash', 0)]
2025-01-05 18:11:58.795 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m21) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/vehicle-access/lock-vehicle', 0)]
2025-01-05 18:11:58.824 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m22) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/vehicle-services-backup/apply-backup', 0)]
2025-01-05 18:11:58.842 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m23) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/operation-request/vehicle-wakeup/wakeup', 0)]
2025-01-05 18:11:58.861 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m24) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/service-event/air-conditioning', 0)]
2025-01-05 18:11:58.885 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m25) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/service-event/charging', 0)]
2025-01-05 18:11:58.903 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m26) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/service-event/departure', 0)]
2025-01-05 18:11:58.920 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m27) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/service-event/vehicle-status/access', 0)]
2025-01-05 18:11:58.938 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m28) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/service-event/vehicle-status/lights', 0)]
2025-01-05 18:11:58.956 DEBUG (MainThread) [myskoda.mqtt] Sending SUBSCRIBE (d0, m29) [(b'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/TMBxxxxxxxxxxxxxx/account-event/account-event/privacy', 0)]
2025-01-05 18:12:05.075 DEBUG (MainThread) [custom_components.myskoda.coordinator] Performing scheduled update of all data for vin TMBxxxxxxxxxxxxxx
2025-01-05 18:12:05.243 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/users - response: 200 (596 bytes) 
2025-01-05 18:12:05.376 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/garage/vehic - response: 200 (5855 bytes) 
2025-01-05 18:12:05.807 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v3/vehicle-main - response: 200 (1823 bytes) 
2025-01-05 18:12:06.805 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditio - response: 200 (769 bytes) 
2025-01-05 18:12:07.785 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/TMB - response: 200 (556 bytes) 
2025-01-05 18:12:08.143 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/maps/positio - response: 200 (241 bytes) 
2025-01-05 18:12:08.630 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/vehicle-stat - response: 200 (1682 bytes) 
2025-01-05 18:12:09.400 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v2/vehicle-stat - response: 200 (314 bytes) 
2025-01-05 18:12:09.590 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/trip-statist - response: 200 (1680 bytes) 
2025-01-05 18:12:09.818 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-heal - response: 200 (323 bytes) 
2025-01-05 18:12:11.150 DEBUG (MainThread) [myskoda.myskoda] Trace: GET https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-auto - response: 200 (1100 bytes) 
2025-01-05 18:12:11.150 DEBUG (MainThread) [custom_components.myskoda.coordinator] Finished fetching myskoda data in 6.075 seconds (success: True)
2025-01-05 18:12:11.151 DEBUG (MainThread) [custom_components.myskoda.device_tracker] Main render not found, choosing composite render instead.
2025-01-05 18:12:18.926 DEBUG (MainThread) [custom_components.myskoda.image] Main render not found, choosing composite render instead.

@prvakt prvakt added the bugfix This PR contains a bugfix label Jan 5, 2025
@WebSpider WebSpider self-assigned this Jan 5, 2025
Copy link
Contributor

@WebSpider WebSpider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and works for me! 👍

@prvakt prvakt merged commit 0d49508 into skodaconnect:main Jan 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR contains a bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants