- Use localTime instead of epochTime when formatting date string,
so date rolls over at local midnight, not UTC midnight (fixes#5)
- Remove WEATHER_SUCCESS state assignment that blocked periodic refresh;
state correctly stays WEATHER_IDLE after successful fetch (fixes#7)
- Fix weather debug page "Last update" to show elapsed seconds
(millis() - lastUpdate) instead of raw timestamp
Applied from PR #6 by @Mysteoa with a compilation fix in web_server.cpp
(missing closing parenthesis in snprintf_P call).
Co-authored-by: Mysteoa <mysteoa@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
## Problem
Previous versions would clear WiFi credentials on connection failure,
requiring manual reconfiguration via captive portal after each WiFi outage.
## Solution
- Never clear credentials on connection failure
- Infinite retry with exponential backoff (5s → 10s → 20s → ... → 5min max)
- Fallback AP ("TJ56654-Setup") enabled after ~5 min of failed attempts
- Dual STA+AP mode allows configuration while still retrying connection
- AP automatically disabled when WiFi reconnects
## Changes
### WiFi Credential Handling
- Try SDK-stored credentials first (from WiFiManager)
- Fall back to EEPROM config if SDK credentials fail
- Fixes OTA update credential loss issue
### User Experience
- Display shows "No WiFi" with retry countdown instead of cryptic numbers
- "!" indicator in date line when WiFi is disconnected
- Clock continues running with last synced time during outage
### Network Activity (~50 requests/day)
| Service | Interval | Endpoint |
|---------|----------|----------|
| NTP | 1 hour | pool.ntp.org:123 (UDP) |
| Weather | 30 min | api.open-meteo.com (HTTP) |
| mDNS | continuous | 224.0.0.251 (multicast) |
Co-authored-by: Alex Petrochenko <petrochenko@life-pay.ru>
Complete context file with:
- Full development history (v1.5 → v1.9.1)
- All technical details and architecture
- Security issues and fixes
- Hardware specifications and pinout
- Current device configuration
- Next steps (Home Assistant integration)
- Key learnings from project
- Quick reference commands
This file serves as complete knowledge base for:
- Resuming work after long breaks
- Onboarding new contributors
- Understanding project evolution
- Reference for future features