Shelly LedStrip Cluster
The Shelly LedStrip cluster is a custom Zigbee cluster with ID 0xFC06 that controls the effects engine of the LedStrip component: the active effect and its parameters, and stepping through the available effects. Devices supporting this cluster expose it on the same endpoint as the standard On/Off, Level Control and Color Control clusters (endpoint 1). Those clusters control the power state, the brightness and the color of the LEDs; this cluster only adds what they cannot express. The Shelly manufacturer code (0x1490) must be used for all interactions with this cluster. Device-specific details are available here.
Attributes
The server supports the attributes listed in the following table:
| Identifier | Name | Data Type | Access | Default | Description |
|---|---|---|---|---|---|
| 0x0000 | CurrentEffect | unsigned 16-bit integer | read/write, reportable | 0 | ID of the active built-in effect (see Effect IDs). 0xFFFF when a script effect is active. |
| 0x0001 | Speed | unsigned 8-bit integer | read/write, reportable | 50 | Effect speed, 0-100. |
| 0x0002 | Intensity | unsigned 8-bit integer | read/write, reportable | 50 | Effect intensity, 0-100. |
| 0x0003 | BackgroundRed | unsigned 8-bit integer | read/write, reportable | 0 | Red component of the effect background color, 0-255. |
| 0x0004 | BackgroundGreen | unsigned 8-bit integer | read/write, reportable | 0 | Green component of the effect background color, 0-255. |
| 0x0005 | BackgroundBlue | unsigned 8-bit integer | read/write, reportable | 0 | Blue component of the effect background color, 0-255. |
| 0x0006 | Palette | unsigned 8-bit integer | read/write, reportable | 0 | Color palette used by the effect (see table below). |
| 0x0007 | Reverse | boolean | read/write, reportable | false | Run the effect in the reverse direction. |
| 0x0008 | CurrentScriptEffect | unsigned 16-bit integer | read/write, reportable | 0 | ID of the active script effect, 1-254. 0 when a built-in effect is active. |
| 0xFFFD | Revision | unsigned 16-bit integer | read-only | 1 | Cluster revision. |
Palette values
| Value | Name |
|---|---|
| 0 | rainbow |
| 1 | pastel |
| 2 | fire |
| 3 | forest |
| 4 | ocean |
| 5 | monochrome |
| 6 | harmony |
| 7 | contrast |
| 8 | complementary |
Writing any other value to Palette is rejected.
Effect IDs
The effect IDs are those of the effect keys of the LedStrip component. The IDs of the built-in effects are the following:
| IDs | Effects |
|---|---|
| 0-9 | solid, blink, fade, rainbow, colorwipe, aurora, twinkle, glitterwaves, meteors, snow |
| 10-19 | lightning, split, gradient, palettestatic, glow, marquee, flow, sweep, pendulum, orbit |
| 20-29 | bounce, flames, candlelight, starlight, scatter, bursts, pulse, prism, drift, warm |
| 30-31 | neutral, cold |
| 1000-1021 | Sound-reactive effects: blurz, freqwave, pixeldance, levelbar, centerlevel, centerspectrum, dancingdots, splashes, beatsplash, soundcolor, ripple, tonesparks, lava, audiosolid, audiomono, audiosplit, beatflash, beatcolor, beatburst, beatsparkle, beatshift, audiosplitgrow |
| 2000 | ddp |
The sound-reactive effects (1000-1021) are available only on devices with an audio analyzer. Writing an ID that the device does not have to CurrentEffect is rejected. Use the ListEffects command to get the effects that a particular device has.
Attribute description
The attributes follow the state of the LedStrip component: a change made through the Zigbee network, RPC, a webhook, a script, a schedule or the buttons of the device is reflected in the attributes and reported through ZCL attribute reporting.
The CurrentEffect and CurrentScriptEffect attributes are mutually exclusive. When a built-in effect is active, CurrentScriptEffect is 0; when a script effect is active, CurrentEffect is 0xFFFF. Writing CurrentEffect selects a built-in effect, and writing CurrentScriptEffect selects a script effect by its script ID (see the script:<id> effect key of the LedStrip component).
Commands
Server commands
| Command ID | Name | Description |
|---|---|---|
| 0x00 | NextEffect | Switch to the next effect. No payload. |
| 0x01 | PreviousEffect | Switch to the previous effect. No payload. |
| 0x02 | ResetEffect | Reset to the solid effect, white, with Speed and Intensity 50, black background, the rainbow palette and no reverse. No payload. |
| 0x03 | ListEffects | List the available effects, paginated. |
NextEffect, PreviousEffect and ResetEffect are answered with a ZCL Default Response.
Client commands
| Command ID | Name | Description |
|---|---|---|
| 0x10 | EffectList | Response to ListEffects with one page of entries. |
Command details
ListEffects (server 0x03)
List the available effects: the built-in effects followed by the script effects, the same list as LedStrip.ListAllEffects.
Payload:
| Field | Type | Description |
|---|---|---|
offset | uint8 | (optional) 0-based index of the first entry of the page. Defaults to 0 when omitted. |
Response: ZCL Default Response (immediate, SUCCESS), followed by an EffectList command with the page.
EffectList (client 0x10)
Payload:
| Field | Type | Description |
|---|---|---|
total | uint8 | Total number of effects. |
count | uint8 | Number of entries in this response (0 = past the end of the list). |
entries | array | count entries, each 18 bytes: {effect_id: uint16, name: char[16]}. The name is null-padded. |
At most 2 entries are sent per response. Page through the list with offset set to the number of entries received so far, until it reaches total.
The effect_id of a built-in effect is its ID from Effect IDs. The effect_id of a script effect is 0xF000 OR-ed with its script ID, so the script ID is effect_id & 0x00FF.
Examples
Select the Rainbow effect
Write 3 (rainbow) to the CurrentEffect attribute (ID 0, type unsigned 16-bit integer = 0x21):
- Zigbee.WriteAttr HTTP GET Request
- Zigbee.WriteAttr Curl Request
- Zigbee.WriteAttr Mos Request
http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=1&cluster=64518&attr=0&type=33&value="0300"
curl -X POST -d '{"id":1,"method":"Zigbee.WriteAttr","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":0,"type":33,"value":"0300"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.WriteAttr '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":0,"type":33,"value":"0300"}'
Response
- Zigbee.WriteAttr HTTP GET Response
- Zigbee.WriteAttr Curl Response
- Zigbee.WriteAttr Mos Response
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
{
"id": 1,
"params": {
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
}
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
Set the effect speed to 80
Write 80 (0x50) to the Speed attribute (ID 1, type unsigned 8-bit integer = 0x20):
- Zigbee.WriteAttr HTTP GET Request
- Zigbee.WriteAttr Curl Request
- Zigbee.WriteAttr Mos Request
http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=1&cluster=64518&attr=1&type=32&value="50"
curl -X POST -d '{"id":1,"method":"Zigbee.WriteAttr","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":1,"type":32,"value":"50"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.WriteAttr '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":1,"type":32,"value":"50"}'
Response
- Zigbee.WriteAttr HTTP GET Response
- Zigbee.WriteAttr Curl Response
- Zigbee.WriteAttr Mos Response
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
{
"id": 1,
"params": {
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
}
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
Select the Fire palette
Write 2 (fire) to the Palette attribute (ID 6):
- Zigbee.WriteAttr HTTP GET Request
- Zigbee.WriteAttr Curl Request
- Zigbee.WriteAttr Mos Request
http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=1&cluster=64518&attr=6&type=32&value="02"
curl -X POST -d '{"id":1,"method":"Zigbee.WriteAttr","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":6,"type":32,"value":"02"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.WriteAttr '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":6,"type":32,"value":"02"}'
Response
- Zigbee.WriteAttr HTTP GET Response
- Zigbee.WriteAttr Curl Response
- Zigbee.WriteAttr Mos Response
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
{
"id": 1,
"params": {
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
}
{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}
Read the active effect
- Zigbee.ReadAttr HTTP GET Request
- Zigbee.ReadAttr Curl Request
- Zigbee.ReadAttr Mos Request
http://192.168.33.1/rpc/Zigbee.ReadAttr?dst_addr=12345&dst_ep=1&cluster=64518&attr=0
curl -X POST -d '{"id":1,"method":"Zigbee.ReadAttr","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.ReadAttr '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"attr":0}'
Response
- Zigbee.ReadAttr HTTP GET Response
- Zigbee.ReadAttr Curl Response
- Zigbee.ReadAttr Mos Response
{
"success": true,
"type": 33,
"value": "0300",
"len": 2
}
{
"id": 1,
"params": {
"success": true,
"type": 33,
"value": "0300",
"len": 2
}
}
{
"success": true,
"type": 33,
"value": "0300",
"len": 2
}
Switch to the next effect
Send NextEffect (cmd 0x00) with no payload:
- Zigbee.SendCommand HTTP GET Request
- Zigbee.SendCommand Curl Request
- Zigbee.SendCommand Mos Request
http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=1&cluster=64518&cmd=0
curl -X POST -d '{"id":1,"method":"Zigbee.SendCommand","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"cmd":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.SendCommand '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"cmd":0}'
Response
- Zigbee.SendCommand HTTP GET Response
- Zigbee.SendCommand Curl Response
- Zigbee.SendCommand Mos Response
{
"success": true,
"status": "SUCCESS"
}
{
"id": 1,
"params": {
"success": true,
"status": "SUCCESS"
}
}
{
"success": true,
"status": "SUCCESS"
}
List the effects (first page)
Send ListEffects (cmd 0x03). Payload: 00 (offset=0). The device answers with the Default Response and then sends the page as an EffectList command:
- Zigbee.SendCommand HTTP GET Request
- Zigbee.SendCommand Curl Request
- Zigbee.SendCommand Mos Request
http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=1&cluster=64518&cmd=3&payload="00"
curl -X POST -d '{"id":1,"method":"Zigbee.SendCommand","params":{"dst_addr":12345,"dst_ep":1,"cluster":64518,"cmd":3,"payload":"00"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Zigbee.SendCommand '{"dst_addr":12345,"dst_ep":1,"cluster":64518,"cmd":3,"payload":"00"}'
Response
- Zigbee.SendCommand HTTP GET Response
- Zigbee.SendCommand Curl Response
- Zigbee.SendCommand Mos Response
{
"success": true,
"status": "SUCCESS"
}
{
"id": 1,
"params": {
"success": true,
"status": "SUCCESS"
}
}
{
"success": true,
"status": "SUCCESS"
}