Getting Apple TVs and HomePods into Home Assistant across VLANs
I have a lot of Apple gear around the house: seven Apple TV 4K units and four HomePod mini speakers, spread across rooms. I wanted them in Home Assistant so I could see what was playing, fold them into automations, and push text-to-speech announcements to the HomePods.
There was one catch baked into my network. I run VLANs, and the Apple devices live on my client VLAN (VLAN 10) while Home Assistant runs on my server VLAN (VLAN 20). That separation is the whole reason the integration would not work out of the box.
The integration could not find anything
Home Assistant has a built-in Apple TV integration. Under the hood it uses pyatv, which talks to Apple TVs and AirPlay speakers over the protocols Apple actually ships.
When I added it, it found nothing. No devices to pair, even when I typed in an IP address by hand.
That was confusing, because the devices were clearly reachable. From the Home Assistant host I could ping every Apple TV and HomePod on VLAN 10, and the relevant ports (7000, 49152, 5000) answered. Unicast traffic was fine. Discovery was the thing that failed.
mDNS does not cross VLANs
The Apple TV integration leans on mDNS (the multicast service discovery behind Bonjour) to find devices, and in my experience it kept failing to enumerate anything even with a manual IP entered. mDNS uses link-local multicast to 224.0.0.251 on UDP 5353, and link-local multicast does not route between subnets on its own. Home Assistant on VLAN 20 could only hear mDNS responses from its own segment. The Apple devices announcing themselves on VLAN 10 were shouting into a room Home Assistant was not in.
So I had a network problem wearing an integration costume. Ping working told me the path was open; the missing piece was getting multicast discovery from one VLAN to the other.
Forwarding mDNS with a RouterOS repeater
My router runs RouterOS, which has had a built-in mDNS repeater since 7.16. That is exactly the bridge I needed: it relays mDNS announcements between the interfaces you list, so a device on VLAN 10 becomes discoverable from VLAN 20.
I enabled the repeater across the relevant VLAN interfaces (client, server, and IoT) and added firewall rules to actually let the multicast through:
- Allow mDNS multicast (
224.0.0.251, UDP5353) in the input chain. - Allow mDNS multicast forwarding between the VLANs in the forward chain.
- Allow Home Assistant to reach the client VLAN where the devices live.
After enabling the repeater and restarting Home Assistant so it re-ran discovery, the devices showed up. Each one surfaced as its own zeroconf discovery I confirmed in turn: seven Apple TVs and four HomePods, each device giving me a media_player entity and a remote entity. Twenty-two entities across the eleven devices.
Pairing, and the Apple TVs that went stale
Apple TVs need pairing. The integration walks you through it: it shows a PIN on the TV screen, you type it into Home Assistant, and it stores credentials for the Companion and AirPlay protocols. The HomePods were simpler. They came in as media players with no pairing step at all.
Pairing once is not the end of it, though. At one point my Apple TVs had credentials stored but were not reporting playback state, even while they were actively playing something. That tends to happen after tvOS updates or when credentials otherwise go stale. The fix is unglamorous: remove the Apple TV from Settings, Devices and Services, add it back, and re-enter the PIN from the screen. Once re-paired, playback state and remote control came back.
TTS to the HomePods
The announcement piece worked, and the reason is worth calling out. Text-to-speech to an AirPlay speaker means Home Assistant generates an audio file and hands the speaker a URL to fetch. If Home Assistant is only reachable over a self-signed or broken certificate, the HomePod refuses the stream. Mine is served over a valid public certificate, so the HomePods happily pulled the TTS audio and played it. If your announcements fail silently, check how the speaker reaches Home Assistant before you blame the integration.
The one thing Apple will not give you
The reason I started this project was partly the HomePod mini’s built-in temperature and humidity sensors. I wanted those readings in Home Assistant. You cannot have them.
I went looking for a way and came up empty, and the dead ends all point the same direction. The HomePod mini does not expose its sensors through the HomeKit Controller path. It does not expose them over Matter, even though a HomePod can act as a Matter controller itself. pyatv does not surface them either. There are convoluted workarounds that bounce the data through an Apple Home automation and a webhook, but that is not a real integration and the data is not real-time.
This is an Apple decision, not a Home Assistant shortcoming. The sensor data stays inside Apple’s ecosystem on purpose. Knowing that up front would have saved me some time, so here it is for you.
What I ended up with
Eleven Apple devices in Home Assistant: media control, accurate playback state, remote control, and TTS announcements to the HomePods. The fix that made it all possible had nothing to do with Apple or Home Assistant. It was forwarding mDNS across VLANs.
A few things I took away:
- A failed integration discovery on a segmented network is usually a multicast problem, not an integration bug. Check whether mDNS reaches the other VLAN before anything else.
- Reachable over unicast (ping, open ports) does not mean discoverable. mDNS is a separate path.
- Apple TV credentials go stale. Re-pairing through the UI is the reliable reset.
- TTS to AirPlay speakers depends on Home Assistant having a certificate the speaker trusts.
- The HomePod mini’s environmental sensors are off limits. Plan around that, do not fight it.
Disclosure: As an Amazon Associate, I earn from qualifying purchases.
Related reading
Troubleshooting RouterOS Local Gateway IP Unreachability
SSH to the router worked from other VLANs but not from the same VLAN as the gateway. What I ruled out, what still does not have a clean root cause, and the workaround that kept management sane.
Researching BirdNET-Pi for backyard bird detection
Before buying any hardware, I researched what it would take to run a self-hosted bird-sound ID service on the homelab: which BirdNET-Pi to use, the hardware it needs, and how it fits a segmented network. Here is the plan I landed on, and why I shelved it.
Why my Home Assistant Generic Camera RTSP feeds stayed blank
Three RTSP cameras registered fine in Home Assistant but showed nothing. The cameras were healthy. The fix came down to making the FFmpeg and Stream components explicit in configuration.yaml.
Ready to Transform Your Career?
Let's work together to unlock your potential and achieve your professional goals.