-
-
Notifications
You must be signed in to change notification settings - Fork 29
Updates
When updating is recommended to do it via OTA as that implies some checks and hopefully prevent some uneventful things, however, if you still want to update over USB you can use the command python esptool.py write_flash 0x20000 <firmware.bin> 0x200000 <firmware.bin> 0x3e0000 <littlefs.bin>
No one likes to have to rip the device from its very well put place just to do a software update for 2 minutes, fortunately, for this reason, the OTA update mechanism exists and allows you to update the device without even leaving your desk.
As the project is currently written on top of the Arduino framework, the OTA mechanism was implemented through ArduinoOTA with the help of the HomeSpan library that also provides the HomeKit functionality.
Starting with version 0.3
, firmware binaries are included with releases and those come in three files as follows:
-
firmware_merged.bin
- this contains everything(bootloader, app,spiffs), only use it for first flash, DON’T USE TO UPDATE -
firmware.bin
- this contains the actual code and is what should be used to update(OTA or Flashing) -
littlefs.bin
- this includes the HTML files for the Web Interface and only needed when updating(OTA or Flashing)
The easiest way to proceed with an over-the-air update is to download the firmware from the Releases page and use the espota
tool.
The espota
tool is available in two versions:
Once you acquire espota
, you can use the following command to upload firmware.bin
:
- For Windows
espota.exe -r -i <address_of_device> -a homespan-ota -f <firmware.bin location>
- Linux/MacOS
python espota.py -r -i <address_of_device> -a homespan-ota -f <firmware.bin location>
Note
Note the use of -a homespan-ota
homespan-ota
is the password used to authenticate the OTA update, this can be changed on the WebUI in the Misc section
Once the above is finished with success, use again the same command but replace firmware.bin
with the location of littlefs.bin
and also add -s
so it knows it's meant for the spiffs
partition.