esphome / esphome-core

🚨 No longer used 🚨 - The C++ framework behind ESPHome
https://esphome.io/
GNU General Public License v3.0
545 stars 114 forks source link

Colour temperature light support? #25

Closed messismore closed 6 years ago

messismore commented 6 years ago

Does the library support colour temperature (= dual channel) lights? Or are there plans to do so?

OttoWinter commented 6 years ago

Yes, I was planning on eventually adding those, but I don't own any hardware for those so I kind of kept away from adding support.

I think it should be relatively easy to do so I could add support for it rather quickly. I'm just wondering how the interface for these color temperature lights usually look like. Do they expose two channels (one for cold white, one for warm white) that you can send PWM signals to? Do these exist together with RGB too, so RGBWW?

messismore commented 6 years ago

From what I understand dimmers expose two channels. I don't own any hardware yet either, but I haven't found dimmers yet that support a pwm input signal. I was hoping to be able to use something like this or that. image_843336_1_720x600

Unfortunately it appears that the only way to control both channels is via DMX and I don't know how much of a headache that is.

messismore commented 6 years ago

Okay it seems that Home Assistant indeed supports setting a colour temperature for RGBWW lights. (See LimitlessLED) Home Assistant expects colour temperatures to be set in Mireds, so I guess esphomelib would need to know the colour of each channel and mix accordingly?

OttoWinter commented 6 years ago

So I did some more digging into this DMX format yesterday and fortunately it's supported by FastLED which I want to add suport for soon (quite a few people seem to be using addressable lights). Then that controller would hopefully also be supported.

About the RGBWW lights: Yes it's true we would need to do some color mixing ourselves, but that probably wouldn't be that big of a problem - looking at the Home Assistant source LimitlessLEDs also don't do nothing more than a bit of mixing.

messismore commented 6 years ago

About the RGBWW lights: Yes it's true we would need to do some color mixing ourselves, but that probably wouldn't be that big of a problem - looking at the Home Assistant source LimitlessLEDs also don't do nothing more than a bit of mixing.

Yeah it's just something to keep in mind since these tuneable white led strips all support different colour ranges. So it's not as simple as to just 'pan' between the two channels, one would also need to know which colour temperature each ratio belongs to.

OttoWinter commented 6 years ago

So I've now implemented support for FastLED, however, support for DMX is going to be quite difficult.

The Arduino library FastLED uses for DMX only works for AVR (so no espressif) devices. I'll maybe try to port that library to esphomelib one day, but tbh it's not that big of a priority for me right now.

messismore commented 6 years ago

That is unfortunate, but understandable. This might be the time for me to finally dabble in C++…

Skaronator commented 6 years ago

Would be cool to see support for RGBWW (aka. RGB+CCT) 5 channel light. I've a few H801 with RGB and CCT LED strips.

messismore commented 6 years ago

Yeah, I finally settled on these. Can't wait to play around with them as soon as they arrive in a couple of weeks. 😄

OttoWinter commented 6 years ago

Done in 1.8.0 :)