“Shelly One” is just one example of several (claimed) open source products produced by a company called Shelly who are based, not as you might expect in China’s mega technology city of Shenzhen but in Sofia, Bulgaria. Shelly are not new and there are plenty of videos out there about their products – so I won’t bore you with the usual stuff. I call them “Shelley” but I note that the box and their web interface footer state “Allterco Robotics Ltd”.
Suffice it to say that they make (or perhaps re-badge in some cases? Just a guess) quite a variety of products from relay switches, through energy switches to smart RGBW lights, flood sensors, temperature sensors and more.
Today let’s just take a look at the “Shelly One”, a product that competes with my favourite smart switch (it is my favourite because it is CHEAP and because I prefer where possible not to help finance the likes of B&Q who are owned by Kingfisher PLC so really we are also talking about for Brico Depot, GoodHome, ScrewFix and others) when it comes to automating my houses here in Spain or back in the UK.
According to the box, the Shelly One features a 16 amp Relay unit , open source, AC 110-220v, DC 12v/DC 24-60v, WiFi 2.4Ghz, intelligent on/off, embedded web server and SSL connectivity. It also has (optional thankfully) a cloud service for remote access, services and backup.
My favourite low-cost power controller then is the Sonoff Basic and it runs lots of gadgets around my house. powered by 3rd party firmware all of which talks to my Raspberry Pi based home controller which communicates with external devices over WIFI using a protocol called MQTT.
Many regular readers will be familiar with this. I also use Node-Red on the Pi but thanks to MQTT, that isn’t important as all the power devices need to understand is MQTT over WIFI. See my home control and various other blog entries for more information.
So is Shelly going to displace Itead (makers of the Sonoff series of mains controllers who have been around for some time) on grounds of price? No, not a hope in hell.. but could they have some other advantage?
Well, yes is the short answer to the second part above. Whether that is enough for you is another matter. Here are a couple of points to consider. The Shelly One, like the Sonoff Basic has a relay output – you can turn things (lights, heaters, alarms for example) on and off via a variety of means in both cases. Sonoffs are cheap, have been around for some time and they have nice new boxes. Shelly One is smaller but the box is not so nice – there are a ton of differences but here are ones that matter to me.
Both Sonoff Basic and Shelly One can do more than merely turn things on and off but then in both cases it gets more complicated. We’ll skip that for now except to say the Shelly One has a non-isolated SW connection for, say an on/off button. Use by all means but don’t actually touch that screw terminal when the unit i connected to power.
Both companies – like everyone else out there have their own mobile APP and cloud service. Well, you must want to use ONLY THEIR APP as that makes like simple. Really? I’ve not come across ANY tech-type who would agree with this. WE all want to use a variety of products, ideally with a common control system, often of our own making. Who wants to use a dozen, incompatibly different remotes to control gadgets around the house? In my case do I really want to RELY on c cloud-based service “somewhere” in the world = or several depending on which device we are talking about?
Erm, no. I already pretty much have to use Amazon’s cloud or non-essential control such as speech input – and that is bad enough.
Is this an unbiased review? Hell no, I don’t review every product on the planet, only those which are cheap or for which I can easily get samples to actually test– on the OTHER hand, no I do NOT do affiliate schemes – I need my blog to remain independent and have done for several years. – and no I don’t have “guest” writers. So, Shelly One – why this, why now?
Both Shelly and Itead now let you use third party “firmware” in place of their own cloud offering so you can use your own favourite control system. So no big difference there, except that installing such third party software may or may not be a problem depending on your software skills (or lack of said skills). There are several such alternative firmwares, the free Tasmota being as good an example as any.
One result of this flexibility is that you can then control their products by the extremely useful MQTT protocols. With Sonoff and others, you need to install Tasmota or similar to enable MQTT access. With Shelly, you can merely issue a simple MQTT command to disable their own cloud service and use MQTT directly, no third party software required, all over in moments. Indeed after a quick word with my friend Antonio, I don’t even need MQTT, the REST API is a doddle to use in Node-Red but that is a whole other conversation.
I did not have to use an FTDI or any other hardware during setup (see FTDI picture below). Just a screwdriver.
Also I just realised that unlike the Sonoff Basic (and others), the relay contact pair (N.O.) on the Shelly One is actually totally uncommitted and isolated from the rest of the board. Most other smart switches common up the neutral line on the assumption it will make life easier for you.
For Sonoff Basic, should you need a completely isolated set of relay contacts, then a potentially messy soldering job is ahead of you. Some might say that this is not important to them – fair enough, often I don’t need isolation either (and with Sonoff “the price is right) but right now, I do need complete output isolation. In the more expensive Shelly One, no issue with relay contact isolation, no soldering, job done.
Why mention it at all? Well, I need to thermostatically control a heating system that needs an uncommitted contact pair to control it and as it is an expensive system, the les bodging, the better. With Shelly, job done.
See the photo of Shelly One at the top of this blog entry – live and neutral in…. also a switch connection (to LIVE – be AWARE of the live nature of THAT connection) to turn the output on and off manually and a normally open, isolated contact pair rated at 16 amps (make that 10 amps – Shelly do as everyone else and quote a DC maximum, a typical heater has a peak current that forces you to work well below their 16 amp spec – hard to be precise, shall we say 11 amps?
Others who quote 10 amp contacts should also phrase their adverts more carefully for the same reason. A 10 amp-rated output (Sonoff Mini and BASIC) should NOT be used to control a 10 amp heater – be similarly conservative and if you are not an expert, listen to someone who is.
Did I say that Shelly One is also very small indeed? 40mm diameter, 18mm high.
If you are happy to use a “cloud” in another country or install your own software (as I usually am) then there are lots of other blog entries including my own which cover this.
If you want to use the MQTT communications format WITHOUT replacing the firmware in such devices, you’ve come to the right place.
Here is my test setup demonstrating some of the points made above. I’m deliberately keeping this as simple a possible.
Once I received the “Shelly One”, I wired it into 220v main power here in Spain and immediately it provided an “access point” that my mobile phone could talk to (I told the phone to use the Shelly as an access point instead of my normal WIFI). I went into the Shelly’s setup page (on my phone browser) and told the Shelly about my WIFI and the WIFI password. From that point, I set my phone back to normal.
A quick check of IP addresses active on my home network showed that the Shelly was now available on the network. One more set of commands sent to the Shelly setup page disabled their company CLOUD access and enabled local MQTT access for which it needed the IP address, username and password of my local (Raspberry Pi-based MQTT “broker” i.e. the free and widely available Mosquitto.
From that point on I simply added 2 commands to my Raspberry Pi Node-Red screen – an “inject” node to turn the output of the Shelly ON” and another to turn it off. In the screen you will also see status monitoring – but that is just there for completeness.
Now I could easily turn the Shelly One on and off (of course in practice I’ll be using my BigTimer node to do that under schedule along with temperature monitoring (handled elsewhere) all without any third party firmware, – but was it safe to connect some system to the output that needs an isolated contact set? YES.
See lit-up LEDS in the photo higher up – they are still here, I am still here, sure enough, neither of the two “Shelly One” output terminals are connected to the mains (as we say in the UK, others might call it the wall outlet) – and hence can be used either to control low voltage gadgets (who’s power supply may well have minus connected to ground) or something like a heating system which requires an isolated contact pair. Just beware that the manual override control on the Shelly One IS however potentially LIVE – no fingers, hence the simple red test lead you see at the right of the photo higher up. I can electrocute myself easily enough without ASKING for it.
Looking at the (Raspberry Pi + Node-Red-originated) MQTT command above you could well ask, is all that necessary? The long name in the “topic” identifies that particular Shelly device and the “0” is there (again in the topic as some Shelly devices have more than one output. In this case the (text) topic identifies the Shelly device and what type of command, the (text) payload covers the two options you have – on or off. Unlike some setups, this IS case sensitive. “on” works, “ON” or “1” does not – remember that to save some heartache.
While I’m here
I started this blog entry determined to talk only about the isolated relay and MQTT features of the Shelly One… but since I realised that the “SW” switch connector (which you fasten to LIVE) was operating in a momentary press mode, so instead of 2 presses turning the output on and then off, with the output initially ON, shorting the SW input to live would turn the output OFF and then releasing it would turn the output back ON. That’s NOT what I wanted and I was/am determined NOT to hook up their APP or Cloud.
I am therefore delighted to report some of the functions of the WEB interface. Simply pointing my PC browser to the internal IP address of the device opened up a nice web interface with an ON/OFF switch, options to change the way the SW hardware input works and so VERY much more including (for those without Node-Red and my wonderful BigTimer) timer schedule options including dusk/dawn and more.
The Shelly automatically detected my time-zone which is necessary for dusk/dawn controls to work. When I took a look I remembered I’d already used this to set up my MQTT address and user name and password but at the time not fully grasped the potential of this interface. Expect more on this subject…
I did notice one setting to protect the web admin interface of the Shelly with a user name and password. Did that, ensured the option was ticked and saved… nothing changed so I rebooted the device… I could still control it via the web without putting in the user name and password… including changing the default power up mode… have others noticed this???
“The Web Interface is now protected by a user name and password” it says -and I have FULLY up to date Shelly firmware. At first I was unsure about this then realised I had two copies of the browser open and I’d left one attached to the Shelly web interface. Once I closed that, things improved. I DID end up having to close ALL browser tabs, related or not, in order to close off access to Shelly.
Maybe I’m missing something but a “Logout” menu option might be useful for the terminally security-conscious.
I’m not going to get into the APP here but there are QR codes on the box for both the Apple and Android Play Stores.
A quick update for you on the Shelly (Dec 2019) – trying to poke wires into those holes for updating software is not easy. I’ve done it using my FTDI as the board eventually failed and I decided to put Tasmota 8.0.1 onto it. I managed it but the plastic around the socket for gnd, 3v3, serial in, out and pgm is, to say the least a tight fit. All works though.