Echo/Alexa not finding fauxmoESP device using Wemos D1

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tikitofu
 
Posts: 1
Joined: Fri Nov 10, 2017 1:49 pm

Echo/Alexa not finding fauxmoESP device using Wemos D1

Post by tikitofu »

Hi, I'm running the fauxmoESP example code on a WeMos D1 R2 . It compiles and connects to my network but Alexa does not recognize any of the devices. I'm using the original Echo which currenty has 7 devices.

My router is an Archer D8 and I also have a SmartThings Hub running through Echo.

My arduino sketch:

Code: Select all

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "fauxmoESP.h"
#include "credentials.h"
 
#define SERIAL_BAUDRATE                 115200
 
fauxmoESP fauxmo;
 
// -----------------------------------------------------------------------------
// Wifi
// -----------------------------------------------------------------------------
 
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 setup() {
 
    // Init serial port and clean garbage
    Serial.begin(SERIAL_BAUDRATE);
    Serial.println();
    Serial.println();
 
    // Wifi
    wifiSetup();
 
    // Fauxmo v2.0
    fauxmo.addDevice("light one");
    fauxmo.addDevice("light two");
    fauxmo.onMessage([](unsigned char device_id, const char * device_name, bool state) {
        Serial.printf("[MAIN] Device #%d (%s) state: %s\n", device_id, device_name, state ? "ON" : "OFF");
    });
 
}
 
void loop() {
    fauxmo.ha
Output from the serial monitor:

Code: Select all

[WIFI] Connecting to newtonian ....
[WIFI] STATION Mode, SSID: newtonian, IP address: 192.168.1.110
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://192.168.1.110:52001/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 44455683112901
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic
ST: urn:Belkin:service:basicevent:1
USN: uuid:Socket-1_0-44455683112901::urn:Belkin:service:basicevent:1


HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://192.168.1.110:52001/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 44455683112901
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic
ST: urn:Belkin:service:basicevent:1
USN: uuid:Socket-1_0-44455683112901::urn:Belkin:service:basicevent:1


HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://192.168.1.110:52000/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 44455683112900
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic
ST: urn:Belkin:service:basicevent:1
USN: uuid:Socket-1_0-44455683112900::urn:Belkin:service:basicevent:1


HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 22 Jun 2015 17:24:01 GMT
EXT:
LOCATION: http://192.168.1.110:52001/setup.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 44455683112901
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic
ST: urn:Belkin:service:basicevent:1
USN: uuid:Socket-1_0-44455683112901::urn:Belkin:service:basicevent:1
Going to 192.168.1.110:52001/setup.xml returns:

Code: Select all

10urn:Belkin:device:controllee:1light twoBelkin International Inc.Socket1.0uuid:Socket-1_0-44455683112901urn:Belkin:service:basicevent:1urn:Belkin:serviceId:basicevent1/upnp/control/basicevent1/upnp/event/basicevent1/eventservice.xmlurn:Belkin:service:metainfo:1urn:Belkin:serviceId:metainfo1/upnp/control/metainfo1/upnp/event/metainfo1
Any ideas? Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”