Essentials
- Streams are used to send telematics data from flespi to cloud hubs, fleet management platforms, and other services.
- Streams can forward data from specific devices, groups of devices, or entire channels.
- If the destination is unavailable, streams use a buffer to temporarily store the messages to be sent.
How streams work
Streams push messages from flespi to other platforms (see how to create a stream [VIDEO]). A stream will push only newly received messages from channels or devices subscribed to the stream. If the target platform is unavailable, the stream stores unpushed messages in its internal buffer and pushes them as soon as the target platform is up again. flespi supports several types of streams.
Note: if a stream is subscribed to a channel and a device (working over the same channel), the messages in the stream will not be duplicated.
IP whitelisting: If you protect your integration with an IP filter or firewall, please be sure to whitelist 185.213.2.10 and 185.213.2.110 IP addresses (or the whole subnet 185.213.2.0/24 that is operated solely by flespi).
Stream types
Common streams
HTTP, MQTT, Wialon Retranslator are the protocols with the open specification that can be used in your custom solution:
HTTP — sends POST requests with a list of messages to the specified URI. Max number of messages in one request can be set in the stream configuration. As soon as the server replies with 200 code, the sent messages are removed from the stream buffer.
MQTT — publishes messages to the MQTT connection (credentials specified in stream configuration). The stream uses QoS=1 to ensure that the message is removed from the stream buffer as soon as ACK from the broker is received.
Wialon Retranslator — sends telemetry collected from several sources (has open specification). This protocol is widely accepted by various telematics platforms.
Flespi gateway — sends data between different flespi accounts via HTTPS.
Streams to cloud IoT hubs
flespi allows easily sending your data into the major cloud services::
These platforms can accept the special data format implemented in flespi streams. So flespi user simply needs to configure the stream with the appropriate IoT hub credentials.
Streams to fleet management & GPS tracking platforms
Streams to specialized platforms
flespi offers ready-made solutions to push data to such platforms as:
- Thingsboard IoT platform
- Maxoptra route optimization software
- GEFCO logistics platform
- Redlist maintenance platform
Streams to toll road systems
- tollBG — forces the incoming messages to the format required by the Bulgarian national toll road system (with the help of a special tollbg plugin for each streamed device)
- e-Toll — forces the incoming messages to the format required by the Polish national toll road system.
Streams to MQTT brokers
- rabbitMQ (CloudAMQP)
How to create a stream?
- Log in to the flespi panel
- Navigate to Telematics hub -> Streams and click the "+" button in the bottom right corner to add a new stream:
- Give the new stream a name, pick the proper stream type depending on the destination platform, configure it, and click Save:
- For the stream to start sending messages it has to be subscribed to device(s) or channel(s). Go to the respective tab on the stream card and assign desired items to the stream:
Important! Avoid subscribing a stream to channels and devices simultaneously — this may lead to duplicate messages coming to the target platform.
- Once the assigned device starts sending messages, the stream with start forwarding them to the target platform. You can check the Logs & Messages for the stream to see the "stream has sent messages" records:
Streams API
To perform any operations with the streams, use the streams API.
Troubleshooting
In case of any issues, check the Logs & Messages tab on the stream screen:
The accepted, read, rejected, and skipped columns show the respective number of packets. The ack_latency parameter shows how long it took to send a batch of messages.