Putting a Sonoff in your wall switch box

It does look like people have used a 4.7 to 10k with success, some even had to go further with additional filters. I’ve had mixed success myself along with others and read about GPIO 14 having a configurable pullup.

Another way to do it using the single GPIO 14 pins with the 2 switches. Cool idea…ff’wd to about 4:45 or so if the link doesn’t take you to the time.

Very cool method, wonder why I never ran across that video. I spent a good amount of time searching for how to setup my 3 way switches with a single sonoff.

The other thing I did was I modified a dimmer switch to work along with the sonoff. I had just spent a ton of $ over the last few years converting all my old incandescent dimmers to led compatible dimmers. I wasn’t about to spend a ton more $ converting them again to smart dimmers, so I came up with using the switch part of the dimmer to turn the sonoff on and off, then route the output power from the sonoff through the dimmer circuitry. So now, while I can turn the lights on or off from the physical switch, or home assist, I still have to manually dim them.

It’s on my list of things to do to write up how I hooked up the dimmer with the sonoff.

Now if only someone made a Esp8266 based LED dimmer. Cheap WiFi flashable LED dimmer. I would be all over that.

1 Like

Ok, I’m going to resurrect an old thread…

I think this has been asked, but it seems like most answers are still for a 3 way switch. How about a 4 way switch? Below is a picture of the wiring in my wall. I have 3 total switches controlling 3 lights (1 switch at the bottom of the stairs, and 2 switches upstairs at different ends of the hallway). From what I’ve read it seems the only way to do this would be to do the same process DrZzs did with a sonoff in each switch box, and disconnecting the red traveler wire. My only concern with this is if hassio is offline then the switches aren’t going to work as they should. Any other thoughts on wiring this scenario?

I thought maybe I could put a sonoff in the light switch (far left switch in picture below) that has the 3 wire cable coming from the 4 way switch, and the 2 wire cable going to the lights, but I dont know what I would do with the remaining red wire assuming GPIO14 and Ground go to the 2 legs of the switch like you would normally wire any other switch. Would connecting it this way and leaving the Red traveler wire work?

Thank you in advance!!

Is that exactly how it is in your wall?
The trick is, do you have the “power in” and the “to lights” wires in the same box? If you do, you can use just one Sonoff like I did in the MakerFaire display: https://youtu.be/EroQ_Eos1HY

The problem with putting the sonoff in the far left box and powering it from the wires from the other switches, is that when one of those switches gets turned off, it will turn off the sonoff too.

In that scenario you are just inserting the gpio14/gnd wires into the multiswitch setup. But that’ll only work if you have power-in and lights-out in the same box. The only other way I can think of to do it with just one Sonoff would be to put the sonoff in the box that has the “to lights” wires and then power the sonoff from another circuit in that box (if there is one that has capacity). You’d have to be pretty sure about what that new circuit is powering so you don’t create a potential overload.

Realistically, if you have the exact situation as that diagram you probably can’t do it with just one sonoff.

I’m trying to get into the habit of doing live streams on Sundays. I may get a chance later today if I get out of work (at my real job) before too late. If you are free and can join in, this would be a good topic to discuss. And it might be easier to explain in that format.
If not tonight then some other sunday. Or find me on Discord sometime and we can have a chat.

Hope that helps!

Helps a ton!

I guess I was kind of just trying to figure out a way, that if hassio is down the WAF will still be high since it will work as intended. I think for now I may just leave it as is (dumb), but yeah that pic is exactly what I have, no power AND lights in the same box :frowning:

thanks as always DrZzs!!

there might be a way to have the Tasmota devices communicate directly with each other. I think your wifi would still need to be available. Not sure exactly, but I kinda remember reading there was some way to do that.

I know there is “group topic” so you can send the “on” command to one topic and all the switches will respond, but that means your MQTT broker would still need to be functional. It wouldn’t rely at all on the automation though, so that’s one less possible point of failure.

Good luck with it!

That could be another option, except my mqtt server is also running on the same pi… ha oh well, the stair lights dont need automated for now. Maybe they will be one of the ones that get an ecobee or something similar, I’m sure there’s a solution out there. For now I will just automate the master bedroom closet light to turn off when someone forgets… ha

1 Like

I have created a 3D Print design for a Decora Switch Body that accepts a Sonoff Basic.

The SonDek, a Sonoff Powered Decora Light Switch by TekMason - Thingiverse

If you find it useful shoot me a like.

1 Like

cool!
I’ll try it out for sure.
Thanks

Hi DrZzs,

You are welcome.
Let me know if you have any feedback on the design.

TekMason

P.S, Keep up the good work on your youtube channel. It’s one of my favs.

Only issue I see is someone holding it down and doing a factory reset.

What would be cool is someone to make a US 1 gang and or 2 gang “old work” box that has a pocket in the bottom that goes deeper for a Sonoff dual, ifan02, basic etc.

Hi digiblur,

Not much can be done to stop the factory reset in the 3D part but I think that there are options to change that in the Tasmoto flash.

I don’t necessarily see this as a problem. If something goes haywire or you change your wifi network just push and hold for 10 seconds to reconfigure without pulling everything out of the electrical box.

Cheers,
TekMason

My kids would figure out how to accidentally reset the switch and act like they have no idea what happened.

1 Like

Can I put a sonoff here? That’s exactly how my home is wire
Thank you

Kind of thing I’d do!

Err…where?

at the switch with the power source comin in , these a 3 way switch

I want to use only 1 sonoff but the load is on one end the connection to the light is on another
No sure how to wire the sonoff