What a Thing is
A Thing groups everything that belongs to one asset (a pump, a PLC, a press, a line, a site) under one name: its connectors, models, agents, actions, rules and panels. You describe the asset once as a template, then deploy it as many times as you need from a root. The broker expands each root into ordinaryDEFINE declarations, called its children, deploys them, and keeps owning them.
- One unit: a root and all its children deploy together or not at all. If a step fails, every child is rolled back.
- Live templates: editing a template redeploys every root that uses it, and only the children whose code changed.
- Cascading removal: removing a root removes its children in reverse deploy order.
- Protected children: a child can only be changed through its Thing. A direct add or remove is refused.
- Dry run:
-addThing --dryRunreturns the full plan and each child’s expanded LoT, and changes nothing. - Recursive: templates can use other templates to any depth (site → line → cell → device).
A first Thing
-addThing command to $SYS/Coreflux/Command. TempSensor is a template and deploys nothing. Oven is a root and deploys four children:
{{path}} and {{limit}} are filled in when the broker expands the Thing. {temp} is an action variable: single braces always belong to the runtime and are never touched.
When to use a Thing
Managing Things
Every Thing is published retained on
$SYS/Coreflux/Things/<name> (the source), …/tree (the expanded instance tree) and, for roots, …/status (ok, degraded or error, from the children’s health). Children keep their own topics.
Next steps
Thing Examples
Simple, ready-to-deploy Thing templates for sensors, PLCs, lines, and smart assets.
Thing Syntax
Templates, clauses, params, names, references and permissions.

