xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
2.99k stars 637 forks source link

Support Xiaomi Philips Zhirui Ball Lamp #1009

Open einstweilenhier opened 6 years ago

einstweilenhier commented 6 years ago

I'm referring to this device.

It has a ESP-WROOM-02 module with a ESP8266 and 2M flash. I was initially just going to send a pull request but: The device has an uncommon setup. GPIO15 seems to control overall brightness, and GPIO12 seems to control color temperature, i.e. GPIO12=0% -> light is warmwhite; GPIO12=100% -> light is coldwhite.

As far as I can see, there is currently no light provider that supports a setup like that. For now I have it working with LIGHT_PROVIDER_DIMMER and two channels, but this just gives two [0,255] sliders and no proper readout of brightness and color temperature.

Any guidance on how to best add this kind of device to Espurna?

Sergey-SRG commented 3 years ago

@einstweilenhier If only by analogy like here: https://github.com/Sergey-SRG/ESPHome-Xiaomi-Philips-light