DSC-BRAIN USER GUIDE · HOW IT WORKS

Zigbee and Tuya — roles, tasks and placement

How a paired device becomes entities: capability class, role, zone and placement, tasks and policy state, climate deltas, and the additive rule for plugs. The Devices screen lists every device in the brain's device model, grouped by the place it serves; one whose place is not known is listed under Location not known.

●  verified for 9.0.0 · corrected for 9.8.9 on 2026-10-01

●  first mirrored 2026-09-15

On this page
  1. From join to entity
  2. Placement is data
  3. Tasks and policy state
  4. Plugs are additive
  5. Tuya specifics

From join to entity

  1. Zigbee2MQTT on the Pi pairs the device and publishes its datapoints over the internal MQTT bus.
  2. The brain fingerprints it into a capability class (climate, liquid, plug, motion, safety, hazard, meter, other) and offers the matching device types. When the installed DSC-KitLib library has a fingerprint for it, the device is also named as a product (automatch): only a single exact match is applied on its own, it only names the device (it never binds a role or changes control), and a product you confirm or clear always wins.
  3. You give it a role (where and what), a zone (room, 4×8, 2×4, indoors outside the room, outdoors, or a zone you added) and optionally a placement (canopy, intake, exhaust, floor…) and a task.
  4. Every bound datapoint becomes a fleet entity you can chart, inspect, alert on and use in a rule.

Placement is data

Zone → placement → position is stored on the binding. The Twin draws placed sensors as markers, and the climate model derives deltas when both ends exist: canopy-to-exhaust, canopy-to-intake, canopy-to-floor, floor-to-ceiling, exhaust-to-intake, tent-to-room, room-to-outdoors (temperature and RH). Indoors and outdoors zones make room-to-outdoors meaningful. A placed sensor silent past the stale window drops out of the deltas rather than freezing them.

Tasks and policy state

A task turns a reading into an action, and the desks show Problem / Clear only from the task's policy state; the raw Wet / Dry is shown separately. Some leak sensors report wet as occupancy; the brain treats those as liquid, not motion.

Task Acts
Liquid level → appliance OOS Yes: the bound appliance goes out of service with its relay forced off while wet, and comes back once the dry reading has held for 2 minutes
Floor flood → alert Critical banner and a grow-log line only, never OOS
Runoff tray → notify Warning banner and a grow-log line while the tray is wet; the plant's sitting-in-runoff state is tracked whether or not this task is set
Follow photoperiod Switches a lamp plug with the hub's window
Safety cut-off Opt-in, on a smoke, gas or CO alarm: heater and heat mat out of service with relays forced off, lamp plugs switched off and held off. Fans, dehumidifier and humidifier are left alone; hub-dimmed lamps are not cut. By default it stays on until you release it on the Safety cut-off card (Settings › Devices), which can also run a test; set to release after clear, it lets go once every tripping alarm has read clear for 10 minutes
Operator datapoint task No: the device reports, nothing is switched

Zigbee state is retained across brain restarts.

Smoke, gas and CO alarms. A Zigbee or Tuya alarm bound to a hazard role (Smoke alarm · room, · 4×8 or · 2×4, Gas alarm · room, CO alarm · room) raises Smoke detected, Gas detected or Carbon monoxide (critical) the moment it reports, with no hold, and writes a grow-log line. An alarm silent for 26 hours raises Safety alarm silent (warn). Alerts alone switch nothing; the Safety cut-off task is what acts.

Bluetooth LE sensors the Pi hears are listed on the Bluetooth sensors (BLE) card under Settings › Devices, with their latest reading and a KitLib product match. Nothing to pair, and neighbours' sensors can appear. Once you bind one, its readings feed your climate readings the same way a Zigbee sensor's do; sensors you do not bind stay listed only.

Plugs are additive

Zigbee and Tuya plugs add loads (pumps, dosing, aux fans, a lamp). The four climate legs stay on the Sonoff relays because each one switches itself OFF when it has not heard from the brain for its grace time (60 to 240 seconds). A Tuya plug holds its last state when the brain stops; a Zigbee plug likewise has no hub cut-out behind it.

Tuya specifics

One local connection per device; the brain owns it while bound. Protocol version and local key come from a Smart Life sign-in or the tinytuya export. A water tester exposes EC, pH and temperature as tank entities.

DSC-Brain user guide · Zigbee and Tuya — roles, tasks and placement · this page is edited on the site; the Notion original was retired after the mirror