HA Voice: Unable to connect to the ESPHome device

I’m getting this anyone I try to install my HA Voice unit: Unable to connect to the ESPHome device. Make sure the device’s YAML configuration includes an api section.

About ideas?

basically. HA connect to esphome device using IP, Port and an API password.

When you added device to HA it should ask you to enter the API password.
If you did not get this, maybe something went wrong or you just missed it.

You can start from beginning by factory resetting HA Voice device. If it is VoicePE just hold the center button for about 30seconds and it will reset. You will see lights indicating reset at some point.

If you “take control” of device then you need to add an API password and try reconnecting to HA

Is this the message you’re getting?
“Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.”? If so, take a look at this post:

I’ve added 3 Voice PEs and it’s never asked for an API password. It’s asking for the host, which is the IP address of the PE device itself. Just to clarify, are you referring to HA instances that already had ESPHome installed before adding the PE? I’ve never installed or used ESPHome, but it’s built in the PE chip and gets installed when you add the PE.

It’s pretty much plug & play if the PE and HA are on the same network or aren’t blocked by firewall rules, which was the problem with my first install. Once I adjusted my firewall rules, my last 2 PE installs took less than 5 minutes…enter the PE’s IP (Host) address answer a few config questions, done!

How did you add them?

The VoicePE has some onboarding method that bypasses API question. The “getting started” method does not ask for api.

Discovery over Bluetooth — by phone or by proxy — can also bypass api

In both cases above the voicepe is factory defaulted and basically api key never created.(my guess. Really don’t know details just observation).

API Is method by which it prevents unauthorized access. In above methods I think it gets around this by using button push to prove authorization.

If you didn’t “take control” or flash with esphome a factory reset will get you back to where you want to be probably.

If onboarding fails after add to WiFi and you attempt add using host:ip I believe it asks for api

I did a factory reset and connected it to my network. I’m using a Firewalla firewall and have it on a VqLan along with all my other IOT devices including my Home Assistant server.

The box has a spinning blue ring and never seems to finish connecting to the server. After a while the disk turns red.

how did you connect it to the network?

I cant stress this enough. Can HA actually connect to the IP defined in the UI under “network” as the “local network”? Do not assume the answer is yes. You may also want to post it here, BUT ONLY IF IT IS LAN IP. if it is not LAN IP, you should set it to a LAN accessible IP.