Google Cast Platform not working

I’m using the HASS 0.43.2 and Google Cast has stopped working. They were working fine a week ago, but since a few days back they either don’t appear in HASS. If I force add the platform, then HASS webui never appears. I’ve also tried to downgrade to previous versions, but there’s no difference.

I have the following Google Cast Devices:

  • 1 Google Home
  • 1 Chromecast V2
  • 3 LG MusicFlow Speakers

Below is the error I get with Normal Discovery:

17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:40 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 13:19:46 ERROR (Thread-10) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
17-05-05 13:19:46 ERROR (Thread-7) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
17-05-05 13:19:46 ERROR (Thread-3) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
17-05-05 13:19:46 ERROR (Thread-1) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
17-05-05 13:19:46 ERROR (Thread-4) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
17-05-05 13:19:46 ERROR (Thread-5) [pychromecast.socket_client] Failed to connect, retrying in 5.0s

When I add the platform to my Config, the HASS WebUI refuses to load. There are no specific errors for this shown in the log.

media_player:
  - platform: cast

17-05-05 12:55:58 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
17-05-05 12:55:59 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
17-05-05 12:56:14 ERROR (Thread-4) [pychromecast.socket_client] Failed to connect, retrying in 5.0s

I’ve managed to fix my problem. I simply included the IP for my Google Home device as below and all the other Google Cast devices shows up now also.

media_player:
  - platform: cast
    host: 192.168.86.115