Skip to content
My Account

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
No ratings yet, be the first.

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.

Breadboard diagram with an ESP8266 module, an AC light dimmer module, a relay module, a TOGGLE and a BUTTON push button and warning signs for high voltage

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):

PropertyValue
Mains220 V or 110 V AC at 50 or 60 Hz
Logic3.3 V or 5 V
IsolationThe mains side is galvanically isolated from the logic side by an optocoupler
Zero-cross detection100 times a second at 50 Hz
Control pinsVCC and GND for the logic supply, ZC for the zero crossing, PSM to trigger the TRIAC
Works withIncandescent lamps, dimmable LED lamps, halogen lamps, heating elements and some AC motors
Does not work withStandard 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

ControlWhat it does
BUTTONSwitches the light on and off
TOGGLEChanges the brightness
RESET and PROGRAMFor 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.bin and otaboot.bin, and the diagram.
  • The repository is under the MIT licence.

The project is in the ESP8266-HomeKit-Light-Dimmer repository on GitHub.

Advertisement
All HomeKit

More HomeKit

Keep building.

Switches, sensors, plugs and blinds: more accessories that you build yourself and add to the Home app.

All HomeKit