Does Home Assistant Voice Preview Support HTTPS Connections?

Hi everyone,

I’m currently setting up Home Assistant Voice Preview (VP) and I have Home Assistant configured to require HTTPS for all connections. Does VP support connecting to Home Assistant over HTTPS? If so, are there any specific configuration steps required to ensure this works seamlessly with Voice Preview?

Thanks for your help!

Hi, i am having problems with this, can’t get by the config stage ,
message from usb serial terminal reads
https://homeassistant.local/api/esphome/ffmpeg_proxy/297ca5566cd2c5422657bbdab9bad898/q-52GSLbkH3o5BtENAqLNQ.flac

[D][esp-idf:000][ann_read]: E (9431661) HTTP_CLIENT: Connection failed, sock < 0

[E][nabu_media_player.pipeline:171]: Media reader encountered an error: ESP_ERR_
HTTP_CONNECT
[E][nabu_media_player:305]: The announcement pipeline’s file reader encountered

[D][media_player:087]: Media URL: https://homeassistant.local/api/esphome/ffmp
eg_proxy/297ca5566cd2c5422657bbdab9bad898/1eKujJQshu_P0bP5QLlQyQ.flac
[D][esp-idf:000][media_read]: E (434171) esp-tls: [sock=57] delayed connect erro
r: Connection reset by peer

[D][esp-idf:000][media_read]: E (434173) esp-tls: Failed to open new connection

[D][esp-idf:000][media_read]: E (434174) transport_base: Failed to open a new co
nnection

[D][esp-idf:000][media_read]: E (434174) HTTP_CLIENT: Connection failed, sock <
0

[E][nabu_media_player.pipeline:171]: Media reader encountered an error: ESP_ERR_
HTTP_CONNECT
[E][nabu_media_player:297]: The media pipeline’s file reader encountered an erro
r.

That error suggests the box is erroneously trying to execute a plain HTTP request and the server rejects it. Consult HTTP server logs.

For SSL to work, I assume you must put your SSL CA certificate somewhere in the YAML of your Voice Preview box, and flash it again.

I’m going to take a guess here, but goto HA’s UI->Settings->System->Network->Home Assistant’s URL. If it is set to homeassistant.local, then that’s my guess as to what the problem is.

It works with HTTPS, as long as you have a valid certificate issued by a public CA.

I did open an RFE to support exceptions, but it was declined. If you are using a self-signed certificate, your only way around, for the time being, would be rebuilding the image to disable SSL/TLS verification.

ESPHome should gain the ability to program CA certs in. I have a local CA and I am fortunate I have not had to interact from ESP to HTTPS yet.

EDIT: at no point in time has my Voice Assistant attempted to connect to the SSL endpoint of my HA. It just goes straight to port 8123 for FLACs of TTS renders.