You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue where I had two devices and two callbacks, but both devices were triggering the same first callback instead of their respective ones.
Solution:
The problem was caused by the way the unique ID was generated in espalexa.h. To fix it, replace this line:
I encountered an issue where I had two devices and two callbacks, but both devices were triggering the same first callback instead of their respective ones.
Solution:
The problem was caused by the way the unique ID was generated in espalexa.h. To fix it, 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 corrected version:
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);
📌 File to Modify: espalexa.h (located in the ESPAlexa library folder)
Note:
I did not come up with this solution myself—I’m simply sharing it here so that others don’t waste an entire day troubleshooting like I did!
🔗 Original Discussion: Arduino Forum - ESPAlexa Only One Callback Working
Hope this helps! 🚀
The text was updated successfully, but these errors were encountered: