Hey everyone, I wanted to share my recent success in integrating 3-way switches with Sonoff devices. I’ve been experimenting with smart home setups for a while now, and this particular project was a bit of a challenge but ultimately very rewarding.
For those who might not know, 3-way switches are those that allow you to control a single light or device from two different locations. Adding smart functionality to these can be tricky, especially when dealing with older wiring or different voltage systems. However, after some research and trial and error, I found a reliable method that works perfectly with Sonoff devices.
Here’s what I did:
- Power Source Setup: I started by installing a power source in one of the switch boxes. It’s crucial to match the voltage here with the relay you’re using. In my case, I used a 110VAC relay, which worked seamlessly with my existing setup.
- Wiring Configuration: I connected the red, black, and white wires in each box as per standard 3-way switch wiring. This ensures that toggling the switches will activate the Sonoff device. To avoid noise issues, I avoided running 3.3V directly to the GPIO pins.
- Relay Installation: In the box with the Sonoff device, I installed the relay. The coil was connected from red to white, and the normally open (NO) contacts were connected from GPIO14 to ground. This setup ensures that the Sonoff can be toggled by the push buttons without any interference.
- Push Button Configuration: I used a normally open (NO) push button, connecting it from black to red. This allows the button to toggle the Sonoff device effectively.
- Testing and Verification: After setting everything up, I tested the system thoroughly. Everything worked as expected, and I didn’t encounter any noise issues or flickering lights, which had been a concern initially.
I also found that using a 3.8V battery from an old Sonoff device worked perfectly for powering the setup. It’s always great to repurpose old components!
This project has been a fantastic learning experience, and I’m thrilled with how it turned out. If anyone has questions or needs help with a similar setup, feel free to reach out. I’d be happy to share more details or troubleshoot any issues!
Happy tinkering everyone! ![]()