-
Notifications
You must be signed in to change notification settings - Fork 166
wemos board control with Alexa #55
Comments
When you ask to turn on or off does it print anything in serial console?
…On Sun, Apr 1, 2018 at 3:29 PM 4x1ks ***@***.***> wrote:
Newbie alert...I have an arduino d1 mini. I added the sinric skill to
alexa smart home. I uploaded code to turn the BUILTIN_LED on and off. The
mini shows up on my wifi. The alexa app finds my device "bigrelay."
When I ask Alexa to turn on or off the device, she says "ok" but nothing
happens. The LED does not change state.
I think my code is ok, it isn't mine..I copied it. I also tried the code
to control 5v to a pin to a relay and this also did not work. I'm thinking
that it isn't the code, it is the Alexa / Wemos connection.
Any help is appreciated very much.
Mark
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5imeFjSCwP9OTFNboacyG3CZRCMhks5tkI_mgaJpZM4TCwfP>
.
|
Thanks for writing me.
No text in serial print except for the WIFI connecting message and my Lan
port.. When I ask to turn on or off the device I get no response on the
serial print. But the Alexa app does show the device on or off...and when
I upload the sketch I get a momentary click of the relay that is attached
to the wemos...after the sketch is fully uploaded there is no change in the
relay or lights at all....
…On Sun, Apr 1, 2018, 13:27 mark rosenberg ***@***.***> wrote:
Thanks for writing me.
This is what get when I upload. When I ask to turn on or off the device I
get no response on the serial print. But the Alexa app does show the
device on or off...and when I upload the sketch I get a momentary click of
the relay that is attached to the wemos...after the sketch is fully
uploaded there is no change in the relay or lights at all....
On Sun, Apr 1, 2018, 11:58 Aruna Tennakoon ***@***.***>
wrote:
> When you ask to turn on or off does it print anything in serial console?
>
> On Sun, Apr 1, 2018 at 3:29 PM 4x1ks ***@***.***> wrote:
>
> > Newbie alert...I have an arduino d1 mini. I added the sinric skill to
> > alexa smart home. I uploaded code to turn the BUILTIN_LED on and off.
> The
> > mini shows up on my wifi. The alexa app finds my device "bigrelay."
> >
> > When I ask Alexa to turn on or off the device, she says "ok" but nothing
> > happens. The LED does not change state.
> >
> > I think my code is ok, it isn't mine..I copied it. I also tried the code
> > to control 5v to a pin to a relay and this also did not work. I'm
> thinking
> > that it isn't the code, it is the Alexa / Wemos connection.
> >
> > Any help is appreciated very much.
> >
> > Mark
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> > <#55>, or mute the thread
> > <
> https://github.com/notifications/unsubscribe-auth/AHIM5imeFjSCwP9OTFNboacyG3CZRCMhks5tkI_mgaJpZM4TCwfP
> >
> > .
> >
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AkNvqC4o7ydUWihDKmFpMyh4AgNIFBnDks5tkJavgaJpZM4TCwfP>
> .
>
|
this is my code
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "fauxmoESP.h"
#define WIFI_SSID "Sura Office"
#define WIFI_PASS "password"
#define SERIAL_BAUDRATE 115200
fauxmoESP fauxmo;
//
-----------------------------------------------------------------------------
// Wifi
//
-----------------------------------------------------------------------------
void wifiSetup() {
// Set WIFI module to STA mode
WiFi.mode(WIFI_STA);
// Connect
Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID);
WiFi.begin(WIFI_SSID, WIFI_PASS);
// Wait
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(100);
}
Serial.println();
// Connected!
Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n",
WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
}
void callback(uint8_t device_id, const char * device_name, bool state) {
Serial.print("Device "); Serial.print(device_name);
Serial.print(" state: ");
if (state) {
Serial.println("ON");
digitalWrite(D4,HIGH);
} else {
Serial.println("OFF");
digitalWrite(D4,LOW);
}
}
void setup() {
// Init serial port and clean garbage
Serial.begin(SERIAL_BAUDRATE);
Serial.println("FauxMo demo sketch");
Serial.println("After connection, ask Alexa/Echo to 'turn <devicename>
on' or 'off'");
pinMode (D4,OUTPUT);
// Wifi
wifiSetup();
// Fauxmo
fauxmo.addDevice("Fish Tank");
fauxmo.onMessage(callback);
}
void loop() {
fauxmo.handle();
}
…On Sun, Apr 1, 2018 at 1:30 PM, mark rosenberg ***@***.***> wrote:
Thanks for writing me.
No text in serial print except for the WIFI connecting message and my Lan
port.. When I ask to turn on or off the device I get no response on the
serial print. But the Alexa app does show the device on or off...and when
I upload the sketch I get a momentary click of the relay that is attached
to the wemos...after the sketch is fully uploaded there is no change in the
relay or lights at all....
On Sun, Apr 1, 2018, 13:27 mark rosenberg ***@***.***> wrote:
> Thanks for writing me.
>
> This is what get when I upload. When I ask to turn on or off the device
> I get no response on the serial print. But the Alexa app does show the
> device on or off...and when I upload the sketch I get a momentary click of
> the relay that is attached to the wemos...after the sketch is fully
> uploaded there is no change in the relay or lights at all....
>
> On Sun, Apr 1, 2018, 11:58 Aruna Tennakoon ***@***.***>
> wrote:
>
>> When you ask to turn on or off does it print anything in serial console?
>>
>> On Sun, Apr 1, 2018 at 3:29 PM 4x1ks ***@***.***> wrote:
>>
>> > Newbie alert...I have an arduino d1 mini. I added the sinric skill to
>> > alexa smart home. I uploaded code to turn the BUILTIN_LED on and off.
>> The
>> > mini shows up on my wifi. The alexa app finds my device "bigrelay."
>> >
>> > When I ask Alexa to turn on or off the device, she says "ok" but
>> nothing
>> > happens. The LED does not change state.
>> >
>> > I think my code is ok, it isn't mine..I copied it. I also tried the
>> code
>> > to control 5v to a pin to a relay and this also did not work. I'm
>> thinking
>> > that it isn't the code, it is the Alexa / Wemos connection.
>> >
>> > Any help is appreciated very much.
>> >
>> > Mark
>> >
>> > —
>> > You are receiving this because you are subscribed to this thread.
>> > Reply to this email directly, view it on GitHub
>> > <#55>, or mute the thread
>> > <https://github.com/notifications/unsubscribe-auth/
>> AHIM5imeFjSCwP9OTFNboacyG3CZRCMhks5tkI_mgaJpZM4TCwfP>
>> > .
>> >
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#55 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AkNvqC4o7ydUWihDKmFpMyh4AgNIFBnDks5tkJavgaJpZM4TCwfP>
>> .
>>
>
|
You are using fauxmoESP library.. this is nothing to do with sinric.
If you want to use Sinric:
Go to sinric examples in the github repo
Copy the switch example
Change the API key
Flash
Ask Alexa to discover devices
…On Sun, Apr 1, 2018 at 5:34 PM 4x1ks ***@***.***> wrote:
this is my code
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "fauxmoESP.h"
#define WIFI_SSID "Sura Office"
#define WIFI_PASS "password"
#define SERIAL_BAUDRATE 115200
fauxmoESP fauxmo;
//
-----------------------------------------------------------------------------
// Wifi
//
-----------------------------------------------------------------------------
void wifiSetup() {
// Set WIFI module to STA mode
WiFi.mode(WIFI_STA);
// Connect
Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID);
WiFi.begin(WIFI_SSID, WIFI_PASS);
// Wait
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(100);
}
Serial.println();
// Connected!
Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n",
WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
}
void callback(uint8_t device_id, const char * device_name, bool state) {
Serial.print("Device "); Serial.print(device_name);
Serial.print(" state: ");
if (state) {
Serial.println("ON");
digitalWrite(D4,HIGH);
} else {
Serial.println("OFF");
digitalWrite(D4,LOW);
}
}
void setup() {
// Init serial port and clean garbage
Serial.begin(SERIAL_BAUDRATE);
Serial.println("FauxMo demo sketch");
Serial.println("After connection, ask Alexa/Echo to 'turn <devicename>
on' or 'off'");
pinMode (D4,OUTPUT);
// Wifi
wifiSetup();
// Fauxmo
fauxmo.addDevice("Fish Tank");
fauxmo.onMessage(callback);
}
void loop() {
fauxmo.handle();
}
On Sun, Apr 1, 2018 at 1:30 PM, mark rosenberg ***@***.***>
wrote:
> Thanks for writing me.
>
> No text in serial print except for the WIFI connecting message and my Lan
> port.. When I ask to turn on or off the device I get no response on the
> serial print. But the Alexa app does show the device on or off...and when
> I upload the sketch I get a momentary click of the relay that is attached
> to the wemos...after the sketch is fully uploaded there is no change in
the
> relay or lights at all....
>
> On Sun, Apr 1, 2018, 13:27 mark rosenberg ***@***.***> wrote:
>
>> Thanks for writing me.
>>
>> This is what get when I upload. When I ask to turn on or off the device
>> I get no response on the serial print. But the Alexa app does show the
>> device on or off...and when I upload the sketch I get a momentary click
of
>> the relay that is attached to the wemos...after the sketch is fully
>> uploaded there is no change in the relay or lights at all....
>>
>> On Sun, Apr 1, 2018, 11:58 Aruna Tennakoon ***@***.***>
>> wrote:
>>
>>> When you ask to turn on or off does it print anything in serial
console?
>>>
>>> On Sun, Apr 1, 2018 at 3:29 PM 4x1ks ***@***.***> wrote:
>>>
>>> > Newbie alert...I have an arduino d1 mini. I added the sinric skill to
>>> > alexa smart home. I uploaded code to turn the BUILTIN_LED on and off.
>>> The
>>> > mini shows up on my wifi. The alexa app finds my device "bigrelay."
>>> >
>>> > When I ask Alexa to turn on or off the device, she says "ok" but
>>> nothing
>>> > happens. The LED does not change state.
>>> >
>>> > I think my code is ok, it isn't mine..I copied it. I also tried the
>>> code
>>> > to control 5v to a pin to a relay and this also did not work. I'm
>>> thinking
>>> > that it isn't the code, it is the Alexa / Wemos connection.
>>> >
>>> > Any help is appreciated very much.
>>> >
>>> > Mark
>>> >
>>> > —
>>> > You are receiving this because you are subscribed to this thread.
>>> > Reply to this email directly, view it on GitHub
>>> > <#55>, or mute the thread
>>> > <https://github.com/notifications/unsubscribe-auth/
>>> AHIM5imeFjSCwP9OTFNboacyG3CZRCMhks5tkI_mgaJpZM4TCwfP>
>>> > .
>>> >
>>>
>>> —
>>> You are receiving this because you authored the thread.
>>> Reply to this email directly, view it on GitHub
>>> <#55 (comment)
>,
>>> or mute the thread
>>> <
https://github.com/notifications/unsubscribe-auth/AkNvqC4o7ydUWihDKmFpMyh4AgNIFBnDks5tkJavgaJpZM4TCwfP
>
>>> .
>>>
>>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5rAdt-L4-cc3SLMzEr3nkCHH7p-sks5tkK0ggaJpZM4TCwfP>
.
|
Thanks for the ideas.
I got a lot of error messages. Looks like I have to edit in web socket,
Arduinojson, and other things that I really don't have experience in.
If there was an smart home app that could be enabled to run fauxmo then I
guess I would be up and running.
I am trying to set up a Arduino d1 mini and relays to turn on and off. The
code that I found calls for me to load sinric as the smart home app to
enable, but clearly this doesn't work.
thanks
On Sun, Apr 1, 2018 at 1:39 PM, Aruna Tennakoon <notifications@github.com>
wrote:
… You are using fauxmoESP library.. this is nothing to do with sinric.
If you want to use Sinric:
Go to sinric examples in the github repo
Copy the switch example
Change the API key
Flash
Ask Alexa to discover devices
On Sun, Apr 1, 2018 at 5:34 PM 4x1ks ***@***.***> wrote:
> this is my code
>
> #include <Arduino.h>
> #include <ESP8266WiFi.h>
> #include "fauxmoESP.h"
>
> #define WIFI_SSID "Sura Office"
> #define WIFI_PASS "password"
> #define SERIAL_BAUDRATE 115200
>
>
> fauxmoESP fauxmo;
>
> //
>
> ------------------------------------------------------------
-----------------
> // Wifi
> //
>
> ------------------------------------------------------------
-----------------
>
>
> void wifiSetup() {
>
> // Set WIFI module to STA mode
> WiFi.mode(WIFI_STA);
>
> // Connect
> Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID);
> WiFi.begin(WIFI_SSID, WIFI_PASS);
>
> // Wait
> while (WiFi.status() != WL_CONNECTED) {
> Serial.print(".");
> delay(100);
> }
> Serial.println();
>
> // Connected!
> Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n",
> WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
> }
>
> void callback(uint8_t device_id, const char * device_name, bool state) {
> Serial.print("Device "); Serial.print(device_name);
> Serial.print(" state: ");
> if (state) {
> Serial.println("ON");
> digitalWrite(D4,HIGH);
> } else {
> Serial.println("OFF");
> digitalWrite(D4,LOW);
> }
> }
>
> void setup() {
> // Init serial port and clean garbage
> Serial.begin(SERIAL_BAUDRATE);
> Serial.println("FauxMo demo sketch");
> Serial.println("After connection, ask Alexa/Echo to 'turn <devicename>
> on' or 'off'");
>
> pinMode (D4,OUTPUT);
>
> // Wifi
> wifiSetup();
>
> // Fauxmo
> fauxmo.addDevice("Fish Tank");
> fauxmo.onMessage(callback);
> }
>
> void loop() {
> fauxmo.handle();
> }
>
> On Sun, Apr 1, 2018 at 1:30 PM, mark rosenberg ***@***.***>
> wrote:
>
> > Thanks for writing me.
> >
> > No text in serial print except for the WIFI connecting message and my
Lan
> > port.. When I ask to turn on or off the device I get no response on the
> > serial print. But the Alexa app does show the device on or off...and
when
> > I upload the sketch I get a momentary click of the relay that is
attached
> > to the wemos...after the sketch is fully uploaded there is no change in
> the
> > relay or lights at all....
> >
> > On Sun, Apr 1, 2018, 13:27 mark rosenberg ***@***.***>
wrote:
> >
> >> Thanks for writing me.
> >>
> >> This is what get when I upload. When I ask to turn on or off the
device
> >> I get no response on the serial print. But the Alexa app does show the
> >> device on or off...and when I upload the sketch I get a momentary
click
> of
> >> the relay that is attached to the wemos...after the sketch is fully
> >> uploaded there is no change in the relay or lights at all....
> >>
> >> On Sun, Apr 1, 2018, 11:58 Aruna Tennakoon ***@***.***>
> >> wrote:
> >>
> >>> When you ask to turn on or off does it print anything in serial
> console?
> >>>
> >>> On Sun, Apr 1, 2018 at 3:29 PM 4x1ks ***@***.***>
wrote:
> >>>
> >>> > Newbie alert...I have an arduino d1 mini. I added the sinric skill
to
> >>> > alexa smart home. I uploaded code to turn the BUILTIN_LED on and
off.
> >>> The
> >>> > mini shows up on my wifi. The alexa app finds my device "bigrelay."
> >>> >
> >>> > When I ask Alexa to turn on or off the device, she says "ok" but
> >>> nothing
> >>> > happens. The LED does not change state.
> >>> >
> >>> > I think my code is ok, it isn't mine..I copied it. I also tried the
> >>> code
> >>> > to control 5v to a pin to a relay and this also did not work. I'm
> >>> thinking
> >>> > that it isn't the code, it is the Alexa / Wemos connection.
> >>> >
> >>> > Any help is appreciated very much.
> >>> >
> >>> > Mark
> >>> >
> >>> > —
> >>> > You are receiving this because you are subscribed to this thread.
> >>> > Reply to this email directly, view it on GitHub
> >>> > <#55>, or mute the
thread
> >>> > <https://github.com/notifications/unsubscribe-auth/
> >>> AHIM5imeFjSCwP9OTFNboacyG3CZRCMhks5tkI_mgaJpZM4TCwfP>
> >>> > .
> >>> >
> >>>
> >>> —
> >>> You are receiving this because you authored the thread.
> >>> Reply to this email directly, view it on GitHub
> >>> <#55 (comment)-
377772947
> >,
> >>> or mute the thread
> >>> <
> https://github.com/notifications/unsubscribe-auth/
AkNvqC4o7ydUWihDKmFpMyh4AgNIFBnDks5tkJavgaJpZM4TCwfP
> >
> >>> .
> >>>
> >>
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHIM5rAdt-L4-
cc3SLMzEr3nkCHH7p-sks5tkK0ggaJpZM4TCwfP>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqDRszB-rK9xs4A6jC1zxDXcI91XVks5tkK53gaJpZM4TCwfP>
.
|
Follow this youtube link to install Arduinojson. do the same for websocket it's not that complicated. |
I haven't programmed since college....35 years...thanks...I will try
…On Sun, Apr 1, 2018, 15:32 Aruna Tennakoon ***@***.***> wrote:
Follow this youtube link to install Arduinojson.
https://www.youtube.com/watch?v=GUTpaY1YaXo
do the same for websocket
it's not that complicated.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP>
.
|
websocketsclient.h is not a zip file to be uploaded into the library.
It is a page of code. So how do you get it into your library? The
arduino.json was easy because it was already in my library.
thanks
…On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon ***@***.***> wrote:
Follow this youtube link to install Arduinojson.
https://www.youtube.com/watch?v=GUTpaY1YaXo
do the same for websocket
it's not that complicated.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP>
.
|
I managed to put websocketsclient.h and the json onto the sketch. It
compiled with no errors.
Where can I give a name to the switch? For example, if I want to call it
"relay" or "wemosrelay"
In the other code, I was able to give it a name.
thanks
…On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***> wrote:
websocketsclient.h is not a zip file to be uploaded into the library.
It is a page of code. So how do you get it into your library? The
arduino.json was easy because it was already in my library.
thanks
On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon ***@***.***>
wrote:
> Follow this youtube link to install Arduinojson.
> https://www.youtube.com/watch?v=GUTpaY1YaXo
>
> do the same for websocket
>
> it's not that complicated.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP>
> .
>
|
in the serial print it started printing
[MAIN] Free heap: 45088 bytes
over and over and over...continuously....but at least it is talking to the
serial print
…On Sun, Apr 1, 2018 at 4:16 PM, mark rosenberg ***@***.***> wrote:
I managed to put websocketsclient.h and the json onto the sketch. It
compiled with no errors.
Where can I give a name to the switch? For example, if I want to call it
"relay" or "wemosrelay"
In the other code, I was able to give it a name.
thanks
On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***>
wrote:
> websocketsclient.h is not a zip file to be uploaded into the
> library. It is a page of code. So how do you get it into your library?
> The arduino.json was easy because it was already in my library.
>
> thanks
>
> On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon ***@***.***
> > wrote:
>
>> Follow this youtube link to install Arduinojson.
>> https://www.youtube.com/watch?v=GUTpaY1YaXo
>>
>> do the same for websocket
>>
>> it's not that complicated.
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#55 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP>
>> .
>>
>
>
|
Goto sinric.com
Create an account
Create a device inside Sinric. There you can give a device name
Copy the API key in the dashboard.
Paste the API key in the arduino sketch. Flash
Install the Srinric smart home skill using Alexa app
Link the skill using above created account
Then you can use turn on / off device name commands
Step by step instructions also on sinric.com home page
…On Sun, Apr 1, 2018 at 8:16 PM 4x1ks ***@***.***> wrote:
I managed to put websocketsclient.h and the json onto the sketch. It
compiled with no errors.
Where can I give a name to the switch? For example, if I want to call it
"relay" or "wemosrelay"
In the other code, I was able to give it a name.
thanks
On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***>
wrote:
> websocketsclient.h is not a zip file to be uploaded into the library.
> It is a page of code. So how do you get it into your library? The
> arduino.json was easy because it was already in my library.
>
> thanks
>
> On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon <
***@***.***>
> wrote:
>
>> Follow this youtube link to install Arduinojson.
>> https://www.youtube.com/watch?v=GUTpaY1YaXo
>>
>> do the same for websocket
>>
>> it's not that complicated.
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#55 (comment)>,
>> or mute the thread
>> <
https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
>
>> .
>>
>
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5prm7Mz9JsyB0EMvZGUGWD_NPBASks5tkNMggaJpZM4TCwfP>
.
|
ok...you're a genius. The commands are showing up in the serial print. on
and off...
but....how do I define the pin that will control the relay? Is there a
line in the code? There must be....
On Sun, Apr 1, 2018 at 4:20 PM, Aruna Tennakoon <notifications@github.com>
wrote:
… Goto sinric.com
Create an account
Create a device inside Sinric. There you can give a device name
Copy the API key in the dashboard.
Paste the API key in the arduino sketch. Flash
Install the Srinric smart home skill using Alexa app
Link the skill using above created account
Then you can use turn on / off device name commands
Step by step instructions also on sinric.com home page
On Sun, Apr 1, 2018 at 8:16 PM 4x1ks ***@***.***> wrote:
> I managed to put websocketsclient.h and the json onto the sketch. It
> compiled with no errors.
>
> Where can I give a name to the switch? For example, if I want to call it
> "relay" or "wemosrelay"
>
> In the other code, I was able to give it a name.
>
> thanks
>
>
> On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***>
> wrote:
>
> > websocketsclient.h is not a zip file to be uploaded into the library.
> > It is a page of code. So how do you get it into your library? The
> > arduino.json was easy because it was already in my library.
> >
> > thanks
> >
> > On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon <
> ***@***.***>
> > wrote:
> >
> >> Follow this youtube link to install Arduinojson.
> >> https://www.youtube.com/watch?v=GUTpaY1YaXo
> >>
> >> do the same for websocket
> >>
> >> it's not that complicated.
> >>
> >> —
> >> You are receiving this because you commented.
> >> Reply to this email directly, view it on GitHub
> >> <#55 (comment)
>,
> >> or mute the thread
> >> <
> https://github.com/notifications/unsubscribe-auth/
AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
> >
> >> .
> >>
> >
> >
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AHIM5prm7Mz9JsyB0EMvZGUGWD_NPBASks5tkNMggaJpZM4TCwfP>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqOv9l2GugQwEA6IapoX1evklgJCIks5tkNQzgaJpZM4TCwfP>
.
|
i think I need the "set power state" code...there is sample code at amazon,
but can I use that?
…On Sun, Apr 1, 2018 at 4:42 PM, mark rosenberg ***@***.***> wrote:
ok...you're a genius. The commands are showing up in the serial print.
on and off...
but....how do I define the pin that will control the relay? Is there a
line in the code? There must be....
On Sun, Apr 1, 2018 at 4:20 PM, Aruna Tennakoon ***@***.***>
wrote:
> Goto sinric.com
>
> Create an account
>
> Create a device inside Sinric. There you can give a device name
>
> Copy the API key in the dashboard.
>
> Paste the API key in the arduino sketch. Flash
>
> Install the Srinric smart home skill using Alexa app
>
> Link the skill using above created account
>
> Then you can use turn on / off device name commands
>
> Step by step instructions also on sinric.com home page
>
>
> On Sun, Apr 1, 2018 at 8:16 PM 4x1ks ***@***.***> wrote:
>
> > I managed to put websocketsclient.h and the json onto the sketch. It
> > compiled with no errors.
> >
> > Where can I give a name to the switch? For example, if I want to call it
> > "relay" or "wemosrelay"
> >
> > In the other code, I was able to give it a name.
> >
> > thanks
> >
> >
> > On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***>
> > wrote:
> >
> > > websocketsclient.h is not a zip file to be uploaded into the library.
> > > It is a page of code. So how do you get it into your library? The
> > > arduino.json was easy because it was already in my library.
> > >
> > > thanks
> > >
> > > On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon <
> > ***@***.***>
> > > wrote:
> > >
> > >> Follow this youtube link to install Arduinojson.
> > >> https://www.youtube.com/watch?v=GUTpaY1YaXo
> > >>
> > >> do the same for websocket
> > >>
> > >> it's not that complicated.
> > >>
> > >> —
> > >> You are receiving this because you commented.
> > >> Reply to this email directly, view it on GitHub
> > >> <#55 (comment)-
> 377783655>,
> > >> or mute the thread
> > >> <
> > https://github.com/notifications/unsubscribe-auth/AkNvqClqTH
> aYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
> > >
> > >> .
> > >>
> > >
> > >
> >
> > —
> > You are receiving this because you commented.
> >
> >
> > Reply to this email directly, view it on GitHub
> > <#55 (comment)>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/AHIM5prm7
> Mz9JsyB0EMvZGUGWD_NPBASks5tkNMggaJpZM4TCwfP>
>
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AkNvqOv9l2GugQwEA6IapoX1evklgJCIks5tkNQzgaJpZM4TCwfP>
> .
>
|
Learn to turn on / off relay in another sketch.
There are lots of examples already on internet.
Then you can copy the code to sinric that will be easy .
Be careful when you are playing with high voltage
…On Sun, Apr 1, 2018 at 8:42 PM 4x1ks ***@***.***> wrote:
ok...you're a genius. The commands are showing up in the serial print. on
and off...
but....how do I define the pin that will control the relay? Is there a
line in the code? There must be....
On Sun, Apr 1, 2018 at 4:20 PM, Aruna Tennakoon ***@***.***>
wrote:
> Goto sinric.com
>
> Create an account
>
> Create a device inside Sinric. There you can give a device name
>
> Copy the API key in the dashboard.
>
> Paste the API key in the arduino sketch. Flash
>
> Install the Srinric smart home skill using Alexa app
>
> Link the skill using above created account
>
> Then you can use turn on / off device name commands
>
> Step by step instructions also on sinric.com home page
>
>
> On Sun, Apr 1, 2018 at 8:16 PM 4x1ks ***@***.***> wrote:
>
> > I managed to put websocketsclient.h and the json onto the sketch. It
> > compiled with no errors.
> >
> > Where can I give a name to the switch? For example, if I want to call
it
> > "relay" or "wemosrelay"
> >
> > In the other code, I was able to give it a name.
> >
> > thanks
> >
> >
> > On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***>
> > wrote:
> >
> > > websocketsclient.h is not a zip file to be uploaded into the library.
> > > It is a page of code. So how do you get it into your library? The
> > > arduino.json was easy because it was already in my library.
> > >
> > > thanks
> > >
> > > On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon <
> > ***@***.***>
> > > wrote:
> > >
> > >> Follow this youtube link to install Arduinojson.
> > >> https://www.youtube.com/watch?v=GUTpaY1YaXo
> > >>
> > >> do the same for websocket
> > >>
> > >> it's not that complicated.
> > >>
> > >> —
> > >> You are receiving this because you commented.
> > >> Reply to this email directly, view it on GitHub
> > >> <
#55 (comment)
> >,
> > >> or mute the thread
> > >> <
> > https://github.com/notifications/unsubscribe-auth/
> AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
> > >
> > >> .
> > >>
> > >
> > >
> >
> > —
> > You are receiving this because you commented.
> >
> >
> > Reply to this email directly, view it on GitHub
> > <#55 (comment)
>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AHIM5prm7Mz9JsyB0EMvZGUGWD_NPBASks5tkNMggaJpZM4TCwfP>
>
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AkNvqOv9l2GugQwEA6IapoX1evklgJCIks5tkNQzgaJpZM4TCwfP
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5p76jAT3ewgTcYGqAhB-Zpe18xYEks5tkNlJgaJpZM4TCwfP>
.
|
when you say " Then you can copy the code to sinric that will be easy ."
you mean copy the code into the sketch? There is no way to copy the code
to sinric ..you must mean to write it into the sketch, yes?
I think I am very close to having it work now.
are you referring to the code that is at:
developer.amazon.com/docs/device-apis/alexa-powercontroller.html ??
On Sun, Apr 1, 2018 at 4:47 PM, Aruna Tennakoon <notifications@github.com>
wrote:
… Learn to turn on / off relay in another sketch.
There are lots of examples already on internet.
Then you can copy the code to sinric that will be easy .
Be careful when you are playing with high voltage
On Sun, Apr 1, 2018 at 8:42 PM 4x1ks ***@***.***> wrote:
> ok...you're a genius. The commands are showing up in the serial print. on
> and off...
>
> but....how do I define the pin that will control the relay? Is there a
> line in the code? There must be....
>
> On Sun, Apr 1, 2018 at 4:20 PM, Aruna Tennakoon <
***@***.***>
> wrote:
>
> > Goto sinric.com
> >
> > Create an account
> >
> > Create a device inside Sinric. There you can give a device name
> >
> > Copy the API key in the dashboard.
> >
> > Paste the API key in the arduino sketch. Flash
> >
> > Install the Srinric smart home skill using Alexa app
> >
> > Link the skill using above created account
> >
> > Then you can use turn on / off device name commands
> >
> > Step by step instructions also on sinric.com home page
> >
> >
> > On Sun, Apr 1, 2018 at 8:16 PM 4x1ks ***@***.***> wrote:
> >
> > > I managed to put websocketsclient.h and the json onto the sketch. It
> > > compiled with no errors.
> > >
> > > Where can I give a name to the switch? For example, if I want to call
> it
> > > "relay" or "wemosrelay"
> > >
> > > In the other code, I was able to give it a name.
> > >
> > > thanks
> > >
> > >
> > > On Sun, Apr 1, 2018 at 3:49 PM, mark rosenberg ***@***.***
>
> > > wrote:
> > >
> > > > websocketsclient.h is not a zip file to be uploaded into the
library.
> > > > It is a page of code. So how do you get it into your library? The
> > > > arduino.json was easy because it was already in my library.
> > > >
> > > > thanks
> > > >
> > > > On Sun, Apr 1, 2018 at 3:32 PM, Aruna Tennakoon <
> > > ***@***.***>
> > > > wrote:
> > > >
> > > >> Follow this youtube link to install Arduinojson.
> > > >> https://www.youtube.com/watch?v=GUTpaY1YaXo
> > > >>
> > > >> do the same for websocket
> > > >>
> > > >> it's not that complicated.
> > > >>
> > > >> —
> > > >> You are receiving this because you commented.
> > > >> Reply to this email directly, view it on GitHub
> > > >> <
> #55 (comment)
> > >,
> > > >> or mute the thread
> > > >> <
> > > https://github.com/notifications/unsubscribe-auth/
> > AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
> > > >
> > > >> .
> > > >>
> > > >
> > > >
> > >
> > > —
> > > You are receiving this because you commented.
> > >
> > >
> > > Reply to this email directly, view it on GitHub
> > > <#55 (comment)-
377786153
> >,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > AHIM5prm7Mz9JsyB0EMvZGUGWD_NPBASks5tkNMggaJpZM4TCwfP>
> >
> > > .
> > >
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <#55 (comment)
>,
> > or mute the thread
> > <
> https://github.com/notifications/unsubscribe-auth/
AkNvqOv9l2GugQwEA6IapoX1evklgJCIks5tkNQzgaJpZM4TCwfP
> >
> > .
> >
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-
auth/AHIM5p76jAT3ewgTcYGqAhB-Zpe18xYEks5tkNlJgaJpZM4TCwfP>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqPo_DH7u_YMLLOwPL5fGa_XA9165ks5tkNpygaJpZM4TCwfP>
.
|
these are the error messages I got from the code I copied from Amazon's
website on power setting. Do these error codes make sense to you?
…_________________________________________________________________________________________________________________
Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M
SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
C:\Users\Radio Room\Desktop\sinric_sketch1\sinric_sketch1.ino: In function
'void webSocketEvent(WStype_t, uint8_t*, size_t)':
sinric_sketch1:81: error: expected ';' before ':' token
"directive": {
^
sinric_sketch1:258: error: expected '}' at end of input
}
^
sinric_sketch1:258: error: expected '}' at end of input
sinric_sketch1:258: error: expected '}' at end of input
sinric_sketch1:258: error: expected '}' at end of input
exit status 1
expected ';' before ':' token
__________________________________________________
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
On Sun, Apr 1, 2018 at 3:33 PM, mark rosenberg ***@***.***> wrote:
I haven't programmed since college....35 years...thanks...I will try
On Sun, Apr 1, 2018, 15:32 Aruna Tennakoon ***@***.***>
wrote:
> Follow this youtube link to install Arduinojson.
> https://www.youtube.com/watch?v=GUTpaY1YaXo
>
> do the same for websocket
>
> it's not that complicated.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP>
> .
>
|
What I meant was to learn to ten on off relay first and then copy that code
inside sinric sketch
Error seems to be related to a missing ;
…On Sun, Apr 1, 2018 at 9:09 PM 4x1ks ***@***.***> wrote:
these are the error messages I got from the code I copied from Amazon's
website on power setting. Do these error codes make sense to you?
_________________________________________________________________________________________________________________
Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M
SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
C:\Users\Radio Room\Desktop\sinric_sketch1\sinric_sketch1.ino: In function
'void webSocketEvent(WStype_t, uint8_t*, size_t)':
sinric_sketch1:81: error: expected ';' before ':' token
"directive": {
^
sinric_sketch1:258: error: expected '}' at end of input
}
^
sinric_sketch1:258: error: expected '}' at end of input
sinric_sketch1:258: error: expected '}' at end of input
sinric_sketch1:258: error: expected '}' at end of input
exit status 1
expected ';' before ':' token
__________________________________________________
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
On Sun, Apr 1, 2018 at 3:33 PM, mark rosenberg ***@***.***>
wrote:
> I haven't programmed since college....35 years...thanks...I will try
>
> On Sun, Apr 1, 2018, 15:32 Aruna Tennakoon ***@***.***>
> wrote:
>
>> Follow this youtube link to install Arduinojson.
>> https://www.youtube.com/watch?v=GUTpaY1YaXo
>>
>> do the same for websocket
>>
>> it's not that complicated.
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#55 (comment)>,
>> or mute the thread
>> <
https://github.com/notifications/unsubscribe-auth/AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
>
>> .
>>
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5sWAhgxRKSQ5B-1j-sbdVVhgZjpSks5tkN-XgaJpZM4TCwfP>
.
|
good morning
So I went to the site:
// https://developer.amazon.com/docs/device-apis/alexa-powercontroller.html
still not sure how to integrate that code into the existing sketch to make
it work.
I noticed in my sketch that it DOES communicate between alexa and sinric,
by listing the commands on the serial print.
In the github example that I am using, there is a line that says:
// {"deviceId": xxxx, "action": "setPowerState", value: "ON"}
this is a comment line, but
obviously I must fill in xxxx, "action" : setPowerState", value: "ON"
......these variables must be linked somehow to the 4 on / off examples
that are on the
amazon developer site....I can't figure out how to do that.
I also did not find any other on/off sketches for sinric that look like
they will work with the existing sketch.
Any help is greatly appreciated. I've gotten close to making it work now
that Alexa is identifying voice commands, but obviously that is not enough
to get the d1 mini to trigger the relay.
thanks
Mark
On Sun, Apr 1, 2018 at 5:32 PM, Aruna Tennakoon <notifications@github.com>
wrote:
… What I meant was to learn to ten on off relay first and then copy that code
inside sinric sketch
Error seems to be related to a missing ;
On Sun, Apr 1, 2018 at 9:09 PM 4x1ks ***@***.***> wrote:
> these are the error messages I got from the code I copied from Amazon's
> website on power setting. Do these error codes make sense to you?
>
>
> ____________________________________________________________
_____________________________________________________
>
> Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M
> SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
>
> C:\Users\Radio Room\Desktop\sinric_sketch1\sinric_sketch1.ino: In
function
> 'void webSocketEvent(WStype_t, uint8_t*, size_t)':
>
> sinric_sketch1:81: error: expected ';' before ':' token
>
> "directive": {
>
> ^
>
> sinric_sketch1:258: error: expected '}' at end of input
>
> }
>
> ^
>
> sinric_sketch1:258: error: expected '}' at end of input
>
> sinric_sketch1:258: error: expected '}' at end of input
>
> sinric_sketch1:258: error: expected '}' at end of input
>
> exit status 1
> expected ';' before ':' token
>
> __________________________________________________
>
> This report would have more information with
> "Show verbose output during compilation"
> option enabled in File -> Preferences.
>
>
> On Sun, Apr 1, 2018 at 3:33 PM, mark rosenberg ***@***.***>
> wrote:
>
> > I haven't programmed since college....35 years...thanks...I will try
> >
> > On Sun, Apr 1, 2018, 15:32 Aruna Tennakoon ***@***.***>
> > wrote:
> >
> >> Follow this youtube link to install Arduinojson.
> >> https://www.youtube.com/watch?v=GUTpaY1YaXo
> >>
> >> do the same for websocket
> >>
> >> it's not that complicated.
> >>
> >> —
> >> You are receiving this because you commented.
> >> Reply to this email directly, view it on GitHub
> >> <#55 (comment)
>,
> >> or mute the thread
> >> <
> https://github.com/notifications/unsubscribe-auth/
AkNvqClqTHaYcwRczSXcNr8cIs0lAxXUks5tkMjTgaJpZM4TCwfP
> >
> >> .
> >>
> >
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#55 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHIM5sWAhgxRKSQ5B-1j-
sbdVVhgZjpSks5tkN-XgaJpZM4TCwfP>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqCM37_KqQOUhreyGogAqei-MgONjks5tkOT4gaJpZM4TCwfP>
.
|
Hello // {"deviceId": xxxx, "action": "setPowerState", value: "ON"} xxx here is the device id displayed in your dashboard. device id is used to identify which device is this command related to when you have multiple smart home devices. if (deviceId == "5axxxxxxxxxxxxxxxxxxx") // <--- copy device id from the dashboard and paste here |
hello:
1: do I need to add the device id number in place of xxxx ...and also
uncomment the line? right now the line has // in front of it and no
numerical device id in place of xxxx
2. I added the following 3 lines...to see if this would solve the problem
#define MYPIN D4
then I also added in the turn device on routine
digitalWrite(MYPIN, HIGH);
and then in the turn device off routine I added
digitalWrite(MYPIN, LOW);
This did not help. There is still no response form pin d4 on the arduino
…On Mon, Apr 2, 2018 at 9:45 AM, Aruna Tennakoon ***@***.***> wrote:
Hello
// {"deviceId": xxxx, "action": "setPowerState", value: "ON"}
xxx here is the device id displayed in your dashboard. device id is used
to identify which device is this command related to when you have multiple
smart home devices.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqFk7KzLZsZ24Hh6jEjTKzAZvXL9hks5tkckEgaJpZM4TCwfP>
.
|
if (deviceId == "your device id from dashboard")
void setup(){ |
It is working!!!!!! Thanks....I will send you chocolate!
…On Mon, Apr 2, 2018, 12:35 Aruna Tennakoon ***@***.***> wrote:
1.
if (deviceId == "your device id from dashboard")
{
Serial.print("Turn off Device ID: ");
Serial.println(deviceId);
}
1. In the setup you have to set the pinmode
void setup(){
pinMode(MYPIN, OUTPUT);
.....
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqNo0X_-zj6PoisWddpT3z7YphY0Qks5tkfDwgaJpZM4TCwfP>
.
|
still waiting .. |
Yes...it works just great! Thanks. If you tell me how to mail it..then I
will send you chocolate!
Next I am going to add more features to the sketch...
…On Wed, Apr 4, 2018, 05:53 Aruna Tennakoon ***@***.***> wrote:
still waiting ..
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqMHoxYA7P8tB17B408HqCvRVQTLPks5tlDWcgaJpZM4TCwfP>
.
|
becareful when you are working with high voltage. don't burn your house down I am planning to make a bigger's video this weekend |
I am a ham radio operator and welder.....I deal with high voltages
often....thanks!
On Apr 5, 2018 5:46 AM, "Aruna Tennakoon" <notifications@github.com> wrote:
becareful when you are working with high voltage. don't burn your house down
https://paypal.me/arunat
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqL8t3EwjinibdRjmHbJ5MHUSaC5Iks5tlYWOgaJpZM4TCwfP>
.
|
4x1ks I'm also a Noob trying to get this working with a relay shield. Any chance you could post your working .ino code please? I'm also confused about this device id, the TODO says "MyApiKey", "MySSID" & "MyWifiPassword", it don't mention I have to get a deviceId? |
To get a device Id you have to signup at https://sinric.com and create a
smart home device. Once you create a device dashboard will show device id. Copy that id and modify the if statment in Arduino sketch.
I have updated the switch example as well. Thanks
…On Thu, Apr 5, 2018 at 4:10 PM Gary Littlemore ***@***.***> wrote:
4x1ks I'm also a Noob trying to get this working with a relay shield. Any
chance you could post your working .ino code please?
I'm also confused about this device id, the TODO says "MyApiKey", "MySSID"
& "MyWifiPassword", it don't mention I have to get a deviceId?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIM5hv8gxEsW_gM3R5phg4SG455vI-Xks5tld-KgaJpZM4TCwfP>
.
|
Thanks for that, I've found it. maybe the code needs to have the "// TODO" on it. Just need the relay code now ;-) |
Where in the .ino code should the relay code be placed? Line number? void setup(){ |
in setup function you have to set the pinMode. then change to high or low to turn on / off https://arduinobasics.blogspot.com/2014/09/relay-module.html |
Thanks, I don't really understand that. I'm not a coder. I've been trying to follow along watching videos and replicating. Hopefully 4x1ks will be able to post their code. Don't worry I'm not doing the wiring with high voltage, a friend will be helping me there. |
Hey Gary
Send me your email...I will get back to you.
Mark 4x1ks
…On Thu, Apr 5, 2018, 13:02 Gary Littlemore ***@***.***> wrote:
Thanks I don't really understand that, I'm not a coder. I've been trying
to follow along watching videos and replicating. Hopefully 4x1ks will be
able to post their code. Don't worry I'm not doing the wiring with high
voltage, a friend will be helping me there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkNvqCrym-Et39-fuNou7-DY58VP3Xyrks5tlevDgaJpZM4TCwfP>
.
|
gary (dot) littlemore (at) btinternet (dot) com Thanks Mark |
Hi Machan kakopappa , Thanks for the wonderful work .. i am planing to flash my LinkNode R4 to work with alexa (https://www.amazon.com/LinkNode-R4-controller-4-Channel-Module/dp/B01FUC9U58/ref=cm_cr_arp_d_product_top?ie=UTF8) and found out your old code .. (https://github.com/CharlesJGantt/LinkNode-R4-Controlled-By-Amazon-Alexa/tree/master) .. My question is .. is there a way i can include sinric to this code ?? or do i need to change entire libraries and codes ? |
I think old method still can be used but unrealiable. It used to emulate a Belkin WeMos switch. Sometimes it work sometimes not. If you do not have access to Sinric Skill you have to use the old method. |
Exactly the old method sometimes it working sometime don't .. planing to flash my LinkNode with new code .. is there any link to know how to add Sinric to the old code ?? |
First of all Thanks for creating the library and all the time you've spent trying to help all of us newbies. I've spent the better part of two days trying to get my D1 mini to work with Alexa. I'm very close. As you can see from the screen shot of the serial monitor the sketch works. If I press test on Sinric, or power on with Alexa it registers on the Com. Great! The problem is that it does NOT turn on the relay. I've tried the relay on numerous pins (changing the pin assignment in the program) with no change in the result. I've tried numerous boards (right now I'm using WeMos D1 R1, but I've tried the generic board as well. Still won't trigger the relay. I've tried different program with the same result. I've tested the D1 with a blink program - works. Tried different relays with the same result. Any advice ESP8266WiFiMulti WiFiMulti; #define MyApiKey "f0e87a67-bcca-469e-b593-3a2882e60ca3" // TODO: Change to your sinric API Key. Your API Key is displayed on sinric.com dashboard #define HEARTBEAT_INTERVAL 300000 // 5 Minutes const int relayPin = 5; uint64_t heartbeatTimestamp = 0; void setPowerStateOnServer(String deviceId, String value); // deviceId is the ID assgined to your smart-home-device in sinric.com dashboard. Copy it from dashboard and paste it here void turnOn(String deviceId) { void turnOff(String deviceId) {
} void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
#if ARDUINOJSON_VERSION_MAJOR == 5
} void setup() { // Relay PIN eg: https://github.com/wemos/D1_mini_Examples/blob/master/examples/04.Shields/Relay_Shield/Blink/Blink.ino WiFiMulti.addAP(MySSID, MyWifiPassword); // Waiting for Wifi connect // server address, port and URL // event handler // try again every 5000ms if connection has failed void loop() { if(isConnected) {
} // If you are going to use a push button to on/off the switch manually, use this function to update the status on the server // Call ONLY If status changed. DO NOT CALL THIS IN loop() and overload the server. webSocket.sendTXT(databuf); //eg: setPowerStateOnServer("deviceid", "CELSIUS", "25.0") // Call ONLY If status changed. DO NOT CALL THIS IN loop() and overload the server. #if ARDUINOJSON_VERSION_MAJOR == 5 StreamString databuf; webSocket.sendTXT(databuf); |
Okay, A day later I have solved my problem. As always it was a series of problems. The first was making sure I had the proper drivers downloaded. Then it was testing all my USB cables until I found one that worked and the computer recognized the port. That was a biggie. But still couldn't get the program to work. Alexa would turn on and off the device. You could see the BLUE LED come on when Alexa turned it on, and turn off when Alexa turned it off.... so close. then after searching more on the internet the final piece fell in place. As is the usual case I had the relay powered from the VCC. I checked it with a volt meter and it was getting 4.75. But the relay would not trigger. Finally I read someone suggested trying using the 3.3V output on the board. I was not convinced as my experience is that voltage is too low to trigger the relay, but low and behold it worked! So If your getting everything but the relay working, change to 3.3v. It will work. Hope this helps. |
Newbie alert...I have an arduino d1 mini. I added the sinric skill to alexa smart home. I uploaded code to turn the BUILTIN_LED on and off. The mini shows up on my wifi. The alexa app finds my device "bigrelay."
When I ask Alexa to turn on or off the device, she says "ok" but nothing happens. The LED does not change state.
I think my code is ok, it isn't mine..I copied it. I also tried the code to control 5v to a pin to a relay and this also did not work. I'm thinking that it isn't the code, it is the Alexa / Wemos connection.
Any help is appreciated very much.
Mark
The text was updated successfully, but these errors were encountered: