SwitchiFy - 4 way switching board with Wifi

SwitchiFy is an ESP8266 based wifi relay board with a 4-way switching configuration which are widely used in big living rooms and bed rooms.

Similar projects worth following

ESP8266 is a fantastic Wifi Microcontroller which comes very cheap and you can do lot more than blinking the LED. I started getting comfortable with ESP8266 (NodeMCU) when I controlled my office AC with Alexa:

Recently we started building a new house and as a maker I want to do home automation for the new house. We had few places where 2 way switching (using two 3 way switches) was planned. Even when home automation is implemented, I wanted the user to control the switches in traditional way even without the mobile app. For example, if the light is turned off from the mobile app and the user wants to turn it on again with the normal switch, he should be able to do it. This requirement was not satisfied by existing relay boards if I plan to put one in parallel with the existing switch.

So I design a ESP8266 controlled 4 way switching relay board which can be put in between two 3 way switches. It used 2 relays to implement a 4 way switch (DPDT switch) and there are 3 sets of 4 way switches in the board.

Here's a very nice video which explains how Four-way switches works:

CAD design:

While designed the board, I took careful consideration for creepage distance and clearance. The minimum creepage distance maintained in this board is 100 mils between high voltage and low voltage tracks. The high voltage track width can handle 4 Amps (which is more than necessary for home appliances such as light, fan etc.)

Mechanical constrain:

There was a mechanical constrain while designing the board. I co-ordinated with the electrician frequency while designing the board. He told that the standard switch box size available (in souther part of India) is 5 inch X 3 inch. Initially I planned to have 4 sets of 4 way switches but I couldn't bring down the size of 5" X 3". So I had to ditch a set.

Here's a completed SwitchiFy board:

Demo video of SwithiFy board configured in 4 Way Switching mode:

You can order this board on @Tindie:


Arduino code for the WeMos D1 Mini. To be used along with the SwitchiFy mobile app. const char* ssid = "SwitchiFy_69648"; Change the number 69648 to any name or number you want. But keep the string 'SwitchiFy_' at the beginning, otherwise the app won't be able to detect he SwitchiFy.

ino - 3.89 kB - 06/27/2017 at 17:49


  • Installing SwithciFy into a standard switch box.

    Vijayenthiran Subramaniam08/19/2017 at 08:45 0 comments

    Recently I installed SwitchiFy at two places in my house with the help of our electrician. Here are the photos taken during the process:

    Opening up the switch box. The box is about 8 inch X 3 inch and about 4 inch in depth.

    The 3-Way switch used for the lighting. The centre terminal is Live wire and the other two terminal connects to the terminals of the other 3-way switch.

    Connecting SwitchiFy to a 3-Way switch is very simple. The two wires in the above picture will go to the Outgoing terminal in the SwitchiFy and the Incoming terminal in the SwitchiFy should be connected to the two terminals of the 3-Way switch (like shown in the below picture). 

    SwitchiFy needs a 220V or 110V power. So we tapped it from the existing line:

    After the wiring is done:

    As you can see, SwithciFy fits nicely into an existing switch box. We used a two way tape to adhere the board to the casing and isolate it.

  • Updated Android App

    Vijayenthiran Subramaniam05/01/2017 at 08:41 0 comments

    The previous version of android app used webview to load the toggle buttons which controls the switch. It wasn't reliable.

    In the updated version, the toggle switch are made with native android switch components. Now the app is reliable than the previous version. Also, few subtle changes have been made to improve the user experience.

    Here's the github link for the android app source code:

    Download the app from here:

    Screenshot of the app:

  • Android App for SwithiFy

    Vijayenthiran Subramaniam04/12/2017 at 06:59 0 comments

    One of my friends developed a android application to control the SwitchiFy boards. The app scans for the Switchify devices and the user can select his required one. Once selected the app will take the user to toggle menu. It is still under testing phase and hope to release the stable version soon. Here are the screens:

    Screen 1: Swithichfy app lists the available Switchify devices. In this case, switchify device in room 1 is listed.

    Screen 2: Once the user selects the required the app will take the user to control page, where he/she can toggle the switches.

View all 3 project logs

  • 1
    Step 1

    SwitchiFy can be configured in two ways. The first one is 4-way switching mode. And the Wiring goes like this:

  • 2
    Step 2

    Connect the phase and Neutral to the screw terminals next to the Hi-Link Module.

  • 3
    Step 3

    In the above picture, Switch 1 and Switch 2 are the generally available 3-way switch. In general, you house wiring guy would have wired like this: The top and bottom terminals of each switch are connected to each other. And the middle one of the Switch 1 will be connected to phase, middle one of the Switch 2 will be connected to one terminal of the appliance (light in this example). The other terminal of the appliance will be connected to neutral.

View all 5 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates