Opens in a new tab

Christmas LED curtain from Action as a display: planes, clock, weather and custom patterns

I bought a Smart LED Curtain at Action for ~$18: 20 strands, 400 RGB LEDs, 2 × 2 meters, and Bluetooth control from your phone. If an app can control it, so can an ESP32-S3. Without soldering or modifying the curtain, it turns it into a display showing the time, planes overhead, weather forecasts, and a precipitation radar. When there’s nothing to report, it displays Christmas patterns or your own images from a web editor. The firmware is free to download, and you can flash it from your browser.

The project is free. If you like, you can buy me a coffee at buymeacoffee.com/chiptroncz.
This article is not sponsored!

Listen to the article

The curtain from Action

The box says Smart LED Curtain Lights, 20 strings, 400 LEDs, 2 × 2 m. It cost ~ $18, and the box contains the curtain with its controller and a power adapter. Nothing else.

The curtain has 20 vertical strands, each with 20 LEDs. That makes a 20 × 20-pixel grid. Every LED is RGB and can light up in a different color. The strands hang from a single horizontal cable with hooks, so you can hang it behind a curtain or in a window.

When I untangled it, one thing caught my attention. Each LED can be controlled individually, yet there are only two wires running to it. No data wire. I explain how that works in the technical section.

What the LED string can do on its own

On its own, it’s a Christmas decoration that can:

  • show one color across the whole curtain, with brightness control
  • run built-in effects, including Christmas patterns
  • use a music mode, where the curtain flashes in time with sound picked up by the microphone in the controller
  • turn on and off on a timer
  • display custom images drawn pixel by pixel in the app

The last one caught my attention. If the curtain can display any 20 × 20 image, all I need to do is send it one from somewhere other than my phone.

How to control it

There are three ways. The button on the controller cycles through effects. The IR remote controls colors, brightness, and modes. Everything else is handled by the Hello Fairy app for Android and iOS, which connects to the curtain over Bluetooth.

The app has all the effects, music mode, timer, and a tool for drawing custom images on the grid. It works, but drawing an image pixel by pixel on a phone isn’t exactly fun.

What the ESP32 curtain displays

The ESP32 Fairy Curtain firmware runs on an ESP32-S3, which connects to the curtain over Bluetooth instead of using a phone. It downloads data from the internet, draws the image itself, and sends it to the curtain. There are five screens.

  • Clock: hours and minutes in large digits, with the date below. You can choose the colors for both the time and date.
  • Plane: when a plane flies overhead, the curtain shows its silhouette, rotated to match its direction of travel (north is up). Its color indicates altitude: red below 1 km, then orange, yellow, green, and turquoise above 9 km. Data comes from adsb.fi.
  • Weather forecast: an icon (sun, moon, clouds, rain, snow, thunderstorm, or fog) and the temperature, colored from purple in freezing weather to red in the heat. Data comes from Open-Meteo.
  • Precipitation radar: a view of roughly 120 × 120 km around your location, using the Czech Hydrometeorological Institute’s color scheme. The white dot in the center is you, and the country’s border is shown in pink. Radar data comes from the Czech Hydrometeorological Institute for the Czech Republic; for the rest of the world, you can select RainViewer in the settings. The radar requires a board with PSRAM. It won’t work on an ESP32-S3 without PSRAM, such as the LaskaKit ESP32-S3-DEVKit, and its option is grayed out in the web settings. Everything else works.
  • Pattern: a Christmas image from the library, or your own image from the editor. More on that below.

You choose what appears and when. In automatic mode, planes take priority, followed by the radar when it’s raining nearby. Otherwise, the clock runs, with the forecast appearing now and then. You can also cycle through the screens at regular intervals or leave one on permanently. At night, the curtain dims or turns off completely.

Radar animations and things like a seconds display on the clock aren’t practical here. Sending one image to the curtain takes about 3 seconds, and the curtain only sets brightness for the whole image, not individual pixels.

Christmas patterns and custom images

When there’s no plane overhead, the curtain can do what it was made for: decorate. The firmware includes a library of 15 Christmas patterns, drawn specifically for the 20 × 20 grid.

A Christmas tree, star, comet, snowflake, snowman, bell, Advent wreath, gift, candy cane, bauble, gingerbread, holly, Santa hat, carp, and a New Year’s greeting with the year. The year updates automatically, showing the next year in December.

You can leave one pattern on continuously, or have the curtain cycle through them all. You can also include patterns in the screen rotation alongside the clock and weather.

Editor

The Patterns tab has an editor where you draw on the 20 × 20 grid with your finger or mouse. There are nine colors, an off pixel, and a slider for choosing any hue. Fill an area with the bucket tool, or pick a color from an image with the eyedropper. You can open any Christmas pattern as a starting point and edit it.

The Show on curtain button sends your image to the curtain for one minute. With Live preview on curtain enabled, each change appears after about 3 seconds. Save finished patterns under a name of your choice. The ESP32 can store up to 16 custom patterns. They stay saved across restarts and power cycles, and you can edit or delete them whenever you like.

What you need

No soldering required. The ESP32 doesn’t connect to the curtain by wire; it communicates with it over Bluetooth.

PartNotes
Smart LED curtainFrom Action, 20 strands × 20 LEDs, Hello Fairy app, ~ $18
ESP32-S3 with PSRAMI recommend the Seeed XIAO ESP32-S3 (8 MB flash, 8 MB PSRAM), which supports everything, including the radar. On the Czech retailer LaskaKit’s ESP32-S3-DEVKit, which has no PSRAM, everything works except the radar.
USB-C cable and 5 V chargerPowers the ESP32 and is used to flash the firmware

The firmware uses only WiFi and Bluetooth, with no GPIO pins. So it will work with any ESP32-S3 board. For the radar, the board needs PSRAM.

Place the ESP32 within a few meters of the curtain. Bluetooth won’t reach through two walls.

Flashing the firmware

No Arduino IDE or libraries needed. All you need is Chrome, Edge, or Firefox 151 or later (Safari doesn’t support Web Serial) and a USB-C cable.

  1. Download the .merged.bin file for your board from Releases on GitHub: ESP32_Fairy_Curtain_XIAO-ESP32-S3.merged.bin, ESP32_Fairy_Curtain_XIAO-ESP32-S3-Plus.merged.bin, or ESP32_Fairy_Curtain_LaskaKit-ESP32-S3-DEVKit.merged.bin. A file built for a different board may not boot. It contains the entire flash image, including the bootloader, so it works on a brand-new board too.
  2. Connect the board to your computer. For the XIAO, use its only USB-C port; for the LaskaKit DEVKit, use the USB-C port labeled UART.
  3. Open esp32flasher.chiptron.cz, connect to the board’s port, select the downloaded file, and click Flash. If the board won’t connect or flashing won’t start (more common with the XIAO), put it into download mode: hold BOOT, briefly press RESET, then release BOOT. On the XIAO, the buttons are labeled B and R.
  4. When flashing finishes, press RESET on the board.

First startup

Plug the curtain into a power outlet and switch it on. The ESP32 finds it and remembers it, so it won’t connect to your neighbor’s curtain later.

  1. The ESP32 doesn’t know your WiFi network yet, so it creates its own open network, ESP32-Fairy-Curtain-XXXX (no password). A blue WiFi symbol and the letters AP appear on the curtain.
  2. Connect to the network with your phone. The settings page should open automatically; if it doesn’t, go to http://192.168.4.1.
  3. On the WiFi tab, select your home network from the list and enter its password.
  4. The curtain will show a yellow WiFi symbol, then turn green and display OK once the ESP32 connects. The clock will appear next.

From then on, you can access the settings at http://esp32-fairy-curtain.local.

Settings

Everything is configured on the ESP32’s web page, from your phone or computer, in Czech or English.

  • Status: a live preview of what’s on the curtain, plus a data overview.
  • Curtain: Bluetooth connection status, a test image, and options to rotate or mirror the image to match how you’ve hung the curtain.
  • Location: your coordinates, used to find planes and rain.
  • Planes, radar, clock, and weather: search radius, minimum altitude, colors, and radar source.
  • Patterns: the Christmas library, custom patterns, editor, and playback.
  • Display: screen mode, daytime and nighttime brightness, and nighttime shutoff.

Right after startup, I recommend running the test image: a white row at the top and bottom, with colors between them running from red to purple. If it looks different, you can correct it by rotating or mirroring the image in the Mounting section.

How it works

The ESP32 does exactly what the phone app does. It connects to the curtain’s controller over Bluetooth and sends it a 20 × 20-pixel image. The only difference is that the firmware draws the image from live data instead of you drawing it.

Over WiFi, the ESP32 downloads plane data from adsb.fi, forecasts from Open-Meteo, and radar data from the Czech Hydrometeorological Institute for the Czech Republic or RainViewer for the rest of the world. It uses that data to decide what to show, draws the image, and sends it to the curtain. It only sends a new image when something has actually changed.

If you unplug the curtain or the connection drops, the ESP32 searches for it again, first after two seconds and then at longer intervals. Once it finds the curtain, it sends the current image. The same thing happens if someone uses the remote to switch the curtain to another effect: the image comes back on its own after the configured delay.

RGB LEDs on two wires

From here on, things get technical.

Common addressable LEDs such as WS2812 have power, ground, and a data wire, with data passed along the chain from one LED to the next. Here, the LEDs on each strand are connected in parallel over two wires, with no data wire. The data travels over the power lines instead.

The controller briefly pulls the supply voltage down and encodes bits in those voltage dips. The chip in each LED decodes them and rides out the power interruption using a small internal capacitor. Since every LED sees the same signal, each one has to identify its own data. It either has an address programmed at the factory or counts which packet has just gone by.

Tim, known as cpldcpu, explains it in detail in Controlling RGB LEDs with only the powerlines. He examined an RGB curtain like this one and the LED chips under a microscope. The numbers on the cables of my curtain (10, 14, 15…) are probably used in manufacturing to track the order of the strands, so their addresses line up.

What’s inside the controller

The board is marked KR-026-R1. The main chip, in an SOP16 package, has the custom marking C07E8C X0F119, which doesn’t identify the part. There’s a 24 MHz crystal next to it and an antenna etched directly into the corner of the board. So it’s a Bluetooth LE SoC. Judging by the crystal and package, I’d guess it’s a Jieli AC632x series chip or a Telink, but I can’t say for sure.

The board also has a buck converter (SOT-23-6, inductor, SS24 Schottky diode), an IR receiver, an electret microphone for music mode, a button, and switching transistors at the bottom that modulate power to the strands. Along the edge are service pads marked −, TX, D, +.

Why I didn’t reflash the controller

My first idea was to load my own program onto the controller and drive the LEDs directly. I decided not to, for a few reasons:

  • Unknown chip. Without knowing exactly what’s in the controller, I don’t know which tool to use or which pin to program through.
  • Closed SDK. Documentation for Jieli and Telink is mostly in Chinese, and the flashing tools are community-made.
  • Risk. Without a backup of the original firmware, I could lose a working controller and the only reference for exactly how it generates the LED signal.
  • It isn’t necessary. Someone has already figured out the Bluetooth protocol, so I can send images to the curtain without modifying its hardware.

This way, anyone can do it: buy the curtain, flash the firmware to an ESP32, done. The curtain stays stock and still works with its remote and app.

The Hello Fairy protocol

The protocol was reverse-engineered and documented by the nzrutman/hello_fairy_ble project (in PROTOCOL.md). Thanks! The controller advertises itself as Hello Fairy-… and has one BLE service with two characteristics: one for writing commands without a response, and the other for notifications.

Every packet has the same format:

AA  command  length  data…  checksum   (checksum = sum of preceding bytes & 0xFF)

AA 00 00 AA              query device information
AA 01 00 AB              query status
AA 02 01 01 AE / 00 AD   turn on / off
AA D0 04 direction brightness speed action     control DIY image
AA DA n  01 (indexH indexL color)…  image pixels

The image is sent in a fixed sequence: D0 with action 3 (clear), D0 with action 0 (draw), six DA packets of 79 pixels each with a 300 ms pause between them, then a 1.2 s wait, D0 with action 4 (finish), and D0 with action 1 (display, including brightness). The largest packet is 242 bytes, so the connection needs an MTU of at least 245. My curtain negotiated 512.

Pixel index is x × 20 + y, so pixels are ordered by column. Color is one byte: 0 to 180 is hue divided by two (0 red, 60 green, 120 blue), 254 means off, and 255 means white. You can’t set individual pixel brightness, only the brightness of the whole image in the final command. So there are no shadows or antialiasing on the curtain.

The timing comes from a capture of the official app’s communication, and I haven’t shortened it. Sending a complete image takes about 3.2 s. When queried for information, my curtain reported firmware 4.7.2, model 25025, 400 LEDs in a 20 × 20 grid, and DIY type 3. The firmware checks these details after connecting and warns on the web interface if they don’t match.

Inside the firmware

The data-handling code comes from my LED Matrix Panel and MeteoPlaneRadar projects: downloading plane, forecast, and radar data, the configuration network, and the web interface. Instead of driving a HUB75 panel, the output is a 20 × 20 image sent over Bluetooth.

Why the ESP32-S3? I need WiFi and Bluetooth LE at the same time, plus enough memory for HTTPS. The S3 does the job, I already had the data-handling code working on it from the LED Matrix Panel project, and there was a DevKit on my desk. Bluetooth takes a chunk of internal RAM, though, so the radar, which needs a large block of memory to decode the image, only works with PSRAM. The LED Matrix Panel handles radar without PSRAM because it doesn’t use Bluetooth.

Why NimBLE? For Bluetooth, I use the NimBLE-Arduino 2.x library instead of the standard Bluedroid stack. It uses significantly less RAM, which helps alongside WiFi and HTTPS, and the ESP32 only needs to act as a client here.

A dedicated Bluetooth task. Sending one image takes over three seconds, and that mustn’t block the web interface or data downloads. So a separate FreeRTOS task handles the connection to the curtain. The rest of the firmware just hands it a new image and keeps the latest one. If an older image hasn’t been sent yet, it gets discarded.

Connection drops. The task handles the following:

  • searches for the curtain with increasing delays of 2, 4, 8, up to 60 seconds
  • checks the status every 20 seconds; three unanswered checks in a row mean the connection is dead, even if the Bluetooth stack hasn’t noticed the disconnect yet
  • doesn’t count an image interrupted halfway through as displayed, and resends the whole image after reconnecting
  • sends just one short command when brightness changes, rather than uploading the image again
  • saves the address of the first curtain it finds, so the ESP32 won’t connect to someone else’s

Time comes from NTP and from the Date header in server responses, so the clock keeps working if one of those sources is unavailable.

If you want to build the firmware yourself, the README on GitHub lists the library versions and settings used for each board.

Home Assistant

If you already run Home Assistant at home, you don’t need to deal with the ESP32 at all. The hello_fairy_ble integration can turn the curtain on and off, set its color and brightness, and control its built-in effects. Version 2.0 adds Curtain Studio for 20 × 20 curtains, with image importing, drawing, text, and playlists.

The Home Assistant forum also has instructions for controlling Hello Fairy lights through ESPHome. ESP32 Fairy Curtain, on the other hand, doesn’t need Home Assistant. It’s a standalone device.

Downloads

Firmware: github.com/petus/ESP32_Fairy_Curtain
Flasher: esp32flasher.chiptron.cz
Protocol: nzrutman/hello_fairy_ble

For about $18 and one ESP32, you can turn a two-meter Christmas decoration into a display showing planes overhead.

This is a hobby project. I make it because I enjoy it. I can’t guarantee it will keep working in the future; third-party APIs and the curtain firmware may change.

Share the article:
Show your
Maker soul!
Buy a T-Shirt
Coffee for Chiptron
Give a boost to the next article

Related Articles

MeteoPlaneRadar 0.7.0: aircraft radar, weather radar, forecast, spot electricity price and the grid mix on a round 2.1″ display. Flashed from a browser.

The YoRadio project is an open-source internet radio built on the ESP32 Wi-Fi and Bluetooth chip with the ESP32-audioI2S library. It features complete documentation, a wide range of supported displays, and can be controlled via MQTT (suitable for Home Assistant).

Linux 6.11 runs directly on the Xtensa core of the ESP32-S3 without emulation. After login, the shell mirrors to the 9.7″ ED097TC2 e-paper display.

If you’ve ever wondered what plane is flying over your house, you’ve probably used an app like FlightRadar24. The ESP32 Plane Radar project offers a more interesting solution though – your own desktop radar built on ESP32 that displays planes…

A project using a Waveshare 96×48 LED panel and LaskaKit ESP32-S3-DEVKit: clock, forecast, CHMI/RainViewer precipitation radar, and planes flying overhead. Flash the firmware from a browser and configure it from your phone.

ESP32, S2, S3, C3, C6, H2, C5, P4 and the upcoming S31 – which chip to choose for your project? Comparative peripherals table, use-case decision tree, software platforms overview, and tips on where to buy dev boards in Czechia.

Trends