-
Notifications
You must be signed in to change notification settings - Fork 250
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
arduino esp8266 script changed in Alexa #44
Comments
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 - |
Pro provides 5 devices for free for life and additional device is $3 per year! you can find a sample sketch for switch here 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 |
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 ***@***.***> 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
<#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... |
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.
|
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: ` // new debug code starts here #define DEBUG_ESP_PORT Serial // Add this // new debug code ends here #include "SinricPro.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 ***@***.***> 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 <
***@***.***> wrote:
OK Thanks ... I will give that a try
On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon <
***@***.***> 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
<#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 ***@***.***> 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 <
***@***.***> wrote:
OK Thanks ... I will give that a try
On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon <
***@***.***> 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
<#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 ***@***.***> 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 <
***@***.***> wrote:
Can you drop your email here please?
On Wed, 6 Nov 2019 at 8:56 PM TexAcoon ***@***.***> 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 <
> ***@***.***> wrote:
>
> OK Thanks ... I will give that a try
> On Tuesday, November 5, 2019, 11:47:18 PM CST, Aruna Tennakoon <
> ***@***.***> 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
> <
#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
<#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 |
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 |
Yes .. I am using a single 10 amp relay (3 volt coil) it's switching fine with the code from Boris - I hope he will be able to take the code I sent him and be able to make a Sinric Pro code out of it. What I like is it has a magnetic relay (switch) to let you know the current condition of the garage door if it's open or not.
You are still having issues?
What code are you using? On Tuesday, November 12, 2019, 06:07:16 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon Are you using any relays? When i used Fauxmo in past i would use digitalWrite(D1,HIGH); etc to trigger my relay 5 Volt. Cant seem to get it to engage
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@TexAcoon I have run from 5 volt side of 8266 to 5 volt relay. Shows it has power but its not switching. I tried a few variations of the code. Last one i tried to run was this below. #include <AsyncPrinter.h> // Uncomment the following line to enable serial debug output #ifdef ENABLE_DEBUG #include <Arduino.h> #include "SinricPro.h" #define WIFI_SSID "" #define BTN_FLASH 0 bool myPowerState = false; /* bool onPowerState(String deviceId, bool &state)
void handleButtonPress() {
} // setup function for WiFi connection while (WiFi.status() != WL_CONNECTED) { // setup function for SinricPro // set callback function to device // setup SinricPro // main setup function Serial.begin(BAUD_RATE); void loop() { |
Difference I see is your DEVICE TYPE is using a SWITCH while mine is using SMART LOCK.
We found the unit seemed to work better using SMART LOCK over the SWITCH. Also you would need to go into your Alexa Cell Phone APP and adjust the Smart Lock device to allow your personal UNLOCK code for the door. On Tuesday, November 12, 2019, 06:34:37 PM CST, Doug Crawford <[email protected]> wrote:
Yes .. I am using a single 10 amp relay (3 volt coil) it's switching fine with the code from Boris - I hope he will be able to take the code I sent him and be able to make a Sinric Pro code out of it. What I like is it has a magnetic relay (switch) to let you know the current condition of the garage door if it's open or not.
You are still having issues?
What code are you using? On Tuesday, November 12, 2019, 06:07:16 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon Are you using any relays? When i used Fauxmo in past i would use digitalWrite(D1,HIGH); etc to trigger my relay 5 Volt. Cant seem to get it to engage
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@TexAcoon hmm. yea I know its gotta be something simple I am missing. what pin are you activating on relay. are you setting up defining LEDs both as pin 1? I am trying D2 etc to relay and nothing. |
3V to VCCGrn to GRND1 to IN
I changed the pins D4 and D5 to both D1's..
On Tuesday, November 12, 2019, 07:13:51 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon hmm. yea I know its gotta be something simple I am missing. what pin are you activating on relay. are you setting up defining LEDs both as pin 1? I am trying D2 etc to relay and nothing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@TexAcoon I am using the usb for power on 8266. i have 5v pin on 8266 connected to dc+ on relay . grnd from 8266 to dc - on relay and pin D2 connected to IN on relay . 5v power showing lit on relay. |
Try D1 to IN
You say you have 5V pin on DC+ ... ESP8266 are normally 3 volts unless you jump at the inverter.
On Tuesday, November 12, 2019, 07:26:25 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon I am using the usb for power on 8266. i have 5v pin on 8266 connected to dc+ on relay . grnd from 8266 to dc - on relay and pin D2 connected to IN on relay . 5v power showing lit on relay.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
If you have a power supply ... test your relay .. the IN wire will touch positive when triggered. (never know about these relays from China)
My current relay is a 5 volt but measured voltage at the 3 volt pin was 3.2 volts .. just enough to trigger the 5 volt coil on the relay.However, I did order some 3 volt relays for the future .. this way I'll have both 3 and 5 volts for my projects.
On Tuesday, November 12, 2019, 08:06:48 PM CST, Doug Crawford <[email protected]> wrote:
Try D1 to IN
You say you have 5V pin on DC+ ... ESP8266 are normally 3 volts unless you jump at the inverter.
On Tuesday, November 12, 2019, 07:26:25 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon I am using the usb for power on 8266. i have 5v pin on 8266 connected to dc+ on relay . grnd from 8266 to dc - on relay and pin D2 connected to IN on relay . 5v power showing lit on relay.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Check out Garage Door Opener With Feedback Using Esp8266 As Web Server.
|
|
|
| | |
|
|
|
| |
Garage Door Opener With Feedback Using Esp8266 As Web Server.
Garage Door Opener With Feedback Using Esp8266 As Web Server.: Hi,I'll show you how to make a simple way to do a...
|
|
|
You'll see how they got the 5 volts from the ESP8266
On Tuesday, November 12, 2019, 08:10:06 PM CST, Doug Crawford <[email protected]> wrote:
If you have a power supply ... test your relay .. the IN wire will touch positive when triggered. (never know about these relays from China)
My current relay is a 5 volt but measured voltage at the 3 volt pin was 3.2 volts .. just enough to trigger the 5 volt coil on the relay.However, I did order some 3 volt relays for the future .. this way I'll have both 3 and 5 volts for my projects.
On Tuesday, November 12, 2019, 08:06:48 PM CST, Doug Crawford <[email protected]> wrote:
Try D1 to IN
You say you have 5V pin on DC+ ... ESP8266 are normally 3 volts unless you jump at the inverter.
On Tuesday, November 12, 2019, 07:26:25 PM CST, clox-coder <[email protected]> wrote:
@TexAcoon I am using the usb for power on 8266. i have 5v pin on 8266 connected to dc+ on relay . grnd from 8266 to dc - on relay and pin D2 connected to IN on relay . 5v power showing lit on relay.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@TexAcoon I checked the voltage its putting out 4.87 volts from esp8266 . I didnt want to use the sinric lock feature. I wonder if it is because of the code i am using is stating for Button Press. So it is not correct. I am probably gonna have too look over the code. Define Pins etc without the sinric lock feature @sivar2311 is this what i am missing? void handleButtonPress() { |
The project from instructables doesn't require another external service. There is a webserver running on ESP8266 wich lets you open and close the door. Afaik if you're using a relay and a magnetic switch to read the door state, you have 2 pins to define: 1x to turn on the coil and 1x feedback from magnetic switch. I think you're using two of them: one relay to close the door and another one to open the door? If it is so, you have to define 4 pins! 2 as output to control the relays and 2 as inputs to read the states of the magnetic switches. Please take out the defines i made (LED_GREEN / LED_RED) and make your own defines matching your wiring! Assuming you're using RELAY_ONE to open the door, and RELAY_TWO to close the door #define RELAY_ONE D1 // used to open the door
#define MAGNET_ONE D2 // high=door is open
#define RELAY_TWO D3 // used to close the door
#define MAGNET_TWO D4 // high = door is closed in setup() you have to setup the pins correctly pinMode(RELAY_ONE, OUTPUT);
pinMode(RELAY_TWO, OUTPUT);
pinMode(MAGNET_ONE, INPUT);
pinMode(MAGNET_TWO, INPUT); To activate the relays digitalWrite(RELAY_ONE, HIGH); // will turn on relay 1 and open the door digitalWrite(RELAY_TWO, HIGH); // will turn on relay 2 and close the door To read the states of the magnetic switches: bool state_one = digitalRead(MAGNET_ONE);
bool state_two = digitalRead(MAGNET_TWO);
So you have to write your own functions to open and close the door. Call these functions from onLockState callback like this: #define RELAY_ONE D1 // used to open the door
#define MAGNET_ONE D2 // high=door is open | low = door is NOT open
#define RELAY_TWO D3 // used to close the door
#define MAGNET_TWO D4 // high = door is closed | low = door is NOT closed
#define MOVE_TIMEOUT 10000 // timout 60 seconds for door movement -> please use a value which fits to your open/close time
/* function: turn on relay connected to pin RELAY and waits until MAGNET gets closed or timeout happened
* input: RELAY = pin which is RELAY connected to
* MAGNET = pin which is MAGNET connected to
* return: true if MAGNET is closed
* false if MAGNET is still open -> timout happened!
*/
bool turnOnRelayAndWait(int RELAY, int MAGNET, unsigned long timeout) {
unsigned long startMillis = millis();
digitalWrite(RELAY, HIGH); // turn on relay
bool success = false;
while ((!success) && (millis()-startMillis<timeout)) { // wait until MAGNET is HIGH or timeout is reached
success = digitalRead(MAGNET);
yield();
}
digitalWrite(RELAY, LOW); // turn off relay
return success;
}
bool onLockState(String deviceId, bool &lockState) {
if (lockState==true) { // command: close GarageDoor
Serial.printf("Closing garage door...");
bool success = turnOnRelayAndWait(RELAY_TWO, MAGNET_TWO, MOVE_TIMEOUT);
switch(success) {
case true: Serial.printf("closed\r\n");
lockState = true; // tell sinric door is closed
break;
case false: Serial.printf("timeout, door is not closed!!\r\n");
lockState = false; // tell sinric door is not closed
break;
}
} else { // command: open GarageDoor
Serial.printf("Opening garage door...");
bool success = turnOnRelayAndWait(RELAY_ONE, MAGNET_ONE, MOVE_TIMEOUT);
switch(success) {
case true: Serial.printf("open\r\n");
lockState = false; // tell sinric door is open
break;
case false: Serial.printf("timeout, door is not open!!\r\n");
lockState = true; // tell sinric door is not open
break;
}
}
return true; // callback handled successfully
} I hope this will help you. |
Sorry i can't follow you. What's your project like? |
Because it was early in the morning when i wrote the code above...it turned out that it was not working correctly. That's why i edited the post. The code shown above is now correct. |
You'll find my complete demo and wiring here: GarageDoorExample Because i don't have any relays or reed-switches i used two LED's and two pushbuttons. |
WOW! THanks Boris ... I'll give it a try .. I wanted to send you some pictures of the project. After sending I received a email rejection.
Doug
On Wednesday, November 13, 2019, 05:33:59 AM CST, Boris Jäger <[email protected]> wrote:
You'll find my complete demo and wiring here: GarageDoorExample
Because i don't have any relays or reed-switches i used two LED's and two pushbuttons.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Doug, you can't send photos to a @reply.github.com address. |
@sivar2311 that's what I was wondering. I wanted to have my relay switch on automatically at D2 when I ask Alexa to turn on device Instead of using push button method. |
@clox-coder But the difference between onPowerState and sendPowerStateEvent is clear to you now? |
@sivar2311 I am looking over both of these now. My old code was completely different. I was using the below code to turn my relay on . Would i define both pins at the beginning and then use the onPowerState and sendPowerStateEvent under main setup function? void callback(uint8_t device_id, const char * device_name, bool state) { |
Yes because we are talking about SinricPro now. Topic changed during discussion. Have a look at https://sinric.pro and corresponding git repository: https://github.com/sinricpro/esp8266-esp32-sdk |
Hi Boris,
I tried the Garage Door Example and it didn't work correctly for me. I was using magnet reed switches in place of your push buttons.
Not sure if you live in an apartment or house with garage and door opener. Besides having a regular remote control there is a remote push button normally mounted on the inside of the garage wall and is a NO momentary switch. It does not stay on only off until push powering the garage door opener to move whether it's going up or going down. There is no brain i.e., computer to identify its position .. Pushing the wall button once (pending on door position) will either raise it or lower the door - if you push it while in motion or door travel it will stop the garage door because it has not hit it's setpoint that you established for full open and full closed prior to it's normal everyday operation.
The push buttons that you have would normally be magnetic reed switch - and would work normally open or closed pending on door position.
As far as a 5v relay goes (only one needed) - it should be on a timer i.e, 2 to 5 second trigger.
Example: When asking Alexa to Unlock the garage door - she will ask for your code.
Current LOCKED Arduino Conditions ARE:
- Reed switch shows in CLOSE in the LOCKED (DOOR) POSITION- Then sends a 2 to 5 second momentary contact closure to the relay - There is only a two wire pickup on the Wall mounted Garage Door opener inside the garage.- a TEMP CLOSE of the RELAY CONTACTS start the garage door moving to it's "UNLOCKED POSITION"- Now the UNLOCTED
On Wednesday, November 13, 2019, 01:06:52 PM CST, Boris Jäger <[email protected]> wrote:
Yes because we are talking about SinricPro now. Topic changed during discussion. Have a look at sinric.pro and corresponding git repository: https://github.com/sinricpro/esp8266-esp32-sdk
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Oh okay... i thought you want to use the reed switches as endstop, to identify the position of the door. And no, i don't have automatic garage door opener....i don't have a garage :( |
I ended up fat fingering my last email to you .. let me send this new one to you for clarification.
On Wednesday, November 13, 2019, 02:26:03 PM CST, Boris Jäger <[email protected]> wrote:
Oh okay... i thought you want to use the reed switches as endstop, to identify the position of the door. And no, i don't have automatic garage door opener....i don't have a garage :(
So, scenario is following:
You need to activate your existing garage door opener by a high signal for about 2 to 5 seconds.
Problem is: you (your ESP) doesn't know door's position! It's just sending the same signal (2-5 seconds high) to open or close the door.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Boris,
I tried the Garage Door Example and it didn't work correctly for me. I was using magnet reed switches in place of your push buttons.
Not sure if you live in an apartment or house with garage door opener. Besides having a regular remote control there is a remote push button normally usually mounted on the inside of the garage wall and is a NO momentary switch. It does not stay on only off until push powering the garage door opener to move whether it's going up or going down. There is no real brain i.e., computer to identify its position .. Pushing the wall button once (pending on door position) will either raise it or lower the door - if you push it while in motion or door travel it will stop the garage door because it has not hit it's setpoint that you established for full open and full closed prior to it's normal everyday operation.
The push buttons that you have would normally be magnetic reed switch - and would work normally open or closed pending door position.
As far as a 5v relay goes (only one needed) - it should be on a timer i.e, 2 to 5 second trigger (this would depend on internet connection).
Example:
Current LOCKED Arduino Conditions ARE:
- LOCKED mag switch shows in CLOSE in the LOCKED (DOOR) POSITION - The UNLOCKED mag switch is now OPEN position.- Ask Alexa to Unlock the garage door - she will ask for your code.
- Then sends a 2 to 5 second "momentary" contact closure to the relay - There is only a two wire pickup on the Wall mounted Garage Door opener inside the garage I can wire my relay board to.- a TEMP CLOSE of the RELAY CONTACTS start the garage door moving to it's "UNLOCKED POSITION"- Now the UNLOCKED mag switch shows in CLOSE in the UNLOCKED (DOOR) POSITION - The LOCKEDmag switch is now OPEN.
Current UNLOCKED Arduino Conditions ARE:
- UNLOCKED mag switch shows in CLOSE in the UNLOCKED (DOOR) POSITION - The LOCKED mag switch is now in its OPEN position.- Ask Alexa to LOCK the garage door - (No Code Required)
- Then sends a 2 to 5 second "momentary" contact closure to the relay - a TEMP CLOSE of the RELAY CONTACTS start the garage door moving to it's "LOCKED POSITION"- Now the LOCKED Reed switch shows in CLOSE in the LOCKED (DOOR) POSITION - The UNLOCKED mag switch is now OPEN.
Conditions Cycle Again and Again....
The first code you sent me originally works great ... Just need to set up for momentary relay signal D1 for relay - momentary signal ADD D2 for UNLOCKED position - magnetic switch
ADD D3 for LOCKED position - magnetic switch
Pending on the position of the mag switch - If I were to ask Alexa "What condition is the garage door it" .. she would be able to tell me if it's Locked or Unlocked by the mag switches
On Wednesday, November 13, 2019, 02:36:02 PM CST, Doug Crawford <[email protected]> wrote:
I ended up fat fingering my last email to you .. let me send this new one to you for clarification.
On Wednesday, November 13, 2019, 02:26:03 PM CST, Boris Jäger <[email protected]> wrote:
Oh okay... i thought you want to use the reed switches as endstop, to identify the position of the door. And no, i don't have automatic garage door opener....i don't have a garage :(
So, scenario is following:
You need to activate your existing garage door opener by a high signal for about 2 to 5 seconds.
Problem is: you (your ESP) doesn't know door's position! It's just sending the same signal (2-5 seconds high) to open or close the door.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Okay, i think i've got it. |
@TexAcoon I changed the example in my git repo to your needs. please have a look: https://github.com/sivar2311/GarageDoorExample Note: I changed the used pins: |
Thats correct ... I will try and hook up on that to be sure of the connection point..Will take photos and video ...
At this time I'm testing on table top to make sure everything works ..
On Wednesday, November 13, 2019, 02:43:37 PM CST, Boris Jäger <[email protected]> wrote:
Okay, i think i've got it.
so scenario is
1x relay to send 2-5 seconds high signal to turn the door (in whatever direction)
2x reed switches to identify door position. 1 for closed position and 1 for open position, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sounds good. I am going to improve the code a bit...so that manually actions (open / close) will be sent to server. But let us close this issue here, because we're discussing in wrong place. This issue is related to alexa-wemo-switch. But we're working on a concrete implementation about a garage door using SinricPro service. Let us switch over to https://github.com/sivar2311/GarageDoorExample. |
Sounds good - This will be a great feature for Sinric Pro Service when we get this ironed out .. I certainly appreciate your patience and expertise developing a script for the garage.We can switch over to https://github.com/sivar2311/GarageDoorExample.
Doug On Thursday, November 14, 2019, 07:59:32 AM CST, Boris Jäger <[email protected]> wrote:
Sounds good. I am going to improve the code a bit...so that manually actions (open / close) will be sent to server. But let us close this issue here, because we're discussing in wrong place. This issue is related to alexa-wemo-switch. But we're working on a concrete implementation about a garage door using SinricPro service. Let us switch over to https://github.com/sivar2311/GarageDoorExample.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I created a discussion "issue" -> https://github.com/sivar2311/GarageDoorExample/issues/1. So we can switch over now. |
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?
The text was updated successfully, but these errors were encountered: