Contact Sensor/Reed Switch and Switch/Button to control lights in a closet

I am in the process of renovating my utility closet in the kitchen and I’m exploring the possibility of introducing the following improvement:

I’d like to set up a system for the kitchen utility closet where the lights, preferably using LED strips, automatically turn on and remain illuminated for 5 minutes unless the door is closed before the time elapses. Additionally, if we press a button or flip a switch, I want the lights to stay on for 5 minutes unless we press the button/switch again or the door closes. This ensures that we have light in the closet in case the door stays open for longer than 5 minutes and we need light in the closet.

Exploring ideas for the aforementioned solution, I have power and an available outlet in the utility closet. My network accommodates devices utilizing Zigbee, ZWave, IP, Bluetooth, and 433MHz. I possess the expertise to build, flash, install, and configure devices on platforms such as Tasmota, ESPHome, and WLED. As I am about to renovate the closet, I am looking to gather suggestions on the optimal approach for implementing the such a solution. If possible, I would like the solution to be fully contained, and be available to for automation, logging and control in Home Assistant.

Thank you in advance.

Nickolaos

And by this I guess you mean it should work without Home Assistant? In that case I would go for an ESPHome solution.

1 Like

This is nothing more than a contact sensor on the door and a controllable fixture or lamp (I do this for my pantry) Use your favorite network transport and device type - but as Mats said - if you want it to work when HA’s offline you’re looking at something ESP32 based.

My personal approach is the door sensor, and the wall switch are zwave - so I use Zwave Direct Association to link them - Motion turn on light. That covers immediate response and light in a dark place.

Then I have a couple automations that augment that. Turn off on close, Turn off on timeout (there’s plenty of examples for both so I wont dupe them here)

The experience is: If I have power I have light when the door opens. If I have HA then the fancy stuff also works and it also still functions as a standalone light switch.

@Mats789 yes, the intention is that if Home Assistant is unavailable both the reed switch and the contact sensor would continue working.

I was looking at using the Shelly products, but I am not sure if it is possible to wire both a button and a reed switch to the same posts (SW and L) on a Shelly Plus 1. Or would that require a Shelly Plus 2PM?

@NathanCu I have heard about ZWave Direct but have never used it, maybe this would be an opportunity to test it out in my test rig. Thanks for the quick response.

Ok, but then you could not use them when the HA is offline with your 5 minutes rules and automations. To still have your described solution working with HA offline I would code that in ESPHome and flash it to a ESP32. Then wire your switch and contact sensor to the ESP and, of course, the light strip.

Edit: But I don’t use Shelly products so someone will perhaps correct me.

@Mats789, I guess I should have clarified, the plan would be to flash the the Shelly products with ESPHome to get the kind of control I was looking for.

I see, and that I can not help you with. Good luck :slightly_smiling_face:

Appreciate all the advice. Will let you know how it works out.

1 Like