Resources

Most IoT applications have some static files which help firmware to works. It may be a simple audio file, Image, HTML files, etc. When you update your firmware you may need to update these files too. OTA drive resource manager service lets you do it.

Define first resource package

To define a resource go to resources tab of your product and click [+] button. You can upload multiple files at same time. Each file could have a destination path at the target device.

define new SPIFFS OTA file resource

If you enter destination path in the 'Base Path' textbox, all files will get it as the destination path. SPIFFS OTA ESP8266

Set resource package to a group

Now you have a package of files that should be in your device storage. You can choose different resource packages for each group of devices. Go to your group properties and set the resource to your favorite package. set SPIFFS OTA file resources to a group

SPIFFS OTA in ESP8266/ESP32

We provided this feature in our Arduino C++ library and you can use this feature easily in Arduino.

#include <otadrive_esp.h>

void doUpdate()
{
  // sync SPIFFS files with the OTAdrive server
  OTADRIVE.syncResources();

  // get new firmware if available
  OTADRIVE.updateFirmware();
}