Category Archives: sonoff

Sonoff 4CH 4 Channel Mains Control


Sonoff Sonoff 4CHA parcel turned up for me today – the Sonoff 4CH. You may recall I wrote some time ago about a smaller version they put out and I was quite scathing about the wiring. I turned out as you recall that this was a third party product and they were in the process of making their own version. Well, this is it.

The unit uses an ESP8285 (like the 8266 but with built-in Flash) to make a low cost 4-way mains power switch in a very nice DIN box. The price of the unit, at around £11.53 + postage, makes it cheaper than some people charge just for the box!!!

If you read this blog regularly you’ll know I’ve no interest in running their products on their own cloud – and that despite having my own very comprehensive software, this fellow has recently IMHO taken the lead in powering Sonoff products with his code. Well, it just so happens he supports this boar,  so this morning I grabbed the latest software, put in my MQTT and WIFI credentials, made the one change to the code needed to run this board (a single define) and off I went to open the board up.

Inside is the usual handy programming connector needing 3v3 and ground as well as serial in and out from an FTDI. As usual, I broke all the rules and instead of using a proper 3v3 supply I powered the board for the purposes of programming, directly from the FTDI – remembering to set it to 3v3 and not 5v.  At first I got nowhere until I realised I still had my Arduino environment set to ESP8266 – a quick check and there is indeed a setting for the smaller board.

And that was it – nothing to report really – it works as you’d expect.  Now what I don’t understand are the little covers – which on one side of the board cover up the 4 buttons to turn the outputs on and off (one of them is also the programming button) and on the other side the LEDs.  I will be drilling 5 holes in there so I can actually see the LEDs – but that’s just me.

Itead Sonoff 4CHDIN mounting, well put-together, inexpensive 4-relay switching.  The information claims you can use a maximum of 2.5Kw and that each output is 10 amps… well, I’m not sure I’d want to put 10 amps through there especially inductive, maybe more like half of that, while obeying the total of no more than 2.5KW.  There’s a little fuse on the board on the incoming live - but to save opening it up in the event of problems and finding a tiny fuse, I’d be thinking about the lowest sensible value of fuse in your power lead. I put a 10 amp fuse in there and may yet replace it with a 5 amp (of course what this means depends on which side of the pond you are on – we Brits get a lot more power out of 10 amps than our American friends).

You may notice something odd  - or depending where you live you might not find it odd at all – the neutral block is green and the earth block is grey. You see, being a Brit – I associate earth with grass – i.e. green and our earth wire is either green or some combination of green and yellow… so I could see someone being caught out by that – you’ll notice my wiring looks off with the green earth heading into the grey box!!!   Those push connectors incidentally work a treat! With previous Sonoff products I had people asking me what to do with the Earth wire – no such problem here.

This one is going to Spain with me – we have Star wiring over there and spare room on the power DIN rail so this will fit in very nicely to control some lighting and one small heater over there. If you’re starting from scratch this could make a decent low-cost-per-relay move into home control along with whatever software you use to control things – in my case – I send commands out from Node-Red via MQTT straight to the board over WIFI.


ITead Sonoff 4CH circuit board


At least on the surface, another winner from this company. Don’t all rush as Itead are on Chinese holiday until 3rd of Feb!


More from Sonoff

Sonoff Mains PlugToday I got a couple of new(ish) gadgets from Sonoff – one being a UK version of their WIFI mains adaptor. So the point of this if you don’t know Sonoff is that their stuff is solid and inexpensive – not two words you normally find in the same sentence. The mains adaptor is absolutely solid – and when it powers on it has a nice coloured ring light to let you know it is working.  Sonoff have their own software for this but as it is ESP8266-based I usually put my own in or use Arendst’s Sonoff-MQTT-OTA-Arduino software – which up to now is proving reliable and has one advantage over my own – it is smaller and fits into the Sonoff devices without replacing the FLASH (well, it has two advantages – it supports the Amazon Echo – but as I use HA-Bridge to do that, the subject is moot).

So – I opened the unit up and Sonoff have even now kindly put labelling on the 4-hole connector inside for programming – very nice of them.

What can I say, Sonoff SCit worked first time, I can fire off MQTT commands to turn the thing on and off and can override that with the button on the front. Most other similar products I’ve seen are either proprietary, expensive or generally naff – this is GOOD and no secrets – you can get diagrams, change software and it works well.  Like the other Sonoff mains control boxes, good product – good price ($12.86 plus whatever post to get to your location – but even then – compare that to B&Q rip-offs). Lovely.

And with that, I’ll move onto the Sonoff SC – the unit you see on the right. No it is not a loudspeaker. To quote the company - Sonoff SC is an ESP8266 based WiFi environmental monitor device. It detects current temperature, humidity, light intensity, air quality, and even sound levels, and directly send realtime data to iOS/Android APP EWeLink

Sonoff SCAnd yes, I believe there is some source out there but this one is likely to be a little more difficult to DIY as it contains both an ESP8266 and an Atmel 328 – no doubt for two things that need A/D where the ESP8266 has only one analog input. So this gadget contains a SHARP Dust sensor, a DHT11 (I know, the crappy one) temperature and humidity sensor, a light sensor (a simple ORP-12) and a microphone – so it is a test-everything unit.  It runs off 5v.

So we ran it up this afternoon – there’s a nice phone app and it only takes 5 minutes to setup – I’m trying to think where you would use this – maybe in an old-folks home you were running just to keep an eye on everything?

Sonoff SCFor me it fails in that there’s no MQTT connection so unless you use their App the use is limited but they DO claim it is “hacker friendly” so when someone goes to the bother of making a complete replacement software – with MQTT and the option to replace the hated DHT-11 with a marginally more expensive DHT-22 – I may just take more of an interest.

Sonoff SCThe thing is you have light sensing in the range of “dusky, normal and bright” – I’m not sure what use that is – had they made this more than $19 they could have used one of those little light sensors that gives exact LUX out for visible and also measures humidity and temperature accurately.

As it is they’ve used an ORP-12 device which is a bit basic.  Still – if I made a super-duper one and had a 3d printed case made, it would look like something out of Dr Who so hats off to them for making this at a price in a sensible case. It is almost worth getting one for the case to then gut it and do your own thing! Recently in the blog we’ve covered all of these sensor scenarios except for the dust sensing and there’s plenty of doc on that.  Worth a second glance.

Depending on the device you are using you can click on any of these images to get larger ones.

Update 12/JAN/2017:  Reader Jay pointed me to this link which gives the oppotunity to replace the lacklustre DHT11 with a DHT22 on the Sonoff SC and to upgrade the software - nicely written article.  And secondly - just to say I now have three of the mains UK sockets in full time use and not a hitch - they work perfectly using this software (latest version as of a couple of weeks ago - but note at the time of writing he's just today updated the software again).



Ok, this entry will be in 2 parts – I’ll do some digging soon – but as I’ve had several requests for this…

POW, TH16 and DUAL

So what you’re looking at above are the Sonoff Pow, TH16 and DUAL mains controllers. These are ESP8266-based low cost controllers to turn things on and off. The TH16 has a sister product, the TH10 and we covered these a while ago. Now complete with CE markings (which we are told does NOT mean China Engineering before anyone steps in to defend British manufacturing…. and looking quite spiffy.

POW, TH16 and DUAL

Ok, critical bits first, I’m not convinced about the push to connect stuff inside – I know it is fashionable to do away with screwdrivers but hell, you need a screwdriver to get into the thing in the first place  and those push to fit jobs work GREAT with single-core wire – not quite so well with multi-strand, depending on the thickness. Also due to the case design the connectors at the ends could be a tad tricky to sort in a dark cupboard – however, generally very well built.

Note that all three have a proper fuse inside which is really nice to see – and two of them have 16 amp relays – the DUAL having a couple of 10 amp relays.

POW, TH16 and DUAL

Note also that they all have the 4 way programming connector at the top left in these photos. Vcc I should note is 3v3 and not 5v. I usually manage to reprogram them straight from a 3v3 FTDI but it is pushing it a bit.

The ESP8266, FLASH and other bits are on the underside of these boards but if you’re just programming them – then you need go no further as the large button on the top is GPIO0 and hence you can use that for programming. I have programmed the TH16 and 16 extensively, the Dual and the POW are delights I have yet to tackle – the POW in particular as right now I’ve no idea how to read the power chip.

But of course you can use these out of the box with the Expressif cloud to control things. We’ve had the discussion in the past about power, I would not take the 16 amps too literally nor the 10amps – maybe keep the maximum power 25% under what is being claimed – though the tracks are quite thick. Of all the boards of this type I’ve seen – these seem to be about the best put-together.

POW, TH16 and DUAL

on the rightmost image – I’m pretty sure that piece of copper in the middle is the power sensor and there appears to be an 8-pin control chip above it and to the right. Other than that they are much the same… note the nice cutouts in the board, decent spacing and thick tracks for power. A lot of designers could learn from this.  My only gripe is their continued use of a tiny FLASH chip… HOWEVER, here’s a thing – in the old boards, the FLASH chip was on the top – partially obscured by the programming button – NOW it is on the bottom – which should make it one hell of a lot easier to replace – WHEEEEEEEE. I do note two different sizes of FLASH – note the two boards on the right – topmost right 8-pin chip. Last time I tried updating a TH16 I ripped the tracks to bits – now – I might just be able to do it – and the chips I bought are the bigger size. Mind you my biggest problem is more basic – having shipped all my stuff from Spain to the UK for the winter I now have to FIND my supply of SMT flash chips!

More soon on this one but I thought I’d give you a head’s up.  To give you an idea of pricing – here’s the page for the TH10 and 16 -   - they have gone up in price since the early days so just under £7 plus postage for the TH16 – probably a good idea to buy a few – but WAY less than anywhere else as far as I know. I have one of the original boards controlling an electric heater in my office and another controlling the likes of salt and room lights at home and they’ve been happily working away all summer.

As for pricing – with this link you get discount (don’t worry I don’t get anything) – and by the look of it – a shipment of one POW to the UK is (in dollars as their site screws up pounds) $8.62 for the DUAL and $4.62 postage… You are better off buying TWO as the postage is only another dollar..  all of this if you translate to Sterling – even with the atrocious state of the pound – is still cheap.

There is a link for the POW but I think they are out of stock right now.

So – you have these  - and you can use their built in software – or you can roll your own. Our own software handles the TH10 and TH16 but not yet the DUAL and POW (note that the DUAL for reasons best known to ITEAD has a 4MB Flash whereas the others have smaller FLASH). If you’re in a hurry – here’s a link to a fellow who has done the hard work – and who is very responsive – if you’re an Arduino/ESP type – this might be of interest. 

4 Channel WiFi Wireless Switch  IM160920099 – blogged elsewhere

And coming up soon – writeups on:

Sonoff Touch EU
sonoff LED


A Quickie on Itead and CE

I recall a couple of questions in earlier blogs about Itead (Sonoff) and CE. Well, they’ve just written to me to confirm that “CE marking on Sonoff products does mean Conformity European, not China Export.” which should set some minds at ease – they also sent me the test reports.

I’m sitting on a Sonoff Dual, a Sonoff POW and a Sonoff TH16 here. Right now my Amazon DOT has turned up – I’ve just got it hooked into their music system and having great fun – next step is to figure out how to get a cheap SSL certificate running on the Pi so I can use the Node-Red-Contrib-Alexa – that will likely happen tomorrow – THEN I’ll get around to dismantling these Sonoff units and let you know a little more about them.


Sonoff TH10 and TH16

You will have seen me write about the excellent Sonoff ESP8266-controlled mains relay switching devices in the past and I went into great detail as to how to program them using the HC2016 software, the only caveat being they don’t have enough FLASH memory for OTA (well, not with my software). Oh yes and I HAVE added that “button control” that people asked for.

Well, here are two new boards – the Sonoff TH10 and TH16 – if you look on their website – full information including schematics etc. are freely available.

Itead Sonoff TH10[6]

Before we start – here are my previous blog entries Sonoff

Slampher and Sonoff
More Sonoff
Even More Sonoff
Sonoff to Mains Block
32Mb ESP01 and Sonoff

Compared to other boards, several of us have discussed that the Sonoff boards are well made with good clearance on tracks for mains power etc. Some doubted whether their small relays would truly handle the loads claimed.

Well, it looks like ITEAD have taken this on board as I’ve just received both TH10 and TH16 modules.  As far as I can tell the only difference is that the TH10 has a 10 amp relay, the TH16 has a 16 amp relay.

Side View of Sonoff TH10First impressions? Solid. They are bigger than the original Sonoff modules (which I use on a daily basis for controlling lamps etc) but also  much more substantial looking – the programming button is much easier to access as it is intended to be used rather than looking like a reset button.  I’ve made good use of this as an output toggle (which also works on the previous Sonoffs).

As usual I’ll leave it up to others to tell you what you can do with the Sonoff software – first thing I did was to reprogram the boards to handle my own software.

So – the output control is identical to the older models – but they’ve also added in a temperature port. They have very kindly made the input port compatible with my software (see settings below) and options are temperature only using the Dallas temperature sensor which they can provide on a waterproof lead complete with stainless tip – or the DHT22 which also handles humidity – I’m pleased to see they did not use the inferior DHT11 which isn’t that accurate.

PCB for Itead Sonoff TH10

So – see the original article – you’ll see there how to program up the board – this time – the ground and power connectors are blindingly obvious on the end of the board – that’s 3v3 not 5v – I got away with using an FTDI at 3v3 but you may want to consider a proper 3v3 supply for programming.

Itead Sonoff TH10

If you set wifi_button to 0 – sonoff to 1, temp_type to 0 (Dallas) or 1 (DHT) and temperature_port to 14 (these are non-volatile)   you will be able to control the output on out12 (i.e. out12:0 or out12:1), you will be able to read the temperature AND you can toggle the output on and off with the external button on the Sonoff!

The CE and ROHS stickers should keep those who care about such things happy – the important thing for me is looking at the PCB around the mains it is clearly obvious that thought has been put into this. Well done.

Sonoff connectorsOh yes, the FLASH – like the unit before it – we’re looking at an 8Mb FLASH – that is 1MB –  I don’t really support that for OTA though everything works except OTA. I am pretty sure that like other boards, this FLASH if you really must, can be replaced but be warned my soldering isn’t bad and I’ve done lots of Sonoffs, ESP-01s etc – but the little tracks came clean off when I tried it on one of these boards, immediately trashing it – so do so at your own risk.

As for the push connectors for mains in and out – not everyone’s cup of tea and I did have a chuckle that they’ve gone to the effort of avoiding using a screwdriver for the cables – but you have to use a screwdriver to get the cover off !!!!


WIFI Smart Socket

Smart socketIt looks like Itead have done it again – another winner – well that’s all down to the price and I’ll leave you to look that one up…the site says £9.76 for the unit which is reasonable – but I didn’t check postage.

The first modern WIFI wall socket I had was the Orbvibo Smart socket. I could not re-program it but I did manage to get Node-Red to talk to it over a websocket interface. I think it lasted a week before losing the info, then I discovered that Amazon had stopped selling them because of some regulation or other.  Not a nice experience – but they DID look nice.

Smart Socket[6]Similarly – the Itead  unit is good looking (though you would not tell it was theirs based on the one I have – there’s no reference to Itead on there at all and there were no instructions in the (very pretty) box. Probably because this is new (but available). This is an EU socket not UK so if you’re in the UK you’ll need a simple adaptor unless you want to live dangerously.

There is a programming button – which handily goes to GPIO0 on the ESP8266. Again a slight gripe here, once again they’ve Smart Socket[8]used a 1MB FLASH -  fine for their purposes but if ONLY they’d used the same as the ESP-12 (4MB) I could have done OTA – I believe there is other software that might be suitable which fits into the smaller space. However – not that big a deal. When my new 4MB Flash chips turn up I may just replace theirs.

pinsThe Smart Socket is designed to work with Itead’s APP – and if that’s what you want – read no further. It makes for a nice cheap WIFI controlled socket.

In my case of course I wanted it to work with our own software and hence remotely over Node-Red and MQTT – I suspect readers in here will want the same. So – out with the screwdriver – it turns out this was to be incredibly simple, once screw then finger-nails in the edge and it pops open  – there’s a 4-way set of holes which you can just shove wires into – ground, TX, RX and VCC.  I applied the relevant wires from my FTDI (obviously RX to TX etc)  to the holes – ensuring that [a] my finger was on the programming button at the time and [b] my FTDI was set to 3v3 – not 5v (important).  I blew the ROMs into the unit – this is covered elsewhere in the blog and is easy) and lo – one WIFI controlled switch I can control over MQTT etc.

I mean – it was that easy  - I’m missing the bit out about making a  change to my program to slow the flashing light down as the lights in this thing are BRIGHT.  So the green light is the general indicator (GPIO13) which I use all the time (thank heavens) and as in the SONOFF they use GPIO12 for the relay AND a nice blue light – so when the unit is running it is flashing green – if the output is on there is also a blue glow. Very nice.

So – there you have it – another winner.   It’s all down to postal charges really… oh, the relay claims 2KW – I’ll leave it up to someone else to see if it is up to that – I’d suggest that putting a 2KW electric heater on it will probably not work too well. It would be nice if a 1KW heater would work… anyone up to testing that ?


32Mb ESP01 and Sonoff

Some time ago I passed comment in here about converting an ESP-01 to 32Mb  (or 4MB).  And here it is in the flesh – a 32Mb ESP-01 – and also – at last - Sonoff Upgrades.

Now, why would you want to do all of that? I would suggest only if you happen to have lots of ESP-01 units lying around – and I’ll bet quiet a lot of you do. As for the Sonoffs – well, put it this way, I just ordered another 10 chips!

CompareI stopped using the ESP-01 a while ago because the standard 4Mb (512K) of FLASH was simply no longer good enough. Richard of RBOOT fame set me using using his RBOOT program so I could easily flash my home control code (see Home Control 2016 and Blowing the Home Control 2016 Code). Partly because I keep adding new stuff and partly because of the size of the Espressif SDK, Although my code will still run in an ESP-01, it certainly won’t OTA (remote over the air programming).  And so my little ESP-01 boards have been sitting gathering cobwebs. The Sonoff mains controllers on the other hand are VERY useful but it annoys the hell out of my that my software is now too big for the limited FLASH in these units – at least, for doing OTA remote updating anyway. All of that, for me, is now history.

A few weeks ago I noticed the Flash chips available for very little money and thought “go on then, why not” despite never having thought of updating Sonoffs – well, today, weeks later, they arrived, all five of them. I mean, at £1.86 for 5, or 37p each – you have to give it a go.

I got my fine soldering iron out (who’s bit is so fine it looks like it will last all of a week) and opened up the package.

Compare[5]The first thing I noticed is that these chips are slightly wider than the one in my little ESP-01 – chips shown side by side in the photo above. To remove the originals, I took my tweezers, put the side of the bit along the side of the chip – and when the solder melted, just lifted the chip a little – then did the other side. Came off a treat.

ESP-01 on motherboardWhat to do about this width problem…,   I decided to hold the new chip and flatten the leads on either side (vertically) by merely pushing against my desk.  You’ll see in the photo on the right – which shows an un-adulterated chip (the upper, larger one), the lower right photo showing in the middle, the one who’s leads I flattened – and the original chip from the ESP-01, lying on it’s back.

Doing that added very little to the height but positioned the leads smack in the middle of the surface mount tracks. With a fine soldering bit and fine solder it really was a doddle to re-solder the new chip back onto the board. I’d say total time to remove the original and put the new chip on – something like a minute.

And here it is – the ESP-01 is shown here mounted on one of a little adaptor board to allow 5v operation and standard FTDI connector etc. As you can see in the picture, the FLASH chip is a tad higher than before – but only by 1mm, it works a TREAT, flashed first time and my test function shows it as a 32Mbit chip.

flashsize=Manuf ID= 239, Type ID= 64, Size=4194304

And on power cycle, works a treat. Ok, yes, only worth it if you fancy a soldering challenge and you happen to have a load of otherwise useless ESP-01 boards – but hey, that’s what hobbies are all about.

ESP Starting...
GPIO4 and 5 are outputs.
Current web programming pin: 2
GPIO13 is an indicator.
Software version 1.4.2

Use the {debug} command for more information.
Web page control enabled
Waiting for Access Point wififorus
Connected as 192:168:1:34
MQTT connecting
MQTT Broker connected
Device ID is modified
Item published
Time is 10:48:01 06/07/2016

sonoff upgraded to 32MbitJust to prove to myself this was not a fluke, I modified a second board -  worked a treat (well, programmed a treat but would not work then I noted I’d shorted pins 3 and 4 together – fixed that – immediately worked a treat). Yes, I’d say total conversion time around a minute or so. Of course now I don’t know what to call them – ESP-01+ maybe!!

Just earlier after I wrote the blog – and LOTS of people took an interest, I received a comment to ask if it was possible to upgrade the Sonoff.

Well, there’s only one way to find these things out – so back to the soldering iron and yes, not QUITE so easy to get the iron in there – but yes, I now have a working 32Mbit Sonoff – this changes a lot and THAT is why I’ve just ordered another 10 chips.

The Sonoff chip is the EXACT size of the new chips I bought so no bending of leads. Just a VERY careful soldering job – you HAVE to have a pointed fine tip to do this – your dad’s Antex bit will not do it – but – I would say maybe 5 minutes this time being careful not to melt the stand-up LED?  I will update my other Sonoff boards now but I’ll have to wait for more chips to arrive – whoever thought it would be this easy. See my original blog on the subject for programming.


Cheapest IOT on the Planet

You’ve seen me writing about SONOFF before, several times – and you’ll see it again – but today I’m writing about one thing (for now) – “MUCH CHEAPNESS” to quote a last-century holiday advert. I would be very much surprised if the Sonoff WIFI is NOT the cheapest WIFI mains controller on the planet.

This started as a simple article about the Sonoff and the new pricing but it is RAPIDLY developing – one of our readers (see comments) has alerted us to some MQTT software I’d forgotten all about and which is coming along in LEAPS AND BOUNDS for the Sonoffs – meanwhile I’m having a measure of success right now, setting up a REALLY cheap possible Raspberry Pi alternative – but more of that later – if all of this comes together you really COULD be looking at a complete IOT setup that is the world’s cheapest…  For now – let’s concentrate on the Sonoff. Later today I’ll know if my other experiment has succeeded and I’ll update the blog.  

Incidentally if you’re finding this interesting you are not alone – this blog entry is already getting record levels of viewing!!

sonoffLet’s start off for new readers by describing what the Sonoff IS and what it is NOT.  Itead Studio are based in Shenzen, China and I’ve been following their antics for quiet some time now. You’ll see reviews in here of their products  including Sonoff and the Nextion displays. They’ve certainly had a great effect on my IOT experience.  I’ve been building mains control stuff since the last century – and part of my drive has been cost. Off the shelf devices were just too much so I built my own. Then, all of a sudden these guys started producing stuff that was so cheap, it was not even worth the effort of building from scratch.

I’m an ESP8266 enthusiast as it was obvious from the start that this wonderful WIFI controller was going to be a game changer and the Sonoff device basically puts together an ESP8266 chip, a mains power supply and a relay – for a no-nonsense simple mains controller.

Sonoff has it’s own CLOUD service so that off the shelf you can start controlling your home from your mobile phone – but I’ve never been interested in that, for me the exciting thing was to use my own software in the devices so they could be part of my Raspberry Pi controlled home. I have them all over the place – and soon, thanks to some pricing changes I’ll have even more.

What Sonoff is not: It is not for everyone. They use a 10 amp relay but many of us have concerns what that means – I certainly would not wire a 10amp heating element to these devices. On the other hand (no responsibility accepted here) I HAVE had a 700w heating element attached to one of them for some time without issue – and I have LOTS of lights attached to others. So Sonoff is NOT a super high power controller. In this incarnation discussed here it does not have all sorts of fancy inputs like infra-red, Bluetooth etc. It merely takes commands over WIFI to turn on and off a relay. At a pinch you could connect a temperature sensor to it but you might have to get the soldering iron out for that.  It is not an OTA (over-the-air) programmable device before presumably for very tight cost control issues, they’ve chosen a small FLASH which hasn’t enough spare room for that.

What Sonoff is: The cheapest IOT mains controller on the planet, probably. It is small, reasonably well put-together, reliable, looks fine stuck on the wall and importantly – you can with a little effort re-program the device with my software – or other software. The choice is yours – use as-is, out of the box or put the effort in to re-program – either way you have rock-solid, DIRT cheap mains control over WIFI.

What has changed: The price – Sonoff was dirt cheap before but thanks to reader Kris – I just discovered they are selling the units for $4.85 – that is under £3.50 in English – you just SURELY cannot beat that!!

Here’s the link. Enjoy and don’t blame me if it isn’t what you need.

On that link you’ll find sizes, prices, information, schematics and much more. If you want more information on Sonoff – using it, reprogramming it  - you could do worse than doing a search through my blog (search in the right of the page) – it’s all there including the experiences of myself and others.

ALSO reader BOB has reminded me that there is some software for Arduino-types (well the Arduino environment for the ESP8266) that CAN handle OTA as it is smaller and more focussed than my software which could be better described as “kitchen sink”.   Here’s the link – no guarantees as I’ve not used it – though if I get time this week I could well update one of my Sonoffs.

There is possibly more around the corner… keep checking in – right now I’m off to CHURROS in the local market.


Sonoff to Mains Block

sonoffJust an update – today I was clearing out my office boxes and noted 4 old mains control blocks – the kind you buy at B&Q – the kind the cats lose the remote controls – these were a little bigger than some but I think the general principle applies to sonoffmany of the cheaper units. B&M had some at a great price – 3 for a tenner – the software sadly was rubbish and did not remember the state they were in when the power cycled.

Well, as we know, Sonoffs are small boards – and, well I took one of the mains control units apart, ripped out the electronics – and – the Sonoff board fit in there a TREAT.

Total time around 15 minutes or less and a soldering iron. The mains units had a common neutral (as do the Sonoffs – mains in – mains out. I wasn’t interested in buttons so I took them out – but then I thought it might make sense to leave the holes open to get rid of any heat.

And there you have it – one plug-in-the-wall mains controller… larger than a sonoff but for many applications a hell of a lot more useful than having to solder to a choc-block.

The photos should scale when you click them. In the photo below I connected neutral (Black) to the common just one one side of the sonoff, the mains in to the other input and I used a piece of single choc-block to extend the other red lead.



In the photo above I have the output side of the Sonoff nearest the mains plug – in practice (the next day) I’ve now done four of these and it is better to have the dirty end (blue VDR) nearest the mains plug – black wire into the neutral (which is common so you don’t have to connect the other end) – bottom incoming red wire into live… and the top live wire extended with a single choc block to the output on the other side of the board – no soldering required.  As you can see below, here it is looking ok (I put a label on with the MQTT name of the device). After listing to comments in here I have “Maximum 1KW” label – though I think that is under-ambitious – probably 1.5k is possible but I’ve not tested it – they claim 10 amps hence 2.5k but the relay is just too small.

Anyway, under an hour to make 4 of them – not a bad investment of holiday time.




Even More Sonoff

Having read the comments in “More Sonoff” it seemed that with the Sonoff RF – there might be a slightly easier way to program it rather than holding the board, holding a connector in place and trying to short a pair of contacts together with a spare LED.


In the photo above – taken I may add with my phone with the addition of a magnifying lens in front of it  -remarkably easy as the phone compensates for the lens and focuses – just like eyes do!!!  - you will see a resistor marked 000 at the top and down a little to the left – an empty space. ALL you have to do to return the Sonoff RF to push-button-programming glory – is move that resistor down to the left.

Well, it seemed like a good idea. My office is in disarray due to moving so could I HELL find my precision tweezers.  Off I went to my handy watch repair toolkit and took out the tweezers. Rounded corners. BAD mistake.

So after I lost the original resistor and 2 replacements in the carpet I finally managed , despite my resistors being one size up from these, to get a 0 ohm resistor to the right of that chip above in the place I’ve marked with a ring – you can see it was a choice – go into the radio chip OR go off to the button.

Well, what I can I say, the slightly burned button absolutely works a treat.  I think I’ll wait until I can find the right tweezers before doing any more of these but if your soldering iron is obscenely fine and your eyesight is that of a 20 year old you should have absolutely no problem moving that resistor.

If any of the above are not true – you might want to think twice before turning your Sonoff into a smouldering lack of melted plastic.  Oh and do try to avoid the button when soldering.

Armed with this mod, pushing a 4 way connector into the holes while holding that button down, releasing the button and programming is now a snap.

Remember this only applies to the Sonoff RF and only if you don’t want to use the existing software and are able to flash your own (or someone else's software into the board – Relay output is GPIO12.

And no I’m not going to show you a picture of the finished item. It’s embarrassing.

Apologies to any of you who tried to visit yesterday around 4pm and shortly thereafter – the site went down – and then magically came back up – I’ve put in a support query to find out why.