Dimmer function for Node-Red Zigbee Home Automation
This Node-Red function connects an IKEA control to a dimmable light bulb to provide the behavior of a dimmer. Hold down a button on the remote to increase or decrease the brightness of a bulb.
To increase the brightness, press and hold the button on the remote. The remote issues a brightness_up_hold message. This causes the Dimmer function to issue set-brightness messages every 250 ms with increasing brightness values. When you release the button, the remote issues a brightness_up_release message, and the Dimmer function stops.
- Node-Red
- zigbee2mqtt
- IKEA TRADFRI Zigbee E1810 Remote or E1743 On/Off Switch
- Any dimmable Zigbee bulb
For excellent instructions on how to setup all these prerequisites, start here.
The file Dimmer_Flow.json contains the Dimmer function within a small demo flow. In Node-Red, Import the Dimmer_Flow.json file. Paste it to a new or existing flow. Modify the mqtt-in and mqtt-out nodes to match the names of your mqtt server, IKEA remote, and Light bulb. Copy and paste this flow for as many remotes and bulbs as you need.