Alexa (Echo) with ESP32 and ESP8266 – Voice Controlled Relay
I interfaced my ESP32 with the Alexa as the tutorial says, it worked just fine for about 2 weeks, I was able to turn on and off 3 switches that are interfaced with the ESP32. Now the Alexa seem to respond but the ESP32 constantly resets with the error shown below, Would you know what this error code means and why the ESP32 is no longer responding to the Alexa.
[WIFI] Connecting to ATTZHkwbJA ..
[WIFI] STATION Mode, SSID: ATTZHkwbJA, IP address: 192.168.1.92
[MAIN] Free heap: 253296 bytes
[MAIN] Free heap: 253296 bytes
[MAIN] Free heap: 253132 bytes
[MAIN] Free heap: 252944 bytes
[MAIN] Device #5 (Outlet 3) state: ON value: 255
Outlet 3 switched by Alexa
send =13
send =13
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d427f PS : 0x00060330 A0 : 0x800d2f21 A1 : 0x3ffcd770
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x3ffce61c A5 : 0x00000000
A6 : 0x3ffce5d4 A7 : 0x00000000 A8 : 0x80089836 A9 : 0x3ffcd730
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00060320 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x400d427f:0x3ffcd770 0x400d2f1e:0x3ffcd790 0x400d4456:0x3ffcd7b0 0x400d44ed:0x3ffcd7e0 0x400d463e:0x3ffcd820 0x400d465e:0x3ffcd860 0x400d48fe:0x3ffcd880 0x40088b6d:0x3ffcd8b0
Rebooting…
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9564
ho 0 tail 12 room 4
load:0x40080400,len:6320
entry 0x400806a8
[WIFI] Connecting to ATTZHkwbJA ..
[WIFI] STATION Mode, SSID: ATTZHkwbJA, IP address: 192.168.1.92
[MAIN] Free heap: 253312 bytes
[MAIN] Free heap: 253312 bytes
[MAIN] Free heap: 253312 bytes
[MAIN] Free heap: 253312 bytes
[MAIN] Free heap: 253312 bytes
[MAIN] Free heap: 252912 bytes
[MAIN] Free heap: 252912 bytes
[MAIN] Free heap: 252912 bytes
[MAIN] Free heap: 252912 bytes
[MAIN] Free heap: 252912 bytes
Hello Michael, when you upload the code to your board… does your Alexa discover the ESP device? Can you add it to your Alexa app?
yes the alexa discovers the esp32 and it says ok when i say alexa turn on outlet 1 or outlet 2, but the esp32 only resets when alexa sends the command
the esp32 responds with the error code shown in my initial post, once receiving command from alexa the esp32 sends an integer value by i2c to a pcf8574 each outlet command from the alexa corresponds to a certain integer value sent to the pcf8574.
Hello Michael, I was finally able to test the Alexa project once again today for the last hour:
It’s been working perfectly with my ESP32. The error that you are receiving, it looks like you have something in your code that causes your board to trigger a watchdog that restarts your board.
Are you using delays in your code?
Hello Rui, I was sending the I2C data from the command setup versus sending it in the main loop, which was creating the delay. once I made the change to just set the variable to send via I2C and send the variable in the main loop the program works again. Thank You so much for your help.
In the tutorial it says you can connect up to 14 switches to Alexa using ESP32, is that 14 seperate on/off switch pairs, or does each switch on/off count as 2 meaning 7 would be the max with each on/off pair. Im asking this question because it seems my Alexa wont discover no more then 7 switches. Thanks in advance for your help.
I’m glad it worked, this is a fully asynchronous code and it can’t have any delays, otherwise your code will crash and your board keeps rebooting.
I think what I mentioned that information according to the library documentation I’ve only used 2 or 3 switches all my applications, but that might be the limit.