probonopd / ESP8266HueEmulator

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

More than one NeoPixel per emulated bulb/LightStip #27

Closed probonopd closed 7 years ago

probonopd commented 7 years ago

Let's say I have a 30-LED NeoPixel strip but the sketch can only emulate 6 Hue LightStrips. There should be a constant that can be set to have more than one consecutive NeoPixels treated as one emulated LightStrip. In this example, I would like to set const ledsPerBulb = 5; // treat 5 physical LEDs as one emulated bulb.

Pull requests welcome!

sylvainblot commented 7 years ago

You can change it here : https://github.com/probonopd/ESP8266HueEmulator/blob/master/ESP8266HueEmulator/LightService.h#L36

probonopd commented 7 years ago

What I am looking for is to treat e.g., 5 physical NeoPixels as 1 logical Hue bulb...

2xAA commented 7 years ago

I implemented this in a much older version about a year ago now I think, but never made a PR. The code has changed somewhat since then.

I'll check if I can reimplement this.

probonopd commented 7 years ago

Thanks @2xAA

mtaram commented 7 years ago

I cant seem to control more than 14 LEDS, I increased the buffer to 10240 to check. App gets stuck on connecting on anything over 14.

probonopd commented 7 years ago

@mtaram with (significantly) more than 8 logical pixels we are getting memory issues. But the idea here is to combine more than 1 physical into one logical pixel. In the original Hue system, light strips are treated as one logical pixel.

mtaram commented 7 years ago

I too was thinking towards that, unfortunately couldnt get time to experiment more. Need to read and understand how to treat the entire strip as one LED, I remember reading about it sometime back. Lets see. Will post if I make any progress.

2xAA commented 7 years ago

Hi, sorry for the delay on this. Try my fork, I've added in basically what I had before. https://github.com/2xAA/ESP8266HueEmulator

The code only extends the virtual bulbs to a set number of physical LEDs.

So, I've opted for 10 LEDs per virtual bulb. It worked well for me before when I had some cool shelves and I had 27 LEDs per three bulbs.

(photo of my old bedroom with the old ESP8266HueEmulator code running with my modifications)

mtaram commented 7 years ago

I cloned the new repo, compiled successfully connected to network but the app fails to find the new bridge from my phone. Worked with another phone tho.

Another thing that I noticed is that in lights it shows me 6 pixels n not 3 bulbs (set of 10) and also it takes too long to change colors or doesnt change it.