Shelly One WIFI Switch

Shelly

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

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

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.

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.

Facebooktwitterpinterestlinkedin

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

      1. Correct Gary – separate product. I will get into that soon so everyone is clear on the differences. Feedback welcome as always.

    1. I hope to clarify all of this WITHOUT destroying anything OR electrocuting myself. Wish me luck. Electroboom would do this well!!

      1. Peter ,Can I used the MQTT IP of my broker running in my cloud
        inside shelly?
        I want to control from my cloud via MQTT.
        Is this possible.

  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 Amazon.uk but Amazon.es 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.

    1. That’ll do nicely – so you can turn a whole shed-load of them on and off with one instruction. I’ll have to test that …. Shelly are you watching this?

  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](https://twitter.com/mezgrman/status/1063543364358995974) 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. Creapage distances are important, as soon as I get a spare module I will take a look unless we find someone who has already done that.

  5. 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:

      https://www.youtube.com/watch?v=Y2OTbjOYhpc

      https://www.youtube.com/watch?v=9j4fua0cuWU

      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

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

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

  8. Hi Pete,

    I was going to consider a Shelly One mounted in the ceiling for some lighting projects based upon your useful article but then I’ve found this: –

    https://www.itead.cc/sonoff-t4eu1c-wi-fi-smart-single-wire-wall-switch.html

    Sonoff have released a single wire (no neutral wire required) version of their touch switch. Previous versions required the neutral wire despite being described by some online sellers as “UK compatible”… this new T4EU1C seems to address that issue …

    I’ve ordered one today and I’ll be sure to let you know my experiences with it when it arrives in 2-3 weeks time. This could be a game-changer given the low ~£10.50 price

      1. Thanks Pete – I’d not seen that video before although the SuperHouseTV channel is in my YouTube ‘subscription’ list as I’ve found his videos very useful/interesting in the past. Thanks for the heads up

        1. Double thanks now – I’ve just finished watching that video and it was super informative and very interesting. I’d always wondered how the ‘no neutral’ stuff worked (I have an Energenie UK no-neutral ‘smart’ light switch at home). Now I know. What an excellent video. Thanks again Pete!

  9. Hey Peter

    You do know that Screwfix is part of the Kingfisher group ?
    Have been since 1999, and is the main reason you’ll find the same items in both B&Q and Screwfix.

    1. I didn’t know that, Paul – I DID know that B&Q, Home Depot and Brico Depot (Spain) are part of the Kingfisher group… is there ANY competition left in the world? That explains a lot, why for example, Screwfix do a great, cheap job of larger packs of nuts and bolts but don’t do smaller packs – because they would be competing against a sister company (B&Q). Oh, well.

      1. There is Toolstation in the UK which was setup by Mark Goddard-Watts whose family originally setup Screwfix. Having made a fortune from selling Screwfix to Kingfisher he then setup Toolstation and made an even bigger amount of money selling that to Travis Perkins 8 years later. There were stories at the time that Kingfisher screwed up with the non-competition embargoes that he should have been obliged to agree to.

  10. Thanks Brian

    However, for private individuals in particular (i.e. no VAT reclaim) and given that they seem to be insisting on using the DHL for UK deliveries (don’t get me started on DHL) – I’m not seeing any bargains there – and is partly why I never progressed Shelly beyond “Shelly One”.

    Another example from the same page would be a pair of door sensors which come to 47 Euros plus all in – from Shelly. Ok, April 25 delivery but I just ordered door sensors (both open and close sensing) for just a few pounds – but given the current world situation I could be looking at a few weeks – I’ll wait for that level of saving. The last door sensor set I got from AliExpress took 2 weeks, similar price and they work a treat.

    Regards from similarly (pretty much) locked-down UK – Pete.

  11. Hello Pete

    2 new devices from Shelly

    Shelly i3 – the world’s smallest Wi-Fi scenes activation device!
    1)
    Shelly i3 is a tiny device with no relays, capable of showing the status of 3 inputs when installed anywhere you’d like. It supports up to 8 different actions per button and allows for easy control of other Shelly devices WITHOUT your mobile phone. With i3, you can control lighting, garage doors, or any appliances you want!

    2)

    Control everything with just a click

    Shelly Button1 is a small device, possible to be carried in your pocket anywhere. It allows you to activate or deactivate any appliance with a simple click. Powered by rechargeable batteries, it can control every device in the house. Features include dimming preferences and many other push sequences customized individually to give you endless opportunities.

    Regards Brian

  12. Hello Pete

    new device Shelly Air

    Shelly AIR is an air purifier with filters and powerful UV-C LEDs developed to efficiently eliminate bacteria and viruses. UV-C light is found to inactivate viruses and bacteria floating in the air and has numerous supporting studies. 100% safe, Wi-Fi enabled, and easy to maintain, Shelly AIR is a leading product in its field. Use your smartphone to directly control it anytime, anywhere, and always breathe fresh air when you arrive home!

    regards Brian

  13. I enjoyed reading this blog, so thought I’d share some experience 🙂

    I have about 15 shellys in the house for the wall switches installed over the last 2 years. A mix of models 1, 1-PM, 2 and 2.5. Initially I started flashing them with tasmota for homebridge integration but stopped once MQTT support was provided. I actually re-flashed the original shelly firmware on top of tasmota ever since. Mqtt kills the shelly cloud service so I use the appletv to connect remotely to the homebridge server … works a charm.

    I bought a few shelly 1PM for the ‘overheating protection’ but in the end the power metering makes these devices a lot warmer and I know my 5W LED consumes 5W! So I now favour the shelly1 for the price but there’s not a lot left to ‘smarten’.

    Love tasmota for my other stuff: sonoff POW, sonoffSV (garage door controller), LED controllers, smart plugs(laundry management), nodemcu (weather station), wemos miniD1(heating system). But I have to admit that shelly gui is feature-packed and makes some things nice and easy.

    Over that period 1 fried one device (my fault) and Shelly replaced a defective unit.

    1. Hi Ivan

      I like Shelly – but I have to say, 9 Euros + 5.85 standard shipping to Spain = 14.85 to control a light compared to Sonoff Basic R2 from AliExpress at 3.89 Euros inc shipping from AliExpress – need I say more…

      1. Hi Peter,

        I have bought many Sonoffs, but they disconnect from Wifi from time to time using the stock firmware. Possibly the Tasmota firmware is better.

        I have 1 Shelly switch in operation, switchin lights on/off eevery day. Works > 1 year without any problem using the stock firmware.

        Switched to Hue now for all (except the Shelly) but the Shelly firmware is excellent! Too bad about the higher pricepoint 🙁

        1. Well, I can honestly say that Tasmota has not to my knowledge “disconnected from WiFi” without my help, on Sonoff Mini, Sonoff Basic (any model), H801 or any of a range of converted bulbs and smartsockets from various suppliers and manufacturers – not to mention various generic ESP12 boards I’ve used over the years. Issue with routers? Too many boards on one router or pushing the range? Power supply problems?

          1. I started a topic on this issue on the iTead website 4 years ago, now 100 replies later some people still have the same problem.

            I’ve read that Tasmota’s connection is very reliable, but have none in production anymore.

            I really love the ESP8266 and Sonoff hardware but the stock firmware was too unreliable for me.

            Just wanted to express my admiration for the Shelly firmware.

Leave a Reply

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

Leave the field below empty!

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