OTA Updates
- During setup, the firmware checks GitHub Releases for a newer version and updates automatically if available.
- Current version is defined by
FIRMWARE_VERSION
inplatformio.ini
. - GitHub repo is configured via
GITHUB_OWNER
andGITHUB_REPO
inplatformio.ini
. - Optional: define
OTA_ASSET_NAME
(build flag) to pick a specific asset; otherwise the first.bin
asset is used.
Notes
- Requires Wi‑Fi connectivity during setup.
- TLS certificate verification is disabled for simplicity (
WiFiClientSecure::setInsecure()
). Consider pinning certificates for production. - On successful OTA, the device restarts automatically.
- Config file:
data/config.json
is loaded from SPIFFS at boot. - Example keys include
data_collect_interval
,timezone
, BEEP credentials, and asensors
array. - To upload the config to the device filesystem:
pio run -t uploadfs
(PlatformIO) then flash the app as usual.
- Code entry points:
- Loader:
src/config.cpp
- Types/API:
include/config.h
- Load call:
src/main.cpp
(insetup()
)
- Loader: