mariusmotea / diyHue

Philips Hue emulator that is able to control multiple types of lights
Other
627 stars 107 forks source link

Support Lixada H801 #4

Closed fireboy1919 closed 7 years ago

fireboy1919 commented 7 years ago

This an ESP8266 four channel relay board.

Here's someone already using it: https://eryk.io/2015/10/esp8266-based-wifi-rgb-controller-h801/

Would be a good one to add in.

mariusmotea commented 7 years ago

But this is partially supported, you only need to know GPIO pins for R,G, B, W outputs. What will not work currently is the bi white function, but if you use regular RGB or RGBW strips then you will not have any issue. Please look at RgbwHueBulb or RgbHueBulb sketches, current GPIO pin setup is correct for ColorDream bulbs. In case a strip is used will be nice to change "bulb" with "strip" in blow code, so application will be detected the light as a Hue Lightstrip, not like a Hue Bulb:

server.on("/detect", []() {
    server.send(200, "text/plain", "{\"hue\": \"bulb\",............

Marius.

mariusmotea commented 7 years ago

From photos i was able to see the esp8266 output pins. for Lixada H801 you must use:

#define red_pin 13
#define green_pin 12
#define blue_pin 14
#define white_pin 15
mariusmotea commented 7 years ago

I close this because there was no feedback and i believe Lixada H801 works with "GenericWifiHueLight" firmware.

fireboy1919 commented 7 years ago

Haven't had a chance to try it out yet, but I'm going to do that. Will let you know.

spants commented 7 years ago

I didnt see this earlier as it was closed. I also worked out the pins and modified the code to work yesterday. I think that there are several things to change: 1) The Pin numbers 2) The device only has 512k memory AFAIK

Results: It works great using HTTP Post - the colours are correct. When using the Hue app, the colours are not correct - there seems to be some mixing of all RGB lights even at strong RED, GREEN or BLUE (the white leds were not on in this case). Using the selector on the HUE app demonstrates this.

mariusmotea commented 7 years ago

There where lot of changes to lights after you opened the issue, now there is support also for RGB_CCT lights like Lixada H801 with Generic_RGB_CCT_Light. The mixing of all RGB colors is most present when using the official Philips Hue application. For example i saw Hue Switcher use also xy CIE color mode but with better color reproduction. I read also on forums that xy values used by Philips Hue application are not so correct and are optimized just for Philips bulbs . Another important thing is the leds performance, i have many ESP8266 bulbs home, but ony MiLight (converted to ESP8266) and Neopixel strips manage to reproduce very well the colors with Philips application. If i will have some time today i will upload an youtube video to see the difference of two bulbs in color reproduction. Your actions to shrink the firmware size are correct, you can also remove webgui html code because is stored on flash. eeprom part can be also removed if you don't use "last state" power mode and configure manually auto on if this is what you need.

mariusmotea commented 7 years ago

or maybe the leds are full on at 50% pwm level. You can try pwm_set_duty((int)(current_rgb_cct[color] * 2), color);

spants commented 7 years ago

I used the latest version the genericRGBW from 13/jul/17 as the strip that I have has only the four channels. I will look at the pwm level - many thanks!