#Voice PE Factory Reset

1 messages Β· Page 1 of 1 (latest)

past moss
#

Hey - I tried to setup a Home Assistant Voice PE today and hit quite a few issues with the flow. Getting "Can't connect to ESP. Please make sure your YAML file contains an 'api:' line." etc - and after a few attempts from factory reset I got as far as the voice trying to connect to home assistant and failing (I assume because it's trying to use the external URL which needs certs) - and it starts showing a white light then the light goes off and comes on again and off and on forever. When this is happening the factory reset trigger doesn't work (holding down the button for ages).

As I was writing this I managed to get it to go back to the blue light so I could factory reset it - I think by fiddling with my router so presumably the white light was because it couldn't connect to wifi.

  1. Is there some other way to initiate factory reset when this happens?
  2. Is there a way to get debug logs/etc. so I can figure out why it's unable to connect to home assistant?
flat hatch
#

I also had a few internet related issues that were more so my fault, figured out that if you press and hold the center button for ~20 seconds it will start a factory reset. Make sure you keep holding until the red lights go away and it starts flashing the default white lights again

past moss
#

yeah that works for me usually but when it gets into this mode where the white light just keeps going on and off it seems to ignore the long press

flat hatch
#

did you delete the ESPhome integration before doing the reset? The only other thing I could think to try is unplug it and initiate the reset as soon as you plug it in before it can connect or try to start things

past moss
#

i think what worked was switching on my other router so it could find a specific access point (i use a mesh wifi) - dunno but it let me factory this time anyway

#

seems a design flaw to disable factory reswet at any point

#

argh still happening - now it's back in the mode where the white light keeps going on and off - with a click sound when it goes off

#

anyone know if i can ssh in or something to see what it's trying to do?

vast sail
#

i wonder if it is trying to access home Assistant through mdns and it can't resolve the mdns name

past moss
#

any idea how i'd start debugging if that's the case?

vast sail
#

Not sure, don't have my device yet πŸ™

#

Does homeassistant.local resolve to your instance?

past moss
#

yep - that was the issue i thought i was having because i had a messed up wifi setup which had two networks iwth the same ssid - i've resolved that now so there's only one network that definitely has homeassistant on it

vast sail
#

But i mean if you go on the same network the device is connecting to and go to homeassistant.local:8123 does it load your instance?

past moss
#

yeah it does

#

getting logs now by plugging it into my macbook and cat /dev/cu.usbmodem101

#

let's see if this tells me anything!

#

so it is bootlooping!

vast sail
#

Probably something to ask in the esphome discord

glad ingot
#

are you using a 2.0A power supply ?

vast sail
#

Another thought, are you running latest version of home Assistant?

past moss
#

I've tried it with a few power supplies. Current one seems to be 3.0A - it's the rasberry pi plug

#

and yeah - totally up to date home assistant - but right now it doesn't seem to get as far as talking to home assistant right?

vast sail
#

Well log indicates it sets up the api connection, so it might be trying to talk to it

glad ingot
#

looking at the logs it has rebooted 10+ times and is in safe mode. or ate least it was at the time of the logs you posted.

#

can you try getting serial logs by going to web.esphome.io , connect the device and click logs, then click reset device (at the bottom)

past moss
#

running that now

glad ingot
#

just want to see if logs from there decode the backtrace to indicate why the watch dog was triggering

past moss
glad ingot
#

thanks just looking through , do you have the device in the ESPHome Builder dashboard ?

past moss
#

you mean this?

glad ingot
#

yes, is this your only ESP Device ?

past moss
#

yes

glad ingot
#

what do you get if you click logs from there ?

past moss
#

the thing i just sent you

glad ingot
#

ah ok ... sorry thats the web page for flashing . do you have the ESPHome add-on in HA ?

past moss
#

I do not. Installing now

#

installed - it finds a bluetooth proxy esp32 i have running in the house i forgot about btu doesn't see this device

#

oh found it now

#

i restarted it

glad ingot
#

ok interesting , if you 'take control'

#

once it's installed see if you can get logs from the device card

past moss
#

is this what i want to do?

#

installing now

glad ingot
#

🀞

past moss
#

xtensa-esp32s3-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
*** [.pioenvs/home-assistant-voice-092113/src/esphome/components/micro_wake_word/micro_wake_word.cpp.o] Error 1

#

😦

#

this is not a simple easy to use product πŸ˜‚

#

i have no ability to debug Cpp issues πŸ˜„

glad ingot
#

i've had 2 and both were up and running in 5 mins 😬

past moss
#

I have a second one but this looks like a software/environment problem rather than hardware right?

glad ingot
#

ok lets start from the beginning.

past moss
#

I could try wit hthe other one but it might just end up in the same situation...

glad ingot
#

have you been able to add the devive to HA at all, sorry not read all of the above ?

past moss
#

yes - it got as far as the second "discovery" thing in HA - then it did the software update - and then it fialed when trying to connect the device to HA

glad ingot
#

ok, thanks. can you go to the ESPHome integration in devices and services

past moss
#

oh... i deleted it from there... it was trhere but everything was disconnected

glad ingot
#

ok cool was going to say delete anyway πŸ™‚

#

do you have the HA app on your phone ?

past moss
#

I do

glad ingot
#

it may be worth trying another factory reset on the device, then unplug the device, open the app - make sure you have Blue tooth on

#

then open devices and services and plug the device in

past moss
#

any idea if there's an alternative way to factory reset? (e.g. from esphome or something)

#

the holding the button doesn't work when it's in tihs safe mode/boot loop

glad ingot
#

it's only by button press , i'm just looking to see where the tool is to re-flash the device from scratch so you can start again from a fresh install of the firmware

past moss
#

that's super helpful - thank you!

glad ingot
#

no problem.. gimme a couple of mins πŸ™‚

past moss
#

ooh

#

this looks good!

glad ingot
#

at least this way we know it's from as fresh as can be πŸ™‚

past moss
#

it says erasing....

#

i guess this is the benefit of everything being open source πŸ˜„

glad ingot
#

yes it's certainly and advantage over something that you have no control of

past moss
#

alright! now i guess i can go through the setup flow and watch the serial logs and see if anything interesting happens?

glad ingot
#

yup, see if it picks it up as a ble device as thats the easiest method

past moss
#

it did

#

i've gone through this before

#

"Wifi connected successfully"

#

"Connecting..."

glad ingot
#

is should now detect a new device in devices and services

past moss
#

now i'm at the bit where it broke last time

#

it has the white light

#

the screen says "The voice assistant is unable to connect to home assistant"

glad ingot
#

hmm is your wifi 2.4ghz

past moss
#

i think i have 2.4 and 5 enabled - but 5 by default

#

does this only work with 2.4?

glad ingot
#

yes only 2.4ghz

past moss
#

let me check that...

glad ingot
#

anything weird like hidden ssid

past moss
#

i do have 2.4ghz and 5 under the same ssid

#

not hidden

glad ingot
#

that should be ok .. if you check the logs is it looping again ?

past moss
#

yes it is - it looks the same as before

#

the log says it connects to wifi

#

18:57:47]E (163858) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[18:57:47]E (163858) task_wdt: - loopTask (CPU 0) same thing

#

[18:57:41][D][api.connection:1446]: Home Assistant 2024.12.5 (192.168.50.7): Connected successfully
connects to home assistant before dying too

zealous arrow
#

You wouldn't happen to be in Germany, would you?

past moss
#

no, UK

vast sail
#

Dumb question but have you tried rebooting home Assistant? πŸ˜…

past moss
#

I have not rebooted home assistant since having the problem.... let me give that a go....

glad ingot
#

Phew backup has arrived πŸ˜„

zealous arrow
#

We saw the watchdog timeout thing happen in Germany. When the device requests information about any available updates, a particular ISP there would send the packets out of order, and the device couldn't handle it and would time out like this.

#

It may not be able to update, but it would get booted up at the very least.

#

People who encountered the problem were able to update it eventually when they checked for an update really early in the morning... apparently less traffic made the ISP send the packets in the correct order

glad ingot
#

thanks kevin , i was running out of ideas ... sat here trying to remember where i've put links to resources etc

zealous arrow
#

I hope this fixes it! The issue I was writing about is very rare, and we had a hard time reproducing it.

past moss
#

just flashed with 24.12.7 - same behaviour 😦

glad ingot
#

i guess there is a very remote possibilty that it could be a hardware fault... it happens! might be worth trying the other one to see how that behaves

past moss
#

getting the second one now

#

🀞

#

hmm - it failed but in a different way

zealous arrow
#

What happened?

past moss
#

oh

#

it's in home assistant

#

it just didn't enter the wizard

#

wake word is triggering

#

so just a config thing in HA now

#

looks like a hardware issue....

#

(plus some annoying software thing with the wizard?)

zealous arrow
#

What version of HA are you running? Sorry if you mentioned it earlier, I didn't read everything fully!

past moss
zealous arrow
#

If you go to the device page in home assistant, you can press the "Set up voice assistant" link to activate the wizard

past moss
#

under ESPHome?

#

oh i see it

#

"Your voice assistant is not available."

#

do i have to configure voice assistant elsewhere in HA to make this work first?

zealous arrow
#

If I remember right, that message means the device can't play audio files that HA is sending due to some networking issues

past moss
#

hmm will there be details in a log somewhere?

zealous arrow
#

Do you have anything exotic in your network setup? VLANs or anything like that?

past moss
#

Logger: aioesphomeapi.reconnect_logic
Source: runner.py:154
First occurred: 19:05:55 (3 occurrences)
Last logged: 19:19:42

Can't connect to ESPHome API for atom-bluetooth-proxy-94ce3c @ 192.168.50.239: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.50.239', port=6053))]: [Errno 113] Connect call failed ('192.168.50.239', 6053) (SocketAPIError)
Can't connect to ESPHome API for home-assistant-voice-092113 @ 192.168.50.66: Timeout waiting for HelloResponse, ConnectResponse after 30.0s (TimeoutAPIError)
Can't connect to ESPHome API for home-assistant-voice-094bd2 @ 192.168.50.245: Timeout waiting for HelloResponse, ConnectResponse after 30.0s (TimeoutAPIError)

#

i don't think i have anything weird on my network

#

but let me take a look...

#

i need to run get my dinner now or my wife will be mad - i think i'm much further than i was when i started here though. Let me go debug my network a bit and i'll update the thread when i know where i screwed up πŸ˜„

zealous arrow
#

Do you have multiple access points? Several showed up in the logs

past moss
#

yeah it's a mesh netowrk with 4 routers

glad ingot
#

give us an @ when you're back and can continue if you haven't solved it πŸ‘ nothing worse than a new toy and no batteries πŸ˜‰

past moss
#

i'm going to force them onto the same access point....

#

simplify the network setup

#

got them on the same AP - didn't help (though there are 3 available still surely it doesn't matter if they're on the same one)

#

so I go to https://esphome.github.io/home-assistant-voice-pe/ and install the latest. I then from that website set up the SSID + Password, it then shows as available in home assistant. Saying "Okay Nabu" makes it make a noise. I then press "Set up Voice Assistant" - it shows "Checking for updates" Then "Hello! Over the next couple steps we're going to personalize your voice assistant." and then it goes back into the failure state

#

so whatever it's doing behind "Hello! Over the next couple steps we're going to personalize your voice assistant." is causing the device to bootloop

#

Before I press "Set up voice assistant" everything seems fine - there's a media player in the deivce that works - it detects button presses - etc

#

If, before using "Set up voice assistant", I turn off the device and back on, it also begins to boot loop. So maybe not directly related to whatever is happening behind that loading screen but something triggered both by it and the initial boot?

zealous arrow
#

In HA, could you go to settings, system, then network?

#

In particular, what does the local netowrk part look like

past moss
#

Why are these error messages so useless? ```E (19210) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (19210) task_wdt: - loopTask (CPU 0)
E (19210) task_wdt: Tasks currently running:
E (19210) task_wdt: CPU 0: IDLE0
E (19210) task_wdt: CPU 1: IDLE1
E (19210) task_wdt: Aborting.
E (19210) task_wdt: Print CPU 0 (current core) backtrace

Backtrace: 0x40383577:0x3fcaffc0 0x420b2d39:0x3fcaffe0 0x4038717b:0x3fcb0000``` 😱

#

checking now...

zealous arrow
#

Try hitting the automatic toggle

past moss
#

set's it to the same value

zealous arrow
#

What are the logs on the second device when you open the wizard?

past moss
#

you mean the serial logs from the esp32?

zealous arrow
#

Yes please

past moss
#

i'll get it now

#

hmph, this time it seemed to go straight into the bad state rather than waiting for the wizard - flashing again...

#

learning how to flash this firmware has been so useful πŸ˜„ having to try to get the hold-to-factory-reset thing to work was frustrating me no end πŸ˜„

#

i triggered the wakeword - and then clicked into the wizard and it immeidately got the watchdog failure

zealous arrow
#

Hm, this is confusing! My best guess right now is still some networking issue where the device is freezing while trying to access a resource (the update information or an audio file), but the logs are a bit different than my understanding of similar issues

past moss
#

are there any debugging tools to like... manually interact with the server to see at which point it falls over?

#

or super verbose logs

#

(I work in much higher level languages where useful debugging output is cheap!)

zealous arrow
#

Unfortunately not really. Watchdog timeout errors are one of the hardest things to debug on the esp32

past moss
#

i do have a weird external config through cloudflare which uses certs etc. I disabled them because i thought that might be causing issues - but this should only be using the local connection anyway right?

zealous arrow
past moss
#

I'm trying to think of how I could simplify my network setup to try to isolate what's wrong

#

but it's difficult because they're already connected to the same access point now and there's no firewalls between them or throttling or anything

#

(assuming they do communicate locally)

zealous arrow
past moss
#

maybe i could ssh into the home assistant server and see if it can connect to the esp32 or something....

glad ingot
#

the issue is with it constantly bootlooping that it's not stopping connected long enough. i'm assuming you cant ping devicename.local

past moss
#

it doesn't bootloop until i run the wizard

#

so i can check those sort of things before then

zealous arrow
#

So the device communicates with HA in 2 different ways. One is using the ESPHome protocol, and this seems to be working fine as your device is showing up in HA. The other way is through a typical http connection, which is used for only 2 things: checking for updates (which goes out to the internet) and for getting audio files

#

The watchdog timeouts we encountered are only with the http connections, though I can only recall it happenign when checking for updates. When you open the wizard, it forces the device to check for an update

#

After that it would play a short audio clip to verify you can reach the HA server.

past moss
#

the error audio when i trigger the watchword - is that local on the esp32?

zealous arrow
#

Let's try this, reboot the device but don't open the wizard. While on teh device page in HA, click on the media player entity. Try playing back an audio file and see what happens

past moss
#

i just did text-to-speech and it worked

#

i can upload an audio in case that's different

zealous arrow
#

Not really, that's all I needed

#

So I'm about 90% confident something is going wrong when it is checking for an update...

past moss
#

any way i can just disable the update check?

vast sail
#

Maybe router or firewall blocking the path?

zealous arrow
#

If you adopt the device into the ESPHome device builder addon and compile the firmware yourself, then it should no longer check for updates

#

I think someone had you start that process earlier?

past moss
#

it failed to compile - i can try it again though

zealous arrow
#

By the way, I've shared this topic with other people in. Nabu Casa so hoepfully we can narrow this down more. We though that the new beta should avoid these watchdog timeouts if there is an issue checking for an update, so its disappointing that doesn't seem to be the case! Thanks for your patience as we try to figure this out

past moss
#

no problem - thanks for all your help debugging πŸ™‚

#

Yeah still can't compile Compiling .pioenvs/home-assistant-voice-092113/components/esp-tflite-micro/tensorflow/lite/micro/micro_interpreter_context.cc.o xtensa-esp32s3-elf-g++: fatal error: Killed signal terminated program cc1plus compilation terminated. *** [.pioenvs/home-assistant-voice-092113/src/main.cpp.o] Error 1 xtensa-esp32s3-elf-g++: fatal error: Killed signal terminated program cc1plus compilation terminated. *** [.pioenvs/home-assistant-voice-092113/components/esp-tflite-micro/tensorflow/lite/micro/micro_allocation_info.cc.o] Error 1 xtensa-esp32s3-elf-g++: fatal error: Killed signal terminated program cc1plus compilation terminated. *** [.pioenvs/home-assistant-voice-092113/components/esp-tflite-micro/tensorflow/lite/micro/micro_interpreter.cc.o] Error 1 xtensa-esp32s3-elf-g++: fatal error: Killed signal terminated program cc1plus compilation terminated. *** [.pioenvs/home-assistant-voice-092113/components/esp-tflite-micro/tensorflow/lite/micro/memory_helpers.cc.o] Error 1 ========================= [FAILED] Took 35.70 seconds =========================

glad ingot
#

what hardware do you have esphome installed on ?

zealous arrow
glad ingot
past moss
glad ingot
#

how much ram?

past moss
#

4GB

glad ingot
#

ok yeah it will struggle , running ESPHome on your local computer will most likely work

#

do you have access to linux or what os are you using ?

past moss
#

I'm on mac. Which esphome seems to be fine with

#

I'll set it up

glad ingot
#

yes you should be fine with that. it will compile much faster

past moss
#

uhh it just worked

#

no idea whyt

#

but now i'm further in the wizard

#

random fluke the update worked maybe?

#

i was having trouble getting my epshome on my laptop to find the device - and then i went to an old tab and the deivce made a noise and now it's continuing in the wizard...

#

i didn't flash it or anything

zealous arrow
#

πŸŽ‰ Let's celebrate regardless!

past moss
#

close bug WAI

zealous arrow
#

It is possible your internet provider was doing something odd with the packet, like we had happening in Germany. Those people would occasionally be able to update when their was less traffic at the ISP level

#

What's your ISP?

past moss
zealous arrow
#

I'm making a note of it so we can continue to investigate!

glad ingot
#

glad it's sorted... gotta love tech πŸ™‚ πŸ˜‰

past moss
#

as easy as that

#

just 3 hours of flashing the device, trying two different devices, installing docker and esphome

#

should put it on the advert πŸ˜›

#

but really thanks for all your help both of you πŸ˜„

#

now i get to actually play with the thing!

glad ingot
#

hahaha it's not always this way <<honest>>

#

enjoy and you know where to find us πŸ‘

past moss
#

Restarted the device and it boot loops again. Done with debugging for today 😹 but does it try to update on reboot?

hardy kettle
#

Hey πŸ–οΈ ,
I have the exact same problem, including the watchdog error message on both of my voice pe devices. I am in germany but my internet provider is vodafone (kable business), I think the people who had problems here were with telekom. Also with the 24.12.8 I get the same problem and in my post (which I created yesterday before I found this one) someone else has the problem. After reflashing the firmware everything works until the voice pe is reconnected to power or has to reboot for some other reason, then it goes into bootloop.

normal breach
#

I have exactly the same problem with Vodafone Business, firmware 24.12.7 and 24.12.8. After reflashing, then everything works, after a restart the device is in a boot loop .

zealous arrow
#

I can't replicate an ISP causing issues, but I was able to crash the device in the same way by blocking the device from the internet via my router. The PR fixes it in that situation. I assume it will also fix it when an ISP is sending packets out of order.

wintry breach
#

I think I'm having the same issue. I didn't check logs πŸ™ƒ But the device works after flashing and connection to HA. If it reboots, it goes into the bootloop

acoustic grove
#

Catching up on this but to clarify, at this point the device requires internet access in order to be successfully configured?

acoustic grove
#

ok, so initial on-boarding and updates requires internet access, but once on-boarded, internet access can be disabled?

acoustic grove
#

looks like that's the case. Hopefully that can be resolved soon

elfin fiber
hardy kettle
zealous arrow
#

Beat me to it! I'm hoping that release 25.1.0 will fix the issue for you

past moss
#

this fix worked for me πŸ™‚

#

thank you!

cobalt parrot
#

This solved my problem too! Thanks! I can setup my new voice-pe devices now!