Zum Inhalt springen

WetterCube/Updates (OTA)/en

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

The cube updates itself over Wi-Fi (OTA, "over the air") without a USB cable. The new firmware is downloaded from GitHub Pages.

Installing an update

The cube does not check for new versions by itself. The update is started from the web interface:

  1. Open http://wettercube.local and tap "Auf Updates prüfen" (check for updates) in the Firmware card, or open http://wettercube.local/update directly.
  2. The page shows the installed and the available version. "Auf Updates prüfen" asks GitHub for the current version.
  3. If the version differs, "Jetzt updaten" (update now) appears. Tapping it downloads the firmware (about 1.8 MB) and writes it to the free flash slot. This takes about 30 seconds.
  4. Afterwards the cube restarts by itself. The page reports "Update erfolgreich" (update successful), or the connection drops because the cube is just restarting. Both are normal.

Do not disconnect the cube from power during the update. Settings, Wi-Fi data and location are kept.

If the update fails (e.g. no internet), the error message appears on the page and the cube keeps running the old version.

Notes

  • The cube only compares whether the published version is different from the installed one. The update is therefore also offered if the published version is lower.
  • After a release, GitHub Pages sometimes needs a few minutes to serve the new firmware. On a download error, wait a moment and try again.
  • The update only works with the custom partition table (two app slots, see Development). Coming from a very old version (before v1.7.0) you need to reinstall once via USB or the web installer, because the partition table cannot be changed by an update.

Emergency: reinstall the firmware via USB

If the cube no longer starts at all (e.g. because it was disconnected from power during an update), the firmware can be reinstalled via USB with the web installer or from the Arduino IDE. The installation erases the flash, including settings, Wi-Fi data and location.