Schemas and examples¶
Review machine-readable artifacts with the prose. Reuse them in firmware host tests, frontend and platform tests. Passing checks establishes the covered contract behavior, not physical-device acceptance.
Current interfaces: sensor-values-v2 contract / schema2 / examples, and display-v4 / profile SET4 / GET4 / examples. Original sensor-values-v1/display-v3 artifacts remain frozen for history and are marked deprecated in the registry; RC.1 does not promise old-RC compatibility. x-utf8Bytes validates UTF-8 byte limits/unpaired surrogates; x-float32Finite validates finite float32 conversion.
Common and index¶
| File | Contents |
|---|---|
| Interface registry | Interface IDs, versions, status, producers/consumers and implementation paths |
| Positive/negative JSON examples | Type, range, unit, unknown-field and embedded-NUL boundaries |
Sensors and MQTT¶
| File | Contents |
|---|---|
| CO₂ sensor Schema | CO₂ ingress fields for account-scoped sensor messages |
| Source configuration Schema | Strict co2_source.set parameters |
| Sensor reminder write / state | Optional buzzer switches, desired/actual readback and unknown state on old MCUs |
| Generic typed sensors | Same-account measurements, TC1 power, A1 main-fan percentage, exact units and invalid null |
| CO₂ source input v2 / new JSON examples | Additive source-ID normalization and positive/negative schema3 cases; old artifacts stay byte-for-byte frozen |
M1 display and UART¶
| File | Contents |
|---|---|
| Dual configuration / runtime / API lease | Independent lanes, global selection, CAS, explicit clear and MCU confirmation boundaries |
| Formatted display policy / numeric and raw API vectors | Local/MQTT float32 modes, raw API digits/flags, 18 independent segments, confirmation and v10 migration |
| Formatted profile write / state / raw API write | Strict schema3 configuration, canonical response IDs, volatile digits/lamps and explicit clear |
| CO₂ source input v2 / new JSON examples | Additive source-ID normalization and positive/negative schema3 cases; old artifacts stay byte-for-byte frozen |
| Dual UART v3 / new vectors | D13 schema2, additive21/22/23 and scalar compatibility; original v1 files retained |
| Formatted UART v4 / vectors | Additive 24/25/26, unchanged v3 capabilities, active-profile flag and all 512 masks per region |
| Button reset / transaction vectors | Independent 0x72 frames, pending ACK matching, retry after failed persistence, deduplication and conflict protection |
| MCU capabilities and operations | Frame sizes, status values, capability offsets, display and sensor-buzzer operations |
| UART vectors | Display, buttons, OP 14 requests/replies and capability compatibility |
Daikin hub¶
| File | Contents |
|---|---|
| Hub rules | Authentication, ports, route origins, freshness and HAP storage boundaries |
| Local account Schema | Initial local owner setup |
| Upstream route Schema / Bemfa Schema | Explicit direction, retained restrictions and model/channel mappings |
| HAP settings / pairing erase / state | Strict writes, explicit erase confirmation and pairing credential visibility |
Running the checks¶
From the repository root:
Beyond the schemas¶
python tools/validate.py
python tools/build.py
python tools/validate.py --consumer /path/to/implementation
python tools/validate.py --sources /path/to/workspace
The registry's repositories maps firmware, mcu, frontend and platform to Git repositories. Each implementation / verification reference is a real file path following that alias. --sources checks those paths in a workspace with matching directory names. Before consumer validation, check out the full specification commit in protocols.lock.json and verify the registry SHA-256. Record the implementation commit and any dirty patch digest separately. Development source paths do not establish a public release.
What static vectors do not cover¶
Schemas constrain structure and expressible field relationships. Firmware measures string limits in UTF-8 bytes; JSON Schema measures characters, so ingress must also check UTF-8 and byte lengths. Runtime checks establish yellow <= red, topic/ID agreement, owner authorization, unique route/channel keys, empty-key preservation, freshness, sequence replay, desired/actual mask agreement, persistence rollback and UART scheduling. Two schema-valid messages may still conflict because of a repeated sequence. The UART validator interprets declared fields and conditions instead of copying MCU control logic.
Dual threshold objects declare x-orderedFields:["low","high"] for strict low<high. This repository validator implements that relation beyond standard JSON Schema; consumers using only a generic validator must check it separately. Configuration revisions, source/unit matching, API TTL bounded by configuration, scaled representability and readback confirmation remain runtime checks. UART v3 validation runs both original/new vectors and verifies that existing layouts and fields were not redefined.
Button-reset vectors check framing, schema, reserved bytes, pending transaction matching, the 5-second ACK boundary and the persistence/deduplication model. Consumers must still test actual button timing, 500 ms retries, Flash commits, Wi-Fi EN low for at least 1 second and both MCU restarts. Passing contract checks does not establish hardware acceptance.
Formatted validation preserves frozen schemas, examples, UART definitions and vectors by SHA-256. It checks float32 format boundaries only for local/MQTT input, raw API digit/flag readout, all 512 lamp masks in each region, PM decimal rejection and preservation of the other region's bits. Raw API value/unit, fractional/overflow digits and incomplete lamp writes have explicit negative cases. Real selector-ACK generations, independent queries, freshness, active profile, ID normalization before self-check, persistence and historical native backup envelopes still require implementation tests. These static vectors do not execute the device display or establish optical acceptance.
Formatted schema3 threshold objects additionally declare x-float32OrderedFields:["low","high"]: convert both numbers to IEEE-754 binary32, require finite results and strict low<high after conversion. Reject values that overflow float32 or collapse to the same float32 number (for example 1 and 1.000000001). Ordinary 1000/1500 thresholds remain valid. Consumers must implement this extension when using a generic JSON Schema validator; frozen v2 schemas and their original x-orderedFields semantics remain unchanged.