arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.93k stars 4.76k forks source link

Sonoff doesnt work after update #2848

Closed MrJoki007 closed 6 years ago

MrJoki007 commented 6 years ago

Today i wanted to update my sonoff basic with the firmware 5.10.0 to the new 5.14.0 I downloaded the newest sonoff-DE.bin and wanted to upload it on the UI. I got an error and looked it up and some user said i should flash the sonoff-basic.bin and then reflash the normal one. After uploading it, it said upload finished and that its restarting. After that, the green led lights up, blinks about 30 times and you hear the relay clicking once. And that repeats every 30 secounds. In my router i can see that its connecting to wifi for 9 secounds and than disconnecting again.

ayancey commented 6 years ago

same thing happening to me :(

andyfitter commented 6 years ago

I’ve seen the same on some U.K. T1 units.

rmounce commented 6 years ago

I am having a similar issue with 6x Sonoff Basics (from different batches) after OTA upgrading from 5.12/13 to 5.14. None of my other Tasmota devices (S20, S22, TH10, H801, Wemos D1) are affected. 2 of these 6 Basics did eventually connect to the network, but after another reboot they were lost again.

This fault isn't present when the Sonoff is being powered by 3.3V. My working theory is this is a combination of self-interference from the switching power supply, and a change in retry/timeout behaviour. I recall seeing that the 5.14 release binaries are built against an older SDK to reduce file size, so this may be related.

Edit: After more testing on 2 Sonoff Basics, each different revisions on PCB silkscreen with 5.14 sonoff-classic.bin (built against 2.3.0 SDK) AC power: cannot even get a DHCP lease. With monitor mode on my laptop I can see that most WiFi frames broadcast by the Sonoff are partially corrupted 3.3V: connects to network, at least reliably enough to downgrade via OTA

with 5.13 sonoff-classic.bin (built against 2.4.0 SDK) AC or 3.3V power: works perfectly

cHunter789 commented 6 years ago

For me sonoffs basic with tasmota 5.13 and later are unusable with precompiled/ota firmware. In 5.13 the problem was when connected to mqtt server. Few days ago I have tried OTA to 5.14 and I stuck at minimal image. Even when i turned off a mgtt server it's not helped to get back a control over sonoff basic device.

Looks like no one testing the firmware with sonoff basic before release...

ascillato commented 6 years ago

Hi,

I'm sorry to know that you are facing issues with last firmware. I have 12 sonoff devices at home working with last 5.14.0b without any problem.

Sometimes the issues comes from a problem in the configuration and/or Esp8266 SDK config in flash. It happened few times to me that upgrading by OTA from old versions of Tasmota, the OTA method failed and I have to erase all the flash and upload again but by cable. After that fresh start, it works really good. So I recommend to see troubleshooting on the wiki and/or flash by cable if OTA has failed.

Each version is being tested before released, by a lot of people. In the development branch, bugs are fixed and some new features are added and tested. Then, after sometime, it is merged to the master branch and released as precompiled binaries.

So, Theo and a lot of people are spending their free time for free to contribute to this software and this github community. If you think, more testing is needed, you are more than welcome to test it, find bugs and help other people in trobleshooting. Complaining is not an useful option. But helping is it.

reloxx13 commented 6 years ago

if not done already, try to let it full power loss for a few mins.

i had only 1 of 11 basics always restarting after 1-60mins, after i let it power loss for 10mins it got fixed. i dont know why 😕 i had this with 5.14.0a. never had it before or after that, im always on the dev builds.

give it a try. i just released a fuse to get it power loss.

MrJoki007 commented 6 years ago

Plugged mine out for one day and now plugged it in again over the night. But still got the same problem

maciboy commented 6 years ago

After my first Sonoff Basic died due to a failed OTA update some weeks ago, today my second (and last) one got the blinking issue after I’ve tried to update it to 5.14… It is publishing a Wifi with its correct former host name, but I’m unable to connect :( (I’ve no possibility to flash them by wire…)

Any tipps how I can fix it, since as I said I can see its wifi-network…?

ascillato commented 6 years ago

Hi,

Sorry to know that you are unable to connect. Seems that your OTA has failed. In that case you need to flash by wire. There is an explanation on how to do that in the wiki.

maciboy commented 6 years ago

Juhu, I’m back in the game (at least with the one that I bricked today^^)

What I did? As you might know the Sonoff supports several actions when applying push-patterns on its button: https://github.com/arendst/Sonoff-Tasmota/wiki/Button-usage

I tried the ones that sound promising… With the 7-short-presses option I had success :) I was able to connect to its wifi, opened 192.168.4.1/up? and uploaded the sonoff.bin file manually

I really hope the same works for you!

stasrm commented 6 years ago

I have 3 basic and 6 touch. I have successfully upgraded touch. But all basic were bricked after upgrade. I can't unbrick them even flashing through cable. I can see AP but i can't connect. I've flashed 5.13 and problem resolved.

Trago5 commented 6 years ago

@maciboy Thanks!

I had to use the short presses for both of my Sonoff Basics and upload sonoff.bin manually, too. Four presses worked for me.

However, after the upgrade most of my devices (2 Basics, 1 TH16) didn't work correctly with Home Assistant anymore. I could switch them on but couldn't switch them off. So I downgraded to 5.12 and now they work just fine again. Sonoff POW seems to be working with 5.14 without problems.

unscel commented 6 years ago

I have all (8) my basic’s placed in wall switches. Each one of them have been soldered with resistors and capacitors to avoid interference for the switchmode1. Unfortunately all died (restart loop, blinking led) during ota uptate from 5.12 to 5.14. Deattaching, desoldering, erasing flash and reflashing thru wire, soldering and reattaching took almost whole day but now all works fine at the end.

MrJoki007 commented 6 years ago

After a lot of time i got it in AP mode and connected to the wifi of the sonoff. Then i changed the ip of my pc to 192.168.4.2 to connect to the sonoff webinterface. It said sonoff basic please upgrade. So i uploaded the new sonoff.bin version 5.14.0. But after the update, i cant find the wifi of the sonoff in ap-mode anymore.

MrJoki007 commented 6 years ago

Now i wanted to flash it manually but when i try to flash it i get this message: A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header Is it now completly bricked?

arendst commented 6 years ago

For what it's worth...

I had a Sonoff Bridge running on 5.12.0c just fine. I did an OTA update to 6.0.0a and it seemed to have died. No more response on the webpages and all leds off. As I wasn't in any hurry I removed power and put it aside for further analyses some day...

The next day I connected power again for analysis and was surprised to find it was running just fine!

I suspect there is something in RTC memory which might lead to a hang when power is not removed. RTC mem stores exception data and some tasmota parameters but the tasmota parameter layout hasn't changed between 5.12.0 and 6.0.0 so it must be something in the SDK.

The RTC memory keeps it's value as long as power is applied so a restart only won't fix it.

Analysis so far has not revealed any hints regarding SDK level changes (1.5.3 (core 2.3.0) and 2.2.1 (core 2.4.1)).

Bottomline: If updates seem to have failed, remove power for a while, cross your fingers, re-apply power and hope it works (before removing the units behind panels and serial reflash).

rmounce commented 6 years ago

I have done some more testing with my Sonoff Basic R2 (v1.0 PCB) and found the following results, performing OTA upgrades back and forwards between versions.

v5.13.1 built myself with 1.5/2.3.0: Good v5.13.1 binary release 1.6/2.4.0: Good v5.14.0 binary release 1.5/2.3.0: Bad, cannot connect to WiFi when powered from AC v5.14.0 built myself with 1.5/2.3.0: Bad, cannot connect to WiFi when powered from AC v5.14.0 built myself with 1.6/2.4.0: Good 457f438bacc28554885b9363bd31ac4a83e82c54 / v5.14.0a built myself with 1.5/2.3.0: Good

So I can reliably reproduce this issue that is only affecting my Sonoff Basics with v5.14.0 from the master branch, built with Arduino core 2.3.0.

It is difficult to narrow this down further as all commits on the master branch are squashed together for releases, and the development branch doesn't seem to be affected at all (even at the commit that should be syncing it up with the 5.14.0 release). The most likely explanation to me right now is a bad merge.

I did, incidentally, bisect a different issue on the development branch. 0d5117cdca1b1c909d1250f55488e88695f033bd breaks WiFi entirely on my Sonoff Basic and necessitates a serial reflash.

arendst commented 6 years ago

Thnx for testing. From your results it beats me too why it sometimes works and sometimes doesn't.

The last line is a mystery to me as the only change is in Sonoff Bridge code and will only execute after user action. Probably a candidate for removing power, wait a minute and re-apply power...

ascillato2 commented 6 years ago

Please, see #3224

If your issue is not solved, please reopen it. Thanks