Make your own gradient lightstrip with diyHue

You can create your own hue gradient lightstrip using some components like a board, lightstrip, and a power adapter. The lightstrip supports 7 zones, just like the official Philips Hue Play Gradient Lightstrip. This is to simulate the Philips Hue original. Creating the lightstrip requires soldering and some really advanced steps to flash the board. It is meant for the advanced user who is into a challenge.

Support for this DIY gradient strip is only available in the flask branch of diyHue. This branch is currently under development.

What do I need?

Furthermore, you will need Hue Essentials as the app to run Sync on your Android TV or other devices.

Build the lightstrip

  1. Connect the red/white/green wires of the lightstrip to the board. Connect red to 5V, white to GND, green to RX. You will need to solder the wires to the board. You may use the included pins so you can easily connect and disconnect the board.
  2. Connect the other two red/white wires of the lightstrip to the 5V power adapter. Connect red (+) to red, white (-) to white.

This is what the result looks like:

Flash the board

  1. Install and open Arduino IDE on your PC or Mac

  2. Go to Preferences, add the following URL to Additional Boards Manager URLs, and tap OK:

    https://arduino.esp8266.com/stable/package_esp8266com_index.json
    
  3. Now go to Tools, and tap Manage libraries

  4. Install WiFiManager by tzapu,tablatronix (GitHub)

  5. Install ArduinoJson by Benolt Blanchon (GitHub)

  6. Go to Tools, tap Board: …, and tap Boards Manager

  7. Install esp8266 by ESP8266 Community (GitHub)

  8. Download the Gradient_Strip_WS2812 sketch from diyHue (open the link, on that page right click Raw, and click Save Link As).

  9. In the Arduino IDE, tap File, tap Open, and select the downloaded .ino file.

  10. Remove your board from power and the lightstrip. Then connect it to your PC or Mac using the USB port

  11. In the Arduino IDE, go to Tools and change the following settings:

    • Tap Board: …, tap ESP8266 Boards (…), and select your board. In our case it is the LOLIN(WEMOS) D1 R2 & mini
    • Set Erase Flash to All Flash Contents
    • Set Port to the port you connected your board (if you connected your board through usb, then select the port with usb in the name)
  12. Go to Sketch, and tap Upload

  13. Wait until the flashing was successful

If you are using a Mac and get the following error:

pyserial or esptool directories not found next to this upload.py tool

Then follow this workaround:

Workaround
  1. Open the file ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py
  2. Replace line 29 and 30 with the following:
iokit = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/IOKit.framework/IOKit')
cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation')
  1. Save the file, restart Arduino IDE, and try again.

See also comment #3 at PySerial and EspTools Directory Error

Configure the lightstrip

  1. Remove the controller from your PC or Mac and connect your lightstrip and power adapter to the controller
  2. On your phone, connect to the WiFi network that is created by the controller
  3. Open a web browser on your phone, and go to 192.168.4.1
  4. On the web page, connect the controller to your WiFi network
  5. The controller and your phone should now both reconnect to your WiFi network
  6. Open a web browser, and go to the IP address of your controller.
  7. Go to Preferences and configure the Pixel count. This is the amount of LEDs (pixels) your lightstrip has. For example, when you use a lightstrip with 60 LEDs per meter, and the total length is 5 meters, then you have 60*5=300 pixels.

Install diyHue

Support for the diyHue gradient lightstrip is in beta and is only available in the flask branch at the moment.

See the following how to instal diyHue and follow the additional instructions depending on your installation method below: Getting Started — diyHue 1.0 documentation

When installing diyHue, make sure you install the flask branch. If you are using the Docker installation method, replace diyhue/core:latest with diyhue/core:flask in the command.

Connect the lightstrip to diyHue

  1. Open Hue Essentials and connect it to your diyHue emulator
  2. Go to the Devices tab, tap the + button, tap Light, and select your diyHue emulator
  3. Tap Search for lights in Hue Essentials
  4. Your gradient light strip should appear in Hue Essentials now. If it does not appear, try searching for lights multiple times
  5. Now you can create an entertainment area under the Entertainment tab and start Sync.

Amazon links

As an Amazon Associate I earn from qualifying purchases. The price remains the same for you.

1 Like

Awesome post, I would like to play with it in the near future. Can I use these strips? And…does it also work with 60 led per meter? And…does it also work with panel strips?

This board will also work? I have this one already, somewhere…

€ 0,78 18%OFF | New Wireless module CH340 NodeMcu V3 Lua WIFI Internet of Things development board based ESP8266

The ESP8266 based boards should all work. We used a WS2812B 60 LEDs per meter on 5 meter in our first setup; so, yes Dennis, that works.

1 Like

Cool, thanks Robert!
Then I’ll know what to buy (I guess).

Now I’ll try to find out if I should install a docker container, or just using the addon I’m home Assistant. That would be much nicer, then it will be integrated in my HA environment.

When using the Hassio add-on, make sure you select the flask branch. It should work if you are using the flask branch, but we have not tested it with this Addon yet. In the future the master branch should work when the code has been merged, but I do not know when that will be.

1 Like

Well, one more I was wondering about:
Could it work with WS2812B led panels also, like the picture I send earlier, or only the WS2812B led strip?

Now I need to do a speedcourse soldering and then I’m good to go :roll_eyes:

Yes, possible you may get seven zones but I have no idea how they end up on the led panel as I have not tested it. It may need adjustment in the configuration and in Hue Essentials in the future. The result will not be as good as a led strip at this time.

1 Like

Thank you Thomas.

Then I’ll leave it as it is and will go for the led strip solution. Very curious how that will work out, but as I said…never ever used solder, so I’ll need a speedcourse first :relaxed:

Looking forward to this future diy project!