vintlabs / fauxmoESP

Add voice control of your ESP32 and ESP8266 devices using Amazon Alexa
MIT License
389 stars 71 forks source link

no devices found #41

Closed pvint closed 6 years ago

pvint commented 6 years ago

Original report by hbbushcraft (Bitbucket: hbbushcraft, ).


Hi,

first of all I am running your example code, got the correct wifi-settings in order to be able to connect:

[WIFI] Connecting to .. [WIFI] STATION Mode, SSID: , IP address: [MAIN] Free heap: 44192 bytes [MAIN] Free heap: 42728 bytes [MAIN] Free heap: 42816 bytes [MAIN] Free heap: 42816 bytes

Nothing more even during Discovery.

Where and how do I use the debug-Flag you provided in some other issues?

I am on MacOS highSierra using Arduino IDE 1.8.5 wemos d1 mini, gen1 Alexa, wifi-connect working but no further serial-output nor discovery

pvint commented 6 years ago

Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).


You have to compile the code providing the "DEBUG_FAUXMO=Serial" flag to get debug info on serial port. Unfortunately that's not easy when using the Arduino IDE and it involves changing your boards.txt file to add a new DEBUG option, like this (the example is for the D1 Mini board):

d1_mini.menu.DebugLevel.FAUXMO=FAUXMO
d1_mini.menu.DebugLevel.FAUXMO.build.debug_level= -DDEBUG_FAUXMO=Serial

The restart the IDE and you should see a FAUXMO option in the "Tools > Debug Level" menu.

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


great, that works Xose, but still not showing anything in the Alexa-App...

[WIFI] Connecting to ssid ..[FAUXMO] UDP server started

[WIFI] STATION Mode, SSID: ssid, IP address: ip [FAUXMO] Enabled [FAUXMO] Device 'switch one' added as #0

[MAIN] Free heap: 43040 bytes [MAIN] Free heap: 42536 bytes

[FAUXMO] Search request from 10.0.1.5

[FAUXMO] UDP response for device #0 (switch one)

[FAUXMO] UDP response for device #0 (switch one)

[FAUXMO] Search request from 10.0.1.5

[FAUXMO] Client #0 connected

[FAUXMO] Device #0 /setup.xml

[MAIN] Free heap: 41776 bytes

[FAUXMO] Client #1 connected

[FAUXMO] Device #0 /setup.xml

[MAIN] Free heap: 41664 bytes [MAIN] Free heap: 41664 bytes

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


Dug some more. Maybe it contains something useful.

[FAUXMO] Enabled
[FAUXMO] Device 'switch one' added as #0
[MAIN] Free heap: 43040 bytes
[FAUXMO] Search request from 10.0.1.5
[FAUXMO] UDP response for device #0 (switch one)
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://10.0.1.32:52000/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 4445568E93B700
SERVER: Unspecified, UPnP/1.0, Unspecified
ST: urn:Belkin:device:**
USN: uuid:Socket-1_0-4445568E93B700::urn:Belkin:device:**
X-User-Agent: redsonic

still no device recognized by Alexa

pvint commented 6 years ago

Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).


Can you please check the code in the dev branch? I have updated it this morning.

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


I did... No devices discovered. I added the DEBUG (response) to the cpp in order to see more...

[FAUXMO] Enabled
[FAUXMO] UDP server started
[FAUXMO] Device 'switch one' added as #0
[FAUXMO] Device 'switch two' added as #1
[FAUXMO] Device 'switch three' added as #2
[MAIN] Free heap: 42776 bytes
[MAIN] Free heap: 42272 bytes
[FAUXMO] Search request from 10.0.1.5:50000
[FAUXMO] UDP response for device #1 (switch two) sent to 10.0.1.5:50000
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://10.0.1.32:52001/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 018E93B746584D
SERVER: Unspecified, UPnP/1.0, Unspecified
ST: urn:Belkin:device:**
USN: uuid:Socket-1_0-018E93B746584D::urn:Belkin:device:**
X-User-Agent: redsonic

[FAUXMO] UDP response for device #2 (switch three) sent to 10.0.1.5:50000
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://10.0.1.32:52002/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 028E93B746584D
SERVER: Unspecified, UPnP/1.0, Unspecified
ST: urn:Belkin:device:**
USN: uuid:Socket-1_0-028E93B746584D::urn:Belkin:device:**
X-User-Agent: redsonic

[FAUXMO] Client #0 connected
[FAUXMO] Device #2 /setup.xml
[FAUXMO] Client #1 connected
[FAUXMO] Device #1 /setup.xml
[FAUXMO] UDP response for device #0 (switch one) sent to 10.0.1.5:50000
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://10.0.1.32:52000/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 008E93B746584D
SERVER: Unspecified, UPnP/1.0, Unspecified
ST: urn:Belkin:device:**
USN: uuid:Socket-1_0-008E93B746584D::urn:Belkin:device:**
X-User-Agent: redsonic

[FAUXMO] Client #2 connected
[FAUXMO] Device #0 /setup.xml
[MAIN] Free heap: 40976 bytes
[MAIN] Free heap: 40976 bytes
[MAIN] Free heap: 40976 bytes
[MAIN] Free heap: 40976 bytes
[MAIN] Free heap: 40976 bytes
[MAIN] Free heap: 40976 bytes
[FAUXMO] Client #1 disconnected
[FAUXMO] Client #0 disconnected
[FAUXMO] Client #2 disconnected
[MAIN] Free heap: 42272 bytes
[MAIN] Free heap: 42272 bytes
pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


Tried with Amazon Echo Gen1 and Echo Dot Gen2

pvint commented 6 years ago

Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).


The log looks good except that the "client # disconnected" messages come late, they should return immediately... It could be a problem in the _handleSetup method in fauxmoESP.cpp

[FAUXMO] Enabled
[FAUXMO] UDP server started
[FAUXMO] Device 'switch one' added as #0
[FAUXMO] Device 'switch two' added as #1
[FAUXMO] Device 'switch three' added as #2
[MAIN] Free heap: 45192 bytes
[MAIN] Free heap: 45192 bytes
[FAUXMO] Search request from 192.168.1.104:50000
[FAUXMO] UDP response for device #0 (switch one) sent to 192.168.1.104:50000
[FAUXMO] UDP response for device #1 (switch two) sent to 192.168.1.104:50000
[FAUXMO] UDP response for device #2 (switch three) sent to 192.168.1.104:50000
[FAUXMO] Client #0 connected
[FAUXMO] Device #0 /setup.xml
[FAUXMO] Client #1 connected
[FAUXMO] Device #1 /setup.xml
[FAUXMO] Client #0 disconnected
[FAUXMO] Client #1 disconnected
[FAUXMO] Client #0 connected
[FAUXMO] Device #2 /setup.xml
[FAUXMO] Client #0 disconnected
[MAIN] Free heap: 45192 bytes
[MAIN] Free heap: 45192 bytes

I cannot test it with Gen2 devices and I don't know if they could have any impact on the discovery...

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


in fact I also did try it when the gen2 Dot was offline. No difference.

pvint commented 6 years ago

Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).


Responses are OK. My only guess is that they, somehow, don't get through to the Dot...

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


I have completely removed the Dot from my Setup, now only the Gen1 Amazon Echo is in place. Same output, no discovery...

around 28-30 seconds until client disconnect after the last response...

pvint commented 6 years ago

Original comment by Nils (Bitbucket: nilz90, GitHub: nilz90).


Echo Gen1 and Dot Gen2 uses the same schematic. Thats not the problem here.

Maybe it's again the 2.4 board core for esp8266 ?? If yes, try change to 2.3

pvint commented 6 years ago

Original comment by At-M (Bitbucket: At-M, GitHub: At-M).


Just created an account here to say: This happens to me too :D

I was actually testing a simple code and suddently my Gen1 Dot didn't find it anymore. Testing the given example also didn't work, but then an alert popped up on my phone, that the alexa app has been updated.

So i guess they broke something with their newest update.

edit: on the boardmanager i used 2.3 and now it works again :)

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


must find out how to do this using arduino ide...

pvint commented 6 years ago

Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).


Go to "Tools > Board > Boards Manager", scroll down to the bottom to locate the esp8266 entry, click on it and on the drop down select version 2.3.0.

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


Thanks, I'll try this and come back to you when @home

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


after switching to ESP8266 2.3 it worked immediately and like a charm.

pvint commented 6 years ago

Original comment by hbbushcraft (Bitbucket: hbbushcraft, ).


switching to esp8266-> V2.3 in boardmanager fixed my issue

pvint commented 5 years ago

Original comment by james (Bitbucket: contractorwolf, GitHub: contractorwolf).


I am still getting this issue. I switched the esp8266 library to 2.3 and I still cannot see the wemos from the alexa app, “no devices found” when searching for “other” devices.