Sonoff Devices / Sonoff with Tasmota

Sinbad

Honorary Master
Joined
Jun 5, 2006
Messages
69,748
One of my basics has gone awol off the network, button has no effect.
Will try reflashing it...
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
So thanks to the power hiccups (thanks Eskom) our power was literally turning on/off every 2 seconds. When it stabilised, everything in home was up , but three sonoffs did not deal with the power cycling. They are all connected to the expensive Ellies surge protected plugs. For the pow r2 that I could reach, the blue led just blinks. Does not do anything else. Is it borked, or is there anything I can do to recover it. Pressing the button to activate relay does nothing if that provides a clue. So sad, I had just got them last month from smartkit. Running tasmota.

Update: 8 hours later. :crying::crying:. Every Sonoff POW R2 that was under load, did not like the electricity power cycling, so the ones controlling my geysers and fridges are borked. Still hoping against hope that I can reflash them. But perhaps I should have just bought Shelleys ...

QUOTE="Sinbad, post: 24671098, member: 15693"]One of my basics has gone awol off the network, button has no effect.
Will try reflashing it...[/QUOTE]


That’s what all my borked ones did. 4 POW R2s and Basic R1. Just the LED was flashing. Nothing else worked. Reflashing them sorted them out, though ended up inadvertently breaking the basic button when removing cover meaning could not reflash. Thankfully I had a spare.

This incident has me questioning my folly in HA. Today was a painful exercise -it took the whole day to bring up the core part of my house - all the borked Sonoffs were in the roof - I ended up taking my laptop and Flashing cable into roof so as to flash the borked ones in situ. A 17 in super heavy gaming laptop.

I am equating todays incident, to a pen test. It showed me the pain I am going to be in if everything goes offline. 8 other Sonoff devices which included other pows, basics, SVs survived this attack by Eskom. I now have three trains of thought:-

1. All these Sonoff devices need to be centralized if possible on the ground level (dedicated DB so to speak) to make replacing / reflashing easier.

2. Look to see if there a better solution that includes a failsafe - like a backup firmware (dual bios of old days) even if backup firmware is minimal version. So if primary firmware gets borked, after a certain about of retry attempts , the device either just switches to backup firmware/minimal firmware to allow one to reflash OTA etc
(sidenote:- wonder how the Creston/control4 systems work)

3. Get rid of it all.

Your thoughts/ideas?
 

ToxicBunny

Honorary Master
Joined
Apr 8, 2006
Messages
87,142
I would personally tend towards option 1.... except for the extensive wiring that you will need to do...
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
36,245
That’s what all my borked ones did. 4 POW R2s and Basic R1. Just the LED was flashing. Nothing else worked. Reflashing them sorted them out, though ended up inadvertently breaking the basic button when removing cover meaning could not reflash. Thankfully I had a spare.
How did they get borked?

That would be more important for me to figure out than how to fix them when they do.

Treating the cause and not the symptoms and all that.
 

Sinbad

Honorary Master
Joined
Jun 5, 2006
Messages
69,748
How did they get borked?

That would be more important for me to figure out than how to fix them when they do.

Treating the cause and not the symptoms and all that.
Agreed. I was unable to identify any cause. Symptom was devices associated to the wifi but did not obtain a valid IP address (unifi controller reported them as having 255.255.255.255) and pushing the button did not toggle the relay.
One it happened after it was unplugged for a week. The other, just happened over night.
First one was an RF, second was a POWR2

Both were v5.11

Now running 7
 
Last edited:

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
8,977
Don't the esps have 2 flash partitions? They alternate. So flashing twice should give you a backup.

The one time mine lost settings, there was a WiFi ap available to connect to it and configure it.
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
How did they get borked?

That would be more important for me to figure out than how to fix them when they do.

Treating the cause and not the symptoms and all that.
As mentioned earlier, the main Eskom feed was flip-flopping - on/off rather rapidly - this was an hour before loadshedding was due to start at 10pm on Sat. Sometimes there was enough delay between the transition (2-5 seconds) to allow everything to power off. The Sonoffs (all with tasmota firmware) that got borked were all under load - e.g. fridges, geysers, lights. The other sonoffs that did not get affected were not under load e.g. pool pump, gate motors, lights, etc. As an aside, the other iOT stuff, like Pis running Hass, Unifi, hue lights, etc were not affected at all. Everything continued to work.

It's the pain of recovering that has me reconsidering what should be done. Imagine all these sonoffs were actually inside wall switches, etc ... the nightmare it would be to get to all of them .. yikes.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
8,977
As mentioned earlier, the main Eskom feed was flip-flopping - on/off rather rapidly - this was an hour before loadshedding was due to start at 10pm on Sat. Sometimes there was enough delay between the transition (2-5 seconds) to allow everything to power off. The Sonoffs (all with tasmota firmware) that got borked were all under load - e.g. fridges, geysers, lights. The other sonoffs that did not get affected were not under load e.g. pool pump, gate motors, lights, etc. As an aside, the other iOT stuff, like Pis running Hass, Unifi, hue lights, etc were not affected at all. Everything continued to work.

It's the pain of recovering that has me reconsidering what should be done. Imagine all these sonoffs were actually inside wall switches, etc ... the nightmare it would be to get to all of them .. yikes.
My idea around this is different.

Since I am moving in to a new house in the next 3 months, one of the things I want to do other than home automation is to add solar panels and backup inverter battery power. I am planning to have this hooked up into the main DB board and most of the things I am automating I want to run off the inverter/solar power, such as:
- All lights
- Fridge (otherwise the defrost cycle gets confused with the loadshedding)
- Internet (router + wifi + CPE)
- TV + sound system + droid boxes
- Alarm
- Gate and Garage motors

I won't put the pool or geyser on and the stove is gas which you can use a kettle on too. With the above I should be properly covered that loadshedding wont break anything for and if I lose a sonoff for the pool or geyser its ok. The geyser sonoff you can even consider going in on the main DB board using the 3d printed item the other guy on here made for a sonoff to make it easy to replace.
 

Dairyfarmer

Expert Member
Joined
Apr 17, 2016
Messages
3,693
That, I cannot say where they get the time, but I always noticed an hour difference. I did find a setting for UTC and daylight savings though.
If you don't come right, give me a shout.
I flashed one of my basics and gained access through the browser. In the console I typed time and it seemed to be 1 hour ahead of SA time. I just now need to be able to set the time so that I can remotely deploy the device. Using a wifi hotspot on my phone I can edit timer settings. would be interested to see if it holds time better than the timers we currently have.

I'm wanting to use one to manage a borehole. The timer has 220v that closes and releases the 3 phase contactor that supplies the pump.
 

Dairyfarmer

Expert Member
Joined
Apr 17, 2016
Messages
3,693
Anyone add a temperature probe to read geyser temp?
Wouldn't advise that with a pressure geyser. You would not get a seal around the probe. You could clamp the probe to a copper pipe but you would only get a reading when the water is flowing and only after the pipe has heated up.
 

eg2505

Honorary Master
Joined
Mar 12, 2008
Messages
17,275
guys, how does one know what version of the sonoff basic one has?
was reading the wiki, and it mentioned the one with R3, is the one that supports OTA flashing to tasmota.

not really keen to take apart my sonoff to look at the board and solder in a serial connection.
 

Dairyfarmer

Expert Member
Joined
Apr 17, 2016
Messages
3,693
guys, how does one know what version of the sonoff basic one has?
was reading the wiki, and it mentioned the one with R3, is the one that supports OTA flashing to tasmota.

not really keen to take apart my sonoff to look at the board and solder in a serial connection.
Sonoff basic (not R3) = 3.3.0
 

blunt

Expert Member
Joined
May 1, 2006
Messages
2,631
I run 8 sonoff r3's with tasmota, 2 pow r2's i havent flashed yet and over december setup a d1 mini + relay sheild + reed switch for my garage and front gate (no reed on gate, need to find a suitable place to mount it)

If anyone is thinking of getting a Sonoff SV for gates / garage I'd recommend the Wemos D1 - a lot easier, micro USB powered and always in flashing mode. Runs tasmota just fine (see: https://www.inspectmygadgets.com/wemos-d1-mini-garage-door-opener/)

Anyone running Home Assistant? Very cool - I've got my alarm (paradox), Sonoffs via eWeLink as well as Tasmota's, Hikvision cameras, Arlo cameras, chromecasts, google speakers and even my inverter (scraping the json feeds from the inverters web uri) all set up nicely - highly recommend checking it out. Once you've got your head around the configurations it can do a lot without having to build your own app / UI's.
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,707
I flashed one of my basics and gained access through the browser. In the console I typed time and it seemed to be 1 hour ahead of SA time. I just now need to be able to set the time so that I can remotely deploy the device. Using a wifi hotspot on my phone I can edit timer settings. would be interested to see if it holds time better than the timers we currently have.

I'm wanting to use one to manage a borehole. The timer has 220v that closes and releases the 3 phase contactor that supplies the pump.
It most probably has DST enabled as well. Here are the appropriate console commands.
763676
 

eg2505

Honorary Master
Joined
Mar 12, 2008
Messages
17,275
all I have to my sonoff is to turn my Rain Router on and off before the expensive time.

never thought one could do so much with it.

now if I can only figure out what version I have:unsure:
an if it will be easy to flash to tasmota.
 

blunt

Expert Member
Joined
May 1, 2006
Messages
2,631
all I have to my sonoff is to turn my Rain Router on and off before the expensive time.

never thought one could do so much with it.

now if I can only figure out what version I have:unsure:
an if it will be easy to flash to tasmota.
ewelink tells you what firmware it's on if you check on the device info. it's highly likely you'll be way above version 1.6 so you'll need to solder.
 

eg2505

Honorary Master
Joined
Mar 12, 2008
Messages
17,275
ewelink tells you what firmware it's on if you check on the device info. it's highly likely you'll be way above version 1.6 so you'll need to solder.
mine is 3.1 at the moment,
is this the version that cant be done OTA?
 

Rocket-Boy

Executive Member
Joined
Jul 31, 2007
Messages
8,005
Don't the esps have 2 flash partitions? They alternate. So flashing twice should give you a backup.

The one time mine lost settings, there was a WiFi ap available to connect to it and configure it.
I run 8 sonoff r3's with tasmota, 2 pow r2's i havent flashed yet and over december setup a d1 mini + relay sheild + reed switch for my garage and front gate (no reed on gate, need to find a suitable place to mount it)

If anyone is thinking of getting a Sonoff SV for gates / garage I'd recommend the Wemos D1 - a lot easier, micro USB powered and always in flashing mode. Runs tasmota just fine (see: https://www.inspectmygadgets.com/wemos-d1-mini-garage-door-opener/)

Anyone running Home Assistant? Very cool - I've got my alarm (paradox), Sonoffs via eWeLink as well as Tasmota's, Hikvision cameras, Arlo cameras, chromecasts, google speakers and even my inverter (scraping the json feeds from the inverters web uri) all set up nicely - highly recommend checking it out. Once you've got your head around the configurations it can do a lot without having to build your own app / UI's.
My setup is also done with a D1 mini and relay boards etc.
I soldered two wires to the button of a remote and stashed that inside the container the D1 lives in, that way its all inside the garage roof and can open the gate+garage door.
I used a hall sensor with a neodymium magnet to indicate the open/close positions.
 
Top