Example Flows

Each example below is a complete Node-RED flow you can import directly. They start from the basic pattern shown in Voice CommandsInject → Hub → Device → Debug — and scale it out across more devices, more device types, and more downstream handlers.

Multi-room lighting

One hub controlling three lights across different rooms. The bedroom light shows how to extract specific component properties — power state, brightness, and color — into separate debug outputs.

[{"id":"f100000000000001","type":"DuloNodeHub","z":"a1a1a1a1a1a1a1a1","name":"","x":220,"y":320,"wires":[["f100000000000002","f100000000000004","f100000000000006"]]},{"id":"f100000000000002","type":"DuloNodeDevice","z":"a1a1a1a1a1a1a1a1","name":"Living Room Light","deviceType":"light","x":490,"y":220,"wires":[["f100000000000003"]]},{"id":"f100000000000003","type":"debug","z":"a1a1a1a1a1a1a1a1","name":"Living Room","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":220,"wires":[]},{"id":"f100000000000004","type":"DuloNodeDevice","z":"a1a1a1a1a1a1a1a1","name":"Bedroom Light","deviceType":"light","x":480,"y":320,"wires":[["f100000000000005","f100000000000008","f100000000000009"]]},{"id":"f100000000000005","type":"debug","z":"a1a1a1a1a1a1a1a1","name":"Get brightness","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.components.BrightnessController.brightness","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":320,"wires":[]},{"id":"f100000000000006","type":"DuloNodeDevice","z":"a1a1a1a1a1a1a1a1","name":"Kitchen Light","deviceType":"light","x":470,"y":420,"wires":[["f100000000000007"]]},{"id":"f100000000000007","type":"debug","z":"a1a1a1a1a1a1a1a1","name":"Kitchen","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":420,"wires":[]},{"id":"f100000000000008","type":"debug","z":"a1a1a1a1a1a1a1a1","name":"Get power state","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.components.PowerController.powerState","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":280,"wires":[]},{"id":"f100000000000009","type":"debug","z":"a1a1a1a1a1a1a1a1","name":"Get color","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.components.ColorController.color","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":360,"wires":[]}]

Climate control

A thermostat and ceiling fan on the same hub. The thermostat extracts setpoint, mode, and current temperature into separate outputs. An inject node demonstrates how to send a sensor temperature reading to the thermostat. The fan extracts speed and power state.

[{"id":"f300000000000001","type":"inject","z":"c3c3c3c3c3c3c3c3","name":"Set Sensor Temperature","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"components\":{\"TemperatureSensor\":{\"temperature\":{\"value\":20,\"scale\":\"CELSIUS\"}}},\"id\":\"f300000000000004\"}","payloadType":"json","x":130,"y":160,"wires":[["f300000000000002"]]},{"id":"f300000000000002","type":"DuloNodeHub","z":"c3c3c3c3c3c3c3c3","name":"","x":360,"y":160,"wires":[["f300000000000003","f300000000000004"]]},{"id":"f300000000000003","type":"DuloNodeDevice","z":"c3c3c3c3c3c3c3c3","name":"Ceiling Fan","deviceType":"fan","x":610,"y":260,"wires":[["f300000000000008","f300000000000009"]]},{"id":"f300000000000004","type":"DuloNodeDevice","z":"c3c3c3c3c3c3c3c3","name":"Living Room Thermostat","deviceType":"thermostat","x":650,"y":110,"wires":[["f300000000000005","f300000000000006","f300000000000007"]]},{"id":"f300000000000005","type":"debug","z":"c3c3c3c3c3c3c3c3","name":"Get Setpoint","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":885,"y":60,"wires":[]},{"id":"f300000000000006","type":"debug","z":"c3c3c3c3c3c3c3c3","name":"Get Mode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":885,"y":160,"wires":[]},{"id":"f300000000000007","type":"debug","z":"c3c3c3c3c3c3c3c3","name":"Get Current Temperature","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":110,"wires":[]},{"id":"f300000000000008","type":"debug","z":"c3c3c3c3c3c3c3c3","name":"Get Power State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.components.PowerController.powerState","targetType":"msg","statusVal":"","statusType":"auto","x":885,"y":220,"wires":[]},{"id":"f300000000000009","type":"debug","z":"c3c3c3c3c3c3c3c3","name":"Get Speed","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.components[\"RangeController:Fan.Speed\"].rangeValue","targetType":"msg","statusVal":"","statusType":"auto","x":885,"y":300,"wires":[]}]

Security & access

A lock and a switch acting as an alarm-arm toggle on the same hub, each with its own handler so you can wire in confirmations or notifications.

[{"id":"f400000000000001","type":"DuloNodeHub","z":"d4d4d4d4d4d4d4d4","name":"","x":420,"y":320,"wires":[["f400000000000002","f400000000000004"]]},{"id":"f400000000000002","type":"DuloNodeDevice","z":"d4d4d4d4d4d4d4d4","name":"Front Door Lock","deviceType":"lock","x":660,"y":220,"wires":[["f400000000000003"]]},{"id":"f400000000000003","type":"debug","z":"d4d4d4d4d4d4d4d4","name":"Lock Handler","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":860,"y":220,"wires":[]},{"id":"f400000000000004","type":"DuloNodeDevice","z":"d4d4d4d4d4d4d4d4","name":"Alarm Toggle","deviceType":"switch","x":650,"y":420,"wires":[["f400000000000005"]]},{"id":"f400000000000005","type":"debug","z":"d4d4d4d4d4d4d4d4","name":"Alarm Handler","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":860,"y":420,"wires":[]}]