Aircoookie / Espalexa

Alexa voice control for ESP8266/ESP32 (including brightness and color!)
MIT License
546 stars 137 forks source link

feedbak to my echo dot #23

Open simmorga opened 5 years ago

simmorga commented 5 years ago

hello, I would like to know if it is possible to send a feedbak to Alexa on the actual status of the command sent. I'll explain. I ask Alexa to turn on the light and it is ESP that sends alexa a feedbak if the light has been switched on or not. I do not know if I'm clear enough, I write very badly in English ...Grazie

Aircoookie commented 5 years ago

Hi, the ESP already sents a response if the command was successful. Then, Alexa will say OK, otherwise an error about the device not working correctly.

What I think you want is a response from Alexa like:

That is not possible unfortunately, because Amazon would need to add it, I can't. You can be sure though that your command worked if Alexa says OK or makes a bright "ding-ding" noise.

simmorga commented 5 years ago

Thanks for the reply. I'm using your algorithm to send a command via Telnet to a local server. the local server replies via Telnet if it has executed the command or not. for example: echodot sends the command ad espalexa; espalexa sends the command to the Telnet server that takes care of running a routine and responds successfully or negatively. Echo dot should respond executed not referenced to the voice command, but referred to the Telnet server feedback.

I do not know if I was clear. thank you.

Aircoookie commented 5 years ago

Ok, I understand your use case now. Even though it is not best practice, if your telnet server takes less than ~3 secs to process the command, and returns a response that there was an error, it would theoretically be possible to send Alexa a wrong response so the Echo would say something like "the device is not working correctly" I might give this a try in the next few days, but I won't promise anything.

simmorga commented 5 years ago

thank you, I am very grateful

At home I have a home automation system of "BTicino spa" (Italy). the system accepts commands via TelNet through a gateway between the LAN and the proprietary BUS, on port 20000 with a protocol of communication verification and without authentication request. The server / gateway remains a sequence of characters following a command sent that confirms the extension of the command sent. I'm trying to interface ECHO DOT with it. Now it's working fortuitously. Sending only the ignition sequence to an actuator without considering the server responses. Everything works. But sometimes the server responds differently by executing the command and Alexa says "on" while it is not. thanks again for your help and for the excellent job.