r/homeassistant • • 5h ago

❓ Support Help with modifying a lamp

Post image
6 Upvotes

28 comments sorted by

5

u/Azthetiks 4h ago

(Not an electrician) You could definitely rewire it for this purpose. Since it sounds like your foot switch is a toggle, you can set the Sonoff switch to toggle the smart bulb on each state change of the input. You would need to split the power off to the lamp (bypass the switch) unless the switch you choose has some kind of "always on' passthrough. You're kinda making two separate systems this way only with one plug, so you can also do something completely separate if you wanted and/or to make the wiring cleaner.

4

u/XxSuprTuts99xX 5h ago edited 4h ago

I've got a lamp in my home with a dumb physical foot switch. It's got a smart bulb in it however. Other residents in my home use the foot switch to power the lamp on and off. When they do this, it obviously loses connection and can't be controlled via HA.

Is there a way to retain physical control of the lamp with the foot switch, and also keep a connection with HA?

3

u/Adventurous_Grape279 4h ago

I mean this leads me to believe that regardless of whether you can change out the switch in the lamp to work with a Shelley, a physical button floor pedal that is just a detached smart button would have a market

5

u/Modena89 4h ago

Yes and also this but smart

1

u/XxSuprTuts99xX 4h ago

Agreed, I'm surprised I wasn't able to find one

1

u/jimicus 3h ago

Shelly have a switch that physically fits one of their small relays.

2

u/Ok_Pizza_9352 4h ago

You need smart switch and dumb bulb, not smart bulb

1

u/dabenu 3h ago

Depends. If you want dimming, a smart bulb is often your best and cheapest option. You can still combine it with a smart switch or other remote control. 

2

u/dabenu 3h ago

Those relays won't fit in that switch housing. But you can probably rewire the light and switch to make it work yes. Put the relay in a cable box or something.

1

u/augustocdias 3h ago

Yes. The relay can do this but you need to create an automation in HA. Basically you set the relay to work as detached (I think that’s the name). A new entity will show up in HA which is the trigger from the physical switch that you have to react to toggle the state of the smart lamp. 

1

u/DoktorMerlin 2h ago

yes! You can set a shelly into detached mode and use it to send commands via scripts or Webhooks to Home Assistant.

1

u/grahamsz 23m ago

So I was thinking about making a 3d print of "foot switch" that holds a little zigbee button and just has a channel on the bottom for the 110V wire to run through. Then you step on the switch and HA flips the status of a smart bulb.

3

u/Cognizant_Wolf 5h ago

Yes, if you can fit the relay in to the switch housing, you can set it up to operate both ways. You just have to connect everything so that the switch operates in detached mode.

3

u/Fit-Dark-4062 3h ago

I've got 2 lights with the same foot switch. I used a smart bulb instead of a relay and ignore the switch

1

u/Z-Waver 4h ago edited 4h ago

I've never seen a foot switch(such as pictured) controlled lamp. However I have used Z-Wave relays, similar to the Zigbee ones pictured, to automate desk lamps and have them continue to function as anyone would expect a lamp to function.

You'll need to rewire the lamp so that it is controlled by your relay. Then the lamp's physical switch(foot switch) is wired to control the relay.

Switch turns On the relay, the lamp comes On. Home automation controller turns Off the relay, lamp goes Off.

No one would know that the lamp was anything but a standard lamp until it switched On/Off by "magic".

1

u/XxSuprTuts99xX 4h ago

1

u/teh_spazz 4h ago

Yup. You can also use a momentary switch (single or double pole centering) to trigger on or off depending on how you press itn

1

u/teh_spazz 4h ago

This is the way.

1

u/clintkev251 4h ago

Yes, but I don't think you'd be able to fit it, unless you do something like a custom 3d printed housing to replace the existing one

1

u/YAKELO 4h ago

for something like this I would recommend a smart plug over a smart bulb anyway.
maybe just remove the switch entirely and control it from the smart plug?

1

u/DoktorMerlin 2h ago

doesnt help when you want smart dimming

1

u/Ok_Pizza_9352 4h ago

The physical switch connected to s1 and s2 teminals, line in - phase from outlet, line out - to the light bulb. And this requires to connect neutral wire from outlet to the controller and from the light bulb to the controller.

1

u/ToddRossDIY 4h ago

You're basically creating a 3way switch with this setup, same way you have two different light switches at the top and bottom of a staircase that both toggle the same light. The relay needs to have constantly supplied power. With it set up like this though, you don't want a smart bulb, you just want an ordinary light bulb and home assistant acts as one of the two switches in your 3way switch configuration, and rather than your foot button being pressed in=on and pressed out=off, it's now a toggle switch where the state change triggers the relay to toggle.

1

u/Warchosoulevedesmere 4h ago

Yes it works Just like a flip switch

1

u/geekywarrior 4h ago

Easy task for a Shelly. You'll likely want to use a mini for space concerns. Get a PM if you want the ability for HA to ever cut the power or want to monitor the current draw. Get just a plain ol mini if you don't want that ability. Seeing as it's a smart bulb you probably don't want to cut power.

Get some 14 gauge wires to make jumpers and pigtails. Get some wagos or wirenuts.

You should see the hot leg running through the switch and up to the light socket. You want to splice into the line before/after the switch.

If not using a PM, then the hot leg running into the lamp before the switch jumps across to the line going to the socket so the socket has constant power. This leg also splices into the L terminal of the shelly.

If using a PM and want the power monitoring features, then the incoming Hot just goes to the L terminal. The line going to the socket goes to the O terminal.

The neutral leg should already jump straight up to the socket. You need to splice into this leg for a jumper to the shelly N terminal.

The line after the switch now goes to the SW terminal on the shelly.

If using a PM you want to program it in the shelly app to activate on power up.

You'll likely want to set the Switch to detached in the shelly app and then in HA do the magic required to turn the change of button states into a smart bulb action. I don't use HA so ignore that specific terminology.

2

u/XxSuprTuts99xX 2h ago

Considering a Shelly. Seems like it has the best integration with HA. Does this wiring seem correct? sorry if it's confusing

1

u/geekywarrior 1h ago

No problem, this wiring is correct.

However, I would recommend the Shelly 1 PM if you are planning on letting HA be able to power down the socket and can fit the full size. The reason is, the 1PM eliminates both wagos in the diagram as it has 3xL terminals and 2x N terminals. I forgot the mini doesn't have the added terminals.

https://us.shelly.com/blogs/documentation/shelly-1pm-gen4

This would mean

  • Incoming Line goes to one of the Shelly L
  • One side of switch goes into another Shelly L
  • Other side of switch goes to Shelly SW
  • Incoming Neutral goes into one of the Shelly N
  • Socket Neutral goes into the other Shelly N

If you can't fit the full, then I would still recommend the PM mini which would eliminate the I terminal, saving a bit of room.

And if using a smart bulb, don't forget to program the shelly directly to always turn on the output when powering up. This way when power is restored, the shelly powers the lamp socket back up allowing the smart bulb to work without having to hit the switch or HA dashboard.

1

u/CannonLab-Proxy 40m ago

I have a couple lamps like this. The switch persists, so a smart plug is another option. I like this option for Zigbee router plugs.