probonopd / ESP8266HueEmulator

Emulate a Philips Hue bridge running on an ESP8266 using the Arduino IDE.
MIT License
411 stars 93 forks source link

Need help with WS2812 5050 RGB 12-LED Ring #63

Open jdschuitemaker opened 7 years ago

jdschuitemaker commented 7 years ago

I have a WS2812 5050 RGB LED Ring with 12 leds. It is connected to pin D4 (GPIO2) on a WEMOS D1 Mini Pro that is configured as bridge. The HUE app on my iPad finds the HUE bridge emulator and reports 6 Hue Light Strips.

I am not sure how to modify the ESP8266HueEmulator.INO so that it works with this led ring. I have found the NUM_PIXELS_PER_LIGHT and PixelCount defines in the INO, but whatever I set it doesn't change anything on the led ring.

Any suggestions?

probonopd commented 7 years ago

How did you connect + and - of the LED ring?

jdschuitemaker commented 7 years ago

plus and minus are connected to a breadboard power supply.

probonopd commented 7 years ago

5V?

jdschuitemaker commented 7 years ago

Yes, 5V

probonopd commented 7 years ago

You might need a level shifter for the data line, although it always worked for me without one. Check the description of the NeoPixelBus library for more information how to configure the library for different types of LEDs.

jdschuitemaker commented 7 years ago

Okay, thank you. Going to look into that!

DGxInfinitY commented 7 years ago

Same deal here, I am having problems with a generic WS2812B strip with 8 leds the app glitches a lot and I am seeming to have severe disconnect problems, so most changes I make don't get set and the biggest problem is that the LED's literally don't show any other color than this orange color, the Adafruit library would have been better as I have tested it on the esp8266 and it works a treat, everything changes color and it looks very smooth(not choppy). The Led's will only turn on and off and won't dim.

probonopd commented 7 years ago

Try to treat more than 1 pixel as logical pixels. Possibly this reduces the load?

DGxInfinitY commented 7 years ago

Nope nothing working so far, it get detected fine by the app but I've tried everything. I am using a Nodemcu with the esp12e module. It should have enough power to run the ws2812b leds and a webserver. Let me try overclocking real quick and see if I can solve this.

DGxInfinitY commented 7 years ago

2 amp power supply and overclock to 160mhz did not help. Weird connection issues, a lot a garbage in serial monitor and no color change. It is either white or off. brightness doesn't work either.These are just like neopixels but just not made by adafruit. They have worked fine for a long time but only tested with the adafruit library. Is there any way we could try using this library? Like a code rework? I could try and help.

BobbyDD commented 7 years ago

Hi i have the same issue. I can select a LED strip, i can change the light level but i cant change the color. I use a NodeMCU and a Neopixel WS2812b LED strip and i use the official Philips App on android. I hope you can help. Thx Bobby

mariusmotea commented 7 years ago

Same issue for me, cannot change colors with ESP-12E. With Wemos D1 mini pro i can even turn the lights on, i only see led blinking test that confirm the wifi connection, so is not a wiring issue. I have tried to power the leds with 4.2v to be sure the issue is not with the lack of level shifter. I have tried another project that use adafruit library and there where no issues to control the leds on both boards.

BobbyDD commented 7 years ago

Hi,

i use the latest github version from the ESP8266HueEmulator and the App version is Philips Hue 2.8.0 (129).

I can select the 6 strips an i can dim the light, but when i change the color it does nothing. its only white color.

On start from the NODEMCU i can see the red light on all stips and when the wifi is connected it will change to green. I hope this helps

Thanks Bobby

mariusmotea commented 7 years ago

@BobbyDD from what store did you buy your leds? I buy multiple strips from aliexpress, store name is "BTF-LIGHTING Official Store", i also test with multiple ESP-12E, ESP-12F boards, same issue like you. If this code is working for all except us i start to believe the problem is with our leds. Still strange that other projects based on Adafruit library are working fine. Maybe a timing issue?

mariusmotea commented 7 years ago

I believe i found the issue. If i compile the sketch from my Kubuntu laptop, then i'm able to change the colors. From Windows7 desktop PC i found that when i change the colors hue value from getHsb function is always 0. Not sure is this is 100% the fix as there is a big difference from color selected on application and led output, can someone confirm this?

probonopd commented 7 years ago

Interesting @mariusmotea, I have never used Windows for this.

mariusmotea commented 7 years ago

BTW applying krulkip PR to enable DMA mode will work also with Wemos D1 mini pro.

DGxInfinitY commented 7 years ago

I have the issue compiling with Ubuntu 16.04 and elementaryOS

PRO2XY commented 7 years ago

I was having the same issue. The WS2812 LEDs didnt light up at all. Not even for the infoLight animations. I merged the changes as found in the pull request from krulkip, and the LEDs started working. I did have to change the pin to GPIO3 though (which is the UART RX).

https://github.com/probonopd/ESP8266HueEmulator/pull/46/files#diff-0346a027e5c6e72cf3edfe1e2e7876b4

Also, I must mention that I changed the NeoPixelbus strip declaration line to the following to get rid of flicker. NeoPixelBus<NeoGrbFeature, NeoEsp8266Dma800KbpsMethod> strip(pixelCount);