esp8266_milight_hub icon indicating copy to clipboard operation
esp8266_milight_hub copied to clipboard

Can't save settings.

Open mpisek opened this issue 5 years ago • 17 comments

So, I'm using NodeMCU for more than 1 year now. But in last month it stopped working. I re-flashed it with 1.10.3 but now I can't save settings. When I refresh my browser or reboot the device the settings are gone. Wrote-Over all 4MB with blank 4x1MB file and re-flashed with 1.10.0 still the same story. It saves the initial wifi config (SSID and password) but that's about all. After reboot I can open the WebGUI but settings can't be saved. What am I missing?

Oh yea. I can controll the lights without any problem in the UI itself.

mpisek avatar Sep 25 '19 11:09 mpisek

Hi, please check serial output when saving settings. What version were you using when it stopped working?

sidoh avatar Sep 25 '19 15:09 sidoh

Last working for me was 1.10.0-rc.3 (nodemcuv2). When I open the web GUI I get serial output: Unhandled websocket event: 10 Opening settings file failed

mpisek avatar Sep 25 '19 17:09 mpisek

If you revert back to 1.10.0-rc.3, everything works? Given the changelog, that could basically only mean something in the toolchain silently changed.

sidoh avatar Sep 26 '19 17:09 sidoh

No. Same thing. Nothing works even on 1.10.0-rc.3 not even on earlier versions. I ordered a new NodeMCU but I have the same problem on the new hardware. Now I'm extra confuzed.

mpisek avatar Sep 28 '19 07:09 mpisek

can you paste the output of /about?

sidoh avatar Sep 28 '19 07:09 sidoh

i'm confused too, that makes no sense to me :S

sidoh avatar Sep 28 '19 07:09 sidoh

definitely try running esptool.py erase_flash before flashing the firmware.

sidoh avatar Sep 28 '19 07:09 sidoh

Just did that.

mpisek avatar Sep 28 '19 07:09 mpisek

▒▒5▒▒▒Opening settings file failed *WM: Adding parameter *WM: staticIP *WM: Adding parameter *WM: netmask *WM: Adding parameter *WM: gateway *WM: *WM: AutoConnect *WM: Connecting as wifi client... *WM: Using last saved values, should be faster *WM: Connection result: *WM: 3 *WM: IP Address: *WM: 192.168.125.107 Wifi connected succesfully

Setup complete (version 1.10.3)

mpisek avatar Sep 28 '19 07:09 mpisek

Let me try with https://www.espressif.com/en/support/download/other-tools , different USB cable etc.

mpisek avatar Sep 28 '19 07:09 mpisek

Hmm, it didn't work with expressif - Flash Download Tools (ESP8266 & ESP32) either. What did work was nodemcu-flasher. I don't get it. But hey it works :)

mpisek avatar Sep 28 '19 10:09 mpisek

That's really confusing. There are other users reporting similar problems, so I'm pretty sure there's something funky going on. This is helpful.

Can you paste a screenshot of the settings you used to flash with nodemcu-flasher? Did you flash it with a pre-compiled binary?

sidoh avatar Oct 05 '19 18:10 sidoh

I used precompiled library yes. Well with (Flash Download Tools (ESP8266 & ESP32)) I tryed allkind of settings and nothing worked really. With nodemcu-flasher default settings worked.

mpisek avatar Oct 07 '19 15:10 mpisek

Pleas try another browser. I have same issue with Waterfox 56.2.14 (64-bit) on linux. I open the webui in chrome Version 77.0.3865.90 (Official Build) (64-bit) and saving worked for me.

jkhunter avatar Oct 17 '19 06:10 jkhunter

Same workaround for me. Restoring does not work on Firefox.

On Chrome after the Restore, I have to re-access /settings to complete the restore.

jflemieux avatar Dec 02 '19 22:12 jflemieux

@mpisek you could try one of the 3 options I mentioned in #584 as I did also get the "Opening settings file failed" error when using bin uploaders if the Flash size was not set properly. But managed to get it working in the end.

Also use "Shift+F5" on the ESP webpage, this is a force clean reload (it won't use old bad stuff from the browser memory), but this cant be the cause of the error since "Opening settings file failed" is an internal ESP error that it could not get the data from flash

jellewie avatar Jan 07 '20 11:01 jellewie

I've just assembled my hub this evening and also experienced the issue that settings could not be saved. However, for me the PUT request for saving always returned "success" but the GET /settings ran into connection reset.

I tried flashing 2x with Tasmotizer (been using that a lot lately for ES8266 devices without any problems) and I had this issue both times. Finally decided to download nodemcu-flasher (https://raw.githubusercontent.com/nodemcu/nodemcu-flasher/master/Win64/Release/ESP8266Flasher.exe) and now everything works!

So, yes, there is something fishy in the flash process - @sidoh maybe you can put nodemcu-flasher into the README.md as recommended tool?

didi-home avatar Jan 14 '21 21:01 didi-home