Creating a Custom Application

The AEP firmware version 1.3 or later supports installing and running user-created custom applications as well as managing them from DeviceHQTM. You can disable Node-RED to save system resources.

Basic Requirements:

  • Use a supported language: C/C++, Python, Nodejs
  • The app can be installed either on an SD card or in flash.
    • You can use an optional boolean variable to manage this or otherwise the app-manager takes care of it automatically based on the presence of an SD card. See manifest.json Details for more information.
  • Application is packaged as a gzipped tar file containing all required files.
  • Use the new app-manager program on the Conduit to manage custom apps
    • This is exclusively used to install, uninstall, start, and stop custom apps.

Required Application Structure

tarball

All required files must be present for successful installation.

How to Create a Custom Application

  1. Download the custom app SDK template and extract the enclosed template tarball into your application directory.
  2. Modify manifest.json to contain the information about your app. See manifest.json Details for more information.
  3. Set up app dependencies:
    1. If your app doesn’t have dependencies to install, remove the two sample IPK entries in provisioning/p_manifest.json
    2. If your app does have dependencies to install:
      1. Create IPK files of all dependencies and place them in the provisioning directory
      2. Update provisioning/p_manifest.json with all your IPK dependency files.
    3. See p_manifest.json Details for more information
  4. Modify the Install script if you need extra dependency installation or other install setup beyond installing IPK files. This script is used to install and uninstall your app. See Install Script for more details.
  5. Modify the Start script to start and stop your application process(es) as needed. See Start Script for more details.
  6. If you have config files you want to update through DeviceHQ, place them in the config directory.
  7. Modify status.json with the default AppInfo string of your choosing. See status.json Details for more details.
  8. Organize the rest of your application content within this directory any way you like. The Conduit only cares about the location of the required and optional files noted above.
  9. Create a gzipped tar file (tarball) of this directory, ensuring all required files are present and correct. The tarball doesn’t need to match the app name in manifest.json. The first level application content like manifest.json must be at the top level of the tarball just like the custom app template. To create a tarball on Linux:
    $ cd <your_top_level_app_directory>
    $ tar --hard-dereference -hczf <path_to_create_tgz>.tgz *

Example Applications

More Information