-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Cast Broken 109, HA and Casts on same network. #35735
Comments
cast documentation |
Hey there @emontnemery, mind taking a look at this issue as its been labeled with a integration ( |
I have the same issue - HA 109.6 on Docker on Synology. Since 2 days now, my 7 Google Cast devices (2 Chromecasts, 4 Google Mini's, and 1 Google Nest Home) are no longer accessible from HA. All Google devices and NAS/HA docker are in the same network, no subnetworks. I do not know how to approach this. |
I'm not sure if this is related ... My chrome-cast devices (and cast group) are showing up in HA but the connection is unreliable ... My logs are constantly filled with ...
I am running a virtualenv install of Home Assistant Core |
@tprelog Please note exposing internal IPs are in no way a security or privacy risk, and by changing the logs you just make them harder to read. Anyhow, can you please confirm the IP addresses indicated in the logs are the correct ones? |
@pr0fetul, @N5A
There is a guide here for docker: https://www.home-assistant.io/docs/installation/docker/, please note that Home Assistant should be on the host network which must be the same (same subnet, same VLAN) as that of the Chrome Cast devices. The equivalent will be needed for VirtualBox. It is also possible to setup mDNS forwarding, some hints here: https://www.home-assistant.io/integrations/discovery/#mdns-and-upnp Finally, for Windows 10, another user had isssues due to what may be a bug in Windows: #34631 (comment) |
Hi @emontnemery , thank you very much for the fast reply. |
@emontnemery -- Sorry about that. I have have changed my comment above to include the direct copy from my logs. |
I think I solved the issue on my side. In Synology - Control Panel - Info Center - I had the Bonjour Printer Broadcast service disabled. Once enabled - miracle - all Google Cast devices showed up. I restarted HA - they are here - and working again. Also in same Control Panel - Security - Firewall - I enabled it and added ports 5353 and 1900 UDP traffic All Allowed. For now it seems that all my Cast devices are back working. I will monitor it and report if it breaks again. |
@pr0fetul Great! "Bonjour" is Apple's naming for mDNS, so it makes sense enabling that option has an impact. |
@tprelog No worries! I would say the reconnects you see in the log are pretty normal, Chrome Casts are generally not super stable and are reported by some users to reboot daily, possibly to dial home to Google for whatever reason. Anyhow, Home Assistant should always be able to reconnect to Chrome Casts if the connection has been severed. You could perhaps try to setup a ping sensor with a short interval, https://www.home-assistant.io/integrations/ping/#binary-sensor, to check if the Chrome Casts can be pinged when Home Assistant loses its connection. |
I have an strange error. When I integrate Google cast on the integration page the devices is discovered and all found. But when I restart HA they are Inaccessible. All of them. And if I delete the integration and restart, they are discovered and I am able to re-add them again. Someone else having that problem?? |
@jazbraz please open a new issue for your problem, it doesn't seem related to this one |
I am seeing similar behavior. With 0.109, I had to run an Avahi reflector on my host to get mDNS working again (I am running a docker based setup without --net=host; yes that is not according to install instructions). That worked great, but with 0.110 I am seeing weird behavior: Upon HA reboot, all devices show as unavailable - every reboot again. The fix? Rebooting my WiFi access points, which probably triggers another advertise or so by the Chromecasts. If I do this, they show up one-by-one in HA again without me touching HA - confirming that mDNS works.... Strange.... |
@N5A did you solve your problem yet? |
Sorry I have been out dealing with a new job and figuring out moving to a new state. , issue has not changed. Just tried readding the integration, same failure. No detected chromecasts. |
Taking a snapshot now, will update to 110.4, check/test.. then next also update the hassio os. |
No change with the update to 110.4, OS update proceeding. |
There are changes in 0.109 requiring a working mDNS setup, #35735 (comment) |
Note in the OP, mDNS is up and working. PCs in private VLAN can see Casts in IOT VLAN, HA also exists in the IOT Vlan. I will investigate if Vbox is at fault and possibly mucking up the mDNS passage between HA and the network. |
Vbox is in Bridged mode for network so its going direct to the NIC. so no interference should be there. |
@emontnemery How can I see if HASSIO is pinning some version of what you mentioned? Nothing else looks to be amiss. |
HAH... and now when I go look with zero changes... the casts were auto discovered. |
I am also having same issue. Home Assistant running under docker with host mode. There is no VLAN at all and has only one subnet. If I specify IP/host for Google Cast device HA never finds it and no error in the log. But if I use UI integration "Google Cast" it finds all devices but I want only one device by specifying IP address as shown below:
|
@scadaguru which HA version are you on? |
Latest 0.110.5 |
@scadaguru OK, can you collect and share three logs please, with logs enabled as listed below:
|
@emontnemery First of all appreciate your time and efforts, thanks a lot. I added logging details you provided and was going through logs and noticed it has tons of information about my devices. But here is good news! When I was adding IP of that Google home device it did not show up automatically in my entities list but I noticed in the log which said it discovered with lot more details about the device. So then I click configure Google Cast from UI and it showed only one device (rather than all devices about 12) which I specified using IP. I guess I was wrong thinking that UI Google Cast will bring all the devices but it did just one which I put in the configuration file. I was expecting to show up in the entity list automatically without doing anything from UI. May be I didn't read document correctly that even after manually specifying an IP still I need to configure from UI to include it I think this got changed recently earlier those showed automatically once you specify IP in config. Once more thank you so much for your time and help, sorry for the confusion. |
@bdraco scadaguru's problem with a fully manual config is that the manual configuration is blocked because cast devices have already been discovered, and is waiting for the user to confirm adding the discovered setup. Sample configuration:
Prints of return value from
Not sure if this is a bug, or just a documentation issue? |
Import is explicitly preventing them from being created in if discovery triggers first. It looks like that was added in #15630 for cast and sonos. I think it should be ok to change it to something like this and update the tests to preserve the original intent
|
@bdraco That change works, but the UI shows multiple cast integrations on first startup, one is triggered by discovery, the second one triggered by the import: By aborting the discovery flow on import that can be avoided: diff --git a/homeassistant/helpers/config_entry_flow.py b/homeassistant/helpers/config_entry_flow.py
index 81881d943c..43d281aa5b 100644
--- a/homeassistant/helpers/config_entry_flow.py
+++ b/homeassistant/helpers/config_entry_flow.py
@@ -59,6 +59,9 @@ class DiscoveryFlowHandler(config_entries.ConfigFlow):
for flow in in_progress:
self.hass.config_entries.flow.async_abort(flow["flow_id"])
+ if self._async_current_entries():
+ return self.async_abort(reason="single_instance_allowed")
+
return self.async_create_entry(title=self._title, data={})
async def async_step_discovery(self, discovery_info):
@@ -76,9 +79,14 @@ class DiscoveryFlowHandler(config_entries.ConfigFlow):
async def async_step_import(self, _):
"""Handle a flow initialized by import."""
- if self._async_in_progress() or self._async_current_entries():
+ if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
+ # Cancel other flows.
+ in_progress = self._async_in_progress()
+ for flow in in_progress:
+ self.hass.config_entries.flow.async_abort(flow["flow_id"])
+
return self.async_create_entry(title=self._title, data={}) Do you think that's reasonable? |
@N5A Is your problem solved, and this issue can be closed? |
Closing this as it seems it has been fixed. |
The problem
Google Cast broken somewhere between 108 and 109. Home Assistant and Casts all on the same IOT VLAN. mDNS works well My PCs on the private VLAN can see the cast devices within the IOT VLAN.
Cast Integration states it cannot find any cast devices on network.
Environment
HA Ver 109.6
HA Hosted within the Hassio VM. Virtualbox running VM on Win10 Host. Win10 has dual network connections. Wired goes to IOT Vlan, wireless to Private lan.
Problem-relevant
configuration.yaml
No Cast Config in Config Yaml.
Traceback/Error logs
Additional information
HA's VM's Network card is bound to the wired card of the minipc.
The text was updated successfully, but these errors were encountered: