{"id":424,"date":"2018-08-22T23:16:40","date_gmt":"2018-08-23T03:16:40","guid":{"rendered":"http:\/\/www.thesmarthomehookup.com\/test_install\/?p=424"},"modified":"2023-04-24T15:46:49","modified_gmt":"2023-04-24T19:46:49","slug":"the-shelly-1-smart-relay-is-it-better-than-the-sonoff-basic","status":"publish","type":"post","link":"http:\/\/www.thesmarthomehookup.com\/test_install\/the-shelly-1-smart-relay-is-it-better-than-the-sonoff-basic\/","title":{"rendered":"The Shelly 1 Smart Relay: Is it better than the Sonoff Basic?"},"content":{"rendered":"<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/J20hxfUTP9I\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen=\"\"><\/iframe><\/p>\n<p>Today on the hookup we\u2019re going to take a look at a new product called the Shelly 1 that directly competes with everyone\u2019s favorite $5 smart switch. &nbsp;Does it have the right features to dethrone the sonoff as the go to device for DIY smart home enthusiasts? Lets find out.<\/p>\n<p>A few weeks ago I was contacted by the CEO of a Bulgarian robotics company called Allterco Robotics, they had just launched a new wifi enabled relay that was designed specifically with makers in mind and he was wondering if I\u2019d like to review it on The Hook Up.&nbsp; I told him that I would love to check it out, with the understanding that I would give an unbiased and honest review, and here it is.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/shellyonly.jpg\"><img fetchpriority=\"high\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/shellyonly-300x269.jpg\" alt=\"\" width=\"300\" height=\"269\"><\/a><\/p>\n<p>I\u2019ve had the Shelly 1 for about a week now and I\u2019ve been putting it through its paces.&nbsp; Lets start out by talking about the completely unmodified stock firmware experience.&nbsp; My first impression taking it out of the box was that I couldn\u2019t believe how small it was.&nbsp; If you\u2019ve ever tried to fit a sonoff basic in a standard switch box, you know that it can\u2019t happen without modification to the casing. &nbsp;The shelly 1 is about the size of two oreos stacked on top of each other, which allows it to easily hide behind your existing switches.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/IMG_3625.png\"><img decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/IMG_3625-169x300.png\" alt=\"\" width=\"169\" height=\"300\"><\/a><\/p>\n<p>The shelly 1 comes with firmware pre-installed to use with the shelly app for iphone and android, and the shelly cloud.&nbsp; It behaves pretty much like any other off the shelf smart home product in that regard.&nbsp; You hook it up, open the app, connect to the shelly via it\u2019s broadcasted SSID, and put in your personal wifi information.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/Photo-Aug-19-10-40-18-AM.png\"><img decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/Photo-Aug-19-10-40-18-AM-169x300.png\" alt=\"\" width=\"169\" height=\"300\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The app is nice, it has options for scenes, rooms, and schedules and they have a google home and amazon echo skill to enable voice control.&nbsp; The app gives you the option to control the device locally, or connect it to the shelly cloud.&nbsp; They have a well documented REST API, so even though a home assistant integration isn\u2019t available yet, it shouldn\u2019t be hard to create one.&nbsp; I did monitor the non-cloud enabled shelly\u2019s traffic with wireshark for 24 hours and I didn\u2019t see any outgoing packets, only local multicast requests, so that\u2019s encouraging.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/rest.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/rest-300x277.jpg\" alt=\"\" width=\"300\" height=\"277\"><\/a><\/p>\n<p>But If you watch this channel, you probably already know that using this app isn\u2019t really an option for my smart home.&nbsp; I prefer to have complete control over my devices, which means knowing exactly what\u2019s in the firmware\u2019s code.<\/p>\n<p>The great news is that the shelly 1 is actually made to have it\u2019s firmware changed, and you don\u2019t need to have a 3d printed part or a soldering iron to do it, you don\u2019t even need to open the case (although I did brute force it open in order to satisfy my curiosity about how they fit everything into such a small package, more on that later).<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/Photo-Aug-19-1-07-25-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/Photo-Aug-19-1-07-25-PM-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\"><\/a><\/p>\n<p>On the back of the shelly 1 is an exposed set of female headers for RX, TX, VCC, Ground and GPIO-zero.&nbsp; And if you\u2019ve ever worked with a sonoff you know those are the 5 pins you need to access in order to flash the ESP8266.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/sw.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/sw-300x257.jpg\" alt=\"\" width=\"300\" height=\"257\"><\/a><\/p>\n<p>Before we talk about custom firmware, lets look at some of the interesting differences between the hardware of a sonoff and a shelly1.<\/p>\n<p>On the shelly 1 the relay is isolated, it doesn\u2019t just send the 120 or 240V AC through to the output like a sonoff does, the shelly 1 has a relay in and a relay out terminal, meaning you can use this to switch low voltage if you want.<\/p>\n<p>The shelly 1 is rated to 16 amps. Most people see the 10A rating on the sonoff and figure that it doesn\u2019t matter since they probably won\u2019t be pulling 10A through a singe device anyways.&nbsp; The advantage of having the shelly rated as 16A is that it ensures that the shelly will not be the device that fails in an overcurrent situation.&nbsp; Since most household switches are tied to 15A breakers, a sonoff could be as much as 50% over it\u2019s rated current without tripping the breaker, which could result in a fire.&nbsp; Since the shelly should be able to handle 16A based on its rating, it means that the breaker should trip before the shelly fails.<\/p>\n<p>It&#8217;s worth noting that some sonoffs are rated for 16 amps like the TH16, but they are about 3 times the price of a standard sonoff basic, and quite a bit bigger.<\/p>\n<p>The shelly can also be operated on 24-60V DC, sonoff makes a the sonoff SV that can be operated between 5 and 24 volts DC, but again, it\u2019s a separate device.<\/p>\n<p>The shelly 1 GPIO cannot and should not be used while connected to mains voltage. While the sonoff makes reasonable efforts to isolate the high voltage and low voltage side of the board, the GPIO headers on the shelly are directly tied to the AC lines.&nbsp; Specifically the ground on the header is tied directly to the hot wire or line voltage pin from the AC input.&nbsp; I repeat, do not ever attempt to use the GPIO header of the shelly 1 when it is connected to mains voltage because the ground is referenced to your mains voltage.&nbsp; Which leads me to my last point:<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/shock.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/shock-300x264.png\" alt=\"\" width=\"300\" height=\"264\"><\/a><\/p>\n<p>When using a sonoff we often use the GPIO pins to connect external switches or push buttons. As I said before, this would be extremely unsafe on the shelly 1 because those pins are carrying high voltage in reference to the neutral or ground wire in your house, which could result in a serious shock.&nbsp; So how do you switch the shelly 1 manually?&nbsp; The shelly includes a switching terminal labeled SW.&nbsp; Applying mains voltage to the SW pin grounds GPIO5 on the ESP8266 and triggers the relay.&nbsp; This means you are welcome to keep using your existing AC switch since it is rated for mains voltage, but you can\u2019t use a low voltage switch like people often do with the sonoff.<\/p>\n<p>Now that we\u2019ve covered the hardware, lets look at the software. The most valuable addition to a sonoff basic, and the reason it has become such a favorite among DIY smart home enthusiasts is the ability to flash the custom tasmota firmware maintained by Theo Arends.&nbsp; So naturally, I had to see how the shelly 1 handled tasmota.<\/p>\n<p>Obviously, with the shelly 1 we get to skip a few steps in the process since our header pins are available from outside the cover.&nbsp; You\u2019ll still need to have an FTDI adapter, and you still need to make sure it has the 3.3V output selected, or you\u2019ll fry the chip.&nbsp; Hook up some jumper wires according to this wiring diagram and you\u2019re ready to go.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/diagram.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/diagram-300x118.jpg\" alt=\"\" width=\"300\" height=\"118\"><\/a><\/p>\n<p>Tasmota uploads and flashes exactly like a sonoff basic.&nbsp; If you\u2019ve never flashed tasmota, you should watch watch DrZzs video on the most current way to get that done.&nbsp; When I uploaded the stock tasmota image and arrived at the web interface I noticed that the toggle button didn\u2019t immediately do anything.<\/p>\n<p>That\u2019s okay, we just need to set up the GPIO pins correctly for this particular unit.&nbsp; If you go to configuration and then configure module you can select generic from the drop down menu and then put GPIO4 as relay1 and GPIO5 as switch1.&nbsp; Hit save and now you\u2019ll be able to toggle the relay via the web interface.&nbsp; Great. &nbsp;But the switch still wasn\u2019t functioning for me, at first I thought the shelly documents might be incorrect and the switch wasn\u2019t actually on GPIO5, so I tested all of the pins.&nbsp; None of them worked.&nbsp; Combing through the shelly 1 documentation I noticed that it said that it was made for the SW pin to float when not switched on, but the tasmota firmware activates a pullup resistor on each GPIO when they are configured.&nbsp; To get the switch working I had to edit the sonoff.ino file to use the pinmode \u201cinput\u201d instead of \u201cinput_pullup\u201d and reflash the firmware.&nbsp; I also took this opportunity to add a custom profile in the sonoff_template file for the shelly1 so you can select it from the devices drop down menu.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/arduino2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/arduino2-300x124.jpg\" alt=\"\" width=\"300\" height=\"124\"><\/a><\/p>\n<p>I\u2019ve posted the .bin file with the updated parts of the code in the video description so you can use the esp flash easy tool instead of fooling with the Arduino IDE.&nbsp; I\u2019ll be contacting Theo to see if there\u2019s a way we can set the switch on this particular device to not be an input_pullup, but for now, my .bin file includes tasmota 6.1.1 with a fully working profile for the shelly 1.<\/p>\n<p>Shelly1Tasmota Bin File: <a href=\"https:\/\/github.com\/thehookup\/shelly1tasmota\/blob\/master\/shelly1tasmota.bin\">https:\/\/github.com\/thehookup\/shelly1tasmota\/blob\/master\/shelly1tasmota.bin<\/a><\/p>\n<p>To hook up the shelly 1 you will need to have a small length of white copper wire and 3 small lengths of black copper wire of the same gauge as the incoming line, this is usually 14 gauge for standard 15 amp circuits.<\/p>\n<p>I figure this goes without saying, but I\u2019m going to say it anyways: Mains voltage can kill you, if you get into your switch and there\u2019s something strange going on that you don\u2019t understand, it\u2019s time to either get researching and learn about electrical building code and best practices, or hire a professional.<\/p>\n<p>Before disconnecting anything make sure your breaker is off.&nbsp; Flip the switch before you turn the breaker off to make sure the lights are working, then flip the breaker for that circuit and then test the switch again, if the lights don\u2019t turn on you\u2019re good to go.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/hookup.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/hookup-300x208.jpg\" alt=\"\" width=\"300\" height=\"208\"><\/a><\/p>\n<p>Disconnect the hot line coming from your breaker to your switch and attach the two new black strands of wire to it using a wire nut.&nbsp; Connect one strand to the L terminal of the shelly 1, and the other strand to the I terminal. &nbsp;\u201cL\u201d stands for line voltage, \u201cI\u201d stands for input voltage for the relay. You\u2019ll also need to have a neutral wire in the box for the shelly, you\u2019ll probably have a bundle of neutrals, if so add your short white wire to the neutral bundle using a wire nut, you may need to have a larger wire nut if it won\u2019t fit with the previous bundle.&nbsp;&nbsp; Attach that neutral to your shelly 1.&nbsp; Remove the wire going to the light from the top side of the switch and attach it to the O terminal of the shelly 1.&nbsp; Replace that wire with a short length of black wire that will go to the SW terminal on the shelly 1.&nbsp; Make sure all the screws are secure, but not over tightened.&nbsp; Push the shelly 1 to the back of the switch box, screw the switch back in and you\u2019re all done.&nbsp; You can configure your switch in home assistant just like you would any other tasmota device and it will function just the same.<\/p>\n<p>So is the Shelly 1 actually better than the sonoff basic?&nbsp; Lets compare.<\/p>\n<p><a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/title.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-content\/uploads\/2018\/08\/title-300x149.png\" alt=\"\" width=\"300\" height=\"149\"><\/a><\/p>\n<p>First lets consider price: A shelly 1 costs about 11 dollars from the shelly website vs the 6 dollar and 50 cent average price of the sonoff basic. &nbsp;At the time of publishing this video searching for shelly 1 on amazon doesn\u2019t yield any results, but the CEO of Allterco robotics sent me some direct links to the amazon pages for the shelly 1 that are priced at 11 dollars and 90 cents with amazon prime shipping.&nbsp; Those links are down in the description. The shelly 2, a dual 8A relay switch with the same form factor as the shelly1, but without exposed GPIO headers is also available through those direct links with a price of $19.90, which is much better than the price of $35 that comes up from the normal amazon search. <strong>Even with the lower prices and amazon prime shipping the sonoff basic wins this category, and I think it will be nearly impossible for any company to compete with the crazy low price of the sonoff basic, but of course, price isn\u2019t the only important thing.<\/strong><\/p>\n<p>Shelly 1 Amazon US: <a href=\"https:\/\/amzn.to\/2BzVDYs\">https:\/\/amzn.to\/2BzVDYs<\/a><br \/>\nShelly 2 Amazon US: <a href=\"https:\/\/amzn.to\/2PqtE0i\">https:\/\/amzn.to\/2PqtE0i<\/a><br \/>\nShelly 2 Amazon UK: <a href=\"https:\/\/amzn.to\/2OYJezl\">https:\/\/amzn.to\/2OYJezl<\/a><\/p>\n<p>Next lets consider intended use:&nbsp; The shelly is intended to be inside of a switch box, and the sonoff basic is intended to be used in line with a wall plug.&nbsp; The shelly 1 should probably not be used outside of a switch box, and based on the fact that the housing of the sonoff has to be modified to fit into a switchbox it probably shouldn\u2019t be used inside of a switchbox. <strong>There\u2019s no clear winner in this category, your use case will decide which product will be best.<\/strong><\/p>\n<p>Next lets recap the hardware differences:&nbsp; The sonoff basic has mostly isolated GPIO pins which allow for the use of low voltage switches and buttons with the sonoff.&nbsp; As a number of youtube commenters have pointed out, these switches and buttons have a small chance of becoming energized with mains potentials if a power surge compromises the electrical traces on the board.&nbsp; The shelly 1 has a high voltage switch terminal, which should only be used with high voltage rated switches with a proper ground connection.&nbsp; The way that shelly has implemented switches limits options, but it also adds an amount of safety to the process by ensuring that the switches will always be properly grounded.&nbsp; The shelly is rated to 16 amps, while the sonoff basic is only rated for 10 amps, as I said before, this ensures that a 15 amp circuit breaker will trip before the shelly 1 exceeds its rated voltage.&nbsp; The shelly is also amazingly small, which means that the voltage creep tolerances are also small, but that doesn\u2019t matter as much since we aren\u2019t exposed to any non-grounded circuitry once the shelly is installed.&nbsp; <strong>In this category I would say that the shelly comes out ahead from both a safety perspective, and a utility perspective.<\/strong><\/p>\n<p>I\u2019m not ready to say that everyone should stop buying the sonoff basic and start buying the shelly 1 instead, but I do think that for the specific application of installation behind an existing switch, the shelly is clearly the better designed product.&nbsp; If you\u2019ve been looking for an affordable tasmota compatible product to convert your existing dumb switches into smart ones without the need for soldering you should check out the shelly 1 open source.<\/p>\n<p>Shelly sent me a couple of other products to try out including the shelly 2 and the shelly4pro.&nbsp; I\u2019m currently in the process of running those through their paces and getting tasmota properly installed and working on them.&nbsp; I\u2019ll have reviews of those devices coming out in the next few weeks.&nbsp; Let me know down in the comments if I missed any important information, or if you have questions about this product.&nbsp; I said it before, but I\u2019ll say it again, shelly is not paying me to do this review.&nbsp; I agreed to do this review because I thought it looked like a great solution for smart home users like me who prefer to use custom firmware and non-cloud based solutions.&nbsp; If you enjoyed this video, please consider subscribing, and as always, thanks for watching the hookup.<\/p>\n<p><strong>US Links:<\/strong><br \/>\nShelly 1 Amazon US: <a href=\"https:\/\/amzn.to\/2BzVDYs\">https:\/\/amzn.to\/2BzVDYs<\/a><br \/>\nShelly 2 Amazon US: <a href=\"https:\/\/amzn.to\/2PqtE0i\">https:\/\/amzn.to\/2PqtE0i<\/a><br \/>\nFTDI Adapter Amazon US: <a href=\"https:\/\/amzn.to\/2PpcoZv\">https:\/\/amzn.to\/2PpcoZv<\/a><br \/>\nJumper Wires Amazon US: <a href=\"https:\/\/amzn.to\/2o0Moa1\">https:\/\/amzn.to\/2o0Moa1<\/a><\/p>\n<p><strong>UK Links:<\/strong><br \/>\nShelly 2 Amazon UK: <a href=\"https:\/\/amzn.to\/2OYJezl\">https:\/\/amzn.to\/2OYJezl<\/a><br \/>\nFTDI Adapter Amazon UK: <a href=\"https:\/\/amzn.to\/2w0kPlW\">https:\/\/amzn.to\/2w0kPlW<\/a><br \/>\nJumper Wires Amazon UK: <a href=\"https:\/\/amzn.to\/2MGyA2K\">https:\/\/amzn.to\/2MGyA2K<\/a><\/p>\n<p>Shelly Website: <a href=\"https:\/\/shelly.cloud\/\">https:\/\/shelly.cloud\/<\/a><\/p>\n<p>Shelly1Tasmota Bin File: <a href=\"https:\/\/github.com\/thehookup\/shelly1tasmota\/blob\/master\/shelly1tasmota.bin\">https:\/\/github.com\/thehookup\/shelly1tasmota\/blob\/master\/shelly1tasmota.bin<\/a><\/p>\n<p>Visit my website: <a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\">http:\/\/www.thesmarthomehookup.com\/test_install<\/a><br \/>\nFollow me on Twitter: @TheHookUp1<\/p>\n<p>Support my channel:<br \/>\nPatreon: <a href=\"https:\/\/www.patreon.com\/thehookup\">https:\/\/www.patreon.com\/thehookup<\/a><\/p>\n<p>Music by www.BenSound.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today on the hookup we\u2019re going to take a look at a new product called the Shelly 1 that directly competes with everyone\u2019s favorite $5 smart switch. &nbsp;Does it have the right features to dethrone the sonoff as the go to device for DIY smart home enthusiasts? Lets find out. A few weeks ago I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2598,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reviews"],"acf":[],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/comments?post=424"}],"version-history":[{"count":5,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":2353,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/424\/revisions\/2353"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media\/2598"}],"wp:attachment":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media?parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/categories?post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/tags?post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}