The Smart Lamp

Copyright Claim

The Smart Lamp

Boost
0
1
0
GIF
GIF
GIF

Print Profile(0)


Add the first print profile to earn points

Boost
0
1
0
0
1
0
Released

Description

A minimalist DIY Smart Lamp using WLED with HomeAssistant. In my case, I use this lamp as a nightlight in the hallway, and on top of that, 2 LEDs are used for notifications (like a garbage reminder).

 

BOM:

  • 2 WAGO 221-613
  • WS2812B 16 LED Ring
  • Wemos D1 Mini
  • USB C Socket

 

Links:

16 LED Ring

USB C Socket

WAGOs

 

Installation:

As easy as it shows in the picture. Press the USB C Socket into its hole. Connect everything to the WAGOs, place them in their holders. Then stick the D1 Mini in its holder and finally click the LED Ring into its position.

 

Paint over the onboard LED or use a small piece of tape to cover it on the D1 Mini. Alternatively, you can desolder it completely.

 

WAGO 1:

  • Red Line from USB C Socket
  • 5V Line from D1 Mini
  • 5V Line from LED Ring

 

WAGO 2:

  • Black Line from USB C Socket
  • GND Line from D1 Mini
  • GND Line from LED Ring

 

Pin D4 of the Wemos D1 Mini connects to the Di (Data In) of the LED Ring. I used a connector for this to be able to disconnect everything.

 

 

WLED Configuration:

Create 3 Segments with the following configuration

 

Now we have 2 Segments (Segment 1 and Segment 2) for our Nightlight and 1 Segment with 2 LEDs for our Notification. You can play with these settings to adjust the Notification LEDs to your needs.

WLED can only save Segments in a Preset, so to save our Segments, we will create a preset at ID 16. Make sure to have all Segments marked and they are off like in the screenshot above.

Now to load our Preset after a reboot or power outage, we need to go into the Settings → LED Preferences and set the “Apply preset XX at boot” to ID 16.

 

There we go.

 

Home Assistant:

So now I will tell you how to handle our Smart Lamp in Home Assistant. This is how the added WLED Device looks in HA. I will explain the different switches.

 

The Smart Lamp - This is our switch for the Notification Segment

Haupt - This is our switch for the Power Button in WLED

Segment 1/2 - These are the switches for the nightlight segments

 

So the logic behind this now is that the “Haupt” switch needs to be on the whole time because we are turning on/off the segments as we need. To ensure that the “Haupt” switch is always on (after a reboot/power outage), I turn it on in every automation/flow where I want the nightlight or the notification light on.

This being said, we are now ready to use our lamp in automations or flows in Node-RED. In my home, I use a Hue Motion sensor to turn on the nightlight (Segment 1 + Segment 2 + Haupt) in the hallway after 8 pm and before 7 am when it is dark outside. The Notification segment turns on when I need to take the garbage out for the next day. The good thing now is that both functions work independently.

Feel free to share your configs or use cases in the comments.

Comment & Rating (0)

Please fill in your opinion
(0/5000)

No more