I’ve been looking for a solution to something I wish to do but have been unsuccessful so far. Hoping someone can point me in the right direction.
Current State - I have a wifi light switch (Kasa HS200) controlling some upper cabinet lights in the kitchen. This setup works good and gives me on/off control of the lights manually from the switch, thru HA automations/routines and thru voice control with Alexa. Wiring for the setup is very basic, power into the switch, power continuing on to the lights.
End State - I would like to replace the simple 6 x dumb bulbs above the cabinets with addressable LEDs running off an ESP and controlled via ESPHome. I would still like to have the 3 control methods available: manual, HA or voice.
Initial Thinking - keep WIFI wall switch in place, install ESP board at start of LED string and install LEDs. Of course this works as long as the wall switch is kept on and gives me only HA or voice control when the switch is on.
Questions - is there anything that I can do to either replace the Kasa HS200 Decora wall switch with something similar (the switch is located in a 3 gang box with 2 other dumb switches) and gain manual control of the lighting all the while having power constantly suppled to the ESP board, or is there a particular switch I can install at the current position that is not directly connected to the lights and only communicates with HA to establish any on/off cycles?
My last thought is I might be able keep the Kasa switch in the current location, still have power run to it but do not connect it to the lights. Have separate constant power going to the lights. I do not know yet if the Kasa switch will work without being hooked up completely but I’m confident the constant power to the LEDs will give me HA and voice control over them as a minimum. If the Kasa switch works configured like that then I’ll gain manual control ovder the lights. But I will need to power the LEDs separately from the switch.
Anyone else have this situation and have solved it? Thank very much in advance, cheers
If you’re comfortable with HA controlling all on/off activities, you could wire power directly to the LED controller, while still leaving the hs200 connected to power. The LED controller remains powered at all times, HA gets events from the switch and controls the lights. Problem is you lose control of the lights when HA is down.
Zigbee switches can be bound directly to zigbee lights without needing HA in the middle.
I think the same binding concept is available for esphome based switches, but have no first hand experience.
You’ve actually got a few options (these are the ones I can think of, others may have more):
You can wire the lights to always be on and then monitor the state change of the light switch to perform the state it’s set to to re-achieve the manual control (NOTE: My experience with Kasa for this is that HA doesn’t get the notification for at least another second or two, but YMMV … other switches are much faster)
You can use a different light switch that has ‘smart bulb mode’ that’ll allow you to catch the state change in HA and then have an automation make the change without the switch actually doing anything to the power. Most zigbee/z-wave switches have this ability. Some of the wifi ones do and some don’t. It may also be called ‘detached’ mode.
What I did is basically #2, but using a set of cheap wall switches with an esp8266 in them, I opened them up, flashed them to ESPHOME instead and have them turn on the relay when they gain power on (and ensure the relay is still on) and then only send a button press signal to HA … HA then handles everything when it gets that button press signal, BUT, if the wall/esp-switch doesn’t see HA online, it’ll send a power toggle command to the relay instead, so the lights will still operate in a normal fashion if HA or the home network are down. These are the ones I used, but they don’t exist anymore.
Similarly, you can use a shelly/sonoff/other-similar-device behind a dumb switch and it can register the state change of the switch and send a notice to HA to perform the action … I haven’t done this myself, but my understanding is that the physical switch isn’t connected to mains but the Shelly is, you’re basically just using the switch as an input you’re monitoring … I may be wrong on that though since I haven’t done it, so, if you like the sounds of that idea, just do a bit more research first.
ETA: As @jerrm mentions, zigbee devices have the ability to directly bind to each other, if you wanted to shift your LED controller to zigbee instead -or- esphome using something like this method. NOTE: This would still require your network to be up, but you could potentially have the switch connect to a portal on the LED Controller [ESPHOME has the ability to do that when it doesn’t have network connectivity) as a secondary WiFi and then control it that way. It’d be cumbersome, but, you’d only need to spend the time once.
For me, I’ve also got a few lights I’ve designated as ‘emergency’ lights, so if the network goes down, the ESPHOME device just turns the lights on and makes them stay on since they’re in locations where I really don’t want people to get stuck in the dark, but aren’t used enough that it’ll cause problems if the lights just stay on (the switches are wired in very inconvenient places by the previous owners).
@jerrm , @tjhart85 Thank you very much for those detailed responses and recommendations, I’ll be checking them out and which path will get these lights working the way I want them to , thanks again, cheers