v3.20.2

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Integrations

    Overview
  • Adding Applications
  • Adding Integrations
  • Cloud Integrations
  • MQTT Server
  • Pub/Sub
  • LoRa Cloud
  • Node-RED
  • IFTTT
  • Payload Formatters
  • Storage Integration
    • Configuration
    • Enable/Disable
    • Retrieve Messages
  • Webhooks

Enable/Disable

The Storage Integration is implemented as an Application Package.

Note:

Enabling/disabling Storage Integration for applications can be done using The Things Stack Console or CLI. Enabling/disabling Storage Integration for individual end devices is available only via CLI.

Note that the instructions for CLI here are following generic instructions for using the CLI to manage application packages, just specified for the storage-integration application package.

Enable for an Application

  • Console
  • CLI

Navigate to Applications in the top menu and then select your application. On the left side, click Integrations and then Storage Integration.

Click on Activate Storage Integration to enable the storage integration for your application.

Activate Storage Integration screen

Set up a default association between the desired application and the storage-integration package.

ttn-lw-cli applications packages default-associations set <application-id> <f_port> --package-name storage-integration
Note:
The f_port for the default association is set to 100. This value is irrelevant, i.e. the storage integration will receive and store all uplink messages, regardless of f_port. The f_port value is only needed because of the way application packages work with The Things Stack.
Warning:
Do not configure more than one default association for the same application, since that will lead to storing duplicate messages in the persistent storage.

Enable for an End Device

Command-line interface only

The instructions below use the command-line interface (CLI).

Make sure that the CLI is up-to-date and uses an updated configuration file: ttn-lw-cli use...

Learn how to install or upgrade the CLI

Set up an association between the desired end device and the storage-integration package.

ttn-lw-cli applications packages associations set <application-id> <device-id> <f_port> --package-name storage-integration
Note:
The f_port value is irrelevant.
Warning:
Do not configure multiple associations for the same end device, since that will lead to storing duplicate uplinks in the persistent storage.

Disable for an Application

  • Console
  • CLI

To disable the integration, you only need to click the Deactivate Storage Integration button:

Activated Storage Integration screen

To disable the integration, delete the package association or the default association.

To list associations:

ttn-lw-cli applications packages default-associations list $APP_ID

The output will be something like:

{
  "defaults": [
    {
      "ids": {
        "application_ids": {
          "application_id": "app1"
        },
        "f_port": 100
      },
      "created_at": "2020-08-24T21:09:44.649890166Z",
      "updated_at": "2020-08-24T21:09:44.649890166Z",
      "package_name": "storage-integration"
    }
  ]
}

Then delete the association with:

ttn-lw-cli applications packages default-associations delete <application-id> <f_port>

Disable for an End Device

Command-line interface only

The instructions below use the command-line interface (CLI).

Learn how to install the CLI

To disable the integration, delete the association.

To list associations:

ttn-lw-cli applications packages associations list $APP_ID $DEVICE_ID

The output will be something like:

{
  "associations": [
    {
      "ids": {
        "end_device_ids": {
          "device_id": "dev1",
          "application_ids": {
            "application_id": "app1"
          }
        },
        "f_port": 100
      },
      "created_at": "2020-08-24T21:09:44.649890166Z",
      "updated_at": "2020-08-24T21:09:44.649890166Z",
      "package_name": "storage-integration"
    }
  ]
}

Delete the association with:

ttn-lw-cli applications packages associations delete <application-id> <device-id> <f_port>

Enable and Disable using the API

See instructions on how to create/delete associations and default associations with the storage-integration application package using the API.

← Configuration Retrieve Messages →

On this page

  • Enable for an Application
  • Enable for an End Device
  • Disable for an Application
  • Disable for an End Device
  • Enable and Disable using the API

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Nejra Selimović on 06 Jan 2022.
doc: Add Application package APIs, instructions on using API, reorganize docs (#702)

Edit on Github