Packages

Streambed has an open source package repository that allows anyone to enhance their installation by installing common dashboards, transformers, observation types, and device types from a central location.

Installing or Updating Packages

To install a package:

  1. Select Settings from the left-hand navigation.
  2. Select Packages from the section navigation.
  3. If you have internet connectivity, the page should automatically pull down the latest packages. Otherwise, select Sync when you have connectivity.
  4. Find the packages you wish to install or update, and select the appropriate Install or Update button.

If you have cloud provisioned devices, any linked packages will be automatically installed for you.

Creating and Updating Packages

The package repository is hosted at github.com/streambed/xdp-apps. To create or update a package of your own, follow these steps:

  1. Fork the repository to your own account so that you can create a pull request. This guide should get you started.
  2. With the repository cloned to your machine, create a directory to house your packages.
  3. Within that directory, create one of the following subdirectories: dashboards, end-device-types, observation-types, transformers
  4. Within each, you’ll need to create a subdirectory to hold files for that distinct item. If your package consists of a single dashboard, for example, it’s common to put the dashboards files within dashboards/main.
  5. For each item, refer to the section below to understand the files you need to create.

Dashboards

Each dashboard must specify a descriptor.json file containing the dashboard’s id (v4 UUID, string), name (string), and associated topics (array of strings). Additionally, a source.js file must be specified declaring the dashboard’s layout function. Be sure to refer to the dashboard reference documentation for more information.

The following example shows the directory layout used for the electric-fence dashboard:

xdp-apps/electric-fence/dashboards
xdp-apps/electric-fence/dashboards/main
xdp-apps/electric-fence/dashboards/main/descriptor.json
xdp-apps/electric-fence/dashboards/main/source.js

Refer to descriptor.json and source.js on GitHub to see what the files’ contents are.

End Device Types

Each end device type must specify a descriptor.json file containing its topic (string) and name (string).

The following example shows the directory layout used for the agriace end device type:

xdp-apps/agriace/end-device-types
xdp-apps/agriace/end-device-types/main
xdp-apps/agriace/end-device-types/main/descriptor.json

Refer to descriptor.json on GitHub to see what the file’s contents is.

Observation Types

Each observation type must specify a descriptor.json file containg its topic (string), name (string), and secretPath (string). Additionally, a view.js file must be specified declaring display logic for the type. Be sure to refer to the observation type reference documentation for more information.

The following example shows the directory layout used for the electric-fence observation type:

xdp-apps/electric-fence/
xdp-apps/electric-fence/observation-types
xdp-apps/electric-fence/observation-types/main
xdp-apps/electric-fence/observation-types/main/descriptor.json
xdp-apps/electric-fence/observation-types/main/view.js

Refer to descriptor.json and view.js on GitHub to see what the files’ contents are.

Transformers

Each transformer must specify a descriptor.json file containing its id (v4 UUID, string), name (string), inlet (string), and outlets (array of strings). Additionally, a source.js file must be specified declaring the transformer’s logic. Be sure to refer to the transformer reference documentation for more information.

The following example shows the directory layout used for the agriace transformer:

xdp-apps/agriace/
xdp-apps/agriace/transformers
xdp-apps/agriace/transformers/main
xdp-apps/agriace/transformers/main/descriptor.json
xdp-apps/agriace/transformers/main/source.js

Refer to descriptor.json and source.js on GitHub to see what the files’ contents are.