arduino-esp8266-alexa-wemo-switch
arduino-esp8266-alexa-wemo-switch copied to clipboard
arduino esp8266 script changed in Alexa
kakopappa - I have used this script for over a year and worked so well I was planning on adding more devices to my home automation. Not sure what has gone wrong when asking Alexa to turn on the appliance it "states there is a malfunction" OR "cant find the appliance" (depending on what day it is and how good she feels.
I have not made any chances to the software and still can not get Alexa do discover any of my WeMos ESP8266s ... tried looking in "Serial Monitor" and do not see anything working. Has something changed in the Amazon Alexa for the system not to recognize the WeMos ESP8266 any longer?
Hi @TexAcoon
Emulation seems to have issues with new Alexa firmware updates. I think a smart home skill is the right way to do this. Do you mind giving a https://sinric.pro a try ?
Sure I will download it and try it out .. Will let you know what the status is when complete.
You have to pay for that service - I thought the whole idea of home automation using what we have is to only pay for the components and not the monthly programing. However, there is a free month involved and really interested what is going on with this ..
Kakopappa - Do I use the same Arduino script or do I have to change another script .. for the smart devices that are built in like the Phillips light bulbs etc ... I can see how the connection would work .. Not sure if I have to add a new script to the WeMos or use the one you already created ... Thanks
Pro provides 5 devices for free for life and additional device is $3 per year!
you can find a sample sketch for switch here https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/switch
Fill in the functions with the code you had already. shouldn't take longer than 5 mins
I have signed up and tried loading the software - Before there was not any issue uploading your script to "NodeMCU 1.0(ESP-12E)Module .. Now it gives me an error message: "exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module)." with the SicRic I have tried several difference boards and they say the same thing .. What do you suggest?
Need more details
Are you using Arduino or PlatformIO?
Can you please upload a screenshot ?
On Mon, 4 Nov 2019 at 6:33 PM TexAcoon [email protected] wrote:
I have signed up and tried loading the software - Before there was not any issue uploading your script to "NodeMCU 1.0(ESP-12E)Module .. Now it gives me an error message: "exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module)." I have tried several difference boards and they say the same thing .. What do you suggest?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/44?email_source=notifications&email_token=ABZAZZRPRE6T7N4JUC4CM4DQSAB7JA5CNFSM4JIRPWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC66FSI#issuecomment-549315273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZWTMUWMRWG5CVKKWOTQSAB7JANCNFSM4JIRPWOA .
I'm using Arduino never have tried the PlatformIO... Here is my error message I am getting at this time.. https://www.dropbox.com/home?preview=esp8266+errpr.PNG
I think you forgot to share the image properly.
It shows me this when i open your link
Maybe you do not have the dependencies installed
https://github.com/sinricpro/esp8266-esp32-sdk#dependencies
Aruna, Excellent job! identifying my issue! .. I downloaded all three of the dependencies and did a Arduino code "verify" on the code ..That took care of it! ... Did upload the code just as a double check to the NodeMCU and loaded like it should.
I signed up at Sinric Pro and added a device naming it "Fireplace" ..
I did receive a code for my account and one for the device "Fireplace" .. but it does not describe exactly what code is for which of the define(s)... #define SOCKET_AUTH_TOKEN "??????"#define SIGNING_KEY "YOUR-SIGNING-KEY"#define SWITCH_ID "Fireplace" ????
Thanks Doug (TexAcoon)
On Monday, November 4, 2019, 10:56:12 AM CST, Aruna Tennakoon <[email protected]> wrote:
Maybe you do not have the dependencies installed
https://github.com/sinricpro/esp8266-esp32-sdk#dependencies
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Here is a copy of the error message incase someone else runs across this same issue ... On Monday, November 4, 2019, 12:51:17 PM CST, Doug Crawford [email protected] wrote:
Aruna, Excellent job! identifying my issue! .. I downloaded all three of the dependencies and did a Arduino code "verify" on the code ..That took care of it! ... Did upload the code just as a double check to the NodeMCU and loaded like it should.
I signed up at Sinric Pro and added a device naming it "Fireplace" ..
I did receive a code for my account and one for the device "Fireplace" .. but it does not describe exactly what code is for which of the define(s)... #define SOCKET_AUTH_TOKEN "??????"#define SIGNING_KEY "YOUR-SIGNING-KEY"#define SWITCH_ID "Fireplace" ????
Thanks Doug (TexAcoon)
On Monday, November 4, 2019, 10:56:12 AM CST, Aruna Tennakoon <[email protected]> wrote:
Maybe you do not have the dependencies installed
https://github.com/sinricpro/esp8266-esp32-sdk#dependencies
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
#define SOCKET_AUTH_TOKEN -> In the Left menu -> Goto Credentails tab -> Copy APP KEY #define SIGNING_KEY -> In the Left menu -> Goto Credentails tab -> Copy APP SECRET
"#define SWITCH_ID --> In the left menu -> Devices -> Device you created has an id like ID: 5d7exx18cxxdabxxca420bxx
Thanks for the info on the different keys and which they represent .. I will keep a copy of this email for future reference ... Seems the unit works fine turn on and turn off in Sinric Pro .. But Alexa can not locate the device when I ask "discover devices" - What do you suggest? On Monday, November 4, 2019, 09:20:35 PM CST, Aruna Tennakoon [email protected] wrote:
#define SOCKET_AUTH_TOKEN -> In the Left menu -> Goto Credentails tab -> Copy APP KEY #define SIGNING_KEY -> In the Left menu -> Goto Credentails tab -> Copy APP SECRET
"#define SWITCH_ID --> In the left menu -> Devices -> Device you created has an id like ID: 5d7exx18cxxdabxxca420bxx
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
have you enabled the Sinric Pro skill and linked it? it's in the home page https://sinric.pro/
After linking the account you should be able to see your device in Alexa app
Aruna ... I really do appreciate you helping me on this project ... Seems a bit confusing dealing with another software... (but its new to me and now feel I have a better handle on it for future devices and I Thank You!) However, I looked on my cell phone under my devices through the Alexa App .... Alexa is recognizing the device and turning it on an off on my cell but not on the ESP8266.... Apparently it's not linking back to the ESP8266 for some reason for switching.. On Tuesday, November 5, 2019, 02:01:43 AM CST, Aruna Tennakoon [email protected] wrote:
have you enabled the Sinric Pro skill and linked it? it's in the home page https://sinric.pro/
After linking the account you should be able to see your device in Alexa app
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
`
#include <Arduino.h>
#ifdef ESP8266
#include <ESP8266WiFi.h>
#endif
#ifdef ESP32
#include <WiFi.h>
#endif
// new debug code starts here
#define DEBUG_ESP_PORT Serial // Add this #define NODEBUG_WEBSOCKETS // Add this #define NDEBUG // Add this
// new debug code ends here
#include "SinricPro.h" #include "SinricProSwitch.h" `
.......
This enables Debug on Serial port. Please post your debug output here
OK Thanks ... I will give that a try On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon [email protected] wrote:
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
#define DEBUG_ESP_PORT Serial #define NODEBUG_WEBSOCKETS #define NDEBUG
#include "SinricPro.h" .......
This enables Debug on Serial port. Please post your debug output here
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Still cannot connect through Alexa .. Do not even see the ESP8266 on my Network i.e., internet connections. ALEXA reconizes "fireplace" and turns it on and off fine ... Sinric is also working from the Alexa online perfect ... I can see it on my cell flip off and on .. But it's not activating the ESP8266 for my switch ???? Here is the script upload after I installed the debug info: All seems to look good:
Sketch uses 425722 bytes (40%) of program storage space. Maximum is 1044464 bytes.Global variables use 30452 bytes (37%) of dynamic memory, leaving 51468 bytes for local variables. Maximum is 81920 bytes.esptool.py v2.62.6esptool.py v2.6Serial port COM8Connecting....Chip is ESP8266EXFeatures: WiFiMAC: 2c:3a:e8:43:91:04Uploading stub...Running stub...Stub running...Configuring flash size...Auto-detected Flash size: 4MBCompressed 429872 bytes to 311100... Writing at 0x00000000... (5 %)Writing at 0x00004000... (10 %)Writing at 0x00008000... (15 %)Writing at 0x0000c000... (21 %)Writing at 0x00010000... (26 %)Writing at 0x00014000... (31 %)Writing at 0x00018000... (36 %)Writing at 0x0001c000... (42 %)Writing at 0x00020000... (47 %)Writing at 0x00024000... (52 %)Writing at 0x00028000... (57 %)Writing at 0x0002c000... (63 %)Writing at 0x00030000... (68 %)Writing at 0x00034000... (73 %)Writing at 0x00038000... (78 %)Writing at 0x0003c000... (84 %)Writing at 0x00040000... (89 %)Writing at 0x00044000... (94 %)Writing at 0x00048000... (100 %)Wrote 429872 bytes (311100 compressed) at 0x00000000 in 27.5 seconds (effective 125.2 kbit/s)...Hash of data verified. Leaving...Hard resetting via RTS pin...
On Wednesday, November 6, 2019, 06:41:46 AM CST, Doug Crawford <[email protected]> wrote:
OK Thanks ... I will give that a try On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon [email protected] wrote:
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
#define DEBUG_ESP_PORT Serial #define NODEBUG_WEBSOCKETS #define NDEBUG
#include "SinricPro.h" .......
This enables Debug on Serial port. Please post your debug output here
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Can you drop your email here please?
On Wed, 6 Nov 2019 at 8:56 PM TexAcoon [email protected] wrote:
Still cannot connect through Alexa .. Do not even see the ESP8266 on my Network i.e., internet connections. ALEXA reconizes "fireplace" and turns it on and off fine ... Sinric is also working from the Alexa online perfect ... I can see it on my cell flip off and on .. But it's not activating the ESP8266 for my switch ???? Here is the script upload after I installed the debug info: All seems to look good:
Sketch uses 425722 bytes (40%) of program storage space. Maximum is 1044464 bytes.Global variables use 30452 bytes (37%) of dynamic memory, leaving 51468 bytes for local variables. Maximum is 81920 bytes.esptool.py v2.62.6esptool.py v2.6Serial port COM8Connecting....Chip is ESP8266EXFeatures: WiFiMAC: 2c:3a:e8:43:91:04Uploading stub...Running stub...Stub running...Configuring flash size...Auto-detected Flash size: 4MBCompressed 429872 bytes to 311100... Writing at 0x00000000... (5 %)Writing at 0x00004000... (10 %)Writing at 0x00008000... (15 %)Writing at 0x0000c000... (21 %)Writing at 0x00010000... (26 %)Writing at 0x00014000... (31 %)Writing at 0x00018000... (36 %)Writing at 0x0001c000... (42 %)Writing at 0x00020000... (47 %)Writing at 0x00024000... (52 %)Writing at 0x00028000... (57 %)Writing at 0x0002c000... (63 %)Writing at 0x00030000... (68 %)Writing at 0x00034000... (73 %)Writing at 0x00038000... (78 %)Writing at 0x0003c000... (84 %)Writing at 0x00040000... (89 %)Writing at 0x00044000... (94 %)Writing at 0x00048000... (100 %)Wrote 429872 bytes (311100 compressed) at 0x00000000 in 27.5 seconds (effective 125.2 kbit/s)...Hash of data verified. Leaving...Hard resetting via RTS pin...
On Wednesday, November 6, 2019, 06:41:46 AM CST, Doug Crawford < [email protected]> wrote:
OK Thanks ... I will give that a try On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon < [email protected]> wrote:
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
#define DEBUG_ESP_PORT Serial #define NODEBUG_WEBSOCKETS #define NDEBUG
#include "SinricPro.h" .......
This enables Debug on Serial port. Please post your debug output here
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/44?email_source=notifications&email_token=ABZAZZUKTHQRGJS4IIJBGM3QSLEKPA5CNFSM4JIRPWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDGTONI#issuecomment-550319925, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVWKQ5CHGFXLKJULZ3QSLEKPANCNFSM4JIRPWOA .
Seems Sinric Pro is a bit glitchy ... I have left the page open and see it shows my device going ONLINE then OFFLINE and back and forth .. I know the software still shows in BETA is there a reason why it's losing connection? On Wednesday, November 6, 2019, 08:08:04 AM CST, Aruna Tennakoon [email protected] wrote:
Can you drop your email here please?
On Wed, 6 Nov 2019 at 8:56 PM TexAcoon [email protected] wrote:
Still cannot connect through Alexa .. Do not even see the ESP8266 on my Network i.e., internet connections. ALEXA reconizes "fireplace" and turns it on and off fine ... Sinric is also working from the Alexa online perfect ... I can see it on my cell flip off and on .. But it's not activating the ESP8266 for my switch ???? Here is the script upload after I installed the debug info: All seems to look good:
Sketch uses 425722 bytes (40%) of program storage space. Maximum is 1044464 bytes.Global variables use 30452 bytes (37%) of dynamic memory, leaving 51468 bytes for local variables. Maximum is 81920 bytes.esptool.py v2.62.6esptool.py v2.6Serial port COM8Connecting....Chip is ESP8266EXFeatures: WiFiMAC: 2c:3a:e8:43:91:04Uploading stub...Running stub...Stub running...Configuring flash size...Auto-detected Flash size: 4MBCompressed 429872 bytes to 311100... Writing at 0x00000000... (5 %)Writing at 0x00004000... (10 %)Writing at 0x00008000... (15 %)Writing at 0x0000c000... (21 %)Writing at 0x00010000... (26 %)Writing at 0x00014000... (31 %)Writing at 0x00018000... (36 %)Writing at 0x0001c000... (42 %)Writing at 0x00020000... (47 %)Writing at 0x00024000... (52 %)Writing at 0x00028000... (57 %)Writing at 0x0002c000... (63 %)Writing at 0x00030000... (68 %)Writing at 0x00034000... (73 %)Writing at 0x00038000... (78 %)Writing at 0x0003c000... (84 %)Writing at 0x00040000... (89 %)Writing at 0x00044000... (94 %)Writing at 0x00048000... (100 %)Wrote 429872 bytes (311100 compressed) at 0x00000000 in 27.5 seconds (effective 125.2 kbit/s)...Hash of data verified. Leaving...Hard resetting via RTS pin...
On Wednesday, November 6, 2019, 06:41:46 AM CST, Doug Crawford < [email protected]> wrote:
OK Thanks ... I will give that a try On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon < [email protected]> wrote:
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
#define DEBUG_ESP_PORT Serial #define NODEBUG_WEBSOCKETS #define NDEBUG
#include "SinricPro.h" .......
This enables Debug on Serial port. Please post your debug output here
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/44?email_source=notifications&email_token=ABZAZZUKTHQRGJS4IIJBGM3QSLEKPA5CNFSM4JIRPWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDGTONI#issuecomment-550319925, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVWKQ5CHGFXLKJULZ3QSLEKPANCNFSM4JIRPWOA .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Checking
On Wed, 6 Nov 2019 at 9:59 PM TexAcoon [email protected] wrote:
Seems Sinric Pro is a bit glitchy ... I have left the page open and see it shows my device going ONLINE then OFFLINE and back and forth .. I know the software still shows in BETA is there a reason why it's losing connection? On Wednesday, November 6, 2019, 08:08:04 AM CST, Aruna Tennakoon < [email protected]> wrote:
Can you drop your email here please?
On Wed, 6 Nov 2019 at 8:56 PM TexAcoon [email protected] wrote:
Still cannot connect through Alexa .. Do not even see the ESP8266 on my Network i.e., internet connections. ALEXA reconizes "fireplace" and turns it on and off fine ... Sinric is also working from the Alexa online perfect ... I can see it on my cell flip off and on .. But it's not activating the ESP8266 for my switch ???? Here is the script upload after I installed the debug info: All seems to look good:
Sketch uses 425722 bytes (40%) of program storage space. Maximum is 1044464 bytes.Global variables use 30452 bytes (37%) of dynamic memory, leaving 51468 bytes for local variables. Maximum is 81920 bytes.esptool.py v2.62.6esptool.py v2.6Serial port COM8Connecting....Chip is ESP8266EXFeatures: WiFiMAC: 2c:3a:e8:43:91:04Uploading stub...Running stub...Stub running...Configuring flash size...Auto-detected Flash size: 4MBCompressed 429872 bytes to 311100... Writing at 0x00000000... (5 %)Writing at 0x00004000... (10 %)Writing at 0x00008000... (15 %)Writing at 0x0000c000... (21 %)Writing at 0x00010000... (26 %)Writing at 0x00014000... (31 %)Writing at 0x00018000... (36 %)Writing at 0x0001c000... (42 %)Writing at 0x00020000... (47 %)Writing at 0x00024000... (52 %)Writing at 0x00028000... (57 %)Writing at 0x0002c000... (63 %)Writing at 0x00030000... (68 %)Writing at 0x00034000... (73 %)Writing at 0x00038000... (78 %)Writing at 0x0003c000... (84 %)Writing at 0x00040000... (89 %)Writing at 0x00044000... (94 %)Writing at 0x00048000... (100 %)Wrote 429872 bytes (311100 compressed) at 0x00000000 in 27.5 seconds (effective 125.2 kbit/s)...Hash of data verified. Leaving...Hard resetting via RTS pin...
On Wednesday, November 6, 2019, 06:41:46 AM CST, Doug Crawford < [email protected]> wrote:
OK Thanks ... I will give that a try On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon < [email protected]> wrote:
np,
Yesterday, there were some problems with the sevice and it's fixed now. If still does not work
Please enable Debug Info, to do that
eg:
#define DEBUG_ESP_PORT Serial #define NODEBUG_WEBSOCKETS #define NDEBUG
#include "SinricPro.h" .......
This enables Debug on Serial port. Please post your debug output here
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub < https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/44?email_source=notifications&email_token=ABZAZZUKTHQRGJS4IIJBGM3QSLEKPA5CNFSM4JIRPWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDGTONI#issuecomment-550319925 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABZAZZVWKQ5CHGFXLKJULZ3QSLEKPANCNFSM4JIRPWOA
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/44?email_source=notifications&email_token=ABZAZZX6HIKWTG4LI536XU3QSLLVDA5CNFSM4JIRPWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDG2KIQ#issuecomment-550348066, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZUHBKNBQB5PN7CCPJ3QSLLVDANCNFSM4JIRPWOA .
According to your profile settings, you have not installed the skill. Please make sure you have linked "Sinric Pro" skill.. not "Sinric" Skill
This is the correct icon https://www.amazon.com/dp/B07ZT5VDT8
LOL! ... Well that had to be part of the problem .. I had installed skill Sinric instead of Sinric Pro .. Yup I can see how this makes a difference ... However, I asked ALexa to discover devices and still cannot connect to my ESP8266... However, when I asked Alexa to Turn on or Turn Off the fireplace it stated "it's not responding" which was different than before. I would usually get from ALexa "OK" Im starting to wonder if I have a bad ESP8266.. On Wednesday, November 6, 2019, 09:18:16 AM CST, Aruna Tennakoon [email protected] wrote:
According to your profile settings, you have not installed the skill. Please make sure you have linked "Sinric Pro" skill.. not "Sinric" Skill
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Yes, Alexa integration seems to be fine now. your problem is there are no devices connected with device id "5dxxxxxx26505c"
Please make sure ESP device id is correct
ok... I'm at a loss now .. I thought through the sketch in the ESP8266 it identified the device number then identifies it through Sinric Pro.. for automation with ALexa. With my ESP8266 not being recognized none of this works correctly ... ??? At this time I'm not sure why my ESP8266 is not coming up ... If I remember in the past using the old sketch without Sinric Pro I could see my device on my network. What should I try to do next?
On Wednesday, November 6, 2019, 09:45:54 AM CST, Aruna Tennakoon <[email protected]> wrote:
Yes, Alexa integration seems to be fine now. your problem is there are no devices connected with device id "5dxxxxxx26505c"
Please make sure ESP device id is correct
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Can I connect to your pc Teamviewer / quick assist and take a look?
Yes please do ... On Wednesday, November 6, 2019, 10:13:26 AM CST, Aruna Tennakoon [email protected] wrote:
Can I connect to your pc Teamviewer / quick assist and take a look?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
[email protected] - please drop me an email when you have a chance.
@kakopappa I set everything up a few weeks ago. I am able to make everything discoverable. But when i say "Turn On" It says this device does not have the capability. But i am able to discover etc . it showing up as a philips hue Bulb. I signed up for Sinric Pro. But why cant i just use the code instead of the Sinric service SO basically your Sinric Service works because your setting up a skill server with API? and still emulating with the same code?