$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

25 thoughts on “$12 Smart Boiler”

  1. Hi,
    Thanks for that, I made it and its awesome.
    for the your next goal “Next goal: connecting the boiler with Amazon Echo!”
    You can flush a firmware with MQTT to that pow,
    And use Home Assistant to control it and connect it to Amazon Echo

  2. Hi,
    Thanks for the helpful info,
    Can you please explain how can I identify which connectors of the sonoff’s switch on the pcb I need to connect to the wires?
    Thanks a lot

        1. I don’t have the TH16 to check, so I can’t tell you for sure.
          From the photos I found, it looks the same on this part of the PCB.

          If you have a Multi meter, you can check for continuity between the two pins when you press the button.

          If you have continuity – those are the the pair or pins (usually you have two pairs)

  3. Thanks for the detailed description.
    Is it possible to have the switch shortening the input with the output, instead of soldering the pcb?
    Dual switch of course: phase and line.

    thanks,
    Moshe

    1. Hi,

      I don’t sure I unerstand what you want to do.

      The role of the switch here is to trigger the microcontroller in the sonoff, and the microcontroller will open / close the relay that shorts the phase.

      If the switch will short the input with the output – why do you need the sonoff then?

        1. I think you can put high voltage switch (not momentary) and short the input with the output.

          Just remember that you will bypassing the protection fuse in the sonoff, and you won’t be able the monitor the current with the sonoff while the switch is closed.

  4. Hi,
    I did one of my own with sonoff 16th and it works great.
    do you think it is safe to use the sonoff without any protection circuit or switch?

    1. I can not recommend that you really use this when the law in Israel requires that there be a disconnection of the zero line as well.
      In fact, I had a similar timer that I bought in Israel and it only disconnected the phase, like this device, and there was another manual switch that disconnected the zero… but I never used the manual switch, it was “on” all the time so it acts like this device..
      I think the demand for the zero disconnection is for maintenance, if someone is fixing boiler, to make sure that the boiler is properly disconnected, because sometimes bad electricians switch the phase and zero.

  5. Hi Itay,
    Could you tell, from your experience if the Sonoff POW is necessary or the Basic model should be enough?

    Thanks.

    1. Hey,
      If you want to use it for the Boiler, you must use the Sonoff POW because it’s rated for 16A / 3500W and the Sonoff Basic is only 10A 2200W.
      You can however use the Sonoff Basic to trigger a Contartor (maybe even a contactor with dual control for both the Hot and Neutral lines)

  6. Hi Itay,

    Will a Sonoff POW (16A/3500W) be enough (for use in Israel)? I’m asking because some sellers on Aliexpress have a warning that the product is not for water electric boilers as these appliances may have an initial current above the 16A…

    1. Hi Zvi,
      It’s true that a resistive heater like the boiler will draw a higher current until it get to the operation temperate.
      I don’t know how high this current is, but I think if it will only be for a short period, it’s fine.

      My boiler draws about 11A, and the sonoff pow is rated to 16A so it should be enough.

      The relay datasheet doesn’t state about max inrush currents.

      I can advise you to contact Itead and ask them about it, or use a sonoff basic + contactor if you have any doubts.

      1. Hi guys I’m researching this as well. One point I’d like to add… the water needs to reach a certain temperature (65c) occasionally to kill off legionaries desease. So if you mate using the timer to prepare for a morning shower. Remember to add a longer heating timer once a week

  7. Hi Itay,

    very nice things.
    any chance you want to add sonoff or similar to control blinds?
    i

    1. Hey,
      I don’t have any blinds that I can test such a thing, so there are no plans for that now.

  8. Do you think it possible to integrate the sonoff temperature sensor (DS18B20) with this project and get a truely smart boiler?
    Cheers

    1. you can use tasmota firmware for the ESP8266 that support DS18B20 and maybe get what you want

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.