Comments (6)
That almost works. You need to add a condition around the SetBinaryState, e.g.
if(request.indexOf("SetBinaryState") >= 0) {
if(request.indexOf("<BinaryState>1</BinaryState>") >= 0) {
Serial.println("Got Turn on request");
turnOnRelay();
}
if(request.indexOf("<BinaryState>0</BinaryState>") >= 0) {
Serial.println("Got Turn off request");
turnOffRelay();
}
}
Also, although the code works, sendRelayState() should use u:GetBinaryStateResponse tag, not u:SetBinaryStateResponse tag.
You don't need the trailing "\r\n" in the GetBinaryStateResponse.
I am not sure why my attempts to implement this failed!
from arduino-esp8266-alexa-multiple-wemo-switch.
Can you check this and verify on your gen 2, please?
https://gist.github.com/kakopappa/02299a8ceec0aaaad3ea3bd7f2af8066
diff:
https://gist.github.com/kakopappa/02299a8ceec0aaaad3ea3bd7f2af8066/revisions
If it working for you. I will retest on my eco and update the project.
Thanks a lot
from arduino-esp8266-alexa-multiple-wemo-switch.
https://gist.github.com/kakopappa/02299a8ceec0aaaad3ea3bd7f2af8066
can you give this a try and let me know.
from arduino-esp8266-alexa-multiple-wemo-switch.
Sorry for delay - two of my ESP8266 modules died! The code works but I had to make some changes for my device:
const int relayPin = D1; //D1 is not recognised as a constant by most ESP8266 boards in Arduino. Suggest using universal constant
connectWifi() does not connect to wifi. I used WiFiManager to get it working. I don't know why your code does not work for me. (Yes I did set SSID / password!)
from arduino-esp8266-alexa-multiple-wemo-switch.
Hi all.
@kakopappa, thank's for the great work.
The above code works wonderful on my new Amazon Dot V2 with actual Firmware 595459620.
My Nodemcu was found at once, you don't need the Wemo-Skill!!!
@riban-bw
you have to increase the wait time of 5 seconds in connectWifi() to about 10 or more seconds.
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
if (i > 20){ //--------------------increase to your needs
state = false;
break;
}
i++;
}
from arduino-esp8266-alexa-multiple-wemo-switch.
thanks, code updated.
from arduino-esp8266-alexa-multiple-wemo-switch.
Related Issues (20)
- How do you integrate mqtt for home assistant?
- Alexa and Synric Not Binding
- Echo Dot Gen 3 Compability HOT 13
- WiFiUDP.h: No such file or directory
- Analog values? HOT 2
- Help with multiple RCSwtich.h devices?
- How to change invocation word? Instead of " turn on" HOT 2
- No such file or directory HOT 2
- Connection problem between ESP3266 and alexa on amazon Echo HOT 6
- Not an Issue But a question HOT 5
- 3-way switch
- I can't use your Alexa skill for this project. When I ask Alexa to discover I get the following. HOT 5
- I am working on my NodeMCU v2 ESP 12-E module but every so often I get an Exception and the NodeMCU crashes. The stack is attached below HOT 1
- how to resolve this issue
- Add a push button to manually turn on/off the lights HOT 2
- Emulated wemos devices unresponsive in Alexa HOT 1
- Could not Compile the code
- Update status to Alexa HOT 1
- can i change invocation phrase? HOT 2
- Question on Alexa status HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-esp8266-alexa-multiple-wemo-switch.