Noob Interested in Sonoff

Have Hassio running in a VM with a Conbee 2 stick but looking to get away from ZigBee and employ Wifi only.

Got to be honest - the Sonoff stuff is cheap and definitely of interest but of all the millions of pages on here and in other places I can’t seem to find where to start, so have some questions:

Basically looking to use Sonoffs with physical switches, installed in the ceiling (no neutral, UK).

  • Is this possible without MQTT? If so, why don’t more of you do it? Surely MQTT is just an extra layer.

  • Which Sonoff is best? ‘DIY’ version or solder needed?

  • Should I use Tasmota or ESPHome? I want the ability to switch the light without HA but HA must be aware of the light’s state.

  • Any setup guides? Looking for the quickest, easiest deployment that won’t crash and ticks all the boxes.

Thanks!

I am actually in a similar state. Just getting into sonoff’s so here is my 2 cents based on what I’ve researched:

  1. I believe Tasmota only uses MQTT, but ESPHome can use MQTT or Home Assistant API. For that reason I have gone the route of ESPHome.

  2. I have flashed devices both by soldering (or using a jig if you can) and DIY mode. The DIY mode was a serious time sink - First I had to add them to the Ewelink app to update firmware, then change them to DIY mode, create the SonoffDIY AP for them to connect to, use the DIY tool to change the SSID (because they wouldn’t update on the SonoffDIY network) and finally I was able to get them to update. This is required because they have to reach their servers to allow DIY update… I don’t like this… they shouldn’t need to know when we change firmware.

For that reason, I have gone the route of solder/jig (the mini’s have TINY pads, but there is a jig someone made a 3D print for to make it easier).

  1. I think Tasmota is probably easier - you flash it once, set the GPIO’s and some rules, and you’re done. ESPHome in my opinion has more capability… you have to write YAML to set it up, but then you can do so much with it! On the down side, if you want to change a setup in ESPHome you have to reflash it - but it can be flash OTA (so can Tasmota) so changes aren’t that hard after the initial flash.

  2. There are a lot of setup guides… first you have to choose a firmware to use. Tasmota has a page for many of the sonoff devices (supported devices), ESPHome again takes a little more work I think - if you go that route you have to decide what you want exposed to HA vs kept internal. You can also set some automation within the device itself so it doesn’t need HA to work. I can share what I have setup based on what others have done if you go this route.

I hope that my ramblings have shed some insight, and helped at least a little :wink:
DeadEnd

Thanks for the quick reply. Makes sense that I’d have to pick the firmware route first.

I believe Tasmota only uses MQTT, but ESPHome can use MQTT or Home Assistant API. For that reason I have gone the route of ESPHome.

Why do you prefer not to use MQTT, even though you say ESPHome is longer-winded to set up?

I think Tasmota is probably easier - you flash it once, set the GPIO’s and some rules, and you’re done. ESPHome in my opinion has more capability… you have to write YAML to set it up, but then you can do so much with it! On the down side, if you want to change a setup in ESPHome you have to reflash it - but it can be flash OTA (so can Tasmota) so changes aren’t that hard after the initial flash.

But Tasmota is MQTT - so I would need to set up a broker. Is that hard/where do I start?!

For that reason, I have gone the route of solder/jig (the mini’s have TINY pads, but there is a jig someone made a 3D print for to make it easier).

I have access to a 3D printer so could print the jig. Any links to guides showing what I need etc?

Thanks again!

If you’re putting into ceiling I suggest you look at Shelly 1. It has MQTT built in, so no soldering or firmware uploading required.

You can easily setup an MQTT Broker with Hassio addons and discovery - plenty of documentation

MQTT is easy to setup - again it depends on your setup, but it is a simple thing I think in almost all cases.

I chose ESPHome for the API over MQTT - one less cog in the wheel, and theoretically faster response time. Also I think it gives more control of what the device does. Not saying Tasmota cannot do this, I expect it can - but in ESPHome I just modify the YAML and push the update.

Tasmota I believe you have to use a series of commands in a terminal to change rules to accomplish this. Again, I haven’t used Tasmota except to identify GPIO’s in an undocumented device.

To be honest in the end ESPHome sounded like more fun to me :slight_smile:.

Oh, on top of the API ESPHome can be setup using integrations in HA instead of configuration.yaml. That is probably a plus for some as you don’t need to mess with YAML at that point (but you can do it through YAML still if you prefer), and you can set it up without restarting HA.

DeadEnd

MQTT is exceptionally light and faster than ESPHome API. MQTT was developed by IBM to be as light a protocol as possible - absolutely ideal for IOT.

I haven’t seen a direct comparison between MQTT and API - so I guess I shouldn’t have said “theoretically faster response time” - I was just making the assumption that it would be fast since it is 2 programs instead of 3. I wonder if the difference would even be noticeable or only measurable (> 1 second).

From the ESPHome site, here are the “advantages” of the API (bottom of the page):

DeadEnd

You are unlikely to notice. I know one thing for sure - you’ll notice the difference in time spent soldering and flashing a Sonoff Basic compared to setting up MQTT through the Shelly app, that’s for sure!!

I do not disagree!

My soldering skills are just starting… I can do it, but it is not pretty :slight_smile:.
I wish the DIY tool on Sonoff was easier… it would be create if it just created an AP that allowed you to push firmware to it… but I’m sure they wouldn’t like it being that easy since they wouldn’t be able to mine user data as much …

DeadEnd

You don’t need to solder in most cases. Have a look on youtube for “easiest way to install tasmota”.

The DIY tool on Sonoff is an absolute disaster - avoid at all costs! Use the standard basic, not that new heap of junk.

Do you mean holding pins in the holes of the Sonoff Basic? If you meant something else I missed it :slight_smile:.

I bought Sonoff Mini’s - so no holes… just tiny pads. I have printed out this jig and am waiting for some pogo pins to put it together. Hopefully it is as easy to use once I get it put together.

DeadEnd

I have plenty of sonoff basic s, but it has two problems:

  • does not fit in a standard wcd
    _ does not have a standard way for connecting a switch.
    For this I prefer a sonoff mini ( and a Shelly above a mini, but they are double the price)

The Sonoff Mini is around £6.00 from Aliexpress (2-4 weeks delivery)
The Shelly 1 is around £9.00 (1-2 weeks delivery)

How much was your Jig?
How much were your pogo pins?
How much was your soldering iron?
How much was your serial-to-USB converter?
How much was your solder?
How much was your flux?

Are you happier to use a company who has spent tens of thousands of pounds to get UL approval to sell into the US?

Everything was already owned except the pogo pins. Those cost me $3 USD.

I never said I had a problem at all with Shelly1 - I very much considered them and still think they are fantastic.

I found the sonoff mini’s for just under $5 USD, so I thought I would give them a test run. The next time I look for a device I very well might buy a Shelly instead.

DeadEnd

No, I get it - just passing on what I’ve learned from past experience and the knowledge of newer products like Shelly. At the end of the day it’s your choice.

Shelly 1 looks good but here in the UK struggling on price… Ranges from £15-£22 on British retailers and can’t find it on AliExpress/banggood. £3.66 for a sonoff basic, am I missing something here?!

You don’t need to solder sonoffs. You can easily just put in the pins you need to flash it.

For the Mini they have very small pads instead of through-holes.
This is probably the biggest hurdle of the mini vs the basic (at least to my limited knowledge).
image

DeadEnd

Buy it from shelly directly shellycloud

Buy it from shelly directly shellycloud

Didn’t see that before. Still triple the price of Sonoff though!