Comments (5)
Figured it out. There is no issue with the fine software in this project. Rather, this turned out to be working around Alexa offerings. In the end, to control a relative device I found it best to always exit the call back routine with a command to set the brightness level to a known value. Say, 128. This way we can assume the command is to increase the brightness if the formal parameter is greater than 128 and decrease the brightness if the formal parameter is less than 128. The exceptions are the command for turning on / off the light. This usually results in a value of 128. But if the user said 100%, the value is set to 255. When the user turns off the light the value is 0.
I can fork the project and add my Lutron code in the Arduino example directory. Then you could pull it back in if you want. I also used this same idea to control the volume of my TV. I can add that example as well.
from espalexa.
That's great! Initially I didn't understand your application but now I get that you wanted to add a device that only supports relative change (brighter/dimmer). Awesome that you found a solution! Feel free to fork the project and add your code, I could add it as an example code to control relative devices!
from espalexa.
I might have bitten off more than I can chew. I did a fork and will try to make a clean example. Right now my code not only controls a Lutron wall switch but also a Samsung TV. I would like to make an example for only the Lutron wall switch. But I am also using the IRremoteESP8266 project to develop the IR pulses necessary to control the Lutron wall switch. So, how common is it to include code from a different project in an example? I'm thinking this isn't so bad as I am using the IRremoteESP8266 project as it - no modifications. Regardless, I'll make an example and let you decide what to do.
from espalexa.
No problem at all! I really appreciate that you put in the time to write an example! Also, I like that you include the IR code, because now we don't only have an example on how to handle relative values, but also how to control IR devices from Espalexa. Thank you!
from espalexa.
Found some time to test the example here: https://github.com/st2000/Espalexa/tree/master/examples/EspalexaRelativeDimmer . Thought it reset when Alexa told it to turn on/off the light. But it is behaving now. So I uploaded it into my fork of your project. As I've never done a fork before, I'm not sure what is next. If you can try the example and let me know if it works for you - that would be great. Other wise I'm not sure what to add. Maybe a picture of the circuit or a schematic? (It is 2 resistors, 1 transistor & 1 IR LED.)
from espalexa.
Related Issues (20)
- Is there anyone that can help? The Espalexa creator? 12 days passed from my post and still no answer. HOT 1
- Exception 0: illegal instruction after espalexa.loop()
- No detection Sonos One
- Alexa can't find my ESP8266 HOT 1
- device is unresponsive HOT 1
- DHT espalexa HOT 2
- Not a real issue: unique callback function HOT 2
- Alexa drops Espalexa after some time HOT 6
- Server is unresponsive after setState
- Asyncwebserver and /espalexa look good, but Echo dot (3rd gen) wont pair. HOT 3
- Alexa can't find the new devices
- Alternatives to this HOT 4
- Multiple ESP8266's, one alexa device HOT 2
- Alexa only discovering the last device and not all HOT 3
- Commands that are delayed or not executed
- Device not discovered
- Set temperature to Fractional value eg 22.5
- [Found and solution proposed] Byte Order Mark in Espalexa.h preventing it to compile in some cases HOT 3
- ESP Alexa
- Avoid that Alexa recognize ESPALEXA as light.
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 espalexa.