Broadcast mDNS across multiple network

My HA setup involves multiple networks.

  1. Network with internet where all the home devices connect to.
  2. Network without internet where all the IOT devices connect to.
  3. Virtual Network that bridges host machine with HAOS running in a hyper-v

Some of the devices I own like (ecobee, abode, etc) will connect only through Apple Homekit. However, mDNS doesnt discover devices outside its network and HA doesnt have the ability to integrate devices from multiple network.

So with absolutely no knowledge on Python, I leveraged zeroconf and wrote this tiny program that could help broadcast mDNS over all the networks and thereby allowing you to discover devices from all the networks.

Jebarson/MdnsBroadcaster: MdnsBroadcaster is a lightweight Python program that forwards mDNS traffic between multiple network interfaces.

I use Avahi (https://avahi.org/) to bridge mDNS across my vlans. There are some threads in this forum discussing it’s use (search for Avahi).

I believe avahi as a tool works only in linux though? My set up runs on windows and hyper-v. I believe I looked at both avahi and zeroconf before deciding to use zeroconf to write the script.

I think your tool is a great contribution. I was just pointing out (to others who might search for a solution) that there are other options.

Nah, I wasn’t questioning your intention. I am genuinely interested in knowing how avahi works and its limitations just in case I overlooked something obvious

You are correct that Avahi is targeted at Linux / BSD-like systems. I do not know enough about Avahi to speak to its limitations.

It was easy for me to install and configure Avahi on my pfSense firewall to allow control of my Chromecast devices (on my IoT network) from my secure network. I do not do mDNS bridging for Home Assistant to discover devices. I keep HA and all my IoT devices on the same IoT VLAN and I believe this is the best practice for managing HA and its associated devices (along with device and protocol specific firewall rules).

Interesting. How do you expose HA without connecting to your main network (the one with internet) and connect to things such as remote browsing, home device control / access?

The IoT network firewall rules restrict IoT device access to the IoT VLAN - IoT devices, including Home Assistant, can’t “see” my other VLANs. My “main” network has access the IoT network (but not the other way around); therefore, anything on my “main” network can establish a connection to stuff on the IoT network.

I don’t think of it as “exposing” HA to my other networks, I think of it as controlling the flow of connections (who can initiate a connection to where).

Got it. That’s indeed very cool.

I did initially think about it but then the amount of devices that I will need to manage just scared me enough to create separate networks. But I know that there is a huge amount of people who would rather use firewall to control access to devices instead of complicating the network like I did.

Thanks for sharing your setup.