Shelly One WIFI Switch

“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.

Shelly One on Pete Scargill's bench

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.

Shelly One packaging

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?

ComplianceWell, yes is the short answer. 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.

Shelly One and low-voltage LEDS as load using their own 12v supply

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.

No FTDI required

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.

On and Off - simple

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.

Simple MQTT commands - topic identifies the Shelly

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.Shelly One Security

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.


41 thoughts on “Shelly One WIFI Switch

  1. For me, the big win of the shelly is the switch input. Combined with the small size, you can cram them into a ceiling rose, making it possible to automate UK lighting without running neutrals.

    1. Yes, the size is great and I’d imagine for the USA market, the extra current could come in useful – though they do have 220v, wall outlets tend to be 110v hence anything with a heating element will use twice as much current as it would in Europe.

  2. I have one of these controlling our kitchen LED strip. It’s powered directly from the 12V LED supply, another advantage of this over the Sonoff. I am controlling it over MQTT and it has performed flawlessly for the last 6 months. If they just dropped the price it would be a Sonoff killer for most applications.

    1. You’ve just made me redundant, Gary 😃

      I am testing (photo this afternoon) (rice-wire) LEDS running on a grounded 12v supply, switched by Shelly One and NOT exploding. Good start.

    1. sorry to hijack thread, Pete, but this is the most recent blog article so most chances to get the offer, if anybody is interested… you can delete comment if link is not working out of italy or redundant…

      1. Powerbear socket – nothing on but seems to have the same offer… but beware I’ve not tested this. Could be good, could also be rubbish. Don’t say you weren’t warned.

  3. Smart socket is back to 9 euros on Italian site, just checked. Tasmo’s have had the group topic from the early days. I learned so much about programming from Theo’s early stuff but now there are pages and pages of code. It is truly an exemplary example of what can be done with ESP’s and Arduino IDE.

    1. Yeah, better consider the UL-listed Shelly 2.5 UL (Beware. there is also a “regular/non-UL” variant of the Shelly 2.5)

      [Here]( is a more detailed view of the doubts one might have with the other, similar versions of Shelly. Creepage and Clearance was criticized to be on the very small side.

      With UL mark on it, there is a company with a reputation involved to pay attention the items can be regarded safe. They normally also conduct quarter-annually audits to ensure things are in order with the items bearing their mark.

  4. Again a nice blog entry, excellent.

    Apart from the nice hardware, the firmware of the Shelly is impressive. I especially like:
    – the local timer schedules, they run locally in the Shelly, no cloud required
    – the feature to call a URL when the switch is used, to report switch status to other systems, like Domoticz.

    btw : the Shelly firmware runs on a generic Esp8266 provided it has >2MB flash 🤫

          1. Hmmmmmm. works fine on my Wemos D1 Mini.

            Used this on my Mac.

            ERASE ESP
            ./esptool –port /dev/tty.wchusbserial* erase_flash

            FLASH FIRMWARE
            ./esptool –port /dev/tty.wchusbserial* write_flash -fs 2MB 0x0 SHSW*.bin

            Then used Shelly IOS App to configure Wifi.

            1. i used the espeasy flasher, which never failed to me, and the nodemcu pyflasher… i’ll retry tomorrow on an other module, but it’s just a test, don’t really need that firmware and it’s pretty useless on a device without relays and with sensors…

              1. Had some trouble at first too. But after erasing first, and doing a proper reset after Flashing it is ok.

                Flashed on WemosD1Mini and some ESP12’s, all OK.

                Makes sense if you have other Shelly’s but want to use the Webgui and App on DIY switches.

              2. I flashed shelly firmware one d1 mini but if I remember it only gives you 1 gpio point. Again if I remember right as it was a while ago it was gpio 15

    1. both things can be done on a generic esp8266 loaded with tasmota, and even subscribe or publish mqtt topics… Travis showed that in these videos:

      using http rest api is easier, you can make interactions between tasmota devices without any broker or support software like nodered… given you learn basic rules in tasmote, of course… while scheduling is a menu function, easy to setup

  5. I flashed shelly firmware one d1 mini but if I remember it only gives you 1 gpio point. Again if I remember right as it was a while ago it was gpio 15

  6. @scargill

    you write ““Shelly One” is just one example of several open source products” at the beginning of the article.
    Unfortunately this is not true, Alterco is abusing the use of the word OpenSource and nothing, absolutely none of its products, are opensource. Neither as hardware, nor as firmware, nor as app software.
    Perhaps we can report it to the OpenSource consortium or to the FSF.

Leave a Reply

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

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