Configuring two internal URLs for IoT vlan

HA is listening to two VLANs but I can only configure one internal URL.

Some integrations seem to use the internal URL to set push callbacks with devices. However, if I set the internal URL to my IoT vlan, then devices in my other (main) vlan get the wrong URL and can’t reach HA for push.

Is there any way to register two internal URLs?

1 Like

How do you set even one internal URL? I’m having a problem with HA hosted in a kubernetes cluster and when I try to play media, HA tells the device to use the internal kubernetes IP rather than one that is accessible to my media device.

Failed to cast media from internal_url ( Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

I found the docs for setting the urls here:

Setting two internal urls would be tricky. How would home assistant know which one to give? I guess it could give the one that is on the same vlan as the request.

I wonder if it would work to just use the external IP address. You could have your router handle DNS for your external url and redirect to your local IP.

My HA does not have an external IP / domain. It’s all local.

I have a similar with my reolink camera on a restricted subnet and the webhook (internal_url) URL being inaccessible.
It’s impossible to configure the internal_url per integration without code changes nor is it wise for maintenance, and the IP addresses of the VLAN specifically are restricted so the same IP cannot be accessed from both (even though Home Assistant has both interfaces).
Here’s how I solved it:

  • Subnet1 (trunk) Internet access, Adguard Home DNS
  • Subnet1 (vlan tag 100) No internet or main network access, Adguard Home DNS

Suffice to say Home Assistant has IP addresses on both subnets, and all my cameras (especially those outside like the doorbell) can’t access my lan or the internet, but of course other devices internally still need to reach HA.

By leveraging that all of my network uses adguard home as its DNS, I can manipulate a rewrite rule based on subnet to give the right address for the HA Url, simplified as homeassistant.local here:

# Home assistant on VLAN100
# Home assistant on default network

Presto, it works like a charm.
Consequently, I also use an adguard home DNS rule to route the external URL to the internal IP directly, getting the most direct connection but still using SSL.