Comments (4)
Hey,
of course that is possible! Follow the basic example or readme on how to create an EspalexaDevice object :)
With that, additional functions are available and you can do something like:
void colorLightChanged(uint8_t brightness, uint32_t rgb)
{
uint16_t hue = colorDevice->getHue();
byte sat = colorDevice->getSat();
uint16_t ct = colorDevice->getCt();
}
Keep in mind that when setting color temperature (white spectrum), Hue and Sat will not be updated.
Also, if hue and sat are updated, ct will default to 500. You can check wheter Hue+Sat or ct are currently valid with colorDevice->isColorTemperatureMode()
from espalexa.
Thank you 😄
If i'm finished i will give you the next example 😉
from espalexa.
I don't understand colorDevice->isColorTemperatureMode()
.
For the first time i change color or ct it is "1", and every next time(s) it is "0", but it doesn't matter it's colored or whited...
[before setup]
uint8_t iscolor1;
[...]
[in setup]
device1 = new EspalexaDevice("Oberschrank rechts", colorLightChanged1, 0);
espalexa.addDevice(device1);
[...]
[after loop]
void colorLightChanged1(uint8_t brightness, uint32_t rgb) {
iscolor1 = device1->isColorTemperatureMode();
Serial.print("iscolor1: "); Serial.println(iscolor1);
// [up to here i want to separate witch 'if']
uint16_t hue = device1->getHue();
byte sat = device1->getSat();
uint16_t ct = device1->getCt();
}
from espalexa.
Aaaargh sorry my failure 😁
what you can't see is the rest of my function in which i play with device1->setValue()
and device1->setColor(hue, sat);
so i haven't to wonder 😜
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.