Tag Archives: sonoff

$12 Smart Boiler

Recently I moved to a house where I don’t have a gas water heater.
Now when it’s winter I need to plan my showers and turn on the boiler in advanced.

Since the IOT era began, I can see more and more solutions for connecting the boiler
to a smart wifi switch (switcher, SwitcHeat and more..) , but hose solution are very expensive.

I consider myself as a Maker, and I like DIY solutions so I tinkered a smart wifi control using sonoff pow.

Sonoff is a wireless switch which can control electronic devices such as home appliances via WiFi.

It support max power of 3500W which should be enoughWhy I used sonoff pow:

  • It uses ESP8266 so I can flash my own / other firmwares and add MQTT control
  • It has a nice app to control it, add timers and even share the device so my girlfriend can use it as well
  • I can see the power consumption which is good to make sure the boiler is working and
    also nice addition to see the total cost each use/day/moth
  • Can be also controlled manually (like a regular switch)

Sonoff has aonther model called ‘sonoff TH16’ that also can handle 3500W.
This model does not able to measure current and unable to show the power consumption, but can also be used.
the TH16 has few more connections on the board that might ease connecting it to a switch.

Sonoff pow has one momentary button. Pressing this button will toggle the connected device on and off.
Long press (5 seconds) will make it enter into a pairing mode for pairing with the app.

Before I start writing about my installation, please note that dealing with mains electricity should
be only handled
 by electricians. If you does not know what you are doing, please don’t try this.
If you decide to make your own, please make sure you shut the boiler power
from the main switch and also check that the ‘Live’ wire is not live with a tester.
I take no responsibility.

What you will need:

I replaced the switch in the panel with the stairway momentary button.
(If you don’t want/need a manual control to start/stop the boiler you don’t need this button)
I did this because the sonoff’s button is also a momentary push button, and like I said before – long press will put it in
pairing mode. If I use a regular on/off button I need to imitate this action every time.

Then I had to trim the switch connectors because they are too big and won’t let me close the panel.
After I trimmed them, I also soldered a wire to the switch connectors

Next step is to track the sonoff’s switch on the pcb and connect it to the wires from the new switch.
(again, if you don’t use the button skip this)

Now we have to dissemble the old panel (if you didn’t already) and connect the boiler and the mains electricity.
to the sonoff. Check again that you don’t have a live electricity!

Connect Line to Line (Live/Phase) , Neutral to Neutral (Zero) and Earth to Earth.
Note that the input Line is on the right and the output Line is on the left.
I already had the Earth shorted so I didn’t connect it to the sonoff.
I also managed to break the Line connector so I soldered a thick wire straight the pcb.
In addition, I added a kapton tape on the area the new switch might touch to avoid shortening the circuit.
If you have an indicator light you can connect it to the output Line and Neutral in the sonoff as well.

Now all you have to do is carefully close the panel and put back the power on.
One press on the switch should start the boiler, another one should stop it.
If you have an indicator light you should see it turning on and off.

Download eWeLink app for Android or IOS. Start it and create a new account.
Now make a long press (5 seconds) on the switch to put the sonoff in pairing mode.
In the app add a new device and enter your home SSID and password.
At the end of the process you should have a new device in the app.
You can now control it and see it’s power consumption, add on and off timers and more..

That’s all for today 🙂

Next goal: connecting the boiler with Amazon Echo!

Update: Itead made an Alexa skill for the sonoff so it’s easy to control it with Alexa
https://www.itead.cc/blog/ewelink-works-with-alexa-tutorial

If you want to plug it to your smart home via MQTT,  you can install the Sonoff-Tasmota firmware
(but you will lose the control from their app) and control it with MQTT or HTTP requests.
https://github.com/arendst/Sonoff-Tasmota

You can see how I controlled a esp8266 device with mqtt client from Alexa here:
http://itay.mobi/blog/?p=155