Skip to content

09 Performing Updates and Upgrades

Resinchem edited this page Dec 3, 2022 · 3 revisions

Firmware Upgrades

If a new version of the firmware is released with new features and/or bug fixes, you can easily install the new firmware over-the-air (OTA) using the web interface.

First, download the latest .bin file from the Releases page of this repo and save it to your local machine. Bin files will be named ParkingAsst_vx.xx_ESP8266.bin where x.xx represents the version or release number.

Go to the main controller web page by entering its IP address in your browser. At the bottom of the settings page will be a button to peform a Firmware upgrade. Click this button to launch the firmware upgrade page.

28_FirmwareUpdate_2

The current version of your controller firmware is shown at the top of the page. Simply click the 'Choose File' button, browse to and select the newly downloaded firmware .bin file. Once you've assured the correct file, click the 'Update Firmware' button.

The update begins immediately when you click the button. No confirmation dialog is shown! So be sure you are using a valid file and are ready to upgrade.

Do not power off the controller during this step. The new firmware will load and the controller will reboot. You can either watch the LEDs for the boot process to complete (see the Boot Process for details), or the web page should refresh and return to the settings page when the process completes. You can check the version number at the bottom of the settings page to assure the new firmware is in use.

Unless otherwise noted in the firmware release notes, all of your settings and options should be retained. If changes or additions to the settings are made as part of the update, you may need to set these new values and/or adjust you settings. If this occurs, details will be provided in the release notes.

Manual OTA Updates

The system also permits you to manually load new .ino sketches over-the-air if you want to make changes to the source code and compile your own version via an IDE (like the Arduino IDE). You will need to assure you have installed the ESP8266 board and all the necessary libraries in your enviroment. The steps to do this are beyond the scope of this wiki, but all of the libraries used are listed at the top of the .ino sketch in the source code directory.

To perform an OTA upload from the Arduino IDE, first select the proper port. The parking assistant controller will broadcast an over-the-air port at ParkAsstOTA at ipaddress where ipaddress is the IP address of your controller.

OTA_Updates_Small

After you have validated your code and are ready to upload, you can simply enter the IP address of your controller, followed by /otaupdate to put the controller into OTA update mode, ready to receive the new file.

OTA_Updates_URL

You should immediately upload the file from the IDE at this time. The LED strip will also show an OTA update is occurring by changing all the LEDs to alternating red and green.

OTAUpdate_Cropped

The LEDs will remain this color until the upload completes. The controller will then reboot and load your new code. The boot process and LED colors during this process are described in The Boot Process part of the wiki.

NOTE: The OTA process is a blocking procedure on the ESP8266. For this reason, if an upload doesn't begin in approximately 20 seconds after entering OTA mode, the controller will exit the OTA process and return to normal functions. If this happens and you didn't upload the file in time, simply reissue the /otaupdate command again in your browser and try again.