Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA upgrade to 6.1.0 fails with blinking green light on Sonoff Basic #3177

Closed
apastuszak opened this issue Jul 10, 2018 · 140 comments
Closed

OTA upgrade to 6.1.0 fails with blinking green light on Sonoff Basic #3177

apastuszak opened this issue Jul 10, 2018 · 140 comments

Comments

@apastuszak
Copy link

Just did an OTA upgrade 6.1.0. Flashing Sonoff-minimal.bin worked just fine. But when I upgraded to Sonoff.bin after that, I am getting a flashing green light. When I go into my wifi settings, I see that WIFI_MANAGER has kicked in and the Sonoff has it's own network up and running, but I am unable to connect to this network. and reconfigure the device.

@apastuszak
Copy link
Author

Held the button down for 40 seconds to completely reset Tasmota, Rebooted and now I am not able to see a wifi network at all to connect to. I pressed the button 4 times to start up wifi_manager. Light starts to blink. No wifi network I can connect to.

Pressee button 3 times to put it in Smart Config. Used ESP8266 Smart Config. Keeps failing. Not sure how to bring this thing back to life without taking it apart and using a USB to serial adapter.

@maciboy
Copy link

maciboy commented Jul 10, 2018

Every update is a nightmare :D
I'm experiencing just the same with both of my Basics.
One was working correctly just after the update but failed a few minutes later.
Unluckily, in that time I thought updating my second Basic seems to be safe...

So, now both Basics are "running" 6.1.0, but both are in that loop you're mentioning. They neither connected to the existing wifi, nor they are reachable after a reset...

@Jason2866
Copy link
Collaborator

Miration Path correct? You have to care for that!

@maciboy
Copy link

maciboy commented Jul 10, 2018

Was coming from 5.14., so I don't think the migration path is the issue, or am I wrong?

@apastuszak
Copy link
Author

I was on 5.14.

My 5,13 to 5.14 upgrade caused the same issue and I need to flash over serial.

@Jason2866
Copy link
Collaborator

Jason2866 commented Jul 10, 2018

Well, when 40 seconds button pressing reset doesnt help, there is just one way left
-> Clean reflashing. To be sure everything is erased do a erase with esptool first.
I did a upgrade from 5.14 to 6.1.0a (self compiled) with no problem and it is rock solid
screenshot_20180710-173413

@chriskmn
Copy link

I also had issues with one of my 20 devices. The one with the problem was based on core 2.4.1. May be that could make a difference !?

@Jason2866
Copy link
Collaborator

@chriskmn I never had a version with v.2.4.0 or 2.4.1 i tried, that was reliable. I always got minor or major problems with every version (starting from Tasmota v.5.0.x). For me only (is and was) V.2.3.0 is rock solid!!

@maciboy
Copy link

maciboy commented Jul 10, 2018

So, if 2.4.x is problematic, why is the precompiled binary not based in 2.3.0 :( It would help unexperienced users, like me, very much.
For me every update is pain, since chances are very high that afterwards the Basics are broken - like it is the case now for both of mine.

@chriskmn
Copy link

Thanks Jason, I‘ll stay with 2.3.0 also now.

@Jason2866
Copy link
Collaborator

@maciboy the precompiled version 6.x are based on core 2.3.0
This is a result of experiences users made.

@chriskmn
Copy link

@maciboy: Until now I never had issues with the basics. My problem occured on a 4ch pro. May be there are other factors on the basic. Are they switched on while you are updating ? I know that the ESP8266 are very sensitive on supply power. A microwave could make trouble or even a bad AC adaptor somewhere on the powerline.....

@apastuszak
Copy link
Author

Used ESPtool to erase flash. Flashed the pre-compiled binary from the Github. Came up on it's own network. I connected and configured for my wifi. Rebooted the device. It did NOT connect to my wifi, but instead came up on it's own network under the new hostname I gave it. Connected. Reconfigured Wifi, even though it looked right. Device restarted and did not connect to my wifi and now will not go into Wifi Manager mode.

Now it's just blinking for about a minute, then goes solid, then the device seems to reboot and start blinking again.

@maciboy
Copy link

maciboy commented Jul 10, 2018

@apastuszak
Thats exactlly what I‘m experiencing as well.
No chance for a connection to the exisiting wifi. They just span up their own wifi, with the given hostname. Connecting to that wifi is nearly impossible, just worked once out of a dozen of tries.

@Jason2866 Then it seems that neither the core version, nor the migration path is the issue...

@apastuszak
Copy link
Author

apastuszak commented Jul 10, 2018

@maciboy I'll putting 5.14 back on it and just leaving it alone for now. Can I ask what kind of router you're using and what kind of firmware is on it?

@maciboy
Copy link

maciboy commented Jul 10, 2018

That‘s how it looked on my router.
The Sonoff connected to the wifi but 20 seconds later, it got disconnected.
This pattern is repeated after every reboot.
c9504171-f181-438d-9b39-de333f696881

Because of this, I resetted both using the 40s button press.

Once I was able to connect to the established wifi, entered the credentials, but it did not help.

My router is a FritzBox 7490, firmware is 6.93

@apastuszak
Copy link
Author

@maciboy Does your router do both 2.4 Ghz and 5 Ghz and are both of these networks named the same?

@maciboy
Copy link

maciboy commented Jul 10, 2018

Yes, 2.4 and 5 GHz have the same name

@apastuszak
Copy link
Author

That's the same configuration I have. I wonder if that may be the issue here. Just strange that 6.1.0 minimal works without any issues.

@reloxx13
Copy link
Contributor

reloxx13 commented Jul 10, 2018

just disable 5ghz and test it, but yep, 5ghz can make problems if both have the same name.

@Jason2866
Copy link
Collaborator

Jason2866 commented Jul 10, 2018

Esp is a 2.4Ghz only device. I use 2.4 Ghz and 5 Ghz at the same time on my Accesspoints (Lancom and Bintec-elmeg). No problem. SSID is the same for all just different channels
@reloxx13 How should a frequency (5 Ghz) that the ESP isnt capable make problems?
Or is this problem Fritzbox related?

@apastuszak
Copy link
Author

Just reverted to 5.14.0 using ESPtool and all my problems are now gone. Wifi works great.

@apastuszak
Copy link
Author

@reloxx13 If I do that, I will have two teenage boys scream at me that their Xboxes suddenly stopped working.

@chriskmn
Copy link

chriskmn commented Jul 10, 2018

Did you try this:

In the user_config.h, find the option CFG_Holder and change from #define CFG_HOLDER 4617 to #define CFG_HOLDER 4618. Result: it works flawlessly as it should. connects instant to the wifi, no more problems.

???

5.14.0 has another format of that constant. So may be that somehow messes up the config

5.14.0: #define CFG_HOLDER 0x20161209

@apastuszak
Copy link
Author

apastuszak commented Jul 10, 2018 via email

@Jason2866
Copy link
Collaborator

@chriskmn
changing cfg_holder deletes every stored setting in the device to defaults in user_config.h.
Overflashing with unchanged cfg_holder keeps stored settings in device.
So in your case bad settings where stored in device and reused...

@maciboy
Copy link

maciboy commented Jul 10, 2018

But shouldn‘t the 40sec reset do the same and set back all values to default?

@Jason2866
Copy link
Collaborator

@maciboy yes holding button for 40 sec. should reset device to defaults (user_config.h)

@chriskmn
Copy link

chriskmn commented Jul 10, 2018

@Jason2866: yes, that‘s how I understood it as well. So if you flash a new FW without changing cfg holder, that FW uses the stored config from device.

If it is changed (like from 5.14.0 to 6.1.0) FW uses NOT the config from the device ?!
And if there is a mistake in the config of the binaries there might be issues with connecting after flashing.....

@Jason2866
Copy link
Collaborator

@chriskmn
Function of CFG_HOLDER is not changed by design in latest version.
If behaviour really changed it is a bug

@TasmotaFan
Copy link

@apastuszak thanks for providing 6.1.0 with Arduino Core 2.4.1 - sonoff-minimal.bin and sonoff-DE.bin
I flashed the sonoff-DE.bin and it connects without problems on my sonoff-basic TH_V1.1
Then I made a full reset (press button 40sec). The Wifi Manager starts and I could connect to 192.168.4.1
Then I could set the configuration via the Web-Server. So it looks good

@maciboy
Copy link

maciboy commented Jul 17, 2018

@TasmotaFan
Does it still look good for you with the bin's provided by apastuszak?
I'm about to give flashing another try, but it's hard to figure out which version I should use 😆

Edit:
Basics both says: TH_V1.1 2017-5-5 (1741)
This Basic is not working properly with the provided 6.1.0-DE with Arduino Core 2.4.1.
It attempts to access the wifi, I can see these attempts in my router (FritzBox), but the fail... (timeout)

So, I tried the following firmwares:
6.1.0-DE with Arduino Core 2.4.1 (by @apastuszak)
6.1.1 as provided in https://github.com/arendst/Sonoff-Tasmota/releases
5.14 as provided in https://github.com/arendst/Sonoff-Tasmota/releases
5.13.1 as provided in https://github.com/arendst/Sonoff-Tasmota/releases

Only 5.13.1 works, all others do not connect to my wifi
Conclusion: it seems to me as if both core 2.3 and v6.1.x are problematic for this Basic individually, since always if at least one of them is present in the firmware, issues appear...

@mrtaxi
Copy link

mrtaxi commented Jul 17, 2018

Hi! Sonoff Basic OTA update and flash over serial. from 5.14 to 6.11 fails with blinking green light.
Downgrade to 5.14 over serial.

@TasmotaFan
Copy link

@maciboy
my sonoff-basic TH_V1.1 with the 5.13.1 does connect to my Wifi with WPS to my Fritzbox 6490.
When I then flash a 6.1.0-DE with Arduino Core 2.4.1. to it then it connects to my Wifi with the restored ssid.
When I made a full reset (press button 40sec). WPS does not work, but the Wifi Manager starts and I could connect to 192.168.4.1. Then I could set the configuration via the Web-Server.

@Jason2866
Copy link
Collaborator

Jason2866 commented Jul 17, 2018

WPS problems will be solved in future. Not included anymore in future precompiled builds 😉
Wifimanager is stamdard

@pReya
Copy link

pReya commented Jul 19, 2018

Same problem here (#3056). This has been going on for a while now, and seems to affect many users with Sonoff Basic modules. I'd love to get to the bottom of this.

@all-solutions
Copy link

I'm really new with sonoff. Flashed my devices with 5.9.1. All other versions above caused the "wifi-problem". Meanwhile I've tested all versions above (clean flash). The devices can't connect to my wifi.
But I want a possibility to use v6. I found it in the version 6.1.0 from @apastuszak. His version works on Basic and S20 devices for me. Now waiting for the delivery from Banggood for the ordered devices (duo & 4ch)...

@ascillato2
Copy link
Collaborator

Please, see #3224

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

@apastuszak
Copy link
Author

So, what is the fix?

@maciboy
Copy link

maciboy commented Jul 21, 2018

The issue for me is not solved, I just circumvented it by going back to v5.13.1 😞
Others seem to have done similar things, like downgrading or building special individual versions that circumvent the issue...

@knowsnotmuch
Copy link

how do you downgrade via wifi? or are you all taking the units down and flashing them via Serial?

@apastuszak
Copy link
Author

apastuszak commented Jul 23, 2018 via email

@maciboy
Copy link

maciboy commented Jul 23, 2018

@knowsnotmuch do you refer to my post? Yes, unfortunately I need to do it via serial, no chance to do it via wifi

@knowsnotmuch
Copy link

@maciboy - yes - was referring to that - thanks for clarifying. Have a couple attached to the ceiling fan - too much hassle getting them down :D Thanks both of you @maciboy and @apastuszak

@rwassily
Copy link

I am having the same problem, where LED is flashing green. If I quickly press 4 times, I see a new WIFI network but when connecting to it I don't get any IP and hence can't connect to it. Any tips on how to fix this also how do you download older Tasmoto versions? I flashed Sonoff bassic straight to v6.3.0

@meingraham
Copy link
Collaborator

Once you connect to it, from the device connected to the device AP, Are you able to open a browser and open http://192.168.4.1? If so, that should allow you to configure the Wi-Fi parameters. Once you restart the switch, it should join your Wi-Fi network and you should be able to connect to it via its Wi-Fi IP address.

@rwassily
Copy link

device doesn't connect to AP and I can't connect to it after pressing 4x reset. It always flashing green. When I press once it doesn't even trigger the relay.
First Sonoff was flashed while on 5v so I switched to 3.3v the second module but same problem, I also tried sonoff-basic.bin and sonoff.bin but neither works.

@rwassily
Copy link

After flashing to an older version, it seems to be working now.
https://www.youtube.com/watch?v=MOEmVYn4I8A

@meingraham
Copy link
Collaborator

meingraham commented Dec 11, 2018

@rwassily,

If your first device is still operational after flashing using 5V, you are fortunate indeed! That should have released the magic smoke inside your switch ;-) Having said that, if you notice any strange behavior with the switch, it may be remnants of having connected it to 5V.

But that aside,...

What Sonoff device are you referring to?

What version of TASMOTA did you try to flash? If it was the latest master release (6.3.0), then yes, that has some known connectivity issues. Try using the latest development version. I find the development branch to be pretty stable.

If you decide to upgrade and still encounter issues, please go to the web (or serial) Console and type Status 0. This will provide us with useful information to help you troubleshoot your issue.

As you have upgraded and reverted firmware versions, you are keenly aware of the nice thing once you have TASMOTA on the device. That is, if one encounters problems with the firmware version, most times one can just flash another version using OTA.

I have found that using ESPEasy to upload the firmware is the easiest method. Also, if I'm flashing using the serial interface (i.e., wired), I use Termite to send the initial configuration commands (at least the Wi-Fi config). Dr. Zzs tutorial describes this in detail. It has some of the same information as the video you linked, but is more current and a bit more "compact".

Regards.

Mike

@rwassily
Copy link

Mike,
Thanks for taking the time to explain. I am using Sonoff basic, tried the 6.3.0 and it failed then flashed 5.14.0 and it seems to work. I am only flashing using serial and ESPEasy, once done I log to web interface to set WIFI parameters.
I noticed that the toggle doens't work properly through web interface, works 1/10 times but Yeti seems to work fine so that's my main concern. I'll have to figure out how to connect remotely, for now it just works from local network.
At the moment I am trying to figure out MQTT and the advantages of having it, luckily I already have a Rpi3.
Any modules you know of that has dry contact detection; alarms generated by surveillance cameras are dry contact, that's why I am asking.

B.regards
Rafik

@meingraham
Copy link
Collaborator

Rafik,

You may want to give the TASMOTA Discord chat a try. Lots of HA enthusiasts that can discuss your scenario interactively and recommend an appropriate device for your surveillance camera use case.

You can also give the Sonoff Users Google Groups a go.

As for your Sonoff Basic, I would recommend using the latest development version. I began using TASMOTA with version 6.0.x and have just recently upgraded to 6.3.0.16. The web interface operates (i.e., toggle) completely reliably on all my devices. You can easily update the firmware over the air without having to connect to the serial interface.

Mike

@rwassily
Copy link

Mike,
Thanks for your help, the version 6.0.17 on the link you shared did work for me; 1 out of 4 Sonoffs is constantly flashing green but seems to be working, not sure if it's an indication of some fault... maybe that's the one I used 5v on, not sure.
OTA didn't work for me so I used serial and it worked right away.

Is the same .bin file used to flash any Sonoff device?

@meingraham
Copy link
Collaborator

Rafik (@rwassily),

Glad to hear that you got your devices flashed and working!

Can you "reach" the device with the flashing LED? A blinking LED is usually an indication that it has not connected to the Wi-Fi network. A device that successfully connects to Wi-Fi will typically have an LED that is on or off (you can set the behavior with the LEDState command). If you can connect to this device, you should go to the Console to see what messages are being logged. If you can reach the web GUI, go to the Console and enter 'WebLog 4'. If you can only connect to it through the serial interface (that's probably a clue as to a problem), enter 'SerialLog 4'. The messages in the log may give you a clue as to why the device's LED is always blinking. Be sure to set it back to log level 2 after you're done to avoid extra logging workload on the device.

"Is the same .bin file used to flash any Sonoff device?" Short answer - yes. But there's a qualifier to my answer.

Each precompiled binary has different options set. You can see the differences in each in the "Available Features and Sensors" section of the releases page. For your Sonoff Basic, you should use this development version binary.

For most other ESP based devices that TASMOTA supports, you can choose any of the pre-compile binaries "flavors" that best suits the options you need. Once you flash the firmware onto the device, you go to the configuration and select the specific type of device you actually have (it defaults to Sonoff Basic). Once you set the right Module type, different configuration options will be made available based on the Module type.

Mike

@rwassily
Copy link

Mike,

I meant 6.3.0.17 :) I checked the logs and seems that it was trying to reach an MQTT server, once I set the parameters, the LED went off.
Thanks for the clarification about the the bin file and how the flashing is expected.

Now to check the advantages of connecting to MQTT and how to access these devices outside my LAN :)

B.regards
Rafik

@meingraham
Copy link
Collaborator

TASMOTA change log - That will tell you just how much progress is always happening w/ TASMOTA.

Careful how you set up external access to your devices. Opening up your LAN to the world is risky. If not done properly it could expose your entire home network to malicious access.

All of my MQTT traffic is local to my LAN. I like this setup because it limits my exposure. Also, if my connection to the Internet is down, I can still control everything locally on my LAN. I have a home automation hub (openHAB) where I set up my automations that interface with all of my home's smart devices. openHAB provides a mobile app which can access my hub over the LAN or through a secure cloud connector. This cloud service provides remote access to my automation items. It also integrates with Google Assistant and Alexa to add voice control.

There are several home automation hub solutions. If I were choosing today, I'd look at both openHAB and Home Assistant. There are many others. They all have their pros and cons. Your skills may be better suited for one HA hub solution versus another.

Mike

@rwassily
Copy link

Mike,
I am running everything on a RPI3; using HASS.io at the moment and seems straight forward. Trying to run MQTT from the same server but it doesn't open the configured ports for some reason. On some forums ppl advised to make sure MQTT booted before HASS.io; I am currently still trying to figure this out and trying to find a safe mobile app to connect to HASS.io as well

Rafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests