Skip to main content
Version: 1.0

Shelly IR Storage Cluster

The Shelly IR Storage cluster is a custom Zigbee cluster with ID 0xFC05 that manages the persistent IR code library: devices and codes stored on flash. It provides emit-by-ID for stored codes, learning of new codes from incoming IR signals, receive notifications when incoming signals match stored codes, and raw readback of stored code data for backup/cloning. Devices supporting this cluster normally expose it as part of the Zigbee endpoint 239. The Shelly manufacturer code (0x1490) must be used for all interactions with this cluster. Device-specific details are available here.

This cluster follows the IR dynamic components model — devices and codes managed through this cluster correspond to IRDevice and IRCode components.

Attributes​

The server supports the attributes listed in the following table:

IdentifierNameData TypeAccessDefaultDescription
0x0000LastEmittedIdunsigned 16-bit integerread-only, reportable0xFFFFID of the last successfully emitted stored code. 0xFFFF when no stored code has been emitted yet.
0x0001LearningStatusunsigned 8-bit integerread-only, reportable0Current learning state (see table below).
0x0002EnableNotificationsbooleanread/writefalseEnable CodeReceived unsolicited notifications.
0x0010–0x0023AssignEpNSlotunsigned 16-bit integerread/write, reportable0xFFFFIR code assigned to OnOff endpoint N slot. See assignment attributes.
0xFFFDRevisionunsigned 16-bit integerread-only1Cluster revision.

LearningStatus values​

ValueNameDescription
0idleNo learning in progress.
1learningLearning is active, waiting for IR signal.
2learnedCode was captured and stored (transient — resets to 0 after reporting).
3timeoutNo signal received within timeout (transient).
4cancelledLearning was cancelled (transient).
5errorAn error occurred (transient).

Attribute description​

The LastEmittedId attribute updates to the code ID after the final repeat's TX completion callback. It is 0xFFFF until the first stored code is emitted. Changes are reported via ZCL attribute reporting.

The LearningStatus attribute tracks the UI-facing learning state. Values 2-5 are transient — the device resets to 0 (idle) after reporting. The reliable delivery path for learn outcomes is the LearnResult command response; this attribute is for UI display.

The EnableNotifications attribute controls whether the device sends unsolicited CodeReceived notifications when an incoming IR signal matches a stored code. When false (default), matched signals do not generate Zigbee traffic. The sender sets this to true to receive match events for automations.

Assignment attributes​

The device has 10 OnOff bridge endpoints (endpoints 1–10). Each endpoint has an off slot and an on slot, giving 20 assignment attributes with IDs 0x0010–0x0023. The attribute ID is computed as:

attr_id = 0x0010 + (N - 1) * 2 + slot

where N is the endpoint number (1–10) and slot is 0 (off) or 1 (on).

All assignment attributes are unsigned 16-bit integers, read/write, reportable, default 0xFFFF (unassigned).

  • Write a valid code ID (200–299) to assign that IR code to the endpoint slot.
  • Write 0xFFFF to clear the slot.
  • Writing a nonexistent code ID is rejected and the attribute reverts to its stored value.

When the coordinator sends a standard OnOff command to endpoint N, the device emits the IR code assigned to the matching slot (on or off).

Commands​

Server commands​

Command IDNameDescription
0x00EmitTransmit a stored IR code.
0x01AddDeviceCreate a new IR device (e.g. "TV", "AC").
0x02DeleteDeviceDelete an IR device and cascade-delete all its codes.
0x03LearnCodeStart learning a new IR code from an incoming signal.
0x04CancelLearnCancel an in-progress learning session.
0x05DeleteCodeDelete a single stored IR code.
0x06RenameCodeRename a stored IR code.
0x07ListCodesList stored codes, paginated, optionally filtered by device.
0x08ReadRawChunkRead one chunk of raw data from a stored IR code.

Client commands​

Command IDNameDescription
0x10DeviceAddedResponse to AddDevice with status and assigned device ID.
0x11LearnResultResult of LearnCode or CancelLearn.
0x12CodeListResponse to ListCodes with paginated entries.
0x13RawChunkDataResponse to ReadRawChunk with one chunk of raw data.
0x14CodeReceivedUnsolicited notification when an incoming signal matches a stored code.

Command details​

All names in command payloads are fixed-length char[16], null-padded.

Emit (server 0x00)​

Transmit a stored IR code.

Payload:

FieldTypeDescription
code_iduint16ID of the stored IR code (200-299).
sendsuint8Total number of transmissions (1-10, 1 = send once). 150 ms gap between sends.

Response: ZCL Default Response (immediate). SUCCESS, NOT_FOUND (code does not exist), INVALID_VALUE (bad sends value), FAILURE (TX busy). TX completion is confirmed asynchronously via LastEmittedId attribute reporting.

AddDevice (server 0x01)​

Create a new IR device. The device auto-assigns the next free ID from the 200-299 range.

Payload:

FieldTypeDescription
namechar[16]Human-readable device name.

Response: DeviceAdded (client 0x10).

DeviceAdded (client 0x10)​

Payload:

FieldTypeDescription
statusuint80 = ok, 1 = ID range full.
device_iduint16Auto-assigned device ID. Valid only if status = 0.

DeleteDevice (server 0x02)​

Delete an IR device and cascade-delete all its codes.

Payload:

FieldTypeDescription
device_iduint16ID of the IR device (200-299).

Response: ZCL Default Response. SUCCESS, NOT_FOUND.

LearnCode (server 0x03)​

Start learning a new IR code. The device waits for an incoming IR signal and stores it as a new code associated with the specified device.

Payload:

FieldTypeDescription
device_iduint16ID of the IR device to associate the code with.
namechar[16]Name for the code. Must be unique within the device.
timeoutuint8(optional) Timeout in seconds (1-255). 0 or omitted defaults to 15 seconds.

Response: LearnResult (client 0x11) — immediate if preconditions fail, asynchronous after signal capture or timeout.

CancelLearn (server 0x04)​

Cancel an in-progress learning session. No payload. Idempotent.

Response: LearnResult (client 0x11) with status = cancelled.

LearnResult (client 0x11)​

Payload:

FieldTypeDescription
statusuint8Result status (see table below).
device_iduint16ID of the learning device.
code_iduint16Newly created code ID. Valid only if status = 0. 0xFFFF otherwise.

LearnResult status values:

ValueNameDescription
0learnedCode captured and stored successfully.
1timeoutNo signal received within timeout.
2cancelledCancelled by CancelLearn.
3name_conflictDuplicate name within this device.
4busyAnother device is already learning.
5device_not_foundThe specified device_id does not exist.

DeleteCode (server 0x05)​

Delete a single stored IR code.

Payload:

FieldTypeDescription
code_iduint16ID of the IR code (200-299).

Response: ZCL Default Response. SUCCESS, NOT_FOUND.

RenameCode (server 0x06)​

Rename a stored IR code.

Payload:

FieldTypeDescription
code_iduint16ID of the IR code (200-299).
namechar[16]New name.

Response: ZCL Default Response. SUCCESS, NOT_FOUND, DUPLICATE_EXISTS (name conflict).

ListCodes (server 0x07)​

List stored codes, paginated. Optionally filtered by device.

Payload:

FieldTypeDescription
device_iduint16Filter by device ID. 0xFFFF = all codes across all devices.
offsetuint80-based page offset within the filtered result set.

Response: CodeList (client 0x12).

CodeList (client 0x12)​

Payload:

FieldTypeDescription
totaluint8Total entries across all pages (filtered count).
countuint8Entries in this response (0 = end of list).
entriesarraycount entries, each 20 bytes: {code_id: uint16, device_id: uint16, name: char[16]}.

Maximum 3 entries per response. Page with incrementing offsets until count = 0.

ReadRawChunk (server 0x08)​

Read one chunk of raw data from a stored IR code. Data is decoded on each request (no preparation step needed). Retry-safe: same code_id and position returns same data.

Payload:

FieldTypeDescription
code_iduint16ID of the stored IR code (200-299).
positionuint16Byte offset to read from.

Response: RawChunkData (client 0x13).

RawChunkData (client 0x13)​

Payload:

FieldTypeDescription
positionuint16Echo of the requested position.
dataoctet stringChunk data. Empty = end of data or code not found.

CodeReceived (client 0x14, unsolicited)​

Sent when an incoming IR signal matches a stored code and the EnableNotifications attribute is true. This is the primary mechanism for IR-based automations.

Payload:

FieldTypeDescription
code_iduint16ID of the matched IR code (200-299).
holduint80 = single press, 1 = held button (same code within 200 ms).
tsuint32Device uptime in milliseconds. For deduplication/ordering.

Hold detection: Physical remotes repeat the same code every ~100 ms while held. The device tracks the last matched code and timestamp. Same code within 200 ms = hold = true. Hold events are rate-limited to one per 500 ms.

Examples​

Emit a stored code (code_id=201, 1 repeat)​

Send Emit (cmd 0x00). Payload: c900 (code_id=201 LE) + 01 (sends=1):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=0&payload="c90001"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Emit with 3 sends​

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=0&payload="c90003"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Add a device named "TV"​

Send AddDevice (cmd 0x01). Payload is char[16] null-padded: "TV" = 54560000000000000000000000000000:

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=1&payload="54560000000000000000000000000000"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Delete a device (device_id=200)​

Send DeleteDevice (cmd 0x02). Payload: c800 (device_id=200 LE):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=2&payload="c800"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Start learning a code​

Send LearnCode (cmd 0x03). Payload: c800 (device_id=200 LE) + 706f77657200... ("power" as char[16]) + 0f (timeout=15s):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=3&payload="c800706f77657200000000000000000000000f"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Cancel learning​

Send CancelLearn (cmd 0x04) with no payload:

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=4

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Delete a code (code_id=201)​

Send DeleteCode (cmd 0x05). Payload: c900 (code_id=201 LE):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=5&payload="c900"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Rename a code​

Send RenameCode (cmd 0x06). Payload: c900 (code_id=201 LE) + char[16] for "pwr_toggle":

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=6&payload="c9007077725f746f67676c65000000000000"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

List all stored codes (page 0)​

Send ListCodes (cmd 0x07). Payload: ffff (device_id=0xFFFF = all) + 00 (offset=0):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=7&payload="ffff00"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

List codes filtered by device (device_id=200, page 0)​

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=7&payload="c80000"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Read raw data of a stored code (position 0)​

Send ReadRawChunk (cmd 0x08). Payload: c900 (code_id=201 LE) + 0000 (position=0):

http://192.168.33.1/rpc/Zigbee.SendCommand?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&cmd=8&payload="c9000000"

Response

{
"success": true,
"status": "ZB_ZCL_STATUS_SUCCESS"
}

Assign code 201 to endpoint 1 "on" slot​

Write code_id 201 (0x00C9 → LE c900) to attribute 0x0011 (endpoint 1, on slot). Attribute type is unsigned 16-bit integer (ZCL type 0x21):

http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&attr=17&type=33&value="c900"

Response

{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}

Clear endpoint 1 "off" slot​

Write 0xFFFF to attribute 0x0010 (endpoint 1, off slot):

http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&attr=16&type=33&value="ffff"

Response

{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}

Read LastEmittedId attribute​

http://192.168.33.1/rpc/Zigbee.ReadAttr?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&attr=0

Response

{
"success": true,
"type": 33,
"value": "c900",
"len": 2
}

Read LearningStatus attribute​

http://192.168.33.1/rpc/Zigbee.ReadAttr?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&attr=1

Response

{
"success": true,
"type": 32,
"value": "00",
"len": 1
}

Enable code match notifications​

Write true to the EnableNotifications attribute (ID 2, type boolean = 0x10):

http://192.168.33.1/rpc/Zigbee.WriteAttr?dst_addr=12345&dst_ep=239&profile_id=49153&cluster=64517&attr=2&type=16&value="01"

Response

{
"success": true,
"status_str": "ZB_ZCL_STATUS_SUCCESS"
}