Google Cast integration prevents Home Assistant from starting


My set up used to work without any issue but for whatever reason it decided from one day to another not to start again after a restart of my Raspberry Pi.

I then activated the debug logs (attached here: ) and realised that there was no major error but there were many messages showing like ERROR (Thread-13) [pychromecast.socket_client] Failed to connect, retrying in 5.0s. And at that time accessing HA at the correct URL is not working and the sensor states are not even getting updated in the database.

After quite a lot of troubleshooting and starting from a blank configuration I managed to realise that the Google cast (so pychromecast) integration is the one that seems to stop my HA from starting.

I renamed core.config_entries to core.config_entries.bak and restarted HA which loaded without any error but without finding any of my cast devices.

Then, if I go to Configuration > Integrations and add again Google Cast, my devices are back but if I try to restart HA it will fail again, repeating the same error about pychromecast.socket_client and I have again to remove/rename the file core.config_entries

Would anyone have an idea on how to fix this issue on the long term?

Thanks a lot!

is any of your google cast devices telling you that it has access to your network but no internet connection? i had this once and it prevented home assistant from starting until the chromecast was back online.

Thanks for replying!

Actually I don’t know if one of the devices has issues to connect to the Internet as I am away from home for a week and a half. I can check once I am back home but it will have to wait a few days.

And if this is the case, should it be raised as a bug then?

if this is the case raising a bug is a good idea. i didn’t had any logs at hand to report it and it never happened again. so if you are able to reproduce this behavior it should be reported :slight_smile::+1:

I can now confirm that one of my cast devices, a Chromecast, was stuck without any Internet connection. Once I restarted it it connected back to the Internet and Home Assistant is now restarting normally. I will try to raise a bug even though I have minimal evidences in the logs and I don’t know how to reproduce this issue.

1 Like

This is a well known problem and has already been adressed:

Just to inform that today I faced this issue and after 6H of troubleshooting the issue is not solved on 0.86.4

Same issue here on 0.89.1, getting the following:

2019-03-12 16:41:21 ERROR (SyncWorker_19) [pychromecast.socket_client] [Fire TV:8010] Failed to connect to service Fire TV._googlecast._tcp.local., retrying in 5.0s

Yup, 0.89 and still running into this.