Closed freddebo closed 6 years ago
Hi,
i made something for you very quick, i don't promise anything but may work directly.
Check this:
https://gist.github.com/mariusmotea/21e5c1dcc6ec3915638e3dd442d86d98
Marius.
Hi Marius, I'm super happy that you are able to provide this!
It almost works!
wwa[light][1] = (bri[light] * percent_cold) / 100;
wwa[light][2] = (bri[light] * percent_warm) / 100;
wwa[light][0] = (bri[light] * percent_amber) / 100;
I realized that the amber color is too week and need to be together with the warm white to become the bright warm white I want. So the thing now is that I would like to use both the amber and the warm white together for the warmest color and still use the warm white as a just "middle" warm white.
I tried mess around a bit with the convert_ct() function but I can't really get it working.
The CT value on hue api is between 153 (cold white) and 500 (warm white). I design the code to balance between cold and warm white between 153 and 400 and from warm white and amber between 400 and 500. I propose to left warm white at 100% percent after 400 and balance just Amber.
Try this:
void convert_ct(uint8_t light) {
uint8 percent_warm;
uint8 percent_cold;
uint8 percent_amber;
if (ct[light] < 400) {
percent_warm = ((ct[light] - 153) * 100) / 247;
percent_cold = 100 - percent_warm;
percent_amber = 0;
} else {
percent_cold = 0;
percent_warm = 100;
percent_amber = 100 - (500 - ct[light]);
}
wwa[light][1] = (bri[light] * percent_cold) / 100;
wwa[light][2] = (bri[light] * percent_warm) / 100;
wwa[light][0] = (bri[light] * percent_amber) / 100;
}
Please share the final code that is working. Marius.
It works much better! Now when I know the ct value range I will fine tune it a bit. It is working but the colors of the Philips hue app and the actual colors differs a bit. Will try to see if I could get it working better!
I found that the group on/off toggle dosen't work, you have to set the brightness as a group or individual on/off to get it started / turned off. Do you think it could be because of the sketch or is it some part of the emulator?
I believe there is an error in the sketch, can you provide more details? Brightness is working but on/off not? If you turn on/off the lights individually it is working?
Group brightness is working but not the group on/off. Individual on/off and brightness is working as it should.
Wired. Are you using Android or iPhone?
Try to delete all light emulated by this strip and add them back with a new light search request.
Any progress here?
Sorry for late reply! It worked fine with group on/off after reinstalling the Hue-app on iPhone. The colors are right now a bit colder in the app-preview but it works great as it is! Will post pictures when I have installed the strip at the correct place!
I'm not familiar with Github but I think I got it right now, the result of the complete code is the #213 pull-request now.
Thank you for your support!
I recently bought a SK6812 WWA (natural White, Warm white and Amber) led strip with 114led/m to get a high brightness as a kitchen light. The WWA strip is not supported by any of the normal libraries but it is just another set of colors. It uses it like this:
Is it possible for you to change the SK6812 RGBW sketch easy to a WWA compatible?