Google unavailable after upgrade to 0.109.x

After upgrading from 0.108.9, where everything was working perfectly, to 0.109.x ALL my Google media devices (Google Home, Google Nest Hub, Chromecast) are showing as unavailable.
I’ve tried clearing browser cache and restarting devices to no avail.
Any ideas to fix this issue please?

Running HA as a docker container ?

Oops, sorry, forgot to include that info.
No, running on Windows 10 Python.

and here i thought i was going crazy and did something wrong, i have also got the same issue but i’m running in Proxmox using the whiskerz007 install script (https://github.com/whiskerz007/proxmox_hassos_install). so it used to work before the upgrade on the IoT separate VLAN. i’m now on Home Assistant 0.109.3.

i also have my Google devices on an IoT VLAN that can see and talk to Home Assistant both ways so it’s not a firewall issue. BUT and a big BUT - if i put the google devices on the same LAN as Home assistant then it seems to work. i have even rebuilt my Unifi Network and it’s still not working…

the integration also finds the devices with no issues, but them shows as unavailable.

looks like we are not alone: 0.109: New integrations page and weather card, frontend lost weight

Regards
Pedro

I have one Chromecast and I’m having the same issue. After 109.x the entity mediaplayer.ccast just disappear. It was unavailable because it was restored from the previous states when it was working. After deleting the integration and re-creating it, it’s not seeing the ccast device.

I’m running HASSIO on a VBox VM, same LAN, no vlans… it was working fine in 108.x

Here is some info i have found that might help: https://github.com/home-assistant/core/issues/34620 in my case not so much just yet.

Had the same problem, and my issue was related to this:

Google Cast - Connecting to Cast devices now depends on mDNS even when IP addresses of the Cast Devices are manually entered.- (@emontnemery - #33922) (cast docs)

In my case I have HA and Google Home on different networks. mDNS is not transferred between different networks. Lucky enough I have a Linux machine running with access to both networks (eth0 and wlan0). My solution was to enable avahi reflection on that Linux machine.
Here is one way of doing it:
Implementing an avahi reflector to advertise iPrint printers

To enable Avahi reflection:

  1. Configure a machine with two interfaces (or configure both VLANs to a single NIC if you are using VLAN)
  2. Ensure Avahi is installed ( rpm -qa |grep avahi)
  3. Enable reflection
  • vi /etc/avahi/avahi-daemon.conf
  • uncomment the ‘allow-interfaces’ line and list the interfaces you intend to use
    • allow-interfaces=eth0,wlan0
  • uncomment ‘enable-reflector’ and change the value to yes
    • enable-reflector=yes
  1. Restart avahi (rcavahi-daemon restart)

PS for VLAN’s this could be one solution (same principle):
Need Bonjour across VLANs? Set Up an Avahi Reflector!

Interesting comments and links, @pedro.goncalves and @PetrolHead.

I tried disabling (commenting out) my Google TTS entry, not that I ever use it. In fact, I went as far as disabling, commenting out, deleting/removing all entries in all yaml files that point to or relate to Google casting and media player use (my cameras and BlueIris setup basically) and sill all media player devices were unavailable. So I guess I can assume it’s not anything relating to my code additions breaking it.

Networks - I only have the one network. Or do I? The Windows 10 server PC which is running HA is connected via Ethernet LAN which leads direct to router via a switch. WiFi is powered via UniFi connected to router. So all media player devices connect to the UniFi.

So, this appears to have been a bug during the beta releases. Does this mean the bug was fixed and is no longer considered a bug? If so, how do we go about getting our media cast devices working again before I give up and downgrade to 0.108.9 which worked perfectly.

If it’s any help, here’s the loading script part of the media player setting up.

2020-05-05 12:28:15 INFO (MainThread) [homeassistant.setup] Setting up media_player
2020-05-05 12:28:15 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds.
2020-05-05 12:28:15 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
2020-05-05 12:28:15 ERROR (MainThread) [asyncio.events] Exception in async_set_cast_info called from
   File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DVR\AppData\Local\Programs\Python\Python37\Scripts\hass.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\__main__.py", line 347, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 538, in run_forever
    self._run_once()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 1782, in _run_once
    handle._run()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\helpers\entity_platform.py", line 443, in _async_add_entity
    await entity.async_added_to_hass()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 215, in async_added_to_hass
    async_create_catching_coro(self.async_set_cast_info(self._cast_info))

Traceback (most recent call last):
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 272, in async_set_cast_info
    pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'

2020-05-05 12:28:15 ERROR (MainThread) [asyncio.events] Exception in async_set_cast_info called from
   File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DVR\AppData\Local\Programs\Python\Python37\Scripts\hass.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\__main__.py", line 347, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 538, in run_forever
    self._run_once()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 1782, in _run_once
    handle._run()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\helpers\entity_platform.py", line 443, in _async_add_entity
    await entity.async_added_to_hass()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 215, in async_added_to_hass
    async_create_catching_coro(self.async_set_cast_info(self._cast_info))

Traceback (most recent call last):
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 272, in async_set_cast_info
    pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'

2020-05-05 12:28:15 ERROR (MainThread) [asyncio.events] Exception in async_set_cast_info called from
   File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DVR\AppData\Local\Programs\Python\Python37\Scripts\hass.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\__main__.py", line 347, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 538, in run_forever
    self._run_once()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 1782, in _run_once
    handle._run()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\helpers\entity_platform.py", line 443, in _async_add_entity
    await entity.async_added_to_hass()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 215, in async_added_to_hass
    async_create_catching_coro(self.async_set_cast_info(self._cast_info))

Traceback (most recent call last):
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 272, in async_set_cast_info
    pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'

2020-05-05 12:28:15 ERROR (MainThread) [asyncio.events] Exception in async_set_cast_info called from
   File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DVR\AppData\Local\Programs\Python\Python37\Scripts\hass.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\__main__.py", line 347, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 538, in run_forever
    self._run_once()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 1782, in _run_once
    handle._run()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\helpers\entity_platform.py", line 443, in _async_add_entity
    await entity.async_added_to_hass()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 215, in async_added_to_hass
    async_create_catching_coro(self.async_set_cast_info(self._cast_info))

Traceback (most recent call last):
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 272, in async_set_cast_info
    pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'

2020-05-05 12:28:16 ERROR (MainThread) [asyncio.events] Exception in async_set_cast_info called from
   File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DVR\AppData\Local\Programs\Python\Python37\Scripts\hass.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\__main__.py", line 347, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 538, in run_forever
    self._run_once()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 1782, in _run_once
    handle._run()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\helpers\entity_platform.py", line 443, in _async_add_entity
    await entity.async_added_to_hass()
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 215, in async_added_to_hass
    async_create_catching_coro(self.async_set_cast_info(self._cast_info))

Traceback (most recent call last):
  File "c:\users\dvr\appdata\local\programs\python\python37\lib\site-packages\homeassistant\components\cast\media_player.py", line 272, in async_set_cast_info
    pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'

Hoping someone can suggest anything else I can try. Thanks.

I have seen other solutions related to this change in HASS like wrong version of pychromecast in HASS but also on the network side that some routers don’t relay mDNS between eth and wifi.
Then it depends on how you setup your UniFi I’m not familiar with UniFi so I could not give any advice. It could be so that you UniFi network is a sub to your routers network and then the mDNS will not be relayed.

Good point re my UniFi. However, I was doubtful since my phone connects to the Google Home Hub but then again, my phone is also connected to UniFi via WiFi. So, for the avoidance of doubt, I turned on WiFi on the router with a different SSID to the UniFi so that I could ensure I connected a Google Hub to the router WiFi only, bypassing UniFi altogether. Still unavailable in HA.

So this leaves…

OK, so I changed to another router and still unavailable in HA. Unless both routers are not relaying this blasted mDNS atween eth and wifi?!? This is getting silly now. :frowning:

I’m also having issues connecting to my google devices after updating to 109.4.

I’m running latest hassOS in VBox on Win10, and it’s been fine this whole time, until I updated to 109.4.

Vbox is configured to use my PCs wifi-adapter in bridged mode, emulating a wired connection to HassOS, and it’s been like that for at least two years without issues until now :confused:

Not sure what to try, will probably roll back to my previous install since I for once have a backup :smiley:

WeyHey!! I got it working! I’m all sorted now. Running HA 0.1909.4

My fix?
I noticed in my .homeassistant/deps/python etc folders there were a lot of old files and folders from months and months of installing, uninstalling and testing various things when using Home Assistant. Which were safe to clear out? I had no idea. So I used another PC, installed Python for Windows, installed Home Assistant, started it then stopped it. I then copied the deps folder to desktop of the server machine running my HA. I removed the original deps folder and replaced with the new fresh one I created. Started HA, took a little longer to start up, which I expected as it had some setting up to do based on my HA setup. It didn’t take too long though but once up and running, it was all there, including my 6 Google Media devices and I checked my cameras cast to them, no problem.

Maybe this was a bit drastic? I did keep the old deps folder just in case but it’s installed and running like a new machine, kinda like a fresh install of Windows. So this may be a way for others to get their media players back again - replace the deps folder with a fresh and completely new one. It’s worth a try! It worked for me.

Hi @Legsmaniac, thanks for the info.

I have done a new clean install of Home Assistant in Proxmox with just chromecast integration and i still have the same issue of chromecasts being unavailable whih is very strange.

That’s a shame, @pedro.goncalves. Obviously your problem must be different to mine. Hope you manage to suss it.

Have you checked that mDNS in enabled between your VLAN’s?

I have got the same issue, but i can’t resolve it yet. I have Home assistant Core running in docker. It is running with network-mode:host, because of Bluetooth. So the container is within my LAN vlan. Google Cast are in my IOT vlan, but controlling those stopped working after 109. But i do have Avahi reflector running. This is a docker container running in docker and reflecting between IOT_Vlan and LAN_Vlan. This seems to work OK, because i can find the same google devices from LAN from my iphone or other bonjour browser. But within the HA container it doesn’t look likes it is working. I did try to run list_chromecast.py from within the HA container, but is not listing anything.

Someone have any ideas?

1 Like

Fixed it after a bit of investigation. Problem is with an outdated version of pychromecast. All I had to do is update my plex assistant component and it in turn updated the pychromecast library. Back in business now :slight_smile:

Amazing how different these fixes are turning out for us. Although I’m not using Plex, I did try updating my pychromecast, didn’t make any difference for me.

Hi @PetrolHead yip mDNS is still enadled :frowning: i’m now thinking if it may have something to do with my HP Managed switch not passing over mDNS.

You said in an earlier post that you have your google device on a separate IoT VLAN. mDSN is not relayed between VLAN’s you should check that.