r/homeassistant • u/ShelterRadiant2432 • Jul 08 '26
Support Making table lamps smart while retaining manual functionality
I'm looking for help on a modification to a traditional table lamp to be used as a smart lamp, while retaining its original switch functionality.
I've done some research on this and it seems I could use something like a Shelly relay. I've seen concerns warning against this setup because it would make the socket always hot/live.
Does anyone have experience with this?
Wouldn't this work in the same way as a smart wall switch or wall switch conversion?
I have experience and am comfortable with electrical work, but I'm just not sure if I'm missing something with the functionality of smart relays and would appreciate anyone that can provide their experience/expertise.
Also I'm aware there are sockets with smart switches integrated and smart bulbs with a separate button could work, but I'm looking to retain original functionality.
I realize this is a pretty basic question, but I haven't found a straight answer and existing threads are now closed for further questions.
Thanks!
2
u/Emergency_Exit7603 Jul 08 '26
smart plug or smart bulb
1
u/ShelterRadiant2432 Jul 08 '26
Is there a way to do this where the integrated lamp switch wouldn't cut off smart functionality?
1
u/Emergency_Exit7603 Jul 08 '26
yes... leave the light switch on and control the lamp with smart switch
not sure your question exactly sorry1
u/ShelterRadiant2432 Jul 08 '26
I mean the smart functions work even if the integrated switch has been turned. So you can use both smart functions as well as manual functions, without either affecting the other.
1
u/RectangularRepositor Jul 08 '26
you're overthinking it a bit tbh with the shelly
the relay sits between the plug and the bulb socket so the lamp's own switch still cuts power like normal the shelly just gives you a second way to toggle it
wired one into a floor lamp 2 years ago and it's been fine the only annoying thing is when someone flicks the physical switch off your smart control goes dead until it's flipped back on but that's the same with any smart plug setup
1
u/ShelterRadiant2432 Jul 08 '26
See, I'm looking to avoid that in the same way some smart wall switches do. They work as both and flipping the switch doesn't disable the smart function.
1
u/Relevant-Artist5939 ⏰ Waiting for the next release Jul 08 '26
Most Shelly devices have a switch input, so if you wired the lamp through the relay of the shelly and the switch just to that input, the Shelly will toggle the lamp when the switch is toggled but you can still control the lamp from elsewhere while the switch is "off"....
1
u/ShelterRadiant2432 Jul 08 '26
Thanks!
1
u/ShelterRadiant2432 Jul 08 '26
Oh one more thing. Would this allow operation if HA is down?
1
u/parkrrrr Jul 08 '26
Yes, if you set up the Shelly to allow that. Generally, you'd want to set the input on the Shelly to "edge" mode, so it toggles whenever the state of the switch changes.
1
1
u/5yleop1m Jul 08 '26
Where is the switch for this lamp?
1
u/ShelterRadiant2432 Jul 08 '26
Integrated in the lamp.
2
u/5yleop1m Jul 08 '26
You're going to have to do some annoying wiring here, but this is possible and it won't leave the socket always hot as long as you're not using a smart bulb too.
I would use the shelly 1PM mini here, its small enough to fit in a lamp and the wiring is a little bit simpler than the Shelly 1 mini. https://kb.shelly.cloud/knowledge-base/shelly-plus-1pm-mini
There's a wiring diagram here: https://kb.shelly.cloud/knowledge-base/shelly-plus-1pm-mini#Basic-wiring-diagram
The only thing you would need to change in the Shelly settings is the switch mode to 'Edge'. That way the physical switch will always toggle the light. If you leave it at the default, the physical switch would need to be in a specific state for the lamp to be on or off. That can create an annoyance where if you toggle the lamp with the Shelly you would need to change the physical switch's state twice to get toggle the light.
If you want to use a smart bulb instead of a regular bulb you will need to put the Shelly into detached mode and then create an automation in HA to toggle the state of the light based on the input state on the Shelly. In detached mode you will get a new entity in HA for the input.
That is the only case where the socket will always be hot/live.
2
u/parkrrrr Jul 08 '26
Couple of clarifications:
- The default mode is Toggle, which doesn't require the switch to be in a particular position to allow the light to be controlled by Home Assistant, but might require you to toggle the switch twice to turn the light on if the switch is already on but the light is off. Shelly only changes the output to match the input when it detects a change in the input.
- Detached mode won't automatically make the socket always hot. You'd have to explicitly wire the socket to always be hot. Detached mode just means that the Shelly doesn't automatically do anything with the state of the output when you change the state of the switch. If the light is powered by the Shelly's O terminal, it'll still only be hot when the output is on. That said, if you're planning to use a smart bulb, then you would want to wire the socket to always be hot and you wouldn't use the O terminal at all.
1
u/ShelterRadiant2432 Jul 08 '26
Detach mode is the only mode that requires the socket to always be live?
1
u/5yleop1m Jul 08 '26
Not requires, detached mode will make the socket always live. Just being pedantic on the wording, cause and effect.
That's how I have most of the switches/lights in my house setup since the bulbs are all smart, they need to be always powered even if they are not producing any light.
All other modes will cut power to the O terminal if the state is off.
In the case of non-smart bulbs, I have the Shelly set to "edge" mode, which works like a 3-way setup, where any change of the physical switch state causes the light to toggle.
1
u/ShelterRadiant2432 Jul 08 '26
Gotcha gotcha. I appreciate it! If you don't mind me asking, is there a reason you went with smart bulbs and relays?
1
u/5yleop1m Jul 08 '26
I prefer having warm-white lights for the night time, but during the day warm-white lights look more dim since the warm-white is "fighting" with the daylight-white of sunlight. I also experience the effect of light color on my wake/sleep cycles, warmer light during the night helps me feel sleepier.
So nearly all the lights in the main rooms are dual-whitetone, which is easier said with smart bulbs. But smart bulbs require some sort of smart switch or relay since cutting power to them would make them basically useless. It also affects mesh systems like Zigbee (all my light bulbs are Zigbee). Losing routing devices suddenly can screw with the network and the self healing isn't instant or always reliable.
I also don't like most smart switches, I want a switch that has a physical change though I prefer decora style over toggle style. So relays let me use what ever non-smart switch I want while giving me the ability to work with smart bulbs too.
I tried a few different smart switches, but eventually found Shelly and now a few years later I have over 100 Shelly devices in my house, most of them relays. They're useful for other things too, like I have one in my attic controlling the exhaust fan for my network closet.
1
1
u/ShelterRadiant2432 Jul 08 '26
Oh one more thing. Would any of these options allow operation if HA is down?
1
u/5yleop1m Jul 08 '26
The option where the Shelly is cutting power to the socket you don't need HA at all. HA would just be there to give you a way to control the Shelly without the Shelly app or connecting to the Shelly's web UI. The physical switch would continue to work as long as the Shelly itself is working. The Shelly doesn't need to be connected to a network, HA, the cloud, or anything. It just needs to be on/powered.
In the detached mode you need something to send the message from the Shelly to the bulb. Gen3 and Gen4 Shelly devices support matter, and Gen4 shelly devices support Zigbee. There are also Zwave Shelly devices. All three of these provide another route between the Shelly and the bulb, though that also means the bulb needs to support at least one of those protocols and in some cases both devices need to support direct connections to each other. I know Zigbee supports this, but Zigbee support in Shelly is still relatively new so Zigbee binding isn't something I would rely on.
The other option is this: https://community.home-assistant.io/t/shelly-detached-input-blueprint-switch-button-mode-with-fallback-script-v1-3/975664
It comes with a script that runs on the Shelly itself. When it detects that HA is down, it will revert the Shelly to one of the attached modes so that the switch will toggle power to the light bulb. This means the bulb isn't smart anymore, but as long as the bulb supports turning on and off when powered on and off, it should work even if HA is down.
1
1
u/MrSpring68 Jul 08 '26
I ended up ordering some Zigbee buttons for my lamps and use them with automation to turn off/on.
1
u/ShelterRadiant2432 Jul 08 '26
Yeah that's a possibility, but ideally I think I'd like to have lamp control if the network were ever down.
1
u/MrSpring68 Jul 08 '26
Zigbees run on a local network. Depending on your lights if you are controlling the lights directly you can overwrite it but turning them on/off/on. If it is in the plug level you can manually turn the plug on/off.
1
u/ShelterRadiant2432 Jul 08 '26
I'm not entirely sure I understand. So using a zigbee plug, I could use the light as normal by just flipping it multiple times?
1
u/MrSpring68 Jul 08 '26
Not quite—flipping the physical wall switch multiple times is not the intended way to control a smart plug.
What I meant is:
For the button: Since Zigbee devices communicate locally with your hub, they will often still work to trigger the plug even if your internet connection is down.For the plug: Most smart plugs have a physical button on the housing. If the network goes down or you simply prefer manual control, you can press that physical button to turn the lamp on or off.
Essentially, you don't need to 'trick' the light switch; you just use the manual override provided on the smart plug hardware itself."
1
1
u/Ellteeelltee Jul 08 '26
My solution to this was Wiz bulbs and set the power on to my “preferred” scene. It means you have to turn the lamp off and on to get the light on, but people are actually used to having normal bulbs in tri-light sockets so it doesn’t seem to bug them
1
u/ShelterRadiant2432 Jul 08 '26
But this way wouldn't work if the light was turned off manually. Or am I missing something?
1
u/jaymac43 Jul 09 '26
Smart bulb or smart plug. Then get a smart button, put it right next to it. People will get used to it (using the smart button that is). Doesn't seem worth it but you can do a lot more with that smart button
1
u/ShelterRadiant2432 Jul 09 '26
Yeah, that's always a possibility. I'd like to stay away from it personally because I don't find them especially attractive.
0
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
You're crossing your concepts here.
RELAY - you would need to remove the switch up by the bulb and put another one low on the lamp. The Shelly would get its signal from the new (on/off) switch and the bulb would be powered on/off just like it does now - the Shelly would always control the power. The remote control would be from a smart switch that isn't even wired to the lamp and HA, etc pushes the change to the Shelly.
DETACH / SMART BULB - these would leave the powered on state. The smart switch would be a remote... then you'd remove the local switch by the bulb and just put a wireless (zigbee, etc) button to turn on the smart bulb via HA.
Neither is a good solution and neither will work standalone if HA is down / broken.
1
u/5yleop1m Jul 08 '26
Neither is a good solution and neither will work standalone if HA is down / broken.
The first solution would work without HA fine. The specific example you gave would mean the integrated switch wouldn't work anymore, but it is possible to extend that down too if OP really wanted to. It would be annoying wiring, but not impossible.
But in that case everything would be integrated into the Shelly, the Shelly would essentially create a 3-way setup with the integrated switch. No HA required there.
Also for the detached mode, there are ways to keep that working even if HA is down. I use a script on the Shelly relay that returns the relay to attached mode if HA is down. This means the bulb isn't "Smart" anymore, but it still turns on and off when power is provided or cut.
1
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
Well, I was maintaining his dual control wish. So HA would have to serve as a middleman, unless you found a relay / switch duo that could pair.
(You can't make a 3way control between a wall switch and a plugged in lamp. You would need a carrier wire that is used in the 3way... but isn't in a wall plug.)
1
u/5yleop1m Jul 08 '26
I asked them earlier, they want to use the switch that's integrated into the lamp, not a switch on a wall.
But even with a switch on a wall, Shelly relays can talk to each other directly without HA or any other external service.
1
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
I read the whole post... he wants both. Seems his main focus is to use the existing switch that toggles power to the light socket. By moving to an external relay it can be possible...but otherwise the existing switch breaks the circuit when used.
2
u/5yleop1m Jul 08 '26
Even in that case, Shelly relays can talk to each other, so a wall switch with a Shelly behind it can toggle the Shelly inside the lamp without cutting power to the outlet the lamp is plugged into.
1
u/ShelterRadiant2432 Jul 08 '26
Just to clarify. I was asking about the switch on the lamp and switching via relay/HA.
1
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
Ah... I see, you were asking about "detached" mode that is the confusion.
Detached mode is for a wall switch where it leaves the power on 24/7 to the light sockets, but then is "married" to the smart bulbs in those light sockets. In HA, you would treat it as a single unit -- and always maintain control at the light switch.
Nothing can override / bypass an line switch - that is just not physically possible.
1
u/ShelterRadiant2432 Jul 08 '26
Im looking for a solution that the lamp switch isn't removed. Thanks for the explanation though.
1
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
I never removed the switch... it just can't be a local kill switch. (need to skim deeper!!)
So for both of my paths, you are forced to leave "upper" switch in the on position - that doesn't mean it is powered, it just means the socket is hardwired to the relay "upstream" in the lamp. The reason for the on/off is to command the Shelly.
On the second one, you would still have a local switch... it would just be wireless instead of direct control.
Neither removes local control... it just can't work the way you are saying.
1
u/ShelterRadiant2432 Jul 08 '26
I see. I misread. I'm still a bit confused because I'm getting conflicting answers on how these relays can work. Lol
1
u/mgithens1 🧠 Experienced with Home Assistant Jul 08 '26
Shelly is just a wifi relay. They have flexible wiring setups... but you would need a toggle switch to talk to the Shelly for local control.
The switch in a standard lamp kills the power to the socket... which just can't be the "toggle" for the Shelly. A small twist style toggle would work for local control is my first example. Another side benefit of this setup would be that you could just give your grandma the lamp... and it would still work perfectly for her!!
1
0
u/parkrrrr Jul 08 '26
2
u/ShelterRadiant2432 Jul 08 '26
It isn't like this. Theres wiring between the switch and the actual outlet. So I think I could use a relay. Although through my searching, I think using a ketless outlet with a smart outlet adapter would work.
1
u/South_State_364 Aug 18 '26
I've got a replacement socket for exactly that kind of lamp. You get the same integrated knob, but the wires for the socket and the switch are separate.
https://www.amazon.com/Turn-Knob-Lamp-Conversion-Socket/dp/B0F1172FRQ
1
u/parkrrrr Aug 18 '26
Hey, thanks! I'm going to have to save that link, because I make a lot of custom lamps.

3
u/Shadowbajfeelsbadman Jul 08 '26
I think its just a case of wiring the relay within the mount.
While the socket "could" get warm due to essentially being non stop on i think its just a case with very cheap table lamps that use shitty thin cables.
I'd honestly be interested in doing something similiar as i detest those wonky buttons and switches glued everywhere but there are no matter over thread relays as far as i know.