You can't get away from it, the iTead products are cheap - and sometimes that is very important. But are they the best solution for Home Control? Well, that depends. Sonoff products have always been inexpensive. But bear with me.
At one time the company had a seemingly unbeatable grip on the DIY end of home control - their products which are based on the likes of the ESP8266 include Sonoff BASIC and variations. Not much use for more complex control but for basic on-off control, less than £5 sterling gets you a simple WIFI controller. Today there is some competition depending on your wallet and how much you want to spend on controlling a light.
Of course many of us are averse to using even more Chinese "cloud" or even more APPS - not in my case for political reasons but because I am a happy Raspberry Pi/Node-Red user - and I want to keep my home control working as much as possible even if the WIFI goes off - you can mitigate power issues by using battery backup, generators and other solutions but if your entire control system is cloud based, what do you do if the Internet service provider screws up?
Every IOT company seems to think you should use THEIR APP... I already have lots of different apps for my various watches - I don't want any more for my home control thank you. Which brings us back on topic - Sonoffs. Sonoffs were the smallest and lightest cheap control box until along came Shelly. But on cost, Sonoff still have the edge - and on size, well, the new Sonoff Mini competes there as well.
Shelly made some smart moves however - MQTT support and a nice user interface. Sonoff Mini has DIY mode and as I just found out that kind of works - though it needs fixing up. Cutting to the chase, this page has good info on using Sonoff Mini in DIY mode and within that is the Windows tool you need to set these units up in DI mode. The tool however seems like an unfinished demo.
So, grab a Sonoff Mini (not as cheap as Sonoff Basic but smaller. Last night after wasting hours following the WRONG info I got hold of the links above. The initial issue I had was this - often this kind of board has a user interface i.e. built in with a web server for initial setup - Sonoff Mini doesn't.
Instead, they expect you to set up a router (or your mobile phone hotspot) with a specific SSID and password. That floored me initially as I was expecting to find that hotspot within the device itself. I took the approach of temporarily renaming one of my WIFI access points.
So firstly I did the above, then turned on the un-altered Sonoff Mini - and used the EWELINK App on my phone to set the Mini to work with that access point. I then set the Mini to work with my normal access point. Easy up to now. Using the APP I upgraded the firmware of the Mini to v3.30 - you HAVE to do this as the stock software that came with the unit (v3.0.0) doesn't support the DIY mode.
Next I turned off the device, opened it up (no screwdriver needed) and fitted the supplied "DIY" link to the two OTA pins inside - clearly marked. I put the top back on.
The instructions refer to a single flashing LED meaning you do NOT have a WIFI connection - a double flashing LED means you DO. I turned on the Mini and sure enough, I DIDN'T. WHY? Well, despite the really poor translations I eventually twigged that when you change modes to and from DIY mode and normal CLOUD mode, you lose any custom WIFI settings. Right, back to the special access point.
NOW I was COOKING. I grabbed the EXE program in the link above but frankly it is just not very good. Glaring problems (renaming the device doesn't work, the popup dialog is faulty, changing access point options don't show you the EXISTING access point etc. I changed the name of the Mini from the utterly useless default to myfirstmini. I also set up my normal WiFi access point.
Sonoff Mini DIY does not support MQTT natively, but it DOES have an API on port 8081 and if you get stuck into THIS page, you can supposedly easily make use of it. I had no joy. Strangely as a devout MQTT user I just recently spoke to my SHELLY 1 using ITS API - if you are a Node-Red user, that's a lot easier than it seems. Essentially using the HTTP REQUEST node is a doodle.
Thats the yellow one above. I'm controlling a relay on my heating system with simple on off commands and THIS is the setup inside of that node.
In the Shelly I simply fire into that node a payload of "turn=on" or "turn=off". Easy once you know how. I can also read the output of that node to see what came back... String(msg.payload.ison)
Bu that's Shelly .
Thankfully what the otherwise poor Sonoff tool DOES manage is to let you flash the likes of Tasmota and Esurna - I've used both and I have to say, at least for the Sonoffs - for me, Espurna wins. As soon as I flashed the latest nightly build of Espurna onto the Mini - I lost all the settings as you would expect - I had to do the Espurna setup using (on my mobile) the access point now built into the Mini with Espurna to then set up my access point, ID, MQTT access and Alexa name - all of that is described elsewhere and is, compared to what I've just been through with DIY mode, a doddle.
More on working Sonoff Minis and Espurna soon. For now I'm happy I have a solution - and Alexa has a new toy to connect to. MQTT of course was simple but I decided to try the API out - so in the Espurna web interface I turned OFF the restful API and ON the http API. I used a Node-Red http request node, this time very slightly different format, in the URL I put:
(my default API key for that board) and in a pair of inject nodes - json payloads
respectively. Done, dusted - the request node can return the value only as a string - or lots more info as "parsed json" - and you don't have to lift a finger for that.
Itead HAVE however written to tell me they WILL improve the DIY software and tool - so watch this space....