HomeKit
ESP8266 HomeKit Light Dimmer with a TRIAC Module
A test setup that dims a mains lamp with an ESP8266 and a RobotDyn TRIAC dimmer module, and why it was hard to use in practice.
- ESP8266
- HomeKit
- Archived
- Safety notes
Archived project
The GitHub repository for this project is archived: it is read-only and no longer updated. What follows describes the project as it was, so check for a newer alternative before you build it.
A dimmable lamp for Apple Home: an ESP8266 that switches a lamp on and off and sets its brightness, with a TRIAC dimmer module for the mains side. It was built as a test setup with an incandescent lamp.
The project turned out to be hard to put into practice, mostly because of the size of the dimmer module. That is why the repository is archived.

High voltage
The dimmer works on 230 V. Unplug everything before you touch the wiring, never work on it while it is connected, and only take on mains wiring if you have the experience for it. Ask a certified electrician if you do not. The diagram shows the danger signs for a reason.
The dimmer module
The module in the diagram is the RobotDyn AC Light Dimmer, a one-channel TRIAC dimmer. RobotDyn has stopped making it, and similar modules from other makers are still sold. Its product page lists these details (checked on 26 September 2026):
| Property | Value |
|---|---|
| Mains | 220 V or 110 V AC at 50 or 60 Hz |
| Logic | 3.3 V or 5 V |
| Isolation | The mains side is galvanically isolated from the logic side by an optocoupler |
| Zero-cross detection | 100 times a second at 50 Hz |
| Control pins | VCC and GND for the logic supply, ZC for the zero crossing, PSM to trigger the TRIAC |
| Works with | Incandescent lamps, dimmable LED lamps, halogen lamps, heating elements and some AC motors |
| Does not work with | Standard LED lamps, fluorescent lamps and devices with their own brightness control |
The module cuts a part of every half wave of the mains voltage. The ESP8266 gets a signal at every zero crossing, waits a set time and then triggers the TRIAC. A longer wait means less power for the lamp and a dimmer light.
Controls
| Control | What it does |
|---|---|
| BUTTON | Switches the light on and off |
| TOGGLE | Changes the brightness |
| RESET and PROGRAM | For programming the module |
A relay module is in the diagram as well. The connections follow the pinout of the ESP8266 module. The diagram shows a module of the ESP-01 type, and the ESP8266-01 pinout lists its pins.
What came out of it
The setup worked as a test with an incandescent lamp. In practice the module is large for what it does, and that made the project hard to build into a lamp or a wall box. For a simple switch that Apple Home can show as a lamp, see the ESP8266 HomeKit Switch.
Good to know
- The repository has no release, so there is no firmware to install. It holds the three bootloader files,
rboot.bin,blank_config.binandotaboot.bin, and the diagram. - The repository is under the MIT licence.
The project is in the ESP8266-HomeKit-Light-Dimmer repository on GitHub.
More HomeKit
Keep building.
Switches, sensors, plugs and blinds: more accessories that you build yourself and add to the Home app.
All HomeKit

