You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some code that connects to my local HA instance via (which actually results in an odd error when the instance is not reachable, but that's another issue):
This works fine until I, for whatever reason, restart my HA instance. I added some logging to the disconnected and ready callbacks and it appears to me, that the reconnect is working. But I do not get any further messages for my subscriptions.
So I am wondering, whether they do not get re-subscribed after the reconnect? Or that HA isn't ready to handle these subscribe_trigger messages correctly while still starting up?
I would appreciate some ideas on this.
The text was updated successfully, but these errors were encountered:
I did some more research, requesting the /api/config continuously while restarting Home Assistant. Connecting via websocket while state is still NOT_RUNNING or STARTING works - but then the callbacks registered to some triggers are never called. Subscribing when state is RUNNING works as expected. But, and that is really unfortunate, it does not work when state just switched to RUNNING...
Otherwise, not using the the reconnect mechanism and instead polling the /api/config endpoint and waiting for "the right time" to connect would have been a feasible workaround - but adding "wait for 30s after state became RUNNING" does feel really hacky...
Any insights that might confirm or reject my obervations?
I have some code that connects to my local HA instance via (which actually results in an odd error when the instance is not reachable, but that's another issue):
Then, I register to some triggers:
This works fine until I, for whatever reason, restart my HA instance. I added some logging to the
disconnected
andready
callbacks and it appears to me, that the reconnect is working. But I do not get any further messages for my subscriptions.So I am wondering, whether they do not get re-subscribed after the reconnect? Or that HA isn't ready to handle these
subscribe_trigger
messages correctly while still starting up?I would appreciate some ideas on this.
The text was updated successfully, but these errors were encountered: