DSC-BRAIN USER GUIDE · SETUP
Tuya / SmartLife Wi-Fi devices (local)
Bind a SmartLife plug or water tester by its local key; the one-controller rule; the lamp-plug backstop.
● verified for 9.0.0 · firmware train 8.2.0.0
● last verified 2026-09-17 · mirrored 2026-09-15
DSC-Brain drives SmartLife (Tuya) Wi-Fi devices directly on your LAN on TCP port 6668. Once a device's local key is on the Pi the Tuya cloud is never used, and you can block the device's internet at the router.
What Tuya devices are good for
| Use it for | Do not use it for |
|---|---|
Pumps, dosing, auxiliary fans (plug_* roles); the reservoir water tester; a mains-powered smoke, gas or CO alarm (battery Wi-Fi smoke alarms sleep between events, so the brain rarely reaches them; a Zigbee alarm is the reliable choice); a lamp plug with the backstop below |
Heater, humidifier, dehumidifier, heat mat. Those stay on the hub-driven Sonoff relays, which switch off when the hub goes dark. A Tuya plug keeps its last state if the brain stops. |
If you have a Tuya Zigbee device (paired through a Tuya hub), pair it to the Pi's Zigbee coordinator instead. No keys, no cloud.
One local controller per device
A Tuya device accepts exactly one local connection. If Home Assistant, Homebridge, Node-RED, tuya-mqtt or another tinytuya holds it, the brain cannot, and the failure looks like a dead device: Err 901 Unable to Connect (protocol 3.1–3.3) or Err 914 Check device key or version (3.4–3.5) while a plain TCP connection to port 6668 succeeds. Do not rotate keys or re-pair — that changes the local key and wipes the device's schedules, and does not fix a conflict. Disable the device in the other platform (in Home Assistant, Disable device, not Remove), then probe again from the card. The SmartLife phone app is the exception: it falls back to the cloud while something else holds the socket.
Binding a device
- Settings › Devices › Zigbee, Tuya / SmartLife (Wi-Fi, local) card › Add devices (import keys). Step 1 walks through the one-time key export with the tinytuya wizard; paste the
devices.jsonit writes and press Import. - Step 2, for each device: enter its fixed IP and Version, press Probe (it should answer with raw datapoints and a suggested type), pick the Type (Smart plug, Relay / switch, Water quality tester, Smoke alarm, Gas alarm, Carbon monoxide alarm) and Save. Alarms differ between makers: probe first and fix the DPS map under Edit if the alarm datapoint sits elsewhere.
- In the device table give it a role and zone like a Zigbee device and an optional task, then Save roles & tasks. When DSC-KitLib knows the device's product, the row also shows it (naming only; it never binds a role).
Lamp plugs
A tent whose light is not on a hub output (the 4×8 today) can run its lamp from a plug bound as Lamp plug · 4×8 (or · 2×4). The brain then follows the hub's own photoperiod window, so the tent keeps the hub's clock rather than the plug vendor's schedule.
- On/off only. No sunrise or sunset ramp. The hub still ramps the dimmable 2×4 lamp.
- Leave an off-only schedule on the plug, a few minutes after your lights-off time. A brain outage between lights-on and lights-off would otherwise strand the lamp ON through the dark period. Never leave an on schedule on the plug — that is the only way the two can fight.
Water tester
A bound tester feeds the Tank card (EC, pH, water temperature) on Kit and Root, and the tank alerts (EC or pH out of range, water too warm). Set the EC unit multiplier and biases on Kit › Calibrate › Tank EC / pH bias.
DSC-Brain user guide · Tuya / SmartLife Wi-Fi devices (local) · this page is edited on the site; the Notion original was retired after the mirror
