M5Stack Core2 weather display for "what's left today".
- Shows current weather plus the rest-of-today summary
- Refreshes on a timer
- Refreshes on button press
- Build-time location config
- Runtime credential storage in ESP32 NVS
- HTTP polling OTA firmware updates
- Private-first development flow
- Install
uv - Run
make sync - Adjust latitude / longitude / label for your location
- Build with PlatformIO for
m5stack-core2
Build-time credentials remain supported as a migration fallback:
- Copy
include/secrets.example.htoinclude/secrets.local.h - Fill in
WIFI_SSID,WIFI_PASSWORD,DOOARD_API_KEY,DOOARD_DEVICE_ID, andDOOARD_ENDPOINT_URL - Build and flash normally
When NVS credentials are present, they take precedence over these build-time values.
On boot, dooard reads credentials from ESP32 NVS namespace dooard-creds.
Stored records include a configured flag, schema version, and checksum. If the
record is missing and no build-time fallback exists, or if the stored record is
corrupt, the device enters serial setup mode.
Open the serial monitor at 115200 baud:
make monitorEnter the prompted values:
- WiFi SSID
- WiFi password
- API key, optional for endpoints that do not need one
- Device ID
- Endpoint URL
The firmware writes the values to NVS, marks the record configured, and restarts. Every later boot, including the first boot after OTA, validates all credential keys before Wi-Fi or HTTP access. Corrupt or incompatible records show an error on the display and return to serial setup.
Firmware builds use the default_8MB.csv partition table so the Core2 has OTA
app slots. The firmware version is compiled from DOOARD_FIRMWARE_VERSION in
platformio.ini.
The device polls this manifest every 6 hours, independently from weather data:
http://whywaita.github.io/dooard/firmware/version.json
The manifest format is:
{
"version": "0.1.0",
"firmware_url": "http://whywaita.github.io/dooard/firmware/firmware.bin",
"sha256": "<64 lowercase hex chars>",
"size_bytes": 1234
}When a newer version is available, the display footer shows the available OTA version. Hold buttons A+B+C together for 2 seconds to download and apply the update. The downloaded firmware is written only after its SHA256 matches the manifest.
Pushing a tag such as v0.1.0 builds .pio/build/core2/firmware.bin, writes
firmware/version.json, and deploys both files to GitHub Pages.
Wi-Fi credentials, API key, device ID, and endpoint URL are stored in ESP32 NVS
(namespace dooard-creds) via CredentialStore. The existing default_8MB.csv
partition table already includes the 24 KB nvs partition at 0x9000, so no
partition change is needed.
On first boot the device prompts for credentials over serial. Once saved, NVS persists across OTA firmware updates.
make synccreates the local Python environment and installs PlatformIOmake testruns native C++ tests with PlatformIOmake lintrunspio checkmake buildrunspio runinside that environmentmake monitoropens the serial monitor
For local OTA validation, run:
make testmake buildactionlint .github/workflows/*.ymlpinact run -u
- Wi-Fi credentials are kept out of git via NVS or
secrets.local.h - Release key files under
security/are ignored by git and must be backed up outside the repository - Weather data uses Open-Meteo