Voice assistant TTS failing between VLANs even when doesn't need to cross

Hi everyone,

First, the setup:

  • Currently running 2x voice satellites on android (tried both [brownard/Ava](GitHub - brownard/Ava: An Android voice assistant for Home Assistant using the ESPHome protocol · GitHub and the kiosk satellite with same issues) but I have also verified and tested with a esphome (actual esp32) based one.

  • 2 VLANs, standard and IoT. OpenWRT router with the rules of LAN to IoT allowed. IoT to LAN not. Responses are always allowed afaik. I tested too with allow both directions.

  • The satellites are in the IoT.

  • Home Assistant is in docker with network mode: host in a server that has an interface in each vlan.

All of the usual stuff works correctly, hassio discovers devices on both VLANs perfectly and configures them with the correct IP. ESPHome and others.


The error I encounter is that the satellites will get stuck on “responding” instead of speaking the TTS message back.
Checking the esp32 based one (easiest or only one to get logs from) I get:

[20:38:16.538][W][esp-idf:000][md_reader]: E (1202415) micro_decoder.http_client: Failed to fetch headers after 6 attempts
[20:38:16.541][W][esp-idf:000][md_reader]: E (1202416) micro_decoder.audio_reader: Failed to connect to URL: http://standard-vlan-ip:8123/api/tts_proxy/0Rg9TUhAD8t8d3k3VXyEfw.flac
[20:38:16.541][W][esp-idf:000][md_reader]: E (1202416) micro_decoder.decoder_source: Reader failed to open URL

I copy that url and browse to it on my computer (standard vlan too) and it works.
Put my phone into the IoT vlan and use that same url: it doesn’t work
With my phone in the IoT vlan, I change the url to use hass’ IoT IP: it works.
This was tested with the firewall rules to allow traffic between the two VLANs in both directions. Not how I usually run it but to make sure.

The other post I encountered seem to be more SSL related, but I don’t think it matches my setup.

Some ideas I have:

  • TTL being set to 1 (or a value where 1 additional jump kills it) so that the VLAN routing makes it stop working
  • I don’t think this something I as a user can change, but shouldn’t/wouldn’t be better if the URL (either announced for tts to satellites or the local one in hassio) was one in the client’s subnet? Maybe being able to add multiple “local” url with one default if it doesn’t match?
    • I don’t know if the “auto” local url setting is meant to do that?

Maybe its a name resolution problem on the IoT VLAN side? i.e. how does standard-vlan-ip resolve to an HA address?

how does standard-vlan-ip resolve to an HA address

The “standard-vlan-ip” on the logs is the ip itself, not a domain. Which is why I don’t think it is a dns isssue.
I imagine that tts url esphome gets is generated in the home assistant server with the “local url” which, in this case, is in a different subnet.

But just in case and for contect: I have one dns server instance per subnet with dhcp giving each subnet the respective instance.

  • Standard vlan subnet will use dns instance 1 which has the hassio domain point to the standard-vlan IP.
  • IoT vlan subnet is given dns instance 2 which has the hassio domain resolve to the IP on the IoT subnet.

I checked and they work as they should