Shelly 1PM in Table Lamp with Smart Bulb

I have table lamps with smart bulbs in them and I hate that the lamps can’t be used manually without cutting the power to the smart bulbs. I have some Shelly 1PMs and would like to wire them to the lamps and configure the Shellys in detached mode so that if the lamp is manually switched off, it doesn’t actually interrupt the circuit but instead sends a signal to Home Assistant/Node Red where I can process the message and power off the smart bulb.

I know this is pretty simple in a wall switch that’s connected to a smart bulb. However, how would I accomplish this in a typical table lamp with a push thru socket?

Exactly the same way

Very helpful. How would it be the same if I’m trying to keep the bulb continuously powered? In other words, the smart bulb needs to always have power so it can be turned on via voice/homekit/etc. At the same time, the physical lamp switch needs to remain functional. The problem is that I don’t know how to isolate the switch from the bulb, which is easily done in a normal wall switch setup where the power to the bulb and the actual light switch are physically separate. In a lamp socket, everything is closely connected. I was hoping there was some solution out there even if it meant replacing the socket with a different type of socket.

Ah, I see what you mean now. Some lamps have the switch in the cord, which is what I was imagining.

Yes, you can buy un-switched lamp sockets.

I did look at keyless lamp sockets but was hoping to find something that still has a physical switch but that somehow decouples the actual relay from the power to the bulb. Tried googling all sorts of things to find what I’m looking for but no luck.

I use a Shelly Button 1 for that use on one of my table lamps.

And if your lamp has a USB port on it you can keep the Button charged continuously.

I came here to mention the Shelly Button too. I use a few of those and they work very well.

But, if you do want to use your Shelly 1PM, because you want the power monitoring, then I think all you need to do is to keep the smart bulb permanently and directly powered from mains power and connect the physical switch to the SW channel.

I say this tentatively, because I have a number of Shelly1s but not any 1PMs. I am not sure whether the power metering only monitors the relay circuit or also the input power for the Shelly. If it’s the former, then I don’t think you’ll get this to work, because all the physical switch does is to control the relay, and opening the relay will cut the power to the bulb if it gets its power from that circuit. It it’s the latter, then you power the Shelly and the bulb from the input lines, with nothing connected to the relay circuit. The physical switch then only switch the relay circuit on and off (with no effect), but that doesn’t matter, since you just want to know the switch’s state in HA in order to turn the smart bulb on and off. At this point, the switch is really just a mains powered remote control button.

then I think all you need to do is to keep the smart bulb permanently and directly powered from mains power and connect the physical switch to the SW channel.

Yes, this is exactly what I’d like to do. I only chose the 1PM over the 1 because I figured the dry contact in the 1 would be useless to me so I may as well get the 1PM. I’ll probably use the power monitoring but it’s not the most important thing to me. My only objective is finding a way to keep the functionality of the physical push thru switch on my lamp socket while still using a smart bulb in the lamp. My socket looks like this (the terminals are push in connectors on the bottom of the socket):

I just can’t figure out how to separately power the bulb from mains and have the physical switch connected to the SW channel on the 1PM. I’m also surprised to see no one has figured out how to do this yet. I was hoping there was some sort of socket out there that had separate terminals for the bulb power and the physical switch but I can’t find anything like that.

You aren’t going to find a socket like that because it makes no sense to have external contacts for the switch when you just have to wire them back to the socket.

Get an unswitched socket and use an inline cord switch.

1 Like

I know I can get an inline switch and use it with a keyless socket. That’s not the solution I was looking for. It’s not very practical to have an inline switch on a floor lamp in the corner of a room.

1 Like

How about a foot switch in the cord?

This is what I have used for a couple years now. My goal now, since the actual lamps have trouble connecting to the Wi-Fi, I want to use the Shelly products PLUS, since they can extent the signal .

I’m also looking for the same thing.

Yeah, this is true. But there are so many wacky gadgets on Alibaba.

Another option I was looking into is a 3-terminal socket, because it does provide a contact for the second device (usually a night light). This isn’t a complete answer though because the key would still alternate between the different configurations. If there’s such a thing as a configurable 3-terminal lamp socket we may have some hope.

Failing that, I think we’d need to find a socket that is really high quality (or perhaps really old) so that it could be taken apart and re-wired to bypass the switch for the lamp.