Elements
Overview of all frame elements.
| Element | Size | Type | Description |
|---|---|---|---|
| AckReason | 1 byte | uint8 | Reason code. See Ack Reasons |
| AckStatus | 1 byte | uint8 | 0 = accepted, 1 = rejected |
| Flags | 2 bytes | uint16 | Bit 0 = hasDisplayName, 1 = hasIcon, 2 = hasDeviceClass, 3–4 = entity category (0 none, 1 config, 2 diagnostic, 3 reserved), 5 = disabledByDefault. Bits 6–15 reserved |
| Name | variable | string | Button name, as a host sends it in <Name>. ASCII letters, digits, _, - and . only. Unique on the board among properties, buttons and plain commands |
| CmdHash | 4 bytes | uint32 | FNV-1a 32 hash of the command after its message id, identifying which command is acknowledged |
| CmdNameHash | 4 bytes | uint32 | FNV-1a 32 hash of the command name alone (up to the first comma), or 0 if no name was parsed |
| CommandPayloadMax | 2 bytes | uint16 | Longest command the device can receive: the characters between < and > as sent, the #id: prefix and percent-encoding included. 0 = not advertised |
| CRC32 | 4 bytes | uint32 | Integrity checksum over the unescaped bytes from the message key to the last field. Every frame ends with it. See CRC32 |
| DATA | variable | raw bytes | Signal value, size per DTYPE. Fixed width except DTYPE 0x0A, which is length-prefixed |
| DeviceClass | variable | string | Conditional: only if the entry's device-class bit is set. What the value, event or button is, in the host's vocabulary ("temperature", "door", "restart"). A name the host does not know costs that one entity, so a device declares nothing rather than guessing |
| DeviceCount | 1 byte | uint8 | Number of device entries in the frame: 1–255, the board plus its sub-devices |
| DeviceEvent | 1 byte | uint8 | 0x01 restarted, 0x02 not responding, 0x03 responding again. 0x00 and 0x04–0xFF reserved |
| DeviceFlags | 2 bytes | uint16 | Which optional fields follow the versions, one bit each. All bits reserved and sent as 0 |
| DeviceID | 1 byte | uint8 | 0 = the board; 1–254 = a sub-device. 255 is reserved |
| DeviceName | variable | string | Device name. Not empty, no control characters, and unique on the board: no two devices, the board included, share a name |
| OptionalFields | variable | string | One null-terminated string per bit set in DeviceFlags, in bit order. None are defined yet |
| DeviceState | 1 byte | uint8 | Bit 0 NotResponding (marked missing now); bit 1 Restarted (a restart not yet reported to a host). Bits 2–7 reserved, 0 |
| DisplayName | variable | string | Conditional: only if the entry's display-name bit is set. Label a host shows in place of the name. Presentation only: the name stays what a host sends and what any identity it derives is built from |
| DisplayPrecision | 1 byte | uint8 | Conditional: only if Flags bit 11. Decimal places to display |
| DTYPE | 1 byte | uint8 | Datatype code (0x00–0x0B). See Datatypes |
| EntryFields | variable | raw bytes | The fields of the entry's kind. See Entities |
| EntryKind | 1 byte | uint8 | 0 property, 1 event, 2 button. 3–255 reserved: a host skips an entry of a kind it does not know |
| EntryLength | 2 bytes | uint16 | Number of bytes that follow in this entry, from its name to its last field, before escaping. DeviceID, EntryKind and EntryLength are not counted. The next entry starts right after them |
| Flags | 2 bytes | uint16 | Bit 0 = hasDisplayName, 1 = hasIcon, 2 = hasDeviceClass, 3–4 = entity category (0 none, 1 config, 2 diagnostic, 3 reserved), 5 = disabledByDefault. Bits 6–15 reserved |
| EventIndex | 2 bytes | uint16 | Zero-based position of the event among the events of the Entity List |
| Name | variable | string | Event name. Not empty, unique among the events of its device, no control characters |
| EventType | variable | string | Declared event type, plain text (not percent-encoded), not blank, no leading or trailing spaces. Position defines its index |
| EventTypeCount | 2 bytes | uint16 | Number of EventType entries that follow; at least one |
| EventTypeIndex | 2 bytes | uint16 | Zero-based index into the event's EventType list |
| FrameFlags | 1 byte | uint8 | Bit 0 = first frame after restart. Bit 1 = answers BLAECK.WRITE_DATA. Bit 2 = includes a host-interval report, also when mixed with change reports. Bits 1 and 2 never both set; explicit writes and change reports leave both clear. Bits 3-7 reserved, sent clear. Test the bits; do not compare the byte |
| FWVersion | variable | string | Firmware version |
| HWVersion | variable | string | Hardware version |
| Icon | variable | string | Conditional: only if the entry's icon bit is set. Material Design Icons name (e.g. "mdi:tune") |
| LibName | variable | string | Library name |
| LibVersion | variable | string | Library version (e.g., "1.0.0") |
| Options | variable | string | Enum only, always present. Comma-separated options in index order; at least one, none blank, none with leading or trailing spaces. Each option is percent-encoded (%2C a comma, %25 a percent sign; %00 is not an escape): a host splits on the commas, then decodes, then drops outer spaces. An input accepts an index or a decoded option name, matched exactly with case |
| ParentID | 1 byte | uint8 | DeviceID of the device it sits below. 0 for the board itself and for every sub-device (one level) |
| Flags | 4 bytes | uint32 | Bits 0–1 = access: 01 READ, 11 READWRITE; 10 (write only) and 00 reserved. Bit 2 = hasRange, 3 = hasStep, 4 = hasUnit, 5 = hasDisplayName, 6 = hasIcon, 7 = hasDeviceClass, 8–10 = state class (0 none, 1 measurement, 2 total, 3 total\_increasing, 4 measurement\_angle), 11 = hasDisplayPrecision, 12–13 = entity category (0 none, 1 config, 2 diagnostic, 3 reserved), 14 = disabledByDefault, 15 = forceUpdate, 16–17 = input mode (number: 0 auto, 1 box, 2 slider; text: 0 plain, 1 password; 3 reserved). Bits 18–31 reserved, sent clear |
| PropertyIndex | 2 bytes | uint16 | Zero-based position of the property among the properties of the Entity List |
| Name | variable | string | Property name, as a host sends it in <Name,value>. ASCII letters, digits, _, - and . only. Unique on the board among properties, buttons and plain commands |
| RangeMax | variable | raw bytes | Conditional: only if Flags bit 2. Highest value an input accepts, inclusive, and above RangeMin. In the property's own type and at its width, size per DTYPE, exactly as Value |
| RangeMin | variable | raw bytes | Conditional: only if Flags bit 2. Lowest value an input accepts, inclusive. In the property's own type and at its width, size per DTYPE, exactly as Value. A device declares no range rather than one its variable cannot hold, so both limits always fit the DTYPE. Without bit 2 both limits are absent; do not read them as 0 |
| RangeStep | variable | raw bytes | Conditional: only if Flags bit 3. The step a number input stores on, counted from RangeMin. A value within a thousandth of a step of one is snapped to it; a value further off is kept as sent. In the property's own type and at its width, size per DTYPE, exactly as Value - not widened to a float64. Widening keeps the value and loses the decimal it was written as: a step of 0.01 on a board whose double is a float is held as 0.00999999977, and a float64 carrying that exactly reads as 0.009999999776482582, from which a host counting RangeMin + n * RangeStep cannot land on 0.05. At its own width the same step reads back as the shortest decimal that names it, which is the 0.01 the sketch declared |
| SchemaHash | 2 bytes | uint16 | CRC-16/XMODEM over the signal list of the Device List. See Schema Hash |
| SignalCount | 2 bytes | uint16 | Number of signals the device logs; that many SignalName, SignalUnit and DTYPE groups follow |
| SignalIndex | 2 bytes | uint16 | Zero-based signal index, counted across all devices in Device List order |
| SignalName | variable | string | Signal name. Not empty, unique among the signals of its device, no control characters |
| SignalUnit | variable | string | Unit of the signal's values, such as V, mA or °C. Empty for none. No control characters. Use the spelling Home Assistant uses, so a host can convert between units |
| TextMaxLen | 1 byte | uint8 | Text only, always present. Longest value, in bytes after percent-decoding: 0–255 |
| Timestamp64 | 8 bytes | uint64 | Conditional: only if TimestampMode > 0 |
| TimestampMode | 1 byte | uint8 | 0 = none. 1 = micros: microseconds since the device started; it never wraps and never goes back, except at a restart, where it begins again near 0 and FrameFlags bit 0 is set. 2 = UNIX: microseconds since 1970-01-01 00:00:00 UTC, without leap seconds, as the device's clock tells it; it may jump when that clock is set |
| Unit | variable | string | Conditional: only if Flags bit 4 |
| Value | variable | raw bytes | The property's value, size per DTYPE. Fixed width except 0x0A, which is a 1-byte length followed by that many UTF-8 bytes, at most 255, as in DATA. An enum's value is its index |
| ValueKind | 1 byte | uint8 | 0 number, 1 bool, 2 enum, 3 text. 4–255 reserved. With the access, it is what the sketch declared: a READ number is a sensor, a READWRITE one a number input, a READ bool an on/off indicator, a READWRITE one a switch, a READ enum an enum sensor, a READWRITE one a select, a READ text a text sensor, a READWRITE one a text input |
All string fields are null-terminated, except values of DTYPE 0x0A (in DATA and Value),
which are length-prefixed.