No cloud Sonoff question

Hi everybody!

I was wondering if I could have your opinions about the following:
I have a basic water heater in my apartment (80 liter, 1500W @ 230V) that I’m using every day, so it’s almost always on, but then a couple of times a year I’m going away for a couple of weeks and I would like it off.
Basically I would like a fully programable switch, that turns on and off manually but also automatically (at specific times, on a specific day of the year even).
It should also remember it’s state, and return to that state after a power outage. So if it was off, it would remain off after the power comes back, and switch on if it was on before.
I also don’t want to depend on cloud stuff. I just want to program it and leave, and control it remotely (I have access to my home network by VPN, port forward, I also have my own Linux server, so I don’t really need (or want) a cloud service.
Can all of these be achieved with a Sonoff DUAL 10A and maybe some custom firmware on it? If so, can you guys give me some links/pointers on where to start?

Thank you for your time!

Someone will no doubt suggest flashing the Sonoff with Tasmota, which is an excellent idea, but fiddly. I was going to do that with my two…

…until that fussing with their App and IFTTT and what-not… so I bought a bunch of Shelly’s, instead, and have been generally happier since. And though the Shelly’s support cloud, I haven’t enabled that feature, and just operate them locally. Options wise, they’re not quite as extensive as Tasmota, but they’re still a lot better than the Sonoff’s were — and come with both web access, and MQTT out of the box.

Hi Fredderic,

thanks for this info. I did not know about Shelly. A couple of questions to you, seeing that you have multiple of these:

  1. if you don’t enable the cloud, you still get all the functionality of the device?
  2. how does it behave when the power goes out and comes back? Can it remember it’s state (on/off) before the power outage and return to that state?
  3. can I program it to turn on at a certain date (day, month, year, hour, minute)? How flexible is the scheduling part?
  4. can I turn it on/off with a simple API call (from a browser, script, etc.)?

What I’m looking for is to be able to program it to turn on/off on it’s own at any date/time, even if the Internet/LAN/wifi is down and I don’t have remote access to it.

Thanks!

You can connect to them directly from a browser locally (need the Cloud service to connect over the web), and it’s got features like controlling the switch mode (normal, inverted, toggle, detatched, and a few others), I think the timer function works, but scheduling requires the Cloud service — although I found the built in page’s login can be a little flaky. Bunch of setup and functionality right there… however if you have several, connecting to them individually to do anything would be a pain. Power off behaviour is also configurable (per device setting to come on, off, resume its last state, or if it has a regular switch attached, do whatever the switch says).

From what I recall of the Sonoff’s, you could pretty much only control them from their App, through their cloud service… I was using IFTTT for a bit because I didn’t like their App at all, and they didn’t offer direct control, or any official components — IFTTT was a “partner”, I believe, so had access to their API… until they slapped a subscription fee on that. (Considering I didn’t want to use the cloud service at all, I rather went without until the Shelly’s arrived.) But I could never read the status of the Sonoff switches, and they had a habit of just not working from time to time.

For the Shelly, pretty sure I heard there’s a Shelly App that works with their Cloud service, though I haven’t used it (also not sure whether the cloud service is a pay thing as well), but then you’d get your scheduling… (But also, being it works through the cloud service, it very well may only function with an active internet connection also.) The whole point of me switching to Shelly’s, was to not use any Cloud service at all, so, can’t say much about it.

What I use instead, is Home Assistant… It provides a cloud connection to your local instance, which I know more about and trust a whole lot more… And HA has a component that connects to the Shelly’s directly, and just works, gives me timers, and schedules, and all sorts of things, so I pretty much set the Shelly’s up using their direct web access, and then don’t directly interact with them again.

As for an API… I’m certain there is, the Home Assistant component doesn’t use the MQTT functionality, and they’re not signed into the Shelly cloud service, so it must be using an API — but I honestly haven’t looked because it just works with HA. Was incredibly easy to get it set up and working, compared to the Sonoff…

There’s also MQTT if you’re using something that doesn’t support the Shelly directly, and I actually turned that on as well because there’s a little extra information it includes in it’s MQTT messages that the component doesn’t expose. If you’re looking for an API, the MQTT interface is probably even better… a lot of things can talk MQTT.

And then there’s the same final option as per Sonoff — flash it with something like Tasmota. The Shelly’s I’ve got actually expose the flashing header right through the case (which kind of bothers me slightly, because the 2.5’s I’m using don’t come with dust covers, but once it’s tucked away in a box or something it doesn’t matter so much), where the Sonoff’s only offer some pads on the PCB (which is why I never got around to flashing them).

To your final point, the device can’t operate itself on a schedule, which actually seems a little odd since it has the time, and can operate on a timer… Maybe they omitted that as a “bonus feature for using their Cloud service” (and maybe the cloud is only needed to configure it? I really don’t know)… But I don’t think the Sonoff could, either. Pretty sure the Sonoff App didn’t even connect to the devices directly, but went through the Cloud — I know there was often a noticeable delay between pressing the button on the App, and the Sonoff actually switching. The Shelly’s can also connect to a physical switch, anything else it going to need Wifi anyhow, but it doesn’t need internet access, so long something else controlling it locally.

All in all, I’m very happy with the Shelly’s… Not quite as feature-rich as flashing with Tasmota, but more than good enough, and much better than the experience I had with the Sonoff’s…