Overview
My partner gifted me a Darth Vader Look-ALite lamp a few years back. It looks awesome, and as a gift it’s great! A lamp themed after your favourite characters that’s battery or USB powered? Super cool.
Until you use it, and realise it’s a SINGLE white LED in there. It’s basically useless as a lamp. In fairness to the company behind it, if you read their website and packaging carefully it never really suggests it could be used like a normal lamp and suggests it’s more a decorative thing, but still.
I wanted to upgrade it. So I took it apart and started taking some measurements and making some plans.
The Plan
My plan was to fit a ring of addressable RGB LEDs inside the top of the lamp, that would connect to a ESP8266 or similar board to be controllable by Home-Assistant, and in our case therefore HomeKit & Siri.
Components
- ESP8266 based micro-controller board (NodeMCU or similar)
- RGB LED ring (12x LEDs)
- Female-to-Female Jump Wire (Sometimes refered to as “Dupont Wire”)
Wiring
I opened up the light and drilled a couple of holes for the wires to pull through.
Then I de-soldered the power cables that come from the USB connector/switch and soldered some female jumper wire (Dupont) connectors onto them. I could then plug this into the “VIN” and “GND” pins on the NodeMCU. I used some heat shrink to protect the connections between the two kinds of cables.
I then soldered some jumper wire into the “PWR”, “GND” and “IN” connectors on the RGB LED ring. These then connect to “3.3v”, “GND” and “D4” on the NodeMCU.
I then put a couple of blobs of super glue onto the bottom of the RGB ring, and put it on top of the original LED plate. This probably isn’t necessary as it will be “clamped” in somewhat once you screw the top on, but I thought it was worth it.
Now you’re done and you can move onto the software.
ESPHome Code
Using ESPHome you can easily create the firmware for this light and update it wirelessly if you ever need to.
You’ll need an install of Home-Assistant too ideally.
Take a look at the code below and make sure you add secrets in ESPHome for your WiFi SSID (!secret wifi_ssid
) and password (!secret wifi_password
).
|
|
Home-Assistant and Apple HomeKit
Once you’ve uploaded your code the NodeMCU, Home-Assistant should detect the device and offer to set it up for you. Go through this process and you should then get the controls on the entity:
Then if you add it to your HomeKit configuration in Home-Assistant, it will be available to your Apple HomeKit devices too:
Considerations
Power
Powering off the 3.3v rail on the NodeMCU is not a great idea, but really the LEDs are so low power that this isn’t really a concern for me. Try it at your own risk! But consider wiring the LEDs directly to 5v from the power input if you are using any different LEDs.