Skip to content
My Account

HomeKit

ESP8266 HomeKit NeoPixel RGBW Light Strip

A warm white RGBW LED strip in the Home app: pick any colour and a real white LED joins in as the colour gets softer. A test setup with an SK6812 strip and an ESP8266.

  • ESP8266
  • HomeKit
  • 3 min read
No ratings yet, be the first.

Most colour LED strips make white light by turning red, green and blue on together. An RGBW strip adds a fourth LED to every pixel, a real white one, so white is no longer a mix. This project puts a strip like that in the Home app: pick any colour, and the white LED joins in when the colour gets softer.

The strip is an SK6812 RGBW with warm white, driven by an ESP8266. It is a test setup, made to see how the colours and the white behave, and how the whole thing behaves as a HomeKit light.

What it does

FeatureDetails
HomeKit light, “RGBW Strip”On and off, brightness, hue and saturation, from the Home app
15 pixelsEach with a red, green, blue and warm white LED
White channelThe lower the saturation, the more the white LED is used. At full saturation it stays off
Long pressHold the button for 4 seconds to reset the WiFi and HomeKit settings
IdentifyThe strip flashes pink, together with the on-board LED
UpdatesOver the air, through Life Cycle Manager 2
No cloudControl stays on your own network

Colour in HomeKit is hue, saturation and brightness. The firmware converts those to red, green, blue and white values for every pixel, using the well-known HSI to RGBW method, with the intensity shaped so that the dim end has finer steps.

Hardware

ComponentNotes
ESP8266 moduleAn Ai-Thinker ESP8266 module of the ESP-12 type. See the ESP8266 pinout
SK6812 RGBW LED stripWarm white, 15 LEDs used. See the NeoPixels guide for how these addressable LEDs work
5 V, 2 A USB power supplyPowers the strip, through a screw terminal
USB-serial (FTDI) adapterFor flashing. Set it to 3.3 V logic
Slide switchChooses between programming and the LED strip
2 push buttonsRESET and PROGRAM
Large electrolytic capacitorNeeded for stable operation
Resistors and a small ceramic capacitorAs drawn

Wiring and pins

The Fritzing diagram at the top of this page shows the whole build on a breadboard, with the pinout of the module in the corner. The strip is powered separately from the 5 V, 2 A supply, and the slide switch decides whether the board is in programming mode or driving the strip. Use an FTDI adapter set to 3.3 V, because a 5 V adapter can damage the module.

FunctionESP8266 pin
ButtonGPIO0, active low
On-board LEDGPIO2
LED stripThe I²S output, through the ws2812_i2s driver

The button of the firmware is on GPIO0, which is also the pin the PROGRAM button pulls low, so that button doubles as the reset button once the strip is running. A short press has no function in this firmware, and there is an empty place in the code where you can add your own.

Flash and install

The installation is the same as for the other ESP8266 HomeKit accessories on this site. The firmware runs on ESP-Open-RTOS with Life Cycle Manager 2, which sets up the WiFi and installs updates over the air. The full steps, from installing esptool to flashing, joining the LCM- WiFi network and pairing, are in ESP8266 HomeKit Blinds.

In the portal, use these values:

FieldValue
OTA repositoryAchimPieters/ESP8266-HomeKit-NeoPixel-RGBW-Light-Strip
OTA binary filemain.bin

When the installation is done, scan the QR code the device generates in the Home app to add it.

Firmware releases

VersionDate
0.0.317 January 2020
0.04 (as tagged)17 January 2020
0.0.216 January 2020
0.0.115 January 2020

All four came out within three days. Each release has a main.bin and a signature file, main.bin.sig.

Good to know

  • This is a test setup and not a finished product.
  • The HomeKit Accessory Protocol specification the firmware follows is the non-commercial version, for accessories you build yourself and do not distribute or sell.
  • The repository is under the MIT licence. The HomeKit setup code is set in the firmware source, so change it to your own.

Looking for the next step? The HomeKit NeoPixel controller does the same kind of thing on a small ESP32-C3 board.

Everything is in the ESP8266-HomeKit-NeoPixel-RGBW-Light-Strip repository on GitHub.

Advertisement
All HomeKit

More HomeKit

Keep building.

Switches, sensors, plugs and blinds: more accessories that you build yourself and add to the Home app.

All HomeKit