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

[ESP8266] Einstellungen gehen verloren #771

Closed
1 task
eupesco opened this issue Mar 14, 2023 · 17 comments
Closed
1 task

[ESP8266] Einstellungen gehen verloren #771

eupesco opened this issue Mar 14, 2023 · 17 comments
Assignees
Labels
bug Something isn't working fixed dev fixed

Comments

@eupesco
Copy link

eupesco commented Mar 14, 2023

Platform

ESP8266

Model name

ESP8266MOD 12F

nRF24L01+ Module

nRF24L01+ plus

Antenna

external antenna

Power Stabilization

~100uF Elko

Connection diagram

Connection diagram I used:

nRF24L01+ Pin ESP8266 GPIO
Pin 1 GND [*] GND
Pin 2 +3.3V +3.3V
Pin 3 CE GPIO2 CE D4
Pin 4 CSN GPIO15 CS D8
Pin 5 SCK GPIO14 SCLK D5
Pin 6 MOSI GPIO13 MOSI D7
Pin 7 MISO GPIO12 MISO D6
Pin 8 IRQ GPIO0 IRQ D3
nRF24L01+ Pin ESP32 GPIO
Pin 1 GND [*] GND
Pin 2 +3.3V +3.3V
Pin 3 CE GPIO4 CE D4
Pin 4 CSN GPIO5 CS D5
Pin 5 SCK GPIO18 SCLK D18
Pin 6 MOSI GPIO23 MOSI D23
Pin 7 MISO GPIO19 MISO D19
Pin 8 IRQ GPIO0 IRQ D0

Note: [*] GND Pin 1 has a square mark on the nRF24L01+ module

Connection picture

  • I will attach/upload an Image of my wiring

Version

0.5.100 (auch mit 0.5.99)

Github Hash

6da58e3

Build & Flash Method

ESP Tools (flash)

Desktop

Windows

Setup

1.3" OLED SH1106

Debug Serial Log output

No response

Error description

Nach einen Powercycle vom ESP8622, gehen die Einstellungen verloren (d.h. auch Wifi, Inverter usw; komplett).

"your settings are invalid."

@eupesco eupesco added the bug Something isn't working label Mar 14, 2023
@tqma1
Copy link

tqma1 commented Mar 14, 2023

Kann ich so nicht bestätigen - weder bei einem Reboot auch nicht bei einem echten Powercycle / wenn ich die Spannungsversorgung ab- und wieder an-stecke.

@T-Paul80
Copy link

T-Paul80 commented Mar 14, 2023

Ich kann es leider bestätigen, gleiches Verhalten in meinem Fall mit der 0.5.101.
Über AP vorgenommene WiFi Einstellungen werden zunächst übernommen und bleiben nach dem Neustart erhalten. Nachdem ich dann meine Wechselrichter, mqtt, Display und Standort etc. eintrage, gehen alle Einstellungen nach speichern -> Neustart verloren.
Nachtrag: Problem tritt nur auf, wenn ich einen zweiten Wechselrichter eintrage.

@lumapu lumapu assigned lumapu and unassigned stefan123t Mar 15, 2023
@Argafal
Copy link
Contributor

Argafal commented Mar 15, 2023

Ich kann es leider bestätigen, gleiches Verhalten in meinem Fall mit der 0.5.101. Über AP vorgenommene WiFi Einstellungen werden zunächst übernommen und bleiben nach dem Neustart erhalten. Nachdem ich dann meine Wechselrichter, mqtt, Display und Standort etc. eintrage, gehen alle Einstellungen nach speichern -> Neustart verloren. Nachtrag: Problem tritt nur auf, wenn ich einen zweiten Wechselrichter eintrage.

@T-Paul80: Da beschreibst du jetzt aber etwas anderes als der Originalposter dieses Issues ;)

For the record: Ich kann @T-Paul80's Problem genau reproduzieren. Beim zweiten Setzen (Nachkorrigieren) von Einstellungen gehen auch bei mir die Einstellungen komplett verloren, und ich fange wieder via Ahoy's eigenem Access Point an. @eupesco's Beschreibung, dass das bei einem Powercycle passiert, klingt ähnlich von den Symptomen her. Allerdings kann ich das (Powercycle->Einstellungsverlust) selbst nicht reproduzieren.

@eupesco
Copy link
Author

eupesco commented Mar 15, 2023

Ich checks am Freitag nochmal. Ich habe zwei Wechselrichter, könnte sein, dass es damit zusammenhängt.

@Argafal
Copy link
Contributor

Argafal commented Mar 15, 2023

For the record: Das Problem das ich mit 0.5.99/0.5.100/0.5.101 sehe, tritt auch mit 0.5.96 auf. Gehe ich auf 0.5.93 zurück (git hash https://github.com/lumapu/ahoy/commits/71ea715) kann ich die Einstellungen wieder erfolgreich speichern. Ein erster Anhaltspunkt, das kann natürlich auch Zufall sein.

Ich konfiguriere wie folgt:

  • System: Die GPIO pins für NRF und den NRF Power Level. Keine LED, kein Display, die bleiben Default.
  • Netzwerk: SSID und Passwort
  • Protection: alles auf Default
  • Inverter: zwei Inverter, ein HM-600, ein HM-1500. Jeweils mit "max power module" Werten. Interval: 10, und all drei Reset ein.
  • NTP Server: default
  • Sunrise/Sunset: Latitude, Longitude, Offset 60 minutes, Stop polling enabled.
  • MQTT: Server IP. Rest Default.
  • Display Config: unverändert.

Reboot upon save = enabled, press Save button.

Vielleicht hilft meine Liste ja, das zu reproduzieren.

@lumapu
Copy link
Owner

lumapu commented Mar 15, 2023

ich werde es testen

@Argafal
Copy link
Contributor

Argafal commented Mar 16, 2023

As promised I went to try to find the offending commit. a4799b4 works. The one right after (f7a7026) does not. I tried to review that commit. The settings routines are majorly reworked, so it seemed like a good candidate for the origin of the problem.

However, I must be doing something wrong. For your amusement I will share what it looks like for me, and hopefully someone can help me understand better.

$ git diff f7a7026ac88f161ad02c84e5eb90d56695124805 a4799b497ddc6935a9cfbfc80bbead6d475a95a8|wc -l
10385

To me this looks like a gigantic commit touching 10385 lines. Here is list of things the git diff touches upon: the build environment, the readme files, the setup routines of the main app, the main communication loops, the mqtt communication, interrupt handling, displays, settings configuration, default pin configurations, dark mode, the size of the settings json, inverter data and communication, a circular buffer for the radio communication, MI payloads, more display routines, logging routines, html and css.

The commit message is "renamed var to VAr". So I hope this gave you a good chuckle and someone can help me understand what's going on :)

P.S. I think it's really a diff against 0.5.66, I'm not sure how. I assume all pull requests are always done against the development03 branch?

@Argafal
Copy link
Contributor

Argafal commented Mar 16, 2023

For the record: 71ea715 also works. That's Fri Mar 3 12:01:19 2023 +0100, one of the 0.5.93 hot fixes.

@lumapu
Copy link
Owner

lumapu commented Mar 16, 2023

thank you for pointing it out. I think you can make diffs between two commits if you pass two SHAs to diff.
Maybe there is an option to hide whitespace chances to further reduce number of changes during compare.
I really like the windows tool TortoiseGit

@knickohr
Copy link

knickohr commented Mar 17, 2023

Wollte eigentlich einen separaten Issue dazu aufmachen, da es aber diesen hier schon gibt, hänge ich es an.

Es ist nicht nur auf den 8266 beschränkt, sondern betrifft auch den ESP32.

Ganz grass ist es wenn man das Nokia Display auswählt, da sind dann schon die Einstellungen nach dem Save (ohne Reboot) wieder verloren. Andere Displays lassen sich kurioserweise noch einstellen 🤔

Die letzte Version wo ich ein Nokia noch am ESP32 konfigurieren konnte ist die DEV 98.

@Argafal
Copy link
Contributor

Argafal commented Mar 17, 2023

I am walking through the commits. f5ef19c doesn't work for me, settings get lost. 71ea715 works for me, stable and fine. In between are 36 commits. The big changes are MI and display.

@knickohr
Copy link

Das wäre dann die 93, danach kam das ePaper 😲

lumapu added a commit that referenced this issue Mar 18, 2023
fix JSON import #775
fix save settings, at least already stored settings are not lost #771
@lumapu lumapu added the fixed dev fixed label Mar 18, 2023
@Argafal
Copy link
Contributor

Argafal commented Mar 18, 2023

Ja, das scheint das Problem für mich zu lösen. Toll gemacht, @lumapu. Ach wie wunderbar :)

@eupesco Kannst du 0.5.102 ausprobieren bitte? Löst das für dich auch das Problem mit den Einstellungen?

@T-Paul80
Copy link

T-Paul80 commented Mar 18, 2023

Anmerkung, ich habe zunächst auf die .102 upgedatet, dann Display angepasst, soweit alles funktioniert.
Nach dem Neustart gemerkt, dass Device Host Name leer ist. Also erneut "AHOY-DTU" eingetragen und Checkbox bei "Dark Mode" gesetzt. Nach dem Neustart waren die Einstellungen, bis auf WiFi , wieder weg.
Anschließen Werkseinstellungen, dann erneut die gleichen Werte geändert, Einstellungen werden übernommen und es sieht so aus, dass alles einwandfrei läuft. Danke @lumapu :)

@tqma1
Copy link

tqma1 commented Mar 18, 2023

Das wäre dann die 93, danach kam das ePaper 😲

Nur für den ESP32 oder auch für den ESP8266?

@knickohr
Copy link

ePaper gibt’s nur für den ESP32

@tqma1
Copy link

tqma1 commented Mar 18, 2023

Schade, da gibt es so ein nettes Set (ESP8266 und 1,54“ ePaper) ….

@lumapu lumapu closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed dev fixed
Projects
None yet
Development

No branches or pull requests

7 participants