Google media players and chromecasts not being discovered

I recently set up home assistant Windows 10 (x64) with Virtualbox. HA seems to be working fine and all devices (zwave, etc…) except for cast devices are discovered. I have several chromecasts and Google home minis that are not being discovered using the integration module. I then added some lines to my configuration.yaml file in homes of them manually being added, but they still aren’t showing up in my devices. Below is the error log related to media player, but I don’t understand the log well enough to decipher the issue. Any ideas on what could be causing this? I’ve also included the lines from my configuration.yaml file for reference. HA and my cast devices are on the same subnet and logged into same wifi ssid.

Versions:
core: core-2021.2.0
Supervisor: supervisor-2021.01.8

configuration.yaml lines related to media player:

cast:
media_player:
- host: 192.168.0.121
- host: 192.168.0.122
- host: 192.168.0.123

Error logs:

Error while setting up cast platform for media_player
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 198, in _async_setup_platform
await asyncio.shield(task)
File “/usr/src/homeassistant/homeassistant/components/cast/media_player.py”, line 137, in async_setup_entry
[
File “/usr/src/homeassistant/homeassistant/components/cast/media_player.py”, line 138, in
_async_setup_platform(hass, ENTITY_SCHEMA(cfg), async_add_entities)
File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 218, in call
return self._exec((Schema(val) for val in self.validators), v)
File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 341, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 337, in _exec
v = func(v)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 817, in validate_callable
return schema(data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data[‘host’]

Thanks
Bill

Where did you see this configuration? The error says that host is not a valid option for cast, the available options can be found here.

Does your router support mDNS and is it enabled?

That is cut and pasted from an older VM I had running (older versions of HA, etc…). I see that the documentation now calls for UUID instead of IP address when manually adding cast devices. I’m not sure how to find the UUID (need to find a mDNS browser). I’ll try that and report back. I looked all through my TP-Link Archer C9 router settings and I don’t see anything regarding mDNS (or Bonjour which I think is the Apple version).

I think my setup is technically in a docker container, but I’m not sure. I just installed it via a virtualbox HD per an online tutorial. Maybe I need to put the VM in host mode, but I’m not sure how to do that.

Per the manual: When running Home Assistant Core in a Docker container, the command line option --net=host or the compose file equivalent network_mode: host must be used to put it on the host’s network, otherwise the Home Assistant Core will not be able to connect to any Cast device.

I am able to reach my HA by using the homeassistant.local:8123 from other pcs on the same network. My understanding is that this is an indication that mDNS is working.

Thanks for your help.

I can’t find an mDNS browser, so I’m not sure how to find the UUID of the chromecast devices. Does anyone know how to do this?

No, the documentation says that you can configure which chromecasts should be included of the ones HA already discovered. You can’t add devices manual anymore since a few months, they need to be discovered by HA.
Is discovery enabled on your system?

Yes, discovery is enabled. Other devices have been discovered automatically, such as Roku and Denon.