Manage Forwarding
Forwarding allows you to forward data from your devices to other services, via a configured connection.
This will replace similar messaging based on Notifications, which is only accessible via API or the Cloud app.
You can access sharing on supported devices, via the Forwarding device action on the devices admin pageADMIN.

For multiple device selection, you can also access forwarding via the Forwarding button in the bulk actions.

Selection
If you already have a forwarder set up, it should appear in the list of forwarders ready to select.
If no forwarders have been set up, you'll see an empty list.

Create a Forwarder
Hit the New button to create a new forwarder.
You'll then be presented with a dialog to configure the forwarder.

Enter the details for the forwarder:
- Name: Something descriptive for you to identify the forwarder by.
- Connection: The connection to use for the forwarder, which you must have set up previously. (Click the
+button to create a new connection if you haven't already). - Forward for all devices (rather than adding individual devices to the forwarder).
- Payload Format (Defaults to bytes):
- V3 Bytes: Will forward the raw V3 protocol bytes received from the device. You'll need to parse this yourself on the receiving end. (SDKs coming soon).
- V3 JSON: Will forward a JSON object, which is translated from the V3 protocol bytes. This is easier to work with, but larger in size.
- Message Types Filter: Select from the available message for the device communication protocol. Only messages of the selected types will be forwarded. You can leave blank to forward all message types.
- Subscription Requests: Optionally send subscription requests to the device when it connects, to control what data is sent from the device.
Clicking Create Forwarder will create the forwarder.
Subscription Requests
See Subscriptions for more information on how device message subscriptions work.
The subscription requests section allows managing multiple subscription requests to be sent to the device when it connects.

Clicking the Add Subscription button will add a new row to the subscription table.
Here, each column lines up with the relevant subscription header (see Subscription documentation)
A single subscription for valid position messages, every 1 second may look like this...

When sent to a device, the first subscription for each message type will have the subscription ID of 0. Any additional subscriptions for the same message type will have incrementing subscription IDs (1, 2, etc).
Connections
The connection defines how and where the data is forwarded to. Some pre-defined system connections exist, but you can also create your own custom connections.
System connections
Some connections are provided by the system, which you can use without needing to create your own.
Currently the only system connection that exists is Lightbug Cloud.
Lightbug Cloud
The Lightbug Cloud connection allows you to forward the V3 device messages into Lightbug Cloud.
🧪 Alpha Lightbug Cloud Forwarding
Devices may still directly send data to Lightbug Cloud, and thus you may receive data from both sources.
Not all message types are currently supported (see below).
When using this connection for a forwarder, you do not need to select any payload or format options, as this is handled automatically by the system.

Messages
Position messages will be forwarded to Lightbug Cloud, and will appear in the device's location list. Some data fields will be null when forwarded, as they are not available in position message, such as battery level.
Subscriptions
Forwarding a device to Lightbug Cloud will automatically create a subscription for Position messages for the device when connected to the Chasm link.
The interval of this subscription will be determined by the device's configured reporting interval, for example a 10s device interval setting, will result in 10000ms interval subscriptions.
The storage level MH_STORAGE_LEVEL_NVM will be used.
Access
Data can be accessed via Lightbug Cloud as normal, including via the Cloud App, and the API as device datapoints.

Create a Connection
To create your own connection, click the "New" button, next to the connection selection on the forwarder creation dialog.
You'll then be presented with a dialog to configure the connection, which will vary depending on the type of connection you wish to create.

Enter the details for the connection:
- Name: Something descriptive for you to identify the connection by.
- Type: The type of connection to create. Currently supported types are:
- Webhook (HTTP POST): Forwards data via HTTP POST to a specified URL.
- MQTT: Forwards data to an MQTT broker.
- Details: The details required will depend on the connection type selected.
Webhook
For webhooks, you need only enter the URL to which the data should be posted.
MQTT
For MQTT, you'll need to select a few options:
- Schema and host: The schema (mqtt:// or mqtts://) and host of the MQTT broker.
- Port: The port of the MQTT broker.
- Username: (Optional) The username to authenticate with the MQTT broker.
- Password: (Optional) The password to authenticate with the MQTT broker.
Connection testing
In both cases, you can Test Connection to ensure the details are correct before saving the connection.
When the test is performed, you'll receive raw test message string JSON encoded.
