probonopd / ESP8266HueEmulator

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

Using RGB power strip #47

Closed iotlearner0level closed 7 years ago

iotlearner0level commented 7 years ago

I've a RGB LED strip with 60 leds. However it is not neopixel compatible. Rather, it has 4 wires, white-positive, Red, Green and blue for negative of those three colours respectively. I've managed to get colour of my choice using esp8266 creating a webserver. This is done by using 3 n-MOSFETS connected to Red, green and blue wires and to ground. Their gate is driven by 3 GPIO pins of the esp8266 using pulse width modulation technique as there is no true analog output from esp8266

But due to lack of knowledge of internet protocols, ssdp and all that, i am unable to follow the example code you gave for lighting the neopixel. To get colour of my choice i only need red, green and blue intensity levels separately as integer values from 0-255.

If i am correct, there is a virtual function in your library for that *lighthandler, but i am unable to get red, green and blue levels there...any help is greatly appreciated.

If i am successful, i will put these strips at strategic locations to get lighting effect according to time of day, music being played and what not. The reason i am trying for hue protocol is that there are so many apps already there to achieve these goals, i only have to make my led strip appear like a hue light bulb. I suppose, that will not be very difficult courtesy to your library as neopixel example you gave achieves this.

Another advantage of using philips hue protocol is that it can be directly connected to the cloud and using services like ifttt.com (please see: https://ifttt.com/hue for examples, if interested) i can very easily achieve something like the following (just a few examples, but very useful at least for me):

fading alarm--light should gradually increase intensity 6.00am-8.00am in morning much like the real thing. alert lights -- if someone is outside my room, the PIR sensor gives a signal and the light should automatically turn somewhat more reddish in colour and increase intensity. fitness tracker alert -- if i do not run according to my goal, the light should turn somewhat more yellowish sleep assistant -- light shold gradually fade according to time and turn orangish in evening time. example like point 3 which depend on different services can be achieved due to support of 3rd party...

probonopd commented 7 years ago

WS2812-type strips are so much easier to work with. No 12 V needed, no MOSFETs needed, just one signal pin to hook up and 5V otherwise. I strongly suggest you to get a WS2812-type strip. They are not much more expensive than normal RGB strips anymore.

iotlearner0level commented 7 years ago

i agree but i want more light output. for higer power, neopixel is costlier.

On Sun, Dec 11, 2016 at 5:24 PM, probonopd notifications@github.com wrote:

WS2812-type strips are so much easier to work with. No 12 V needed, no MOSFETs needed, just one signal pin to hook up and 5V otherwise. I strongly suggest you to get a WS2812-type strip. They are not much more expensive than normal RGB strips anymore.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/probonopd/ESP8266HueEmulator/issues/47#issuecomment-266277793, or mute the thread https://github.com/notifications/unsubscribe-auth/AVsstQlvcbNOXhYDJ9PwjBWS1d9-2nbAks5rG-R_gaJpZM4K8_uF .

probonopd commented 7 years ago

Feel free to send a Pull Request; the feature should not be that hard to do actually...