
Nanoleaf is a family of Wi-Fi LED lighting products — modular wall panels, LED strips, bulbs, floor lamps and holiday string lights — that all speak the same local REST API on TCP port 16021. A single TapHome template covers every WiFi-reachable Nanoleaf product: TapHome polls the controller over HTTP on the LAN and exposes the whole layout as a single HSB light with colour temperature.
Supported models
| Product | Model code | Notes |
|---|---|---|
| Light Panels (formerly Aurora) | NL22 | No touch |
| Shapes Hexagons | NL42 | Touch-enabled |
| Shapes Triangles | NL47 | Touch-enabled |
| Shapes Mini Triangles | NL48 | Touch-enabled |
| Canvas (Squares) | NL29 | Touch-enabled |
| Elements Hexagons (Wood Look) | NL52 | Narrower CCT range (1500–4000 K) |
| Lines | NL59 | Touch-enabled |
| Matter WiFi Essentials (Bulbs, Lightstrips, Holiday String Lights, Floor Lamp, A19) | — | Firmware 3.0.10+ only; stricter brightness floor and narrower CCT (2127–6535 K) |
Thread-only Nanoleaf Essentials and the Nanoleaf Skylight are not supported — the template requires a WiFi-reachable controller speaking the Open API on port 16021.
Device capabilities
Light (HSB + colour temperature)
The template exposes a single HSB light with on/off, brightness, hue, saturation and colour temperature. On every poll cycle (500 ms) the module sends
| |
and caches the full device JSON in the StatusJson custom variable. Per-property readscripts then parse fields from that cached blob:
- On/off —
state.on.value - Brightness —
state.brightness.value(0–100), normalized to TapHome’s 0.0–1.0 range - Hue —
state.hue.value(0–360°) — only read whenstate.colorMode == "hs" - Saturation —
state.sat.value(0–100) — only read whenstate.colorMode == "hs" - Colour temperature —
state.ct.value(Kelvin) — only read whenstate.colorMode == "ct"
All writes go to PUT /api/v1/{authToken}/state with a per-property JSON body:
| |
The template declares 1800–6500 K as the colour-temperature range — a practical subset of what the hardware actually supports. Values outside the device’s physical band are silently clamped by Nanoleaf firmware (see Notes and limitations).
Colour mode gating
Nanoleaf controllers are always in exactly one of three colour modes:
colorMode | Meaning |
|---|---|
hs | Hue / saturation mode — hue and saturation values are live |
ct | Colour-temperature mode — CCT value is live |
effect | A dynamic scene is running |
The TapHome readscripts respect this: hue and saturation reads return NULL when the controller is in ct or effect mode, and the colour-temperature read returns NaN when it is in hs or effect mode. This prevents stale cross-mode values from being fed into the dashboard. Writing any hue / saturation value switches the controller to hs, and writing a CCT value switches it to ct — both stop any running effect.
Configuration
1. Pair the controller on the Nanoleaf app
Mount the panels / bulb / strip, install the Nanoleaf mobile app and connect the controller to the local Wi-Fi network through the app’s pairing flow. Note the controller’s IPv4 address — the app shows it under device settings → Info, or it can be read from the router’s DHCP lease table.
Assign a DHCP reservation (or static IP) to the Nanoleaf controller so the address does not change after a lease renewal. The TapHome template stores the IP in its import parameters and does not auto-discover.
2. Generate the Open API token
The Nanoleaf Open API requires a one-time pairing between TapHome and the controller. The pairing produces a permanent 32-character auth_token that survives reboots and firmware upgrades.
On the Nanoleaf controller (the small inline unit for panels, or the device itself for bulbs / strips), hold the on-off button for 5–7 seconds until the white LED starts flashing in a pattern. The device is now in pairing mode for 30 seconds.
Within the 30-second window, send an empty
POSTto the pairing endpoint — for example withcurl, PowerShell or Postman:1curl -X POST http://{controller-ip}:16021/api/v1/newThe controller responds with:
1{ "auth_token": "xxxKJISJCjY2hfAyilpyIOfGixxxx" }Copy the 32-character
auth_tokenstring.
If the window expires before the POST arrives, the endpoint returns 403 Forbidden — hold the on-off button again and retry.
Some Essentials form factors (bulbs, strips) do not have a physical button. In that case, start pairing from the Nanoleaf app’s device settings — the app arms the 30-second window for you.
3. Import the template in TapHome
- In TapHome, create a new PacketParser device from the Nanoleaf RGB light template.
- Enter the controller’s IPv4 address as the
ipAddressimport parameter. The port is fixed to 16021 and does not need to be changed. - Open the device properties, find the
authTokencustom variable and paste the 32-character token generated in step 2. - Save. The module will poll
/api/v1/{authToken}/every 500 ms and populate the HSB light with the current state.
If the token is wrong or expired, every read fails with 401 Unauthorized in the TapHome log.
Network requirements
- Only outbound TCP 16021 from the TapHome CCU to the Nanoleaf controller. No cloud calls, no MQTT broker, no HTTPS certificates.
- The CCU and the controller must be on the same LAN / VLAN. If the Wi-Fi and wired networks are segregated, add a firewall rule allowing TCP 16021 between them.
- Nanoleaf controllers advertise the service
_nanoleafapi._tcpover mDNS. The template requires a direct IP, but mDNS can be used for discovery withavahi-browse -r _nanoleafapi._tcp(Linux) ordns-sd -B _nanoleafapi._tcp(macOS).
The Nanoleaf Open API is HTTP only — there is no HTTPS and no transport encryption. It is safe inside the LAN but must never be exposed to the public internet. Do not forward port 16021 through the router.
Notes and limitations
Colour-temperature range depends on model family
The TapHome template declares 1800–6500 K as the writable CCT range. The underlying hardware band differs per family:
| Family | Hardware CCT range | Behaviour outside range |
|---|---|---|
| Light Panels, Shapes, Canvas, Lines | 1200–6500 K | Clamped by firmware |
| Elements Hexagons | 1500–4000 K | Clamped by firmware |
| Matter WiFi Essentials | 2127–6535 K | Clamped by firmware; 1800 K is below the 2127 K floor, so Essentials will clamp to 2127 K |
Writing a value outside the device’s physical band does not raise an error — the controller silently uses its own limit. When designing dashboards that target Essentials, prefer CCT values in the common 2127–6500 K window.
Essentials reject brightness = 0
Classic controllers (Light Panels, Shapes, Canvas, Elements, Lines) accept brightness: 0. Matter WiFi Essentials enforce a minimum of 1 and reject 0 with HTTP 400. To power down an Essentials bulb or strip, use the on/off channel instead of driving brightness to zero.
Hue / saturation / CCT reads can return NULL or NaN
Because hs and ct are mutually exclusive, and both are inactive during a running effect, the wrong-mode reads deliberately return NULL (hue / sat) or NaN (ct). This is expected behaviour, not a fault. A hue / sat / ct write brings the controller back to hs or ct mode and the reads resume.
One token per controller, not per panel
A multi-panel Shapes or Canvas layout is a single TapHome device. The auth token is issued at controller level and covers every panel connected to it.
IPv6 mDNS instability on firmware 8.5.2+
The openHAB community has reported that IPv6 mDNS records alternate between ONLINE and OFFLINE on some firmware 8.5.2+ controllers. If mDNS discovery is unstable, set a fixed IPv4 DHCP reservation and use the IP directly — the TapHome template does not rely on mDNS anyway.
Troubleshooting
401 Unauthorized on every read
The authToken is wrong, expired or has been revoked. Generate a new token (hold the on-off button for 5–7 s and POST /api/v1/new) and paste it into the authToken custom variable.
403 Forbidden when generating a token
The 30-second pairing window has closed. Hold the on-off button again until the LED flashes in a pattern, then immediately send POST /api/v1/new.
Hue / saturation show NULL in the dashboard
The controller is in ct mode or running an effect. Write any hue or saturation value to switch the controller back to hs mode, or set a colour with the HSB picker. The template cannot infer a hue / sat reading when the device is not producing one.
Colour temperature reads as NaN
The controller is in hs mode or running an effect. Write a CCT value to switch to ct mode, or set a colour temperature from the dashboard. If an effect is running, stop it from the Nanoleaf app (or write any HSB / CCT value — this also stops the effect).
Brightness write fails on Essentials
Matter WiFi Essentials reject brightness: 0. Drive the on/off channel to power down instead of writing 0 to brightness. Values 1–100 are accepted on all models.
Controller drops offline on firmware 8.5.2+
If the TapHome CCU repeatedly loses the controller, assign a static IPv4 DHCP reservation and use the IP in the ipAddress import parameter — the IPv6 mDNS layer can be unstable on this firmware branch.
