Automatically translate this page?

How to create flespi devices in bulk?

Four ways for the massive creation of devices in the flespi platform.

Sometimes you want to add a few dozens or hundreds of devices into the flespi platform (e.g. a fleet). The standard method of clicking the “+” button in the Telematics hub -> Devices section will take ages with such volumes.

For such cases flespi offers four options to create devices in bulk:

1. Use a REST API method 

The following POST method is used to create flespi devices: https://flespi.io/docs/#/gw/!/devices/post_devices

flespi post devices method rest API

This approach is the most flexible but requires scripting from you.

result of post device request rest API

2. "Create devices" button on the Connections tab of the Channel card

This is a GUI-based method but it also accepts idents in the CSV format. 

device card connections tab create devices

You can add idents manually into the input field or use the “CSV input” button to speed up the process. To use this approach you may generate a CSV string and paste into the required field:

add idents as csv to create devices

3. "Create devices" button on the Idents tab of the Channel card

This is another GUI-based: there is an Idents tab (next to the Connections tab), which stores idents of devices extracted from the saved traffic in the given channel (the rotation of the saved traffic depends on the volume of data in the channel). If you click on the "Create devices" button on the right, you will be offered to create the flespi devices for all listed idents.

You can leave only the ones you need, pick the proper device type from the drop-down and click the "+" button to initiate bulk device creation: 

4. Use a tool written by one of the flespi developers 

Here is the source code of a small but handy tool that can automate the creation of devices for your account. In essence, it's a helper for creating devices via the REST API (in option 1). You may run it directly in your browser.

Just copy the required idents from Excel (or any other tool containing a column of idents) and paste them into the input.

flespi bulk device creation tool

Then you will also be able to specify the phone numbers for the devices if necessary and set the messages TTL period.

The tool will then offer you a generated JSON for revision. If it looks OK to you, just click the Create devices button at the bottom to make it happen.

check json and create flespi devices automatically

***

Pick the option that you find the most convenient.


See also
Some examples of the mathematical functionality supported in MQTT Tiles.
Configure variables in MQTT Tiles to select from the lists of like entities and populate the widgets with their values.