High Power Mains Switching with Sonoff

Sonoff BASIC

I am as most of you know a great fan of the Sonoff BASIC modules – because, in the main, they are cheap and reliable – but increasingly I’ve been faced with challenges that involve the need for isolated contacts – or high power (immersion heating) or both.

Well, here is my solution – which remains really low cost. The Sonoff BASIC (last but one version) is REALLY cheap at Banggood – and like most other Sonoffs (and other similar devices) it tops out at 10 amps maximum. There are a few devices like Blitzwolf and others which handle up to 16A MAX… but even then, one immersion heater I’m controlling, heats for example the Sonoff TH16 up a little too much for my liking when in a warm cupboard.

DIN Contactor

Also few if any of these devices have completely isolated contacts (I need that for my thermostat) and all of them switch only the LIVE wire. The answer to all of my problems has been staring at me all this time and I didn’t see it.

Simply take the cheapest option, Sonoff BASIC – and add a 25 AMP contactor from AliExpress – 220v coil (American readers can use 110v verions of all of this)…. 2 poles in my case so you get live AND neutral switching from one Sonoff and one dual contactor – £3.85 + free post for the contactor – right now the v2 Sonoff BASIC is under £4 – I just grabbed some. Add a short piece of DIN rail if you like. That’s what I am doing. It is possible for £1 ($1.40) more to switch up to 63A – I didn’t need that.

You could probably (I will try) make the Sonoff BASIC a bad fit onto the same piece of DIN rail…. the advantage of all of this in my case is 2 screws into the pasterboard wall for the DIN rail, the rest mounts on the rail. If you have a larger set, how about a Sonoff 4CH Pro – which is DIN mounted with isolated outputs – adding in a breaker if and where needed for the extra power.

July 2021 Update

What fun. Well, it all worked – kind of – the contactor wasn’t as good as I hoped and you can kiss goodbye to thoise prices now – but HOLD THE PHONE as Sonoff have a new controller on the way – I have one coming to test… TWENTY FIVE AMPS would you believe.

Facebooktwitterpinterestlinkedin

90 thoughts on “High Power Mains Switching with Sonoff

  1. In case you’re wanting to install a few of these contactors, remember to leave an air space between them if running at over 50% rating.
    Also, Itead do a ‘Din Rail Tray’ which neatly mounts the Sonoff onto the same rail as the contactor…

  2. Are you going to trust that contactor on such a high amperage?

    From my research that will invalidate any insurance you have in case of a fire.

    At least buy it from somewhere like CPC or RS.

    1. I am not a “qualified” electrician so anything I’ve done has probably already given the insurance company an opt-out. I will test the device properly under load at worse-case temperature. I may class as a hacker but I’m not suicidal. I just checked CPC and the prices horrified me.

      1. I have an exceedingly expensive LG air source heating system, fully certified and fitted by qualified operators a year ago – the main unit (now on 2nd replacement) has never been very reliable – the main boards outside have been replaced twice – and it came with a fully certified thermostat fitted by the same qualified installers and was anything but reliable. My home designed and made un-certified thermostat replacement is on the other hand very reliable. If only I could design and build air source heat pumps.

        Neil – Sonoffs – I would normally never go anywhere near relay capacity – given that the Sonoff TH16 is currently getting warm with a slight smell of bakelite when left running the immersion heater for an hour or so, I’m planning to lower my self-imposed limit in future. Waiting for the contactor to arrive – the immersion heater cannot be more than 2Kw so I’ve no idea why it is getting so warm but I’m counting on the dual pole 25A contactor with a Sonoff BASIC doing a lot better (the contactor will only ever be handling 13A in the event of failure as that is the incoming mains fuse size and the heater at 2KW should normally need around 8A at 250v – which is the voltage we have here in the Northeast of England).

        1. Okay so Basic controls the contactor, got it.

          As far as I recall the inductive devices (motors & heaters) do cause issues for automation and things like the X10 modules were derated for any inductive device. I recall seeing several X10 modules that didn’t fair well when paired with inductive control so our rule was to avoid it.

          My guess on the heating is back-emf (though I’m not 100% sure of that). I do know that my 5m extension code (20A rated) would heat up when used with my 15A pool motor.

          1. Some devices use extra current at startup – and yes, with inductive dvices I’d knock the maximum down a bit. X10 is a lifetime back.

            Back EMF – surely a vdr would sort that? The pool motor – well that is indeed inductive – could it also be using extra power at atartup… I guess thats where power monitoring comes in. I just moved from the TH16 to the Sonoff POWR2 for that reason – and using Tasmota I’ve put a time limit on the immersion heater.

        2. check connection tightness, some immersion heaters are 3kw,at 230v =4.6 amps per kw. The load of any contactor is determined by the contacts, personally I would not put anything over 6amps on this contactor/relay-the real problem is not being to see the contacts inside

          1. Consider driving a solid state relay directly off the sonoff board (remove the relay and use the 5v out) for resistive loads.

      2. Good electric components are not cheap-would you fit tyres costing £4 on your car? Of course not.As a past techical Electrician (now retired) I would warn not to cut corners on Electrics or any of the services come to that. Today is all about price, cutting corners and sod the outcome usually to someone else. Electricity has a way of fooling you into a false state. Thats when is bites with avengance. Far better to do it right the first time-there is plenty of help out there.

    2. Paul, a bit confused … “Are you going to trust that contactor on such a high amperage?”

      My friends work on the railroad (real high power – 40KV) so yes they use and trust certified contactors. If you mean one that’s not certified then I agree. Not going to trust high current to a £1 (or even a £4) contactor to 63A.

      And while I also do as Pete does (using the uncertified Sonoffs) I do limit them to less than 60% of there ratings and no inductive loads (switching power supplied are the exception).

    3. You’re adopting UK-think – CPC in Spain or France? or USA? Americans often refer to Best Buy – which is not a lot of use in the UK. We should try to avoid such assumptions in an Englidh-speaking but otherwise world-facing blog – I recently came across a worse example in here – 2-sided adhesives – I’d never heard of some of the companies mentioned – and when I got on the phone to them, a couple had no idea how to export 🙂

    1. Christ this looks like diy electrics! Obviously not done to the 18th Edition! All components must be same make including the box. Cables should be fixed, with rubber or brass bushes through metal.Cant see RCD ratings but trip setting should be 30 milliamp and I love the colour coding of cables!

      1. Worth noting that where I am in Southern Spain, the kind-of-intuitive UK-type colour coding is of no relevance – plugs here have neither L or N markings and are generally interchangeable. Not sure how I missed that 3D printable case for the Mini – possibly as I had no 3D printer at the time.

      2. The 18th does not state that “all components must be the same make” – but of course the manufacturers, retailers and Screwfux will happily spin it to drive sales.. The 18th DOES refer to type-tested assemblies, and regards the fitting of a different make of e.g. mcb, as a modification.
        It is therefore up to the competent person making the modification to ensure that verification is carried out… For me, that would mean checking that the mcb is made to the same BSEN, and has the appropriate PSC, tripping, thermal and co-ordination characteristics, and the busbar terminals are correctly aligned ~ which is all just basic elec engineering and competence anyway, nothing in the 18th has changed that.

        Suppose your car was fitted with 205/55R16 tyres from new, Dunlop SP2000. Dunlop stop making the SP2000, are you going to scrap the car because the manufacturer specified a particular tyre? No, you fit the same size tyre from a different maker, and make sure that the Load and Speed ratings are met.

        As for the green incoming phase wire – it’s probably just a european pre-harmonisation installation; green phase wires are common, especially in eastern europe. Let’s be honest, anyone taking the lid off a box of electrics can be expected to know about red ‘n’ black, green, blue, whatever. The ONLY reserved colour combo is green/yellow ~ you can actually use any colours you want so long as they’re identified in another way.

        1. Evening Carl (and all)

          Sorry to be slow guys – what on earth does the “18th” refer to? Also what’s a BSEN (I assume a British-standard-something – I probably do know but have forgotten) and PSC?

          I of course welcome all input to the blog – particularly safety recommendations – when you have been working with electronics since being a toddler, you lose all perspective on what is common sense and what is not when it comes to electrical safety – please advise but do not lecture, some of us have been doing this forever. I am probably as bad as anyone – I refer frequently to “esp8266” as if everyone was born knowing whan that means.

          Covid may get me, brain damage may get me, SOMETHING will get me but NO chance it will be electrical stupidity unless at some point in the future it is aided by senility. I hope this applies to other subscribers – even those who think their knowledge will last forever.

          As for regulations I have mixed feelings – the world of regulation is NOT geared towards talented individuals or indeed very small businesses – I will never forget the heartless, ignorant introduction of CE regulations in the UK, the inspectors who had NO training to take into account small volume, small businesses suffered never mind talented individuals – the result being that large chunks of UK SME tech innovation went down the toilet at least for a while. Today I’m wise enough to know this mostly means “China Engineering” in the products end users actually buy.

          My childhood hero for better or worse was Clive Sinclair – imagine that today in the UK – no chance – ok lets ignore the car). Does anyone remember the DTI (Department against Trade and Industry) adverts “CE or Bust”? Bloody pen-pushers.

          Rant over.

          For clarity – about phase – whenever you hear me talking in this blog – I am assuming single-phase power unless specifically noted. I assume any power wire with green in it is earth, any wire with blue or black in it is neutral (for those countries where neutral is even relevant) and any cable with red or brown is live (where live is even relevant). Am I missing any important colour variations here.

          I’m personally working on being Spain-based (despite Brexit and not helped by Covid) and here in my corner of rural Southern Spain at least, there is no “live” or “neutral” – there are two power leads (220v nominally) and earth for power appliances – definitely not an ugly 3-pin plug for a bulb).

          Actually I’m as bad as everyone else – I just said “220v nominally” – while that is standard in the EU and not far off in the UK (I have a home in the UK Northeast where 250v is nearer the norm) – 220v is NOT the norm worldwide – the US use 110v for low power stuff and higher voltage for some power appliances – and of course industry even uses 3-phase – so what should we call “normal”…

          Carl – good info – did you ever ponder if any English speaking countries have no idea who “Dunlop” are. Personally I’m well familiar with Dunlop (a major customer of ours at one point) but I’m ashamed to say I would not know a 205/55F16 from a hole in the ground. I do on the other hand know the very relevant life info that Huescar could be open next week which means eat-in Churos at La Perla 🙂 It’s all a matter of perspective.

          1. Pete – Totally agree with what you say about advise not lecture and the imposition of regulation without consideration. As your blog is taken as gospel by many can I just add a couple of clarifications to common misconceptions. The UK and Europe standardised on 230V some years ago but with a fudge that 10% above (UK but 6% Europe) and 6% below was acceptable allowing anything between 216V and 254V to be considered as within specification. These are of course RMS values so peak amplitude can be up to 360V (for capacitor specification) at 254V RMS. US voltage is 120V +- 6% single phase (not 110V as commonly thought) with as you say 2/3 phase creating other values. Also as you say 2 pin plugs are agnostic as to which is line (not live as commonly used) and which is neutral but it might be worth pointing out that there is still a neutral which as always is determined by the wiring in the socket its just the device that works either way as probably would many UK devices if you reverse wired line and neutral in the plug. This of course should not be done due to the UK standard of having a fused plug which would leave the device in a dangerous state if the fuse blew. Hope I have been specific where issues are UK only.

            1. Well done Steve – I think I specified 110v, you are likely right at 120v. Gadgets intended for international sales often refer to “100v-240v” – and 250v is definitely nearer the mark in parts of Northumberland, UK. I cannot speak for ALL EU countries but here in Spain where I am right now, I don’t think there is any difference between the two power wires. Could be just rubbish wiring of course 🙂

              1. This also opens up another issue – if you put a UK plug into a European adapter (depending on which way round the adapter is inserted into the wall) and the fuse in the UK plug blows you may still have a device that looks to be de-activated but that will still be at full mains potential. Obviously its best to assume any device plugged into the wall is dangerous but it is an issue when using foreign plug adapters.

                1. The adaptors that worry me the most are USA – many are badly fitting to add into the mix.

                  Just to make life more interesting:

                  Plug Types: C, F, and J
                  Germany and Austria use two plug types, types C and F. The older type C plug has two round pins and no ground pin. The newer type F plug has two round pins with two ground clips on the side. In addition to the type C plug, Switzerland also uses the diamond-shaped type J plug with three round pins.

                  All 3 countries have 230V supply voltage and 50Hz. Besides Switzerland (and Liechtenstein), some regions in Denmark, France, Belgium, Italy, and Poland have odd plug types (E, K, or L) that do not conform to the standard European C or F plugs.

                  Thankfully I only ever have to deal with one type here in Spain.

                  If it were up to me I’d add a further complication by insisting on wider minimum gaps between sockets on extensions. How many folk out there have bought a 6-way extension only to realise that there is only room for three smart plugs as the sockets are too close together.

                  1. I have bought a couple of these 10 way extension leads https://www.amazon.co.uk/gp/product/B00AAA0VWW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 which are usually on special promotion – nice wide spacing with the plugs set at an angle to give flexibility. In addition they have surge protection with indications if the MOV’s are failing. Also as I now have so many European plugged devices which came from China with the flimsy death adaptors I bought a couple of European extension leads and chopped off the plug and replaced it with a UK plug. That gives a much more stable setup for the European devices whilst in the UK.

        2. Hi Carl, I came across this when trying to install a timer into a Wylex consumer unit,in that wylex themselves dont make such an animal! Further inquires resulted in being told that Wylex would not cover any liability with the C/U if fitted with another manufacturers parts and quoted the 18th. My reaction was the same as yours, thinking its just another scam.I got round the problem by putting the timer in a seperate box.
          As to the wiring colours, there is supposed to be a EU standard.Hence the availibily of coloured sleeving. I completely agree with you BUT having come across an “Electrician” under my supervision and inquiring into his said ability, was told in Romania where he came from, he had been a farm labourer! I then asked where he got his JIB card from and promptly told me it was issued to him by the company. Need I say more?

  3. 2 pole switching the neutral that is a really bad idea and quite like you to be illegal in Australia and New Zealand failure to isolate the phase where the neutral is open circuit indicates to the uninitiated the circuit is dead but still very dangerous. Switching neutral is a very bad practice

    1. I find this advice confusing because (in the UK) many high current switches (eg cooker control switches) are by specification double pole isolating the device from both live and neutral.

      1. I’m finding it confusing also – I wonder if this fellow has 3-phase mains. I definitely favour isolating both live and neutral – then iof one contactor fails closed at least you gave the other one.

    2. Er, no… **Single** pole switching the neutral is A Bad Idea in countries with neutral:earth bonding on their networks.
      **Double** pole switching is perfectly acceptable ~ indeed in rural NZ and AUS may even be recommended due to long overhead runs and difficult local earthing conditions (dry ground etc.)
      Many european countries don’t explicitly reference any pole to earth, and it’s a lucky dip as to whether a single-pole switch is in a ‘line’ or a ‘neutral’ conductor. Circuit protection, i.e. MCB’s, will always be double-pole in this case.

      1. Absolutely – I was being polite as one could always be wrong but it seems absolutely sensible to me to do double pole isolation – especially when there is little or no cost penalty – in Spain where we spend our summers – most of the time, sockets are not even marked live and neutral and certainly small appliance/lamp 2 pin plugs are completely reversible.

        1. I have a place in Romania ~ similar electrics to rural Spain with 10Amp and 20Amp supplies. We have fused ‘neutrals’ in our old fuseboard… it’s quite a “refresher” when the neutral fuse pops, leaving the live one intact – and you begin UK-style faultfinding….

          1. Be very careful when neutral fuse pops, the neutral from the appliance or lighting(if on) will still be live.Touch that and you will stick to it (depending on load)and be electricuted.They use to use fused neutrals way before the war in the UK but that’s why they became ‘solid’ in todays consumer units.These kind of installations rely heavily on RCD,RCBO’S and slightly lesser MCB Make sure about your setup

      2. Carl, Peter and all – yes you are correct and my comment was poorly written from the international perspective. In Australia and New Zealand we have very strict Neutral : Earth bonding at many points in the network. I can assure you in New Zealand we have no problem with dry ground, quite a different story in Australia atm., however!

        99% of outlets or service isolators (in the single phase domain) are single pole down here and I am not sure the other 1% would receive official sign off.

        1. In the UK the neutrals are typically bonded to earth too.
          However, metallic devices have an additional earth conductor solidly bonded to any metallic components. Earth conductors are never switched.
          Safe use and control of mains electrical devices is an interesting subject and it is interesting to learn how it is applied across the world.

  4. I was recently looking for a din rail equivalent of sonoff basic and came across a few tuya devices but quite expensive (20€ range) so I gave up. Don’t want to throw 20€ on a device that may happens running a non-Esp chip.
    The contactor looks a good alternative. I was just in the idea of changing the very old one of my legacy heater installation (which is driven by the electricity company to enable water heating at low tariff time) and yes it cost between 40€ to 65€.
    But I will not make any € hard-saving on this one by purchasing Chinese. Security 1st.

  5. 2 years ago I also purchased a pair of 20A Solid State Relay (SSR) with their heat sink with the idea of experimenting heaters switching but they are still waiting in a tray

  6. Hi I have used sonoff basic for my outside lights ; but if going to use high loads than that I would use a double pole contactor 16-20amp; have got some sonoff din rail adaptors from AliExpress; have you tried the Sonoff mini yet?

  7. Well, I was using a Sonoff TH16 but this conversation got me thinking as it gets (got)warm. Instead I’ve put in a Sonoff POWR2 which runs cooler – mind you it could hasve been the connections – I’m not 100% happy with those push-on connectors. Contactors are the next step for me for high loads like immersion heaters (3KW would you believe, I though they were mostly 2KW). I’m also feeling inclined to add in a Dallas temperatur e sensor – should not be hard to add as I’m using Tasmota for firmware.

    1. Pete, I’ve been using the circuit described in the Open energy solar divert pages to divert to the immersion heater in our Heat Bank for the last few years with no problems this uses a solid state device.

      The circuit is very simple see -> https://learn.openenergymonitor.org/pv-diversion/introduction/choosing-an-energy-diverter.

      Obviously you’d need to build the circuit, so not as easy as cascading two off the shelf units as you were suggesting.

      Simon

      1. I have used that circuit too and it works well. The author is very helpful too. One huge advantage of ‘build your own’ is that one can ensure it is built to the highest safety standards. It is also very easy to add a DS18B20 to monitor temperature of the heatsink and enclosure. One could even add current monitoring using a CT (as per the same website) to monitor the heater is actually on or has failed. 9 times out of 10 it is the internal thermostat that fails in the immersion heater.

        1. Hi Bob,

          My circuit is hanging off an emonTX which has 3 CTs monitoring the PV, house usage and the diversion (not really necessary). I’m using Martin’s sketch with some mods for more DS18B20s – these monitor temperatures in the Heat Bank.

          Can’t speak too highly of the openenergy community.

          Simon

          PS Lovely sunny day, eventually, so it’s working flat out now! 😀

  8. Domestic immersion heaters in the UK have been 3 kW for many years and are generally wired through a 20A double pole switch on a 2.5 mm TW/E cable direct to the fuse board. Since the main isolator is a double pole device, live and neutral, Peter is spot on using a 2 pole contactor.
    In respect of fuses neither cartridge fuses nor MCB’s will blow or operate at the rated amperage, say 13A, the fuse will carry that current indefinitely. The purpose of the fuse is to protect the suppply cables. A significant overload, say x5, would be required to blow the fuse or trip the MCB in a very short time, or a dead short.
    Those people who are experiencing odour from electrical devices please be aware those odours can be toxic.

    1. It doesn’t matter if Peter is using a single- or double-pole contactor for the immersion ~ what he’s doing with it is ‘Functional Switching’ and provided it opens the Live pole the job’s done and the Regs are satisfied…

      Using both poles just gives a little reassurance the the heater will still go off if one contact of this cheap contactor were to weld closed.
      After all, just about every immersion timer ever built has been single pole…

    1. Board does not seem to have programming headers so you would have to solder directly to the chip – not a unit that I would fancy messing around internally with and still be able to trust

  9. I am against a different solution- there are Latch relays that turn off and on with just a short impulse, than no power is needed to keep it up. So actually I have this setup for all my lights for now, then, I have a regular latch wall-mounter light switches. Automating this is as easy as adding a small relay to give a short contact for a quarter of a second, imitating a real latch switch.

    The problem of tracking the state was solved by using a 2-chanel latch relay – with a single pulse it toggles 2 separate lines. Thus I can use the second line to track the current state on 5v.

    I know this is a more complex solution, but this is electronics-proof one and allows for a seamless fallback to the native installation and also allows to get the installation up and running long before the automation part

    1. Hi Brian, Thanks for the link, it is a shame they do not show a view of the rear side of the PCB so one could see if the PCB tracks are appropriately sized / spaced for that level of voltage / current.

    1. Now that opens up an interesting can of opportunities!
      Was the Sonoff basic to MCP23017 or PCF8574 (I2C port expander) successful? which Sonoff pins did you use?

  10. Just received a TOCT1-25 contactor and noticed that the AC-7b rating (Household Inductive) is 9A. Almost 65% lower than its non inductive current rating. Even more noticeable is that the inductive power rating is 1.4Kw which equates to less than 6A at UK/European voltages (over 75% lower). I have usually worked on a safety factor of 40-50% reduction on relay ratings for inductive loads but maybe it needs to be an even higher margin. It also brings into question whether an even bigger contactor is needed.

    1. A very good point Steve – well, of course it depends on what you do with it, mine just turned up today – same model – and I want to use it with a 3Kw heater which is a little inductive though not inductive like a motor. Right now a Sonoff T16 is running the whow- and getting slightly hot – that has a 16A non-inductivee capability so I’m hoping this contactor with 25A non-inductive capability will run warm to cool instead. Being twin pole, if something were to go wrong my theory is that breaking both leads is better than breaking one.

  11. I would not worry about an immersion heater (3kW) being slightly inductive in terms of de-rating the contactor. The de-rating is for truly inductive loads like motors, transformers, fluorescent light chokes or anything with a copper winding on a iron core.
    Your two pole theory is good for UK mains supplies where a completely separate earth conductor is connected to the electrical load.
    I hope all is well with your scan Peter.

    1. I figured as much, Bob ut thanks for that confirmation. An immersion heater – my GUT feeling is that they are not THAT inductive, no-where near as much as a motor etc as you suggest. My contactor has turned up – as we used to say back in the “old days” the proof of the pudding is in the eating, I guess I’ll soon find out how well it works. If it runs cool to barely warm I’ll be very happy.
      Scan – well, I had the scan but typical NHS all I got from the operator was hello – goodbye – I guess it takes an in-short-supply specialist to actually read the scan so I guess I’ll find out if I’m dead or alive in a month or two. I asked how long it would take to find out – response “all consultants are different”. I may as well have asked “how long is a piece of string” 🙂

    1. That video highlights the potential dangers of switching high current loads. It is not just the steady state current that has to be considered but the inrush current also which can be 5 to 7 times the steady state current. Other factors are the open gap of the relay contacts and the ability of the contacts to break the current flow when opening.
      The other item mentioned was smoke alarms, whether it links to Home Assistant openHab or any other home automation system is IRRELEVANT! The key criterion are that it must be utterly reliable, work totally independently of any external factor and be able to be heard all over the house. The latter point may be achieved by multiple wireless or mains wired linked modules.
      A smoke alarm could save the life of you and your family and prevent your house being burnt down! Please do not buy cheap smoke alarms. In the Uk AICO are one of the best makes, not cheap but neither is a funeral or re-building a house.
      In UK rented properties linked smoke alarms properly located are a legal requirement.

  12. We are fulfilling every UK lockdown cliche / buying a hot-tub. I’d really like to monitor power usage. Currently we have a patio heater with a Sonoff POW R2 (they work up to 15A). The hot tub needs a 32A (wah!) feed. I think most of the time it should use a lot less, perhaps that is for power spikes or whatever.

    Wonder how I can monitor that level of current? Any decent Tasmota-ready devices out there that can do this?

    * delete as appropriate

    1. Controlling and monitoring devices at 32 amps – that is beyond most of the devices I’ve tested, actually ALL of the devices I’ve tested – if anyone knows better, please do comment. At 220v that must be a powerful hot-tub.

      1. Just re-checked the specs and it requires minimum 25A feed. That *is* a lot of power. I’m hoping they have over-egged that spec, or there’s going to be a hefty electricity bill!

        1. Mat, for a hot tub, that isn’t a lot power! Assuming UK mains voltage of 240 VAC and 25A it is a 6 kW load, less than a domestic electric shower. It is effectively an immersion heater and thus a resistive, not inductive load.
          Regarding monitoring the current the easiest and safest way is to use a current transformer (CT) where the ‘live’ (or neutral) wire passes as one loop through the sensing toroid. There is an excellent article on the ‘Open Energy Monitor’ website on using CT’s with an Arduino. The monitoring can also be done using an ESP8266 or ESP32 and very likely a Raspi zero W, once you can get the current value into one of those devices then you can use, for example, MQTT or HTTP to process the data as you wish.
          However, unless the heater has thermostatic control it will be on constantly drawing 6 kW which is about £1 / hour currently. If it has a thermostat then you could monitor the thermostat output, to the heater, with a 240 vAC coil relay. The relay contacts could provide a low voltage input to, say, an ESP8266 for you to time the amount of time the heater is energised and thus how much power it has consumed.
          There is NO Sonoff or similar device that can control 25A, you MUST use a properly rated contactor. If you are not competent to work with mains voltage systems then please get a qualified electrician to do the wiring.
          If you tell me the volume of water the tub holds I can calculate how long it will take to heat from a starting temperature to a given bathing temperature, the time is less if the cover is in place.
          BTW if your patio heater has a 13A plug then it is very likely 3 kW or less that is definitely the limit for the supposedly 15A Sonoff. I would advise you to check the Sonoff frequently for signs of over heating.

          1. Hi Bob

            Thanks for your reply. Until today I hadn’t realised that relays don’t generally carry above 10 or 15A, and I have just read about the difference between a contactor and a relay so wasn’t aware of the additional safety features of a contactor.

            I have three cheap Chinese current transformers (an eBay purchase from a couple of years ago, never got around to using them) and have watched numerous videos about their use with arduino. I like that they are easy to connect up and relatively safe as ling as burden resistor is used of course.

            Another idea is that the tub has a built in computer with colour screen etc for temperature control, chemical monitoring reminder etc, so I could consider hacking that to get heating info out of it.

            My ideal situation would be to monitor and log power usage, temperature, pH, and bromine levels but the last two are particularly difficult if not impossible to do electronically (at least in any permanent fashion).

            1. Mat, as discussed power usage is achievable in a number of ways, temperature is no problem either. PH can be done relatively easily but the probes are expensive. PH is widely measured in hydroponic / aquaponic growing systems. Bromine, no idea 3-5 ppm is a very small value to measure.

  13. Hi Peter.
    Did you finished this?
    I’m currently in need for contactor controlled with sonoff, and landed here.
    I’m trying to power electric heater 2400W, I tried with Blitzwolf SHP-2 (16 AMP) and it did OK for some time, but it started to overheat, and I’m not OK with that.
    I was thinking on ordering those contactors you linked in aliexpress. Does it work OK?
    Thank’s!

    1. Strange you should mention thst – I have two of them – one here in Spain, one in the UK. The latter has been working for many, many months now – the one here – amazing coincidence, I WAS going to wire it up TODAY but we had a severe power outage (on-off-on-off etc) which made some of my Tasmota devices lose their settings because I got lazy and didn’t use “setoption65 1” or “SO65 1” on them. I have all but one back – spent most of the day working on this. Hence I never got around to fitting the contactor.

  14. Well, I placed an order on contactor, so when they arrive I’m gonna try hooking it up. That will proboboly work more reliable and safer than going trough 16A relay.

  15. Hi there!

    A quick wiring diagram would be much appreciated for those like me that don’t have electrical experience.

    Best regards

    1. Some of my devices are still on ESP-GO – but as far as development goes, ESP-GO is essentially me, whereas Tasmota has lots of people working on it. No mistake, where I’m using it, ESP-GO juust works and it still seems to have the edge on Tsasmota on displasy support – but in other areas, Tasmota is under active development by several parties, supports LOTS of sensors etc and so I deemed it worth moving over – after a brief love affair with Espurna.

    2. If you have no electrical experience (note: I didn’t say qualifications), then my advice would be ponder whether you wish to start controlling heavy, high voltage loads. Several contactors have been mentioned in here in the comments and the positioning of connectors will vary from one to the other.

      1. Hi Peter, my use case is controlling an air conditioner and adding logic to control the schedule the air conditioner would be allowed to run using some device powered with ESP8266.

        I definitely will contact and electrician, so far your approach is the most logic an safe thing that I have found

        Regards

  16. Hi Peter,

    Did you get to finish this project, it seemed that you did but got interrupted in the writeup – I was keen to see some more details.

    Cheers – Mark

Leave a Reply

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

Leave the field below empty!

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