I see many solutions about using the ESP with Alexa but found no one for my DUE / UNO.
So here is a working script. It only needs the std Ethernet lib (with a little modfication).
Inspired by the Tasmota for ESP on github.
To get the IP from the Remote it is necessary to edit the Ethernet Lib (aktual version):
Ethernet.cpp on the end of file:
uint8_t *EthernetClient::getRemoteIP(uint8_t remoteIP[])
{
W5100.readSnDIPR(sockindex, remoteIP);
return remoteIP;
}
Ethernet.h after virtual void stop(); (ca zeile 230)
uint8_t *getRemoteIP(uint8_t RemoteIP[]);//adds remote ip address
I used Alexa Dot 3 Gen, i think it would work with 2 Gen too but not with 1 Gen, there you need to add the BRI stat every time. To do this take a look in the "xdrv_20_hue.ino" from Tasmota.
Not sure how many devices are possible, maybe up to 255.
I use it to switch 32 Relays on my DUE for home automation.
I use the DUE instead of an ESP cause i need 3 serial coms (RS485,RF,SMS usw) and many other pins.
Alexa.ino (18.5 KB)