Bricked Sonoff devices after upgrade to 1.14.2 / 1.14.3 (THE SOLUTION IS TO ROLL BACK TO 1.13.6)

You might check out this addon :

Very easy to restore if something goes wrong.

3 Likes

Another decent back-up regime is to keep old firmware back-ups. I have a folder here with all my 1.13.6 firmwares for each device. I have 16 plugs and two ESP32_Dev_boards which pick up bluetooth signals from temp sensors.

If a corrupt firmware or a bad build doesn’t work, I can just re-flash the device Over The Air with the original firmware.

Belts and braces!

Adding now, will take another full SD Card back-up tonight.

@francisp Thanks for your suggestion, I can see why that’d be a great option for many people. My only issue with it is a philosophical one: I run HA in part because I want privacy. Backing up to Google Drive is thus a hard pass.

@SiriusGen, that’s a good idea; I have a folder where I store the first compile of each firmware. It’s probably useful for disaster management. My own solution is I’ve shared the HASS config folder via Samba, and it gets backed up daily along with the rest of everything else that’s important.

I’m back up, but with caveats.

I had to remove the bricked Sonoff from the wall, and manually flash it.

I first compiled a firmware for 1.14.3. I manually flashed this onto the Sonoff. It would not connect to the network, but remained responsive to the touch sensor I have attached to it.

Then I flashed Tasmota 6.7.1 onto it. Worked fine, got an IP address from my router. From the Tasmota interface, I did an OTA upgrade to ESPHome 1.14.3. Same as before - no network connection.

Reflashed Tasmota 6.7.1. Compiled a new binary with a static IP address, upgraded via Tasmota. Now it works.

But this means I will have to assign static IPs to everything. I’m really reluctant to test 1.14.3 on a device that isn’t on my bench, and unfortunately, I don’t have any spare units right at the minute.

are you using the logger component?
I messed up 2 sonoff basics (in a ceiling fan) by using that.
Had to flash it manually without the logger

I am using the logger component but it seemed to be the UART that bricked it. I will reflash this weekend and give it another try.

Having the same issue myself. Some devices are just dead after the update (don’t connect to the network), but others work from time to time.

I’m also having a weird really creepy issue where the lights flash when the sonoff connects to the network again. The family isn’t too happy about it:)) Any way to get around this issue?

Do we just wait for Otto to respond?

Right now your options are to roll back to 1.13.6, which is great and solid, or you can add this line to your wifi:

output_power: 17.5db

With that line in, you can then compile a new binary, and you will have to manually flash it since OTA won’t work while the device is off the network. Sooooo sucks to be me with devices in the roof and up radio poles next to boreholes 1km+ from the house.

Honestly, I believe rolling back to 1.13.6 is the best route, because while my devices will connect to the network in 1.14.3 using the output_power kludge, the connection itself is spotty and they keep losing connection to Home Assistant.

I agree but if you use hass.io you can’t do that. Really sucks. (I only ran esphome on one test device on a test Pi)
Where did that output_power command come from? Never seen that offered as a solution before.

I think the best solution is to use Tasmota unless you are doing something that is impossible to do without Esphome.

Please tell me why you think that’s the case? I’ve managed to roll back to 1.14.0, but I’ve had an error rolling back to 1.13.6. According to the description in the hassio plugin, rolling back is as simple as specifying the version number you want to install in the config file, and reading back the logs, it does seem to work, but, in my case it encounters an error that I haven’t had time to sleuth. My next plan was to grab the ESPHome folder out of an older backup, delete the current one, plut the old one in its place, and restart.

Is there some fundamental reason why rolling back to 1.13.6 won’t work in hassio?

1 Like

Oh shit! You’re right! I never saw that. No one pointed it out in the numerous places I posted about rolling back until now. Thanks. I might give that a shot.

1 Like

:rofl: I didn’t say it actually works, just that it’s supposed to be that easy. So far for me, it doesn’t work. The older version installs, but there’s an error during launch and then I get a bad gateway whenever I try to visit web interface.

For @DavidFW1960 and others that want to roll back to 1.13.6, here are two ways.

Method one: from within the ESPHome plugin in hassio. From the Hass.io page, click the ESPHome button, and when it opens, click the toggle to disable Auto update, because you have learned your lesson. Then scroll down to the Config, and add "esphome_version": "v1.13.6". Now you can restart.

That method should work, but didn’t for me - 1.13.6 was duly installed, but the web interface would fail to launch. However, that’s the recommended approach, and it certainly has worked for others.

Method two: restore a previous snapshot. This method requires you to keep reasonably current backups - personally, I keep 8 previous snapshots, on average. Go to the Hass.io page, and click the the Snapshots tab. Then click on each of your snapshots in turn, until you find the most recent one that has ESPHome 1.13.6.

Now, you don’t want to wipe everything else about your installation, so make sure to uncheck the boxes for every other component. You only want ESPHome checked. Then, click Restore Selected. Nothing appears to happen for a while - there isn’t any progress bar or anything, but eventually a window will pop up telling you that the job is done.

You should now be running 1.13.6. Now all you have to do is open the web interface for ESPHome, and “update” each device from 1.14.3 to 1.13.6.

1 Like

Saw this thread and my experiences…

I’m using Hassio and lots of Sonoff’s (still a mix of tasmota and esphome), and wanted to update my ESPHome Sonoff’s from 1.12.2 to 1.14.3. Did update one Sonoff Basic by OTA and damn, it disappeared from the network, no way to get it working again. So took it out of the box and reflash’d it with the extensive yaml I use… still no response.
After tweaking the yaml and reflashing several times again with no luck, I reflashed it with a plain minimal yaml. It appeared again!

So after that I have flashed the Sonoff Basic many times with little variations in the yaml code and now determined where it goes wrong.
My sonoff’s use a yaml like the code in the sonoff 20 example in the ESPHome web.
Now found out that it goes wrong in the “light:” part

# part of the yaml for Sonoff S20

output:
  # Register the green LED as a dimmable output ....
  - platform: esp8266_pwm
    id: s20_green_led
    pin:
      number: GPIO13
      inverted: True

light:
  # ... and then make a light out of it.
  - platform: monochromatic
    name: "Sonoff S20 Green LED"
    output: s20_green_led

If I leave the “light:” part out (comment it out) my sonoff works, if I turn the “light:” part active again (uncomment it) my Sonoff disappears. Tried many variations in the yaml code but haven’t found the correct code to get the light functionality working again (could live without it but I find the functionality handy).

Mind, this all worked with no problem in 1.12 (didn’t test 1.13). So for the time being I leave my other Sonoff’s on 1.12.

Same experiences?

Not really the same as me, but I’ve read descriptions of what you’re experiencing - you’re not alone. What you are describing is discussed in this messy thread here: https://github.com/esphome/issues/issues/455#issuecomment-559143015

I believe the fix in your case is to add output_power: 17db to the WiFi section of your yaml.

For what it is worth, you can safely upgrade to 1.13.6. The problems appear from 1.14.0 onwards, and I’m sorry to say that it appears that they consider the issue resolved.

Personally, I have sonoffs deployed in many hard-to-reach places and I don’t think it’s practical to expect people to manually flash things - I have 30+ devices deployed throughout the house and the farm. I fear my love affair with ESPHome is coming to a close. Those things that are now on 1.13.6 will remain, but I don’t think I can trust building a new device based on this platform. This issue disrupted the water supply on my farm for a whole week.

I mean, I get it: ESPHome is a passion project and we are not owed anything by its creators. But it was a hard lesson. I have nothing negative to say about the project or the people who work on it. The fault lies with me; I need to rethink how I deploy mission critical systems.

Thanks for the reply. Although I cannot make much sense of the relation between the output_power: setting and my light: problem, I’m interested enough to try it. :wink: And will read the link, thanks.

Since using Hassio with the ESPHome module, I’m afraid I’m not able to downgrade to 1.13.6. So I’ll experiment further with yaml settings hoping I find a way to use the light: setting (is only for showing the led in the sonof modules). And maybe I’ll leave the led functionality out by not using the light: section as explained in my other message.

I feel sorry for your sonoff’s in hard-to-reach places, but using sonoff’s modules, xiaomi sensors and much other stuff and HA itself, I’m so used to stumble into troubles when upgrading something, I always keep in mind to not physical install things which are out of reach. Although I understand that it is not always possible.

@DeeBeeKay, The setting “output_power: 17db” to the WiFi section works oke, but it doesn’t help my “light” problem/bug. My current setting is

# part of the yaml for Sonoff 

output:
  # Register the green LED as a dimmable output ....
  - platform: esp8266_pwm
    id: s20_green_led
    pin:
      number: GPIO13
      inverted: True

# light:
#  # ... and then make a light out of it.
#  - platform: monochromatic
#    name: "Sonoff S20 Green LED"
#    output: s20_green_led

When I uncomment the “light:” part, the Sonoff disappears and I need to reflash it again manually. So my conclusion is that there is a bug in the ESPHome 1.14.3 code.

To a happy final: I changed to ESPHome dev level (so I’m now at ESPHome 1.15.0 level) and also made yaml modifications (alas didn’t do good logging), but now the thing suddenly is functioning again as in the 1.12 version. Pfff, relief…

Hi @dojf, I’m glad that you got sorted out - and I’m even more excited that this problem might go away completely in the 1.15 branch - which I will test very carefully after 1.15.4 goes public. If I learned one thing from this experience, it’s that you should not upgrade something that is working well unless there’s a compelling reason.

For what it’s worth, you absolutely can roll back to 1.13.6 in hassio - see my post in this thread on how to do it, it’s very easy: Bricked Sonoff devices after upgrade to 1.14.2 / 1.14.3 (THE SOLUTION IS TO ROLL BACK TO 1.13.6)