Skip to main content

Elements

Overview of all frame elements.

ElementSizeTypeDescription
AckReason1 byteuint8Reason code. See Ack Reasons
AckStatus1 byteuint80 = accepted, 1 = rejected
Flags2 bytesuint16Bit 0 = hasDisplayName, 1 = hasIcon, 2 = hasDeviceClass, 3–4 = entity category (0 none, 1 config, 2 diagnostic, 3 reserved), 5 = disabledByDefault. Bits 6–15 reserved
NamevariablestringButton name, as a host sends it in <Name>. ASCII letters, digits, _, - and . only. Unique on the board among properties, buttons and plain commands
CmdHash4 bytesuint32FNV-1a 32 hash of the command after its message id, identifying which command is acknowledged
CmdNameHash4 bytesuint32FNV-1a 32 hash of the command name alone (up to the first comma), or 0 if no name was parsed
CommandPayloadMax2 bytesuint16Longest command the device can receive: the characters between < and > as sent, the #id: prefix and percent-encoding included. 0 = not advertised
CRC324 bytesuint32Integrity checksum over the unescaped bytes from the message key to the last field. Every frame ends with it. See CRC32
DATAvariableraw bytesSignal value, size per DTYPE. Fixed width except DTYPE 0x0A, which is length-prefixed
DeviceClassvariablestringConditional: 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
DeviceCount1 byteuint8Number of device entries in the frame: 1–255, the board plus its sub-devices
DeviceEvent1 byteuint80x01 restarted, 0x02 not responding, 0x03 responding again. 0x00 and 0x04–0xFF reserved
DeviceFlags2 bytesuint16Which optional fields follow the versions, one bit each. All bits reserved and sent as 0
DeviceID1 byteuint80 = the board; 1–254 = a sub-device. 255 is reserved
DeviceNamevariablestringDevice name. Not empty, no control characters, and unique on the board: no two devices, the board included, share a name
OptionalFieldsvariablestringOne null-terminated string per bit set in DeviceFlags, in bit order. None are defined yet
DeviceState1 byteuint8Bit 0 NotResponding (marked missing now); bit 1 Restarted (a restart not yet reported to a host). Bits 2–7 reserved, 0
DisplayNamevariablestringConditional: 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
DisplayPrecision1 byteuint8Conditional: only if Flags bit 11. Decimal places to display
DTYPE1 byteuint8Datatype code (0x00–0x0B). See Datatypes
EntryFieldsvariableraw bytesThe fields of the entry's kind. See Entities
EntryKind1 byteuint80 property, 1 event, 2 button. 3–255 reserved: a host skips an entry of a kind it does not know
EntryLength2 bytesuint16Number 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
Flags2 bytesuint16Bit 0 = hasDisplayName, 1 = hasIcon, 2 = hasDeviceClass, 3–4 = entity category (0 none, 1 config, 2 diagnostic, 3 reserved), 5 = disabledByDefault. Bits 6–15 reserved
EventIndex2 bytesuint16Zero-based position of the event among the events of the Entity List
NamevariablestringEvent name. Not empty, unique among the events of its device, no control characters
EventTypevariablestringDeclared event type, plain text (not percent-encoded), not blank, no leading or trailing spaces. Position defines its index
EventTypeCount2 bytesuint16Number of EventType entries that follow; at least one
EventTypeIndex2 bytesuint16Zero-based index into the event's EventType list
FrameFlags1 byteuint8Bit 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
FWVersionvariablestringFirmware version
HWVersionvariablestringHardware version
IconvariablestringConditional: only if the entry's icon bit is set. Material Design Icons name (e.g. "mdi:tune")
LibNamevariablestringLibrary name
LibVersionvariablestringLibrary version (e.g., "1.0.0")
OptionsvariablestringEnum 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
ParentID1 byteuint8DeviceID of the device it sits below. 0 for the board itself and for every sub-device (one level)
Flags4 bytesuint32Bits 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
PropertyIndex2 bytesuint16Zero-based position of the property among the properties of the Entity List
NamevariablestringProperty name, as a host sends it in <Name,value>. ASCII letters, digits, _, - and . only. Unique on the board among properties, buttons and plain commands
RangeMaxvariableraw bytesConditional: 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
RangeMinvariableraw bytesConditional: 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
RangeStepvariableraw bytesConditional: 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
SchemaHash2 bytesuint16CRC-16/XMODEM over the signal list of the Device List. See Schema Hash
SignalCount2 bytesuint16Number of signals the device logs; that many SignalName, SignalUnit and DTYPE groups follow
SignalIndex2 bytesuint16Zero-based signal index, counted across all devices in Device List order
SignalNamevariablestringSignal name. Not empty, unique among the signals of its device, no control characters
SignalUnitvariablestringUnit 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
TextMaxLen1 byteuint8Text only, always present. Longest value, in bytes after percent-decoding: 0–255
Timestamp648 bytesuint64Conditional: only if TimestampMode > 0
TimestampMode1 byteuint80 = 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
UnitvariablestringConditional: only if Flags bit 4
Valuevariableraw bytesThe 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
ValueKind1 byteuint80 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.