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.


57 thoughts on “Cheapest IOT on the Planet

    1. Writing about them and modifying their software, does not I’m afraid make me an expert on antenna design. I would say that unless you know exactly what you are doing and are prepared to do some hacking – that would be no. Can’t you put the Sonoff in the glass bit? Or at the other end where the lamps get their power?

    2. I used an outside 4×4 metal box to mount my outside floods and cut a window in the side, Inside the box I hot melt glued the sonoff unit after attaching flex wires. The sonoff top is facing the outside of the box and is visible in the window, the window is covered neatly with a piece of clear packing tape. If necessary I can reset it without taking the whole thing apart and it gets wifi just fine.

      On another point I’d like to hear from anyone who has actually used the boilerplate and their experiences. I’ve got a sonoff basic ready for flashing but hesitate due to the lack of any experiences I can find from persons who have used it.

    1. Yup, seen Peter’s video. Good job I updated the manual and software yesterday!! Fixed two bugs.

    1. Hi Ion

      Thanks for that, I’ve requested a sample – most likely will take a couple of weeks and I will look into that. Certainly will! Looks good.


  1. As I cannot even get registered for the supplied android app to control these things, the likelihood that I will be able to reprogram them to become useful with some phone app is extremely remote. At this point don’t even know if they work as I cannot switch them on/off with the PB but at least a rapid depression of the PB will make the LED flash. Great is all I want is a little blinking light.

    Might as well put a message in a bottle and hope it floats to china as to get a response from these people.

    1. IGNORE 7:44pm message.

      Even though the app kept telling me my password/confirm password did not match and that I was not registered, I was able to get past that registration page and on to the active control page.

  2. Ok, the little router is ordered (see comments) – will take at least a couple of weeks from China – look in here for updates.

  3. The Sonoff is nice (I bought some), but I won(t use them on my home installation except for experimentation until these devices are fully CE certified. In case of fire, your insurance won’t refund you anything if they find this was caused by it.

    1. Many of our readers are DIY – if we waited for CE certification on everything including the stuff we build ourselves – there would be no hobby electronics.

      1. Nothing wrong with DIY, including building a home controller like you do, when no high power is involved, But taking the risk of switching unattended loads with 10 A currents using an non-certified device from China with possible weak isolation and not meeting western standards is another matter, and may be a dangerous game. I sincerely hope that ITead Studio will certify the Sonoff soon!

    1. LOOKS good Evan – but now you have my interest up – A5-V11 comes up nowhere on Aliexpress OR Ebay. Got any links?

        1. Ok now ,my interest IS up!! But – in the link you originally sent it points to what I assume is replacement software – BUT the “install” section is “TO DO” – have you installed this – or do you have a link for anyone who’s done this ? Almost sounds too good to be true – but if this runs MQTT it truly could be a game changer right at the bottom end.

            1. Oh excellent – well on that basis I think I am just going to send off for one of these. For anyone interested I found the non-French version of the AliExpress link – same price.


              Got to be worth a shot…

      1. what exactly can be done with these devices, after flashed the modded firmware? use them instead of mosquitto on a raspy? What can be a use case?

        1. Well I’m sure there’s lots of things you could do but yes, in my case talk to them via MQTT – which just happens to be on a Raspberry Pi – though the way things are going this week they could end up on a NanoPi-M1 – I just need to crack the GPIO which unfortunately is not as simple as the Pi (just because there are no similar tools to PIGPIO etc). So I just use the Sonoffs to turn stuff on and off.

          1. Sure, these dongle routers are cheap, but the main problem is the memory size: only 4 MB Flash and 16 or 32 MB DRAM, depending on luck. 16 MB is clearly very limited once you get Linux running, so I hope you will get the 32 MB one.
            Another problem is power consumption: compared to an ESP8266, the RT5350 is a power hog;-)
            As for GPIOs, you are lucky, you will get one which has control of the USB host port power through GPIO7 (check, this way you don’t have to crack open the thing, and just plug an USB cable with GND and switching VUSB to control a relay…

            1. Don’t worry I’m not expecting miracles from that cheap unit… just interested in how low one can go and still get something that actually works.

  4. I am looking for the way to update 5 Lin version of Sonoff. I have attached pins to the correct places, but cannot flash the firmware. Would you be able to describe in more details, how to flash that newer revision. I have seen something about GPIO0 to be not connected to a pin?

  5. Pete,

    I use the Sonoff as a sprinkler controller including Web and MQTT control with added hw. RTC. ( I soldered 2 more pins to the extension connector). I use OTA (512k/512k) within the development evironment you possibly use (Eclipe/C). It works really well.
    If anybody is interested in I can send the Makefile that is proper for both OTA and non-OTA.

    1. I’m sure people would be interested but just remember you have both Linux and Windows people in here. Will the make file run on both?

    1. For me this is the way to go. If you reuse the tx/rx pins as GPIO (option in adv settings I think) you can have inputs/outputs for other nifty devices.
      I have one measuring pulses from a water meter to mqtt (and will add Temp sensor soon) and the other switches kitchen audio (mqtt via Imperihome).

      You can also do OTA easily.

      1. Every time someone suggests reusing the serial pins I think “that’s a good idea” – but never get around to actually doing something about it – but of course – you are right.

  6. RIGHT – tests done – with the relay OFF the Sonoffi is taking around 0.46watts and with the relay ON it is taking around double that – i.e. <1w.

    Hope this is helpful, folks.

    1. Nice! Thanks Pete.

      If anyone else is interested, ITEAD (no affiliation, BTW, other than being a customer) is also selling the iW1700 as a stand-alone, PCB-friendly PSU at only $2.50 each. I’m using one on a prototype right now for a mains-powered ESP project. You’d probably want to ditch the red LED if you used one (mains powered, so it’s going to be inside a box anyway), but apart from that, so far, so good.

    1. Hi Bob – I’ve just taken a look at his code now – MY – he certainly HAS gone to town on this – of course – it is all down to how reliable the software is but it CERTAINLY does look worth taking a look at. My software is too big now to allow OTA (as I have everything but the kitchen sink in it) so it is great to see someone has kept it small enough to OTA – that makes SUCH a difference when the units are all in the loft!!!!

      That is definitely worth a second glance – thanks for reminding us of this software.


      1. Hi Pete, Bob,

        I’ve also had a play with the Sonoff, making an Arduino IDE boilerplate for it

        Sonoff (ESP8266) reprogramming – Control Mains from Anywhere

        So far it has OTA for quick update, WifiManager for quick config, Blynk for quick control and next on the list are MQTT and HTTP as control mthods.

        The electrodragon kits someone reviewed and the conclusion was that the mains part is not as safe as the sonoff’s

        as for the idle consumption, seems about 1W, see here–review

      2. Hi Peter, I have taken his code and modified it for use in one of my projects, albeit not using OTA. I find the code very reliable and I have, as a very inexperienced programmer, learnt a great deal from it.

  7. Can you tell me how much power (W) the unit itself consumes with relay on and off. Because that is important to me if adding a load of modules to the home….

    1. WELL no-one ever asked that before and so I got my trusty meter out this morning, dismantled my heater and….

      realised both of my meters have DC current measuring only!! Can anyone else help? Sonoff without a load on it, relay on and off.

      1. Oh, I didn’t mean to cause you work!

        The reason I’m asking is that for me, home automation is also about saving electricity by using stuff in a smarter way, and I discovered that for some commercial products you end up wasting more electricity with the devices as you would save…

        It’s one of the reasons I’m doing things with ESP8266 only whenever possible, because not only are they cheap and small, they also consume an order of magnitude less than a RPI or similar.

        Maybe for this price I should just get a few and check myself 😉

        1. Well no – it is a perfectly valid point – I note their LED is VERY low brilliance – in the past that has always driven me nuts but now you bring it to my attention – it is probably to keep the standby current REALLY low. Let’s hope someone else comes back with the current….

          Oh, RPI and ESP – no competition – I use RPI as the central controller and ESP for everything else. Keep your eyes open however as I’m currently looking at (and will blog on) a FriendlyArm M1 which is DIRT cheap – I’ve only JUST got a working Debian image out of the company this morning and all is going well up to now – but of course my installation could fall over at any minute. However one of these controlling Sonoffs COULD (and I stress COULD) form the basis of a REALLY cost-effective IOT system.

          More later as tests proceed. Running my script on the unit now.

        2. Petur,

          The Sonoff uses an IW1700 switching power supply, which basically changes the drive characteristics to suit the load. It barely sips power if there’s no load. The Dialog (maker’s) spec sheet quotes less than 5mW at 230v. The only down side with the Sonoff implementation is that they dropped the bootstrap MOSFET and went with a straight resistor voltage divider instead, which means that there’s always a (very, very small) current flowing through the divider pair.

          The Dialog datasheet is here.

          1. Great stuff – I’m really miffed my meter doesn’t do AC current – never noticed it before.

  8. But, if we estimate price “per contact group” Electrodragon wifi relay is almost twice cheaper. Thanks for bringing it to my attention.

    1. Hi Alexey – I am of course aware of the Electrodragon.. but I’m looking now..

      At $6 without a box….no. Well, it’s hard to tell if what you get for $6 IS the boxed version- but it’s not the cheapest unless as you say you take into account the fact that it has 2 relays. It’s an interesting one as I do NOT like the way they put the Electrodragon unit together – you have to force the second pair of wires in as the box does not fit properly – also they’ve not re-enforced the tracking – so on the one hand they seem to have better relays than the Sonoff – on the other hand there is no way on earth their tracking would handle the current the relays are collectively supposed to handle. So far my favourite remains the Sonoff but of course any alternatives are always worth being reminded of.

      1. It is boxed. The box is not build on the board so it is true what you say on second relay cabling issue. The current version has some fixes and the power tracks are not isolated so you can make thicker them. I like the cheaper iot war!

Comments are closed.