Automatically translate this page?

How to set up a stream from flespi to Thingsboard?

Forwarding telemetry data to an open-source IoT platform.

Thingsboard is an open-source IoT platform for device management, data collection, processing, and visualization. This guide shows how to set up streaming data from flespi to Thingsboard assuming that you have already tuned receiving data to flespi Telematics Hub.

1. Create Thingsboard device

You can use your local installed version of Thingsboard or create a demo account on https://demo.thingsboard.io. Go to Devices tab, create a new device and check “is gateway” checkbox — it means that Thingsboard will automatically create a new device if a message with a new “device_name” will be received.

create thingsboard device

2. Get device’s access token

Open the new device card and copy access token. It will be used in the next step for stream configuration.

copy device token

3. Configure stream from flespi.io

Create a new stream in flespi Telematics Hub streams tab. In configuration dropdown list select “thingsboard” and fill in the fields:

uri — Thingsboard MQTT broker address. Use demo.thingsboard.io:1883 for demo platform.

access_token — device token copied on the previous step.

device_name — the field in the message from flespi to Thingsboard which will be used as a device identifier. For most cases “%ident%” is enough. But if you want to stream a single flespi device you can use custom static name e.g. “%device_name%”. 

thingsboard stream settings

Note: %ident% is the ident mask meaning that the messages from flespi will be sent via the stream with their original ident (IMEI). Usually, there's no need to change this parameter unless you want to distinguish the subset of devices coming from flespi. Then you can add a prefix like this "flespi-%ident%.

That’s it. Now each new message for subscribed instances will be sent to Thingsboard.

Useful tips

If Thingsboard device is not created automatically, you can create a new device manually and tie devices in gateway device’s “relations” tab. 

manually tie devices

The same can be done via Thingsboard API. You can publish a message like {“device”:”new_device_name”} to topic v1/gateway/connect.


See also
Obtain telematics data from Jimi Concox devices via API in 5 easy steps.
Using flespi plugins to pack together the data coming from two or more related devices.