Home Assistant Voice Preview - connects to wrong address

I am trying to setup the Home Assistant Voice Preview - first time user of this device. While I hated having to do this, I used the esphome builder and had that image upload to the device (takes forever - I do a lot of ESPHOME but compiling things on HASS-OS is not part of my use of esphome)… So far so good. I see lights, it responds to OK NABU, but that’s where it stops.

The problem I see is that it cannot get the media it wants to download. And the reason is, that it attempts to use the EXTERNAL name for my Home Assistant and that’s not going to work when you’re “inside the firewall”. And it attempts to connect to port 443 (which is valid externally) but that goes nowhere internally too. So it seems to fetch a mix of different settings on where HomeAssistant is running.

My question: Can I configure it to use the internal hostname and port number? One of the reasons I’m doing this is that I want to kill the few remaining Amazon-Echo devices so I can ensure everything stays within my home network, and doesn’t depend on external services, that data is not collected and stored externally etc. etc. etc. So having it use the external name is a big “no no”.

If I grab the external URL from the log where I get the “HTTP request failed: ESP_ERR_HTTP_CONNECT” and just replace the hostname with the proper internal name, I get valid responses and everything seems to work.

Settings > system > network > home assistant url.

Make sure local network is configured and correct.

Well, it is - I’ve had this installation active for years, and can access HASSOS remotely and locally. The 200+ devices on the network, ZWave etc. have no issues communicating. All Wifi based devices connect via the internal HASS DNS address.

But there’s no port 443 access locally - it’s all using port 8123 which is part of the Local Network URL. The “Use Home Assistant Cloud” and “Automatic” features are turned off.

I’ve created a CNAME for the external name that maps to the internal name, but the error is still the same: Connection is attempting to use port 443 - not the configured 8123 for the internal, because it uses the external identification (which is should not).

So I need to force that it grabs the internal hostname:port combination instead of the external.

Sorry, forgot to add what’s actually there - I’ve replaced the actual domain with example.com but otherwise this is what I have:

Home Assistant Cloud: https://homeassistant.example.com
Local Network: https://assistant.iot.example.com:8123

I can see in the configuration, that Assistant and Assistant 2 does not list the internal address. It lists preferred and “Home Assistant Cloud”. Since the “preferred” is set as default and I see these actions, it looks like it’s not recognizing/supporting an internal host name?

Those are the agents you have configured under settings >voice assistants and do jot have bearing on that setting other than if that specific agent is configured for local or remote. You can have multiples configured different ways.

Preferred is ‘whatever you have setup as preferred agent’ in the voice config screen.

The local/network setting is where I pointed earlier and the voice endpoints are directed to whatever is set in local. AFAIK.

That said it also sounds lie you have a complicated DNS setup which in that case

“all problems are name resolution problems until proven otherwise”

what are you doing with your DNS? I caught some of that are you doing split DNS?

Since you have device builder up and running just look at log for HAVPE while giving a voice command

It will almost directly show you the problem.

It will show when wake word detected
I think STT command received
The TTS response text
The url to response media

If any error with those it will show that. That is best start point for troubleshooting esp voice issues

EDIT

Also the media url provided should be playable by any device on the HA >> settings >> system >> network >> local network as Nathan pointed out

1 Like

@tmjpugh I’m confused - where do you think I have the information from, that HASS Voice uses the wrong (external) URL from? And that it’s denied access? That I know it’s use port 443 and not 8123 which in my setup is required for HASS? It’s where the failure that I described comes from. I thought I’d described my issue in clear and certain terms, but instead I keep getting these odd wild suggestions that “it’s probably this or that”.

I didn’t say that media didn’t work on HASS. I said the way that Voice Preview is configured it fails because it uses the wrong URL. My question was how to change/force Voice Preview to use the right (internal) URL. That’s it - no more or less. So answers like this are at best getting ignored (by me). But I’ve reached my frustration limit and I’ll just withdraw from this forum, and just say that while it still uses the wrong URL, I have a solution implemented.

So I’ll close out this “thread” after this reply. I’m not saying this isn’t “a me” issue - it probably is. So I’ll just withdraw from this forum even though I’m a heavy user of Home Assistant and I find the Voice Preview as a key development that really will boost my use of the project; I just do not see this as being helpful to me.

I don’t understand the problem if this is all you needed to know

1 Like