-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alexa only identifies 1 of 4 devices, the others are not visible in the app. #231
Comments
Pretty sure this is your issue, was with us: https://github.com/Aircoookie/Espalexa/issues/url |
Hola @ltavasilva , encontré una solución, estaba leyendo mismo tema en la librería de FAUXMO, entonces la solución es muy similar, en el método encodeLightId, remplazar la linea que asigna el ID, solo eso, y volver a compilar: |
Gracias! Just replaced my router, and suddenly had the same problem. You saved me. |
Gracias! I had the same issue, this trick resolved it! |
Hello @ltavasilva, I found a solution, I was reading the same topic in the FAUXMO library, so the solution is very similar, Open espalexa.h in an editor and search for encodeLightId in the encodeLightId method, replace the line that assigns the ID, Replace this line : sprintf_P(out, PSTR("%02X:%02X:%02X:%02X:%02X:%02X:00:11-%02X"), mac[0],mac[1],mac[2 ],mac[3],mac[4],mac[5], idx); With this line: sprintf_P(out, PSTR("%02X:%02X:%02X:%02X:%02X:%02X-%02X-00:11"), mac[0],mac[1],mac[2 ],mac[3],mac[4],mac[5], idx); save the espalexa.h file and upload your sketch again, the on Alexa app discover the devices again you will see all the devices. |
Not working for me |
Thank, you it works for me! |
I used the "EspalexaBasic" example with 4 devices (Garage, Hall, Kitchen and Living Room). When I command to locate the devices, only "Hall" was found, in the Alexa app, only Hall was available.
But if I give the command to turn on the Garage, the Kitchen or the Living Room, Alexa accepts the command but activates "Hall" for all of them.
Code below
`#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include <Espalexa.h>
// prototypes
boolean connectWifi();
//callback functions
void firstLightChanged(uint8_t brightness);
void secondLightChanged(uint8_t brightness);
void thirdLightChanged(uint8_t brightness);
void fourthLightChanged(uint8_t brightness);
// Change this!!
const char* ssid = "xxx";
const char* password = "yyy";
boolean wifiConnected = false;
Espalexa espalexa;
EspalexaDevice* device3; //this is optional
void setup()
{
Serial.begin(115200);
// Initialise wifi connection
wifiConnected = connectWifi();
if(wifiConnected){
} else
{
while (1) {
Serial.println("Cannot connect to WiFi. Please check data and reset the ESP.");
delay(2500);
}
}
}
void loop()
{
espalexa.loop();
delay(1);
}
//our callback functions
void firstLightChanged(uint8_t brightness) {
Serial.print("Garage changed -> " + brightness);
}
void secondLightChanged(uint8_t brightness) {
Serial.print("Hall changed -> " + brightness);
}
void thirdLightChanged(uint8_t brightness) {
Serial.print("Kitchen changed -> " + brightness);
}
void fourthLightChanged(uint8_t brightness) {
Serial.print("Living room changed -> " + brightness);
}
// connect to wifi – returns true if successful or false if not
boolean connectWifi(){
boolean state = true;
int i = 0;
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("");
Serial.println("Connecting to WiFi");
// Wait for connection
Serial.print("Connecting...");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
if (i > 20){
state = false; break;
}
i++;
}
Serial.println("");
if (state){
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
else {
Serial.println("Connection failed.");
}
return state;
}`
The text was updated successfully, but these errors were encountered: