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

Operations waiting for MQTT completion events never time out #512

Open
dvx76 opened this issue Jan 3, 2025 · 8 comments
Open

Operations waiting for MQTT completion events never time out #512

dvx76 opened this issue Jan 3, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@dvx76
Copy link
Member

dvx76 commented Jan 3, 2025

Describe the bug

Most (probably all) operations (e.g. start/stop charging) will POST the request to the API and then wait for the relevant completion event to be received by MQTT.

However it looks like the API sometimes accepts the POST but then either never completes the operation, or completes it but there is no MQTT event

Is this working in MySkoda app?*
Yes

Latest working release
Never worked

Debug logs

2025-01-02 15:49:11.255 DEBUG (MainThread) [myskoda.myskoda] Trace: POST https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/TMB - response: 202 (0 bytes)
2025-01-02 15:49:11.256 DEBUG (MainThread) [myskoda.mqtt] Waiting for operation stop-charging complete.

https://github.com/skodaconnect/myskoda/blob/9a02ef84dba1a0cf79e392fe524095cc86fd00b3/myskoda/myskoda.py#L149

https://github.com/skodaconnect/myskoda/blob/9a02ef84dba1a0cf79e392fe524095cc86fd00b3/myskoda/myskoda.py#L122

https://github.com/skodaconnect/myskoda/blob/9a02ef84dba1a0cf79e392fe524095cc86fd00b3/myskoda/mqtt.py#L128

@dvx76 dvx76 added the bug Something isn't working label Jan 3, 2025
@prvakt
Copy link
Collaborator

prvakt commented Jan 3, 2025

MQTT is currently down (or Skoda has changed something and it just doesn't work in our integration) so we should not wait for the operation to complete if MQTT is not connected..

@WebSpider
Copy link
Contributor

This has worked, I have seen the debug logs notifiying the completed event, probably around 1.15

@PixelPusher247
Copy link

Is this related to the following log entry?

Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. The system is waiting for tasks: {<Task pending name='Task-1444' coro=<MySkodaDataUpdateCoordinator._mqtt_connect() running at /config/custom_components/myskoda/coordinator.py:180> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove()]>, <Task pending name='Task-1882' coro=<MySkodaDataUpdateCoordinator._mqtt_connect() running at /config/custom_components/myskoda/coordinator.py:180> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove()]>}

@MrRickwi
Copy link

MrRickwi commented Jan 5, 2025

See the same problem: Startup of HA is extremely slow due to SkodaConnect timing out.

Logger: homeassistant.bootstrap
Quelle: bootstrap.py:1065
Erstmals aufgetreten: 10:51:58 (1 Vorkommnisse)
Zuletzt protokolliert: 10:51:58

Setup timed out for bootstrap waiting on {<Task pending name='Task-213' coro=<MySkodaDataUpdateCoordinator._mqtt_connect() running at /config/custom_components/myskoda/coordinator.py:180> wait_for= cb=[set.remove()]>} - moving forward

@WebSpider
Copy link
Contributor

What version are you running? If not v1.18.1, please update :-)

@MrRickwi
Copy link

MrRickwi commented Jan 6, 2025

Interesting, it is an older version 1.17.2 - but the update mechanism does not show any newer version. How can I update manually?

@MrRickwi
Copy link

MrRickwi commented Jan 6, 2025

Searching for Updates in HACS forced the new version to appear - will test 1.18.1

@MrRickwi
Copy link

MrRickwi commented Jan 6, 2025

At least there are no startup problems anymore with 1.18.1. Thanks for the advice :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants