Open Mininuggets opened 3 years ago
Hello everyone,
I just started with the ESP Alexa control and I don't have a lot of experience, so my problem might be easy to solve. In the end I just want to turn a servo motor 180 degrees if the device is turned on, but the problem begins earlier.
I am using a WeMos D1 R2. from ARCELI. The code is just the basics for testing if Alexa can find anything:
#define ESPALEXA_DEBUG #include <Espalexa.h> #include <ESP8266WiFi.h> #include <Arduino.h> #define WIFI_SSID "FRITZ!Box 7560 XZ" #define WIFI_PASS "65689645260398988233" #define SERIAL_BAUDRATE 9600 void firstDeviceChanged(uint8_t brightness); Espalexa espalexa; void wifiSetup() { // Set WIFI module to STA mode WiFi.mode(WIFI_STA); // Connect Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID); WiFi.begin(WIFI_SSID, WIFI_PASS); // Wait while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(100); } Serial.println(); // Connected! Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str()); } void firstDeviceChanged(uint8_t brightness) { //brightness parameter contains the new device state (0:off,255:on,1-254:dimmed) //do what you'd like to happen here (e.g. control an LED) } void setup() { // put your setup code here, to run once: // Init serial port and clean garbage Serial.begin(SERIAL_BAUDRATE); Serial.println(); Serial.println(); wifiSetup(); espalexa.addDevice("Bewegungssensor", firstDeviceChanged); espalexa.begin(); } void loop() { // put your main code here, to run repeatedly: espalexa.loop(); }
I checked if the arduino is connected to the wifi, and indeed it is. And if Alexa searches for devices the following text appears in the serial monitor:
[WIFI] Connecting to FRITZ!Box XXX ..................... [WIFI] STATION Mode, SSID: XXX, IP address: XXX.XXX.XXX.XXX Exception (3): epc1=0x4020fe3c epc2=0x00000000 epc3=0x00000000 excvaddr=0x4023e3b8 depc=0x00000000 ctx: cont sp: 3ffff730 end: 3fffffd0 offset: 01a0 >>>stack>>> 3ffff8d0: 3fff0d2c 3ffff9c3 00000010 401004e4 3ffff8e0: 3fff0d2c 000000ff 00000000 4020e648 3ffff8f0: 3ffffa20 3ffe8308 3ffff980 4020a6c9 3ffff900: 3fff0d2c 3ffffbcb 3ffff930 3ffef300 3ffff910: 3fff0d2c 3ffefb64 3ffefc8c 3ffff980 3ffff920: 4020e648 3ffffa20 3ffffbcb 4020aa84 3ffff930: 00000000 3ffefc8c 00000000 40218d7a 3ffff940: 3ffe8308 00000002 0000000a 3ffe9184 3ffff950: 3ffff9c3 3fff0e9a 3ffe95c1 00000000 3ffff960: 4022b78a 3ffecbe0 3ffef4dc 3fff0ed0 3ffff970: 00000000 3ffe8308 3ffffa20 4020eaa8 3ffff980: 00000000 ffffffff 00000000 00000000 3ffff990: 00000000 00000060 3f302073 3fff0060 3ffff9a0: 00000000 4021dcb7 3ffee0a8 40209160 3ffff9b0: 00000000 00000002 00000000 3ffecbe0 3ffff9c0: 00343532 401058a3 3fff0060 3ffef8a4 3ffff9d0: 3fff0f4c 00000000 00000000 4020744d 3ffff9e0: 3ffffb20 3ffffb10 00000028 00000000 3ffff9f0: 3fff0ecf 00000034 000003a9 4010020c 3ffffa00: 3ffe89e0 3ffefe9c 3ffffa40 7fffffff 3ffffa10: 4023e3f4 3ffe8308 7fffffff 4020c489 3ffffa20: 3ffffca0 3ffffb13 7fffff9e ffff0208 3ffffa30: 3ffffc40 7ffffffe 3f302064 4020e648 3ffffa40: 3ffffb70 3ffe8308 3ffffad0 4020a6c9 3ffffa50: 3ffef335 3ffffb0a 3ffffa80 4021800c 3ffffa60: 00303032 3ffeed08 3ffefe9c 3ffffad0 3ffffa70: 4020e648 3ffffb70 3ffffb0a 4020aa84 3ffffa80: 00000009 3ffffb40 0000000c 3fff0f90 3ffffa90: 3ffeedec 3ffffc40 3fff0e6c 4020c4cc 3ffffaa0: 3ffffb20 3ffffb10 00000008 401004e4 3ffffab0: 00000014 3fff0e80 000000e0 7fffffff 3ffffac0: 4023e3f4 3ffffc40 3fff0e6c 402094ad 3ffffad0: 3ffffb20 3ffffb10 00000008 7fffffff 3ffffae0: 3ffefb7c 0000000f 3ffffbf0 4023e3b8 3ffffaf0: 3ffffbb0 3ffe88d4 3ffefbfc 402094ee 3ffffb00: 3ffffb20 3ffffb10 00000008 40208818 3ffffb10: 40235635 3fff0e7c 3ffe88d4 000000fe 3ffffb20: 3ffffb60 3ffffbdf 00000000 402038d0 3ffffb30: 3ffffc00 3ffffbf0 3ffefbfc 40202a5b 3ffffb40: 3ffffbcb 4023e3b8 3fff091c 3ffe8b3c 3ffffb50: 00000001 3ffffbb0 000002d0 00000000 3ffffb60: 00000000 00000000 00000000 00000000 3ffffb70: 00000000 00000000 00000000 00000000 3ffffb80: 00000000 00000000 00000000 00000000 3ffffb90: 00000000 00000000 00000000 00000000 3ffffba0: 00000000 00000000 00000000 00000000 3ffffbb0: 333a3834 41443a46 3a46303a 363a3237 3ffffbc0: 30303a37 2d31313a 00003130 00000000 3ffffbd0: 00000000 00000000 00000000 00000000 3ffffbe0: 00000000 00000000 00000000 40000000 3ffffbf0: 3fff091c 0000000f 0000000f 40208a2f 3ffffc00: 000000fe 3fff091c 3ffffc40 3ffe8b3c 3ffffc10: 3ffffeac 3ffeed08 00000000 40208afc 3ffffc20: 3539003a 35383737 00000036 00000000 3ffffc30: 3ffffeac 3ffeed08 00000000 4020342e 3ffffc40: 7473227b 22657461 6f227b3a 663a226e 3ffffc50: 65736c61 7262222c 323a2269 222c3435 3ffffc60: 72656c61 223a2274 656e6f6e 6d222c22 3ffffc70: 2265646f 6f68223a 7561656d 616d6f74 3ffffc80: 6e6f6974 72222c22 68636165 656c6261 3ffffc90: 72743a22 2c7d6575 70797422 223a2265 3ffffca0: 40103269 00040000 7fffffff 00000000 3ffffcb0: 00000022 40103266 00040000 40101e0e 3ffffcc0: 00000002 00000000 00000020 40100f22 3ffffcd0: 3ffe9472 40104304 3ffecbe0 4000050c 3ffffce0: 00000001 40103523 3ffed638 00000022 3ffffcf0: 40103986 00004a88 7fffffff 00000002 3ffffd00: 40000671 00000030 00000010 ffffffff 3ffffd10: 4010346a 0000001b 7fffffff 00000002 3ffffd20: 0000011b 7353a990 ff000000 00000000 3ffffd30: 401022eb 00080000 9239a990 01a9dee7 3ffffd40: 00000000 01a9dee7 00002200 4000050c 3ffffd50: 3fffc278 40101fe8 3fffc200 00000022 3ffffd60: 3ffffd70 3fff0a74 91e8f940 4bc6a7f0 3ffffd70: 40208db4 00000030 00000010 ffffffff 3ffffd80: 4020601c 3ffffef8 00000020 3ffeedec 3ffffd90: 00000010 00000010 00000000 40100575 3ffffda0: 3ffeedec 000002c5 000002c5 3ffeedec 3ffffdb0: 00000010 00000010 00000000 3ffeff48 3ffffdc0: 00000010 3fff0a3c 3fff0a3c 40208693 3ffffdd0: 3ffe8900 00000000 3fff0a3c 402086df 3ffffde0: 3ffeedec 00000325 3fff0a3c 40208711 3ffffdf0: 3fff0930 3fff0a30 3fff0a3c 3ffeedec 3ffffe00: 00000010 00000010 00000000 40100575 3ffffe10: 00000040 00000040 00000000 40100575 3ffffe20: 00000010 3fff0a30 3ffefe9c 3fffff80 3ffffe30: 00000010 3ffffea0 3ffffea0 40208693 3ffffe40: 3ffefb64 0000000f 0000000d 402086df 3ffffe50: 3fff099c 00000034 3ffffea0 40208711 3ffffe60: 00000000 3ffefee0 3ffffea0 4020875e 3ffffe70: ffffffff 3ffefee0 3ffffeac 40208818 3ffffe80: 00000000 00000000 3ffffea0 3fffff80 3ffffe90: 00000000 3ffefee0 3ffeed08 40203527 3ffffea0: 3ffefc8c 0000000f 00000000 3fff09e4 3ffffeb0: 0000003f 00000034 00000010 00000000 3ffffec0: 00000000 3ffefee0 3ffefe9c 40203568 3ffffed0: 00000000 00000000 00000000 40204e96 3ffffee0: 00000000 00000000 00000000 40204fbe 3ffffef0: 00000000 00000000 00000000 00000000 3fffff00: 00000000 3fffff50 401065f8 00006d05 3fffff10: 3ffefee0 00000001 3ffe8504 40207978 3fffff20: 007e0e14 00000000 402043ec 0000000c 3fffff30: 00000000 3fff0964 3ffefe9c 3fffff80 3fffff40: 00000001 3ffefec4 3ffefe9c 402051b0 3fffff50: 40209a28 00000000 00001388 40209329 3fffff60: 00000000 3fff0964 3ffefc54 40207cbf 3fffff70: 3fffdad0 00000000 3ffeed08 40203827 3fffff80: 3fffff80 feefeffe 40209510 402094fc 3fffff90: 00000000 00000000 00000000 3ffeeee8 3fffffa0: 3fffdad0 00000000 3ffeeee0 402038b8 3fffffb0: 3fffdad0 00000000 3ffeeee0 402092b8 3fffffc0: feefeffe feefeffe 3ffe8504 40100739 <<<stack<<< ⸮�
So I did as the guide suggested and activated the debug mode. This gives me the following:
Constructing device 1 Adding device 1 Espalexa Begin... MAXDEVICES 10 Done Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: urn:schemas-upnp-org:device:avm-aha:1 Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: urn:schemas-upnp-org:device:avm-aha:1 Got UDP! M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: ssdp:all Responding search req... Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: ssdp:all Responding search req... Got UDP! M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: ssdp:all Responding search req... Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 Responding search req... Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 Responding search req... # Responding to description.xml ... # Send setup.xml <?xml version="1.0" ?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://192.168.178.139:80/</URLBase><device><deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType><friendlyName>Espalexa (192.168.178.139:80)</friendlyName><manufacturer>Royal Philips Electronics</manufacturer><manufacturerURL>http://www.philips.com</manufacturerURL><modelDescription>Philips hue Personal Wireless Lighting</modelDescription><modelName>Philips hue bridge 2012</modelName><modelNumber>929000226503</modelNumber><modelURL>http://www.meethue.com</modelURL><serialNumber>483fda0f7267</serialNumber><UDN>uuid:2f402f80-da50-11e1-9b23-483fda0f7267</UDN><presentationURL>index.html</presentationURL></device></root> # Responding to description.xml ... # Send setup.xml <?xml version="1.0" ?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://192.168.178.139:80/</URLBase><device><deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType><friendlyName>Espalexa (192.168.178.139:80)</friendlyName><manufacturer>Royal Philips Electronics</manufacturer><manufacturerURL>http://www.philips.com</manufacturerURL><modelDescription>Philips hue Personal Wireless Lighting</modelDescription><modelName>Philips hue bridge 2012</modelName><modelNumber>929000226503</modelNumber><modelURL>http://www.meethue.com</modelURL><serialNumber>483fda0f7267</serialNumber><UDN>uuid:2f402f80-da50-11e1-9b23-483fda0f7267</UDN><presentationURL>index.html</presentationURL></device></root> Got UDP! M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: ssdp:all Responding search req... Got UDP! M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 5 ST: ssdp:all Responding search req... Got UDP! Got UDP! Got UDP! M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 MAN: "ssdp:discover" MX: 1 ST: urn:dial-multiscreen-org:service:dial:1 USER-AGENT: Google Chrome/89.0.4389.114 Windows
I am sorry if this is to much text or if I had to put it somewhere else, as I said I am relatively new to this.
Thank you in advance for helping me.
Same issue. Alexa can't discover the devices. Tried with example EspalexaFullyFeautred too, but can't discover devices.
On enabling debug, getting same log as yours.
Any help will be highly appreciated.
TIA.
I've got a same issue. I've tried ESP32-DEVKIT-V1 and WEMOS D1 R1 (ESP8266) I've running Echo dot gen2, gen3, echo show 5, alexa app.
devices not being discovered.
ESP32 makes panic reset on /espalexa, but op port 80 answer to /api/lights and /description.XML ESP8266 answers fine on all url. debug enabled, but no UDP communication show on debug.
esp8266 outputs:
`Hello from Espalexa!
Value of device 1 (Bewegungssensor): 0 (Dimmable light)
Free Heap: 32880 Uptime: 152861
Espalexa library v2.7.0 by Christian Schwinne 2021`
`
Problem mostly resolved, my network was misconfigured. I can confirm even echo show 5 found all devices on my ESP32-DEV-V1. /espalexa or /espalexa/ call in a browser makes a crash.
sketch: EspAlexaFullyFeatured.ino
`HTTP Req espalexa ...
Guru Meditation Error: Core 1 panic'ed (IntegerDivideByZero). Exception was unhandled.
Core 1 register dump:
PC : 0x400de6bd PS : 0x00060c30 A0 : 0x800deda8 A1 : 0x3ffd1220
A2 : 0x00002710 A3 : 0x3ffcc98c A4 : 0x00000000 A5 : 0x00000012
A6 : 0x3ffd2de4 A7 : 0xff000000 A8 : 0x00000001 A9 : 0x3ffd1220
A10 : 0x3ffd2de4 A11 : 0x3ffd2df6 A12 : 0x00000005 A13 : 0x3ffd2df7
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4000c28c LEND : 0x4000c296 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x400de6bd:0x3ffd1220 0x400deda5:0x3ffd1260 0x400d1696:0x3ffd1280 0x400d1b29:0x3ffd13a0 0x400d775d:0x3ffd13c0 0x400d6321:0x3ffd1400 0x400d63e5:0x3ffd1440 0x400d6635:0x3ffd1490 0x40167835:0x3ffd14b0 0x401678b1:0x3ffd14f0 0x40167f56:0x3ffd1510 0x40089832:0x3ffd1540
Rebooting... ets Jul 29 2019 12:21:46`
Hello everyone,
I just started with the ESP Alexa control and I don't have a lot of experience, so my problem might be easy to solve. In the end I just want to turn a servo motor 180 degrees if the device is turned on, but the problem begins earlier.
I am using a WeMos D1 R2. from ARCELI. The code is just the basics for testing if Alexa can find anything:
I checked if the arduino is connected to the wifi, and indeed it is. And if Alexa searches for devices the following text appears in the serial monitor:
So I did as the guide suggested and activated the debug mode. This gives me the following:
I am sorry if this is to much text or if I had to put it somewhere else, as I said I am relatively new to this.
Thank you in advance for helping me.