Use Cases

Overview

Each use case below pairs a working Configuration Schema with the device-side set-config payload that drives it, so you can adapt a proven example instead of building from scratch.

Pick the one closest to what you need:

Use caseUse it when
Hiding fields until the device reports a capabilityHardware is optional or removable (a Wi‑Fi card, an expansion module), and its settings should disappear when it isn't installed. Keyed on a boolean the device reports.
Switching the schema per firmware generationOne model has units on different firmware, and each generation needs a different set of sections. Keyed on a schema_version the device reports — a version number, a label, or a firmware codename.

Both patterns rely on JSON Schema draft-07 conditionals (if / then, allOf, $ref), which the model's Config Schema editor supports. Drafts above 7 are not supported.

⚠️

Every $id in a schema must be unique

$id values are registered across the whole schema document. If two branches declare the same $id, the schema fails to compile and the condition silently evaluates as false — the form quietly renders the wrong branch with no error shown. Give each branch a distinct $id, or leave $id out of the branches entirely; it isn't required for the form to render.