Manage your data streams

Every source publishing or injecting the data into Live Objects (Device, gateway or business application), must set the stream which would be where you want to store your data.

In order to be able to use and process the data collected correctly, it is necessary to be able to read it and then store it. The management of the read and write processes in Live Objects is done through data stream channels.

A data stream is associated with each publisher and it can be a device with a single interface or several, you must take into consideration where the published messages will be written.

By default, each provisioned device, Live Objects associates a streamId with the defaulDataStreamId whose value is set automatically by Live Objects. The messages will be written under this stream.

So, to correctly manage the streams of your device, you should either use the stream provided by default or modify it if necessary.

When you want the device to use a particular streamId, the publisher must indicate in each uplink the desired stream. This allows data to be writed and stored as needed.

Interactive
Figure 1. Data stream options

Default data stream payload :

{

    "value": {"temp":23.8},
    "model": "data_model_v1"
}

Your data are stored under the defaultDataStreamId value stream. In this case the value is a device URN (or the value that you set in defaultDataStreamId field).

Custom data stream payload :

{
    "streamId" : "my_stream_1"
    "value": {"temp":24.1},
    "model": "data_model_v1"
}

To change your Custom data stream :

{
    "streamId" : "my_stream_2"
    "value": {"temp":20.1},
    "model": "data_model_v1"
}
In the device side, make sure to set the device’s custom streamId properly (set correctely the payload published by the device), as it determines which stream the message will be published to. Otherwise, messages will be sent to the configured/defaultStreamId (configure it in Live objects UI)