Zum Inhalt springen

Fusion/Diagnose und Fehlersuche/en

Aus WetterCube Wiki
Dies ist die englische Fassung. Zur deutschen Fassung

Reading /log

The device keeps a small log in memory (the last 40 entries, empty after a restart). Open it in the browser:

Header line Meaning
Version installed firmware
Freier Heap free internal RAM: current, lowest since start and largest contiguous block. HTTPS needs about 40–50 KB in one piece
PSRAM free external RAM (of 8 MB), lowest level, largest free block
Uptime minutes since start
LVGL-Speicher free memory in the LVGL pool (192 KB, located in PSRAM) and largest free block
Letzter Neustart power connected, software restart (e.g. after an update), crash, watchdog or brownout
WLAN beim Start duration and signal strength, or the failure reason (e.g. "network not found", "password?")
WLAN jetzt network, signal strength and IP address
Standort city with coordinates (0.0000 means: not found yet)
Letzter erfolgreicher Abruf per source (weather, DWD pollen, pollen/air, DWD warnings, map, Biowetter), how long ago
Einstellungen whether Wi-Fi credentials are saved, location, used NVS entries
Letzte /api/ampel-Anfrage how long ago the WetterAmpel last reported
Update installed and latest known version, last check

Below are the last 40 events, newest first, with time (or seconds since start while the clock is not yet synchronized). Successful requests are not logged one by one, only errors and notable events:

Entry Meaning
[Boot] v…, Neustart-Grund: … start with the restart reason
[OTA] Neue Firmware, wird nach gesundem Start als gueltig markiert / Start gesund: Firmware v… als gueltig markiert rollback protection: the new firmware runs on probation, after 60 s it counts as valid (see Recovery)
[OTA] Rollback: Version … ist nicht gestartet, die vorherige laeuft the last update did not start, the previous version runs again
Firmware-Slot: app0 (gueltig), andere Version im Slot app1: … / Notfall-App: Version … installiert top of the log: running slot, state, version in the other slot and state of the recovery app; Notfall-Kopie der Firmware auf der Karte: … shows the "last good version" on the card
[Notfall] Wechsel in die Wiederherstellung (Grund …) / [Notfall] … Abstürze in Folge: Hinweis … the recovery was started or the crash notice was shown
[Karte] erkannt: bereit, … GB frei / nicht erkannt memory card found or missing (optional, see Memory card); the line "Speicherkarte" at the top of the log shows the status
[Boot] Zuletzt aktiv vor dem Neustart: … only after a crash (panic, watchdog, brownout): the last activity, e.g. "Karte: PNG dekodieren" or "Screen: Temperaturverlauf"; also shown as the line "Zuletzt aktiv vor dem Neustart" at the top of the log
[WLAN] verbunden nach 1.9 s, Signal -63 dBm Wi-Fi is up
[WLAN] Versuch 1 fehlgeschlagen: … / Verbindung beim Start fehlgeschlagen … Wi-Fi not reached, with reason; the portal opens and keeps retrying
[WLAN] Netzwerk gewechselt zu '…', Neustart Wi-Fi change through the web interface
[WLAN] getrennt, verbinde neu the connection dropped during operation
[Start] mDNS: …, [WebUI] http://….local name and web interface are reachable; on failure "mDNS konnte nicht gestartet werden" (IP access only)
[Portal] … setup portal: start, connected devices, requests
[Zeit] NTP-Synchronisation fehlgeschlagen the time could not be fetched
[Geo] Suche 'Berlin' / Gefunden: 52.5200, 13.4050 the city was found
[Geo] Fehlgeschlagen fuer '…': kein Treffer city name not found (umlauts? typo?)
[Geo] Fehlgeschlagen fuer '…': HTTP -1 or JSON-Fehler no connection / response not readable
[Config] gespeichert / Standort geaendert: … changes made through the web interface
[Sicherung] … Einstellungen wiederhergestellt, Neustart a backup was restored
[Wetter] HTTP …, TLS …, SRAM frei … / JSON-Parse fehlgeschlagen weather request failed, with TLS error and memory level
[Pollen] …, [Luft] …, [Bio] …, [DWD-Warn] …, [Karte] … request errors of the respective source with reason; [Karte] 1000x… in … ms shows a successfully loaded map
[Update] Pruefung: installiert …, verfuegbar … version check (see Updates)
[OTA] Lade …, … Bytes geschrieben, Neustart update running / finished
[OTA] Fehler: … update failed

Crash record

If the device crashes (panic), it remembers the cause, task and return addresses and writes them to /log and the memory card at the next start, for example:

[Boot] v0.9.4, Neustart-Grund: ABSTURZ (Panic)
[Boot] Zuletzt aktiv vor dem Neustart: UI: Temperaturverlauf
[Absturz] LoadProhibited, Aufgabe 'main', Adresse 0x4200c9b5, Ausnahme 28
[Absturz] Rücksprünge: 0x4200c9b5 0x420364ae 0x420c9d1c ...

To report a crash, copy the lines with [Boot] and [Absturz] into the issue. With the addresses the crash can be traced back to the line in the program. The record exists from version 0.9.4 (for earlier crashes only "Zuletzt aktiv vor dem Neustart" is shown). To check the record, POST /api/absturztest?ja=1 triggers a crash on purpose.

Serial monitor

All log messages also appear in the serial monitor (115200 baud, output through the board's USB-UART). After opening it, restart the board once so the messages are visible from startup.

Common problems

Problem Cause and remedy
Device shows the setup mode although Wi-Fi was configured The credentials are still saved. Is the router reachable? Is 2.4 GHz Wi-Fi active? The device retries by itself. The reason is in /log under "WLAN beim Start"
Glitches, restarts Does /log say "Letzter Neustart: BROWNOUT"? Use a supply of at least 5 V / 2 A and a short cable
Warning map stays empty or outdated Search /log for [Karte]: "Download fehlgeschlagen" means the DWD server was not reachable (it retries after 2 minutes). "PNG-Dekodierung fehlgeschlagen (83)" means too little contiguous memory: up to v0.3.9 in the LVGL pool, up to v0.3.15 on every refresh after startup because the old map was still in PSRAM. Both are fixed (v0.3.10, v0.3.16)
Weather values stand still Look at /log: fetch errors are listed there with the memory level
Update icon does not appear It only appears when a newer version is released. In the web interface "Auf Updates prüfen" forces an immediate check
Update aborts with "download error" GitHub Pages sometimes serves the new firmware only after a few minutes. Wait a moment and retry
City is not found Leave out umlauts (Munchen, Koln), check the name. The [Geo] entry in the log gives the reason
Wrong time / night mode does not kick in The time comes via NTP and needs internet. Check "WLAN jetzt" and [Zeit] in /log
Traffic light always shows the same color Check "Letzte /api/ampel-Anfrage" in /log: well above 30 s means the light is not reporting (check Wi-Fi or the device)