How iodn/geekmagic-tv-esp8266 works
This is ESP8266 firmware for a SmallTV weather clock. Its principal workflow is boot and provision WiFi, serve an authenticated browser dashboard, acquire configured feeds, and render the resulting clock, data pages, or temporary images on the display. The graph preserves the documented integrations and device capabilities; connections for subsystems whose implementation was not excerpted are omitted rather than inferred. The README documents LittleFS configuration, EEPROM settings validation, and OTA behavior.
Main entry points: main.cpp Firmware lifecycle · webserver.cpp HTTP routes · feeds.cpp Feed polling · display.cpp Page rendering
Components 21
Boot and connectivity
- Firmware lifecycle
src/main.cpp - WiFi setup
src/main.cpp - mDNS discovery
src/main.cpp - OTA updates
src/main.cpp - Button controls
src/button.cpp
Dashboard management
- HTTP routes
src/webserver.cpp - Browser dashboard
src/webui.h - Authentication
src/auth.cpp - Dashboard config
src/dashboard.cpp
Feeds and display
- Feed polling
src/feeds.cpp - Open-Meteo
- Market providers
- Home Assistant
- Page rendering
src/display.cpp - ST7789 display
- Temporary images
src/display.cpp
Configuration and state
- LittleFS configs
src/dashboard.cpp - EEPROM settings
src/settings.cpp - Device logs
src/logger.cpp
Other components
- Device owner
- NTP time
Connections 32
- Device owner → WiFi setup: configures
README.md - Device owner → HTTP routes: uses
README.md - Firmware lifecycle → EEPROM settings: loads
src/main.cpp - Firmware lifecycle → Dashboard config: initializes
src/main.cpp - Firmware lifecycle → Feed polling: initializes
src/main.cpp - Firmware lifecycle → Page rendering: initializes
src/main.cpp - Firmware lifecycle → WiFi setup: starts
src/main.cpp - Firmware lifecycle → mDNS discovery: starts
src/main.cpp - Firmware lifecycle → OTA updates: starts
src/main.cpp - Firmware lifecycle → HTTP routes: starts
- Firmware lifecycle → NTP time: configures
src/main.cpp - Button controls → Page rendering: cycles pages
- Browser dashboard → HTTP routes: sends requests
src/webui.h - HTTP routes → Authentication: verifies login
src/webserver.cpp - HTTP routes → Dashboard config: applies settings
src/webserver.cpp - HTTP routes → Feed polling: applies feed config
src/webserver.cpp - HTTP routes → Page rendering: updates display
src/webserver.cpp - HTTP routes → EEPROM settings: saves settings
src/webserver.cpp - HTTP routes → Browser dashboard: serves UI
src/webserver.cpp - Feed polling → Open-Meteo: polls
- Feed polling → Market providers: polls
- Feed polling → Home Assistant: polls REST
- Feed polling → Dashboard config: updates data
- Page rendering → Dashboard config: renders data
src/display.cpp - Page rendering → Feed polling: reads feed data
src/display.cpp - Page rendering → ST7789 display: draws output
- Page rendering → Temporary images: renders JPEG
src/display.cpp - Dashboard config → LittleFS configs: persists config
src/dashboard.cpp - Feed polling → LittleFS configs: persists feed config
- EEPROM settings → LittleFS configs: stores image state
- Firmware lifecycle → Device logs: initializes logging
src/main.cpp - HTTP routes → Device logs: writes logs