Skip to content
My Account

HomeKit

ESP8266 HomeKit Garden Light EX

The extended garden light: an outdoor fixture with a mains lamp on a relay, a NeoPixel strip for coloured light, and a 3D-printed housing for a motion sensor, on a board left over from the fountain project.

  • ESP8266
  • HomeKit
  • Safety notes
  • 3 min read
No ratings yet, be the first.

An outdoor light fitting turned into a HomeKit accessory with two kinds of light: the normal E14 lamp, switched by a relay, and a NeoPixel strip for coloured ambience light, controlled on its own from the Home app.

This is the extended version, which comes with a housing for a motion sensor. The plain version is ESP8266 HomeKit Garden Light.

The idea came after the successful fountain light project. A few of its printed circuit boards were left over, so the same board went into a garden light, to build out the atmosphere in the garden further.

High voltage

The board is connected to 230 V and switches a mains-powered lamp. It is built into an outdoor fixture. Only build this if you know how to work safely on mains wiring, and disconnect the power before you open the fixture.

What it does

FeatureDetails
Lamp, “NeoPixel Strip”A 12-LED strip for coloured light: on and off, brightness, hue and saturation. It is separate from the standard light
SwitchSwitches the E14 lamp on mains voltage through a relay, the standard light of the fixture
ButtonA single press toggles the relay. A double or triple press does nothing
Long press4 seconds. Nothing happens
IdentifyThe strip flashes pink in three groups of three, together with the on-board LED
UpdatesOver the air, through Life Cycle Manager 2
No cloudControl stays on your own network

Hardware

ComponentNotes
Outdoor fixtureA grey oval fitting, with a front cover, a white diffuser and a base with an E14 lamp holder
Controller boardThe StudioPieters board from the fountain project, with an ESP-12 type module, a Hi-Link HLK-PM01 power module, a fuse holder and blue screw terminals
NeoPixel strip12 WS2812B LEDs on a strip with a cable. See the NeoPixels WS2812B guide
E14 lampThe standard light, switched by the relay
The parts of the fixture: the grey front cover, a white diffuser and the base with the lamp holder and terminal block
A NeoPixel strip with twelve LEDs on a black cable
The controller board with the power module, fuse holder and screw terminals in the base of the fixture, with the NeoPixel strip along its edge

Pins

FunctionESP8266 pin
Relay (E14 lamp)GPIO12
ButtonGPIO0, active high
On-board LEDGPIO2
NeoPixel stripThe I²S output, through the ws2812_i2s driver

These come from the firmware source in the src folder of the repository. The relay is switched active-high. See the ESP8266 pinout for the module.

The motion sensor housing

The extended version comes with a housing for a motion sensor. It is a square housing in two parts, modelled as HC501 motion sensor v6, with an opening on top for the sensor. The sensor itself goes inside the housing. It is a separate HomeKit motion sensor, like the ESP8266 HomeKit Motion Sensor, that you link to the light with a HomeKit automation.

The closed two-part square motion sensor housing with an opening on top
The two parts of the motion sensor housing, with the outer part shown transparent
The inner part of the motion sensor housing seen from above

The repository contains images of the housing, not the model file.

Flash and install

The installation is the same as for the other ESP8266 HomeKit accessories on this site. The firmware runs on ESP-Open-RTOS with Life Cycle Manager 2, which sets up the WiFi and installs updates over the air. The full steps, from installing esptool to flashing, joining the LCM- WiFi network and pairing, are in ESP8266 HomeKit Blinds.

In the portal, use these values:

FieldValue
OTA repositoryAchimPieters/ESP8266-HomeKit-Garden-Light-EX
OTA binary filemain.bin

When the installation is done, scan the QR code the device generates in the Home app to add it.

Firmware releases

VersionDateNotes
0.0.212 April 2020Minor fixes
0.0.111 April 2020First release

Each release has a main.bin and a signature file, main.bin.sig.

Good to know

  • The HomeKit Accessory Protocol specification the firmware follows is the non-commercial version, for accessories you build yourself and do not distribute or sell.
  • The repository is under the MIT licence. The HomeKit setup code is set in the firmware source, so change it to your own.

Everything is in the ESP8266-HomeKit-Garden-Light-EX 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