Skip to main content
Version: 1.0

LedStrip

The LedStrip component controls addressable LED strips and matrices with an integrated effects engine. It supports a wide range of LED protocols (WS2812, WS2812B, WS2811, SK6812, WS2811_W, SK9822) and provides real-time control via RPC, MQTT, WebSocket, and JavaScript scripting. The component includes effects playback, color control, brightness adjustment, and optional audio analyzer integration for sound-reactive effects. It uses LedStrip as RPC namespace and provides the methods:

LedStrip components are identified with ledstrip:<id> in objects containing multiple component payloads.

Methods​

LedStrip.SetConfig​

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

config

object

Configuration that the method takes

Find more about the config properties in config section

LedStrip.GetConfig​

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

Find the LedStrip.GetConfig response properties in config section

LedStrip.GetStatus​

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

Find more about the status response properties in status section

LedStrip.Set​

This method sets the output state, brightness, colors, and active effect. It can be used to trigger automations via LNM and webhooks.

Request​

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance. Required

on

boolean

True for LED on, false otherwise. Optional

brightness

number

Brightness level 0%-100%. Optional

rgb

array

RGB color as array [r, g, b] with values 0-255 (e.g., [255, 0, 0] for red). Optional

r

number

Red channel 0-255. Optional

g

number

Green channel 0-255. Optional

b

number

Blue channel 0-255. Optional

bg_rgb

array

Background RGB color as array [r, g, b] with values 0-255. Optional

bg_r

number

Background red channel 0-255. Optional

bg_g

number

Background green channel 0-255. Optional

bg_b

number

Background blue channel 0-255. Optional

effect

string

Effect key (e.g., "solid", "rainbow"). Optional

speed

number

Effect speed 0-100. Optional

intensity

number

Effect intensity 0-100. Optional

palette

string

Palette name (e.g., "fire", "rainbow"). Optional

reverse

boolean

Reverse effect direction. Optional

transition_duration

number

Transition time in seconds for color/brightness changes. Optional

audio_gain

number

Audio analyzer gain 0-100 (for devices with audio analyzer). Optional

audio_norm

boolean

Audio analyzer auto-gain normalization (for devices with audio analyzer). Optional

tag

string or null

Up to 20 characters used to identify the origin of a state change. Optional

info

At least one of the parameters (on, brightness, rgb/r/g/b, effect, speed, intensity, palette, or reverse) is required.

LedStrip.Toggle​

Toggle the LED strip on/off. If the strip is currently on, it will turn off; if it is off, it will turn on.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance. Required

LedStrip.ResetEffect​

Resets effect parameters (speed, intensity, palette, reverse, colors) to their default values for the current effect.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance. Required

LedStrip.ListAllEffects​

List all available effects for the LED strip. Effects can be built-in or user-defined via scripts.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

offset

number

Pagination offset. Optional

Response:

PropertyTypeDescription

effects

array

Array of available effects with key, name, description, and controls

LedStrip.ListAllPalettes​

List all available color palettes.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

offset

number

Pagination offset. Optional

rgb

array

Preview color for generative palettes as array [r, g, b] with values 0-255 (e.g., [255, 0, 0]). Optional

Response:

PropertyTypeDescription

palettes

array

Array of available palettes with key, name, colors, and metadata

LedStrip.AddEffect​

Add an effect to the effects list.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

effect_key

string

Effect key to add. Must be a built-in effect or script effect (format: "script:N")

LedStrip.RemoveEffect​

Remove an effect from the effects list.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

effect_key

string

Effect key to remove

LedStrip.NextEffect​

Switch to the next effect in the effects list.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

LedStrip.ListAllProtocols​

Not available on all devices. Only available when LED protocol is configurable (not fixed by hardware).

List all available LED protocols supported by the hardware.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

Response:

PropertyTypeDescription

protocols

array

Array of available protocols with id, key, and name

LedStrip.TestColors​

Not available on all devices. Only available when color order is configurable (not fixed by hardware).

Test LED colors by cycling through red, green, blue, and white at 25% brightness.

Parameters:

PropertyTypeDescription

id

number

Id of the LedStrip component instance

Configuration​

PropertyTypeDescription

name

string

Display name of the LED strip

enable

boolean

Enable or disable the LED strip

num_leds

integer

Number of LEDs per module (1-1024). Fixed on some devices.

num_modules

integer

Number of cascaded LED modules (1-256). Fixed on some devices. Total LED count: num_leds × num_modules

protocol

integer

LED protocol: 0=WS2812, 1=WS2812B (default), 2=WS2811, 3=SK6812, 4=WS2811_W, 5=SK9822

color_order

string

Color order for LED protocol. One of: default, rgb, grb, brg, rbg, gbr, bgr. Default depends on protocol.

initial_state

integer

State on boot: 0=Off, 1=On, 2=Restore last (default), 3=Toggle

effects

string

Comma-separated list of effect keys (built-in and script effects)

effect_interval_ms

integer

Effect update interval in milliseconds (default: 33ms = 30 FPS)

ddp_port

integer

DDP (Distributed Display Protocol) UDP listen port for external pixel control. Set to 0 to disable (default).

Status​

PropertyTypeDescription

id

number

ID of the LedStrip component instance

on

boolean

Whether the LED strip is on

brightness

number

Current brightness 0-100%

rgb

array

Current RGB color as array [r, g, b] with values 0-255

r

number

Red channel current value 0-255

g

number

Green channel current value 0-255

b

number

Blue channel current value 0-255

bg_rgb

array

Background RGB color as array [r, g, b] with values 0-255

bg_r

number

Background red channel 0-255

bg_g

number

Background green channel 0-255

bg_b

number

Background blue channel 0-255

effect

string

Currently active effect key

speed

number

Effect speed 0-100

intensity

number

Effect intensity 0-100

palette

string

Current palette name

reverse

boolean

Effect direction reversed

apower

number

Active power in watts (if power monitoring is available)

temperature

number

Internal temperature in Celsius (if temperature sensor is available)

Effects​

The LED strip supports a variety of built-in effects and user-defined effects created via JavaScript. Built-in effects provide different visual patterns and animations. The list of available effects may vary by device and firmware version.

For devices with integrated microphones, audio-reactive effects are available that respond to sound input.

Custom effects can be created using JavaScript and registered as script effects with the @meta metadata format. See the LedStrip JavaScript API documentation for details on scripting and audio analyzer integration.

Palettes​

The LED strip includes a palette system for color gradients. Palettes are used by some effects to create smooth color transitions and gradients. Both static predefined palettes and generative palettes (which create gradients based on the current RGB color) are available. The specific set of available palettes may vary by firmware version.

Errors​

The LedStrip component can report the following error conditions:

PropertyTypeDescription

kOverTemperature

error

Temperature protection detected overheat condition and triggered safety cutoff. This occurs when internal LED temperature exceeds safe limits. Power is cut to the LED strip via the power GPIO until the device cools down.

note

Temperature protection with safety cutoff is only available on devices with integrated temperature sensors.

Webhook Events​

The LedStrip component supports the following webhook events:

  • ledstrip.on - produced when the LED strip turns on (brightness > 0)
  • ledstrip.off - produced when the LED strip turns off (brightness = 0 or on = false)

These events can be used to trigger automations and integrations through the webhook system.

Examples​

http://192.168.33.1/rpc/LedStrip.GetStatus?id=0

Response

{
"id": 0,
"on": true,
"brightness": 80,
"rgb": [
255,
0,
255
],
"r": 255,
"g": 0,
"b": 255,
"bg_rgb": [
0,
0,
0
],
"bg_r": 0,
"bg_g": 0,
"bg_b": 0,
"effect": "rainbow",
"speed": 50,
"intensity": 75,
"palette": "rainbow",
"reverse": false
}
http://192.168.33.1/rpc/LedStrip.Set?id=0&on=true&brightness=100&rgb=[0,0,255]
http://192.168.33.1/rpc/LedStrip.Set?id=0&effect="rainbow"&speed=60&intensity=80
http://192.168.33.1/rpc/LedStrip.Toggle?id=0
http://192.168.33.1/rpc/LedStrip.ListAllEffects?id=0

Response

{
"effects": [
{
"key": "solid",
"name": "Solid",
"description": "Static color display"
},
{
"key": "rainbow",
"name": "Rainbow",
"description": "Rainbow color gradient animation"
}
]
}