Chromecast media devices showing unavailable in home assistant

I have a bunch of google homes and chromecast 4k’s on a separate vlan from my man LAN that my home assistant instance is running on. I have a Ubiquiti Unifi Dream Machine Pro and a Unifi 48 port switch. Even though they show as unavailable in HA i can still cast to them from other devices on my main LAN, so they are functioning. Any ideas as to why HA can’t see them consistently?

Have you tried to enable the chromecast devices manually? Do you have all the firewall rules correct for the HA machine? Have you done the proper port forwarding if needed? If you move chromecast off the vlan to your lan, does that give you access?

Throwing out ideas to investigate.

@AllHailJ Thanks for your reply. I have one of the unavailable chromecasts on my my LAN for testing purposes. It didn’t show up in HA yet so I just restarted Home Assistant and it is showing currently. Of course, the other devices on the VLAN are now showing too so I’ll have to give it some time.

Can you share with me what firewall rules I should have for the HA machine? I was having some trouble getting the TTS to work on my chromecast devices so I just ended up taking all their IP address and opening them up to my main LAN anyway. I need to narrow down what ports actually need to be open in order for me to tighten those rules down because it currently defeats the purpose of having them on a separate VLAN.

Can you share with me what firewall rules I should have for the HA machine?

Without knowing your complete setup I can’t comment. It sounds like you have access to the vlan but need rules to allow lan to access vlan on specific devices but deny wan to the vlan.

This link may help you:

https://blog.g3rt.nl/allow-google-chromecast-host-firewall-iptables.html

Hope this gives you the direction you need.

i currently have the firewall set to allow main lan to all other VLAN’s but not allow those vlans to access the LAN. However. I have punched that whole back to the LAN for the chromecast devices so… Also, the IoT Vlan where the chromecasts reside does have access to the internet. i guess i just don’t know if there are certain ports that I need to have allowed that i’m missing somehow. I have MDNS enabled in my unifi controller.

That is why I referred you to the article:

from the article:

With the help of some extra googling I stumbled upon a document from Cisco: Chromecast Deployment Guide, Release 7.6. While it was quite useful, it was a lot of bla bla and also about wireless network tweaking which I wasn’t really interested in.

To cut to the chase, here’s what you need:

  • Allow high UDP ports both incoming and outgoing.
    “High ports” are the local ports usually ranging 32768-61000 on most Linux systems.
  • Allow both TCP ports 8008 and 8009 outbound to the Chromecast device.
    I’ve noticed most reference only use 8008, but that didn’t do it for me and saw outbound connection to port 8009 being blocked.
  • Allow the special SSDP packets outbound (which is UDP traffic to the multicast IP 239.255.255.250, destination port 1900).
    As far as I understand, a Chromecast app should send information over SSDP if it wants to discover the Chromecasts in the network. The Chromecast should then reply to the source IP it was given.
  • In the INPUT chain, allow ESTABLISHED traffic.
    This is very common to have in your firewall, usually even together with RELATED, e.g.:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Share on: Twitter :snowflake: Hacker News :snowflake: Facebook :snowflake: LinkedIn :snowflake: Reddit :snowflake: Email

4 Comments

Related Posts

Published

30 Sep 2014, 21:45

Category

Security

Tags

Connect with me on…

i have a question about configuring the SSDP packets outbound. Where in my firewall would I do this? I’m using unifi and I have the WAN IN, WAN OUT, WAN LOCAL, LAN IN, LAN OUT, LAN LOCAL etc… Any idea how to set that up? Would the source be my LAN network and the destination the specific ip address of 255.255.255.250? i’m assuming in unifi i would have to create an ipv4 address group and port group?

I did take one of the chromecasts that wasn’t available and put it on my LAN where my Home Assistant is. It still wasn’t able to see it. I ended up uninstalling the Cast Integration and reinstalling it. I got my devices back but now a bunch have become unavailable again. One of the ones that is unavailable is the one that is on the same LAN as HA. So i’m thinking this is less to do with inter-vlan firewall stuff and more to do with general network settings or an issue with Home Assistant or the integration…

Thoughts?

My 4 Google Home devices and other media players seem to come and go regards availability with no real reason I can discern so I’ve just stopped worrying about it. I’ve only ever used HA to display them so it really doesn’t bother me that much

yeah, problem is i was using chromecasts to play audio to my speaker systems all over the house. so i’d like to get it working reliably.

Anybody ever figure this out. I have UDMP and 48 port pro. All my CC are on same plan as HA so I shouldn’t have any firewall issues and it is no rhyme or reason that certain devices drop off and others don’t.

For future people still searching for answers. My setup is two VLANs, one for IOT where the Chromecasts live and one for home where my Home Assistant is running. By default my main network (with HA) has full access to the IOT VLAN, but the IOT VLAN does not have access back except for what’s listed below. My edits to the suggested firewall settings in bold

mDNS is also enabled on both VLANs

I had the same problem.
FIx for me was, changing the DNS server on HA host machine to not use the internet provider DNS, but used the local DNS on the modem/router (192.168.0.1)