Stored data message
Summary
When the devices publish the messages, they are processed by the data transformation and then the data analysis services, they will be stored according to output formats depending on the connectivity and the applied process. Consumers can access them through API requests.
Depending on your connectivity interface, the data message model stored in Live Objects may have a dedicated sections to describe the parameters of your datas'.
The Data message is a JSON object. Please find below a description of its fields.
| Field | Description |
|---|---|
type |
dataMessage. This field is set by Live Objects in the routed Data message. In the store/search section, this field is not set. |
version |
Version number. See the existing versions in the summary. In the store/search section, this field is not set. |
streamId |
String identifying a timeseries /stream. Enriched by default if not set. Should not contain following characters: ' " \ ; { } ( ) and ' ' (space). |
timestamp |
Timestamp associated with the collected information. Generally set by the device, enriched by default if not set. Should follow ISO-8601 date time format. |
created |
Timestamp reflecting the date on which the data was collected by Live Objects. |
location |
Geo location (lat, lon, alt, accuracy, provider) associated with the declared and/or collected location infos. |
model |
String used to indicate which schema is used for the value part of the message, more about model field. Can be empty, but can not contains ' ' (space) or '.' (dot) character. |
value |
Structured representation (JSON object) of the transported info. This field is usually filled with the useful payload (device measurements). Be a JSON object (not a primitive like number or string). Do not contains field name with '.' (dot) character. Size in bytes can not exceed 1 MiB (1024*1024 bytes). |
tags |
List of strings associated with the message. Used for extra-information. |
extra |
Enriched by Live Objects and can contains device inventory information like device’s properties. |
metadata |
Section enriched by Live Objects. * source: unique identifier of the device, usually the URN (urn:lo:nsid:<namespace>:<id>) * group: group to which the device belongs, defined by its id and its path * connector: lora, mqtt, … * network: information from the network, depends on the connector |
| When the LoRa® device send message to Live Objects, the network set timestamp value and when the message is processed by Live Objects, it set the created field value by his own timer. Live Objects does not process messages according to the chronological order of transmission (timestamp value set by the network provider timestamp) but according to the order of processing (created value set by Live objects). |
LoRa® output
payload sent by device :
e17aae4133333942bc8b0100
stored data after decoding :
{
"metadata": {
"source": "urn:lo:nsid:lora:4883C7DF3001114B",
"encoding": "siconia_temperature_humidity_pressure",
"group": {
"path": "/",
"id": "root"
},
"device": {
"location": {
"provider": "static",
"lon": 2.545599,
"lat": 48.82198
}
},
"network": {
"lora": {
"rssi": -110,
"esp": -111.76,
"ack": false,
"fcnt": 27517,
"devEUI": "20635F0108000C8D",
"frequency": 868.5,
"signalLevel": 5,
"gatewayCnt": 5,
"sf": 10,
"messageType": "UNCONFIRMED_DATA_UP",
"port": 10,
"snr": 3,
"location": {
"provider": "lora",
"alt": 0,
"accuracy": 10000,
"lon": 2.526197,
"lat": 48.83361
},
"roaming" : {
"operatorNetId": "600031",
"operatorName": "Stratis IoT"
},
"missingFcnt": 0
}
}
},
"streamId": "urn:lora:20635F0108000C8D!uplink",
"created": "2021-05-30T19:02:46.789Z",
"extra": {
"_outdoor_source_alt_lat_lon",
},
"location": {
"provider": "static",
"alt": null,
"accuracy": null,
"lon": 2.545599,
"lat": 48.82198
},
"model": "lora_v0",
"id": "60b3e15603b409370d2d2b10",
"value": {
"payload": "e17aae4133333942bc8b0100",
"temperature": 21.81,
"humidity": 46.3,
"pressure": 1013.08
},
"timestamp": "2021-05-30T19:02:46.161Z",
"tags": []
}
LoRa® network signal infos
The LoRa® decoded message contains the additional fields added by Live Objects enrichment logic. The network section in the LoRa® decoded message (metadata.network) will be enriched by adding the parameter values collected by network. Here is the description of specific fields (network infos) of LoRa® decoded message :
| Parameter (field) | Description | Notes |
|---|---|---|
SNR |
The "Signal Noise Ratio" provides an indication on the level of perturbations compare to the signal itself received by the field gateway. |
A bad value of SNR may indicates that the device is in a perturbed environment (for example industrial machines that produce high level of electromagnetic radiations), or that the power of the signal is simply too weak to overcome the ambiant noise. A bad SNR is very likely to cause frame loss. We consider these typical values for SNR:
|
RSSI |
The "Received Signal Strength Indication" indicates the strength of the "raw signal" that is to say the signal who contains the util information plus the background noise and the interferences due to the transmission. |
It is used to estimate if a device is close or not to a gateway and to automatically adapt the data rate for a best compromise between signal quality and battery consumption. So that a strong RSSI is not necessarily better. It has to be considered globally. We consider these typical values for RSSI:
|
ESP |
The "Estimated Signal Power" represents the strength of the useful signal. Basically it can be considered as a measurement of how well a receiver can “hear” a signal from a sender. |
It is computed based on the RSS and the SNR with the formula: ESP=RSSI-10×log(1+10(--SNR10)) We consider these typical values for RSSI:
It’s not necessary to have a strong ESP if the level of SNR is low. The signal will be well received but could be more sensible on the environment changes. |
SF |
The "Spreading Factor" represents the "effort" that a device do to send a message. |
If it is useful for a device to use the highest SF (12) when JOINing to maximize the chance to be heared by a gateway, it is better further to use the lowest SF as possible to save the battery . The network server tells automatically to the device to set the appropriate SF depending on the power of the received signal (RSSI). Minimum SF is 7, maximum is 12. |
gatewayCnt |
It is the number of LoRa gateway who "heard" the message sent by the device. It is an indicator of network coverage. |
It’s better for reliability to have a space redundancy : > 1 and even > 3 for a more precise geolocation |
signalLevel |
This value is a "Signal level" computed from last uplink. |
It’s an Orange computation based on previous indicators to estimate the overall quality of the signal on a scale from 1 (very poor) to 5 (very good). |
roaming |
Field provided if the message is transmitted by a foreign operator network |
operatorNetId : Unique identifier of the operator operatorName : Optional Name of the operator |
|
In most cases the network will pilot the device to automatically adapt the strength of the transmission depending on the radio conditions to keep the best compromise between quality and battery saving. This mechanism is called the Adaptative Data Rate (ADR). Actions who can improve bad communications would be:
|
LoRa® device battery infos
In some cases, LoRa® devices may publish their battery level if the device supports it, 2 ways are then possible :
-
Using the standard Lorawan mechanism: The device publishes the batterie level in a devStatusAns frame. This frame is published in response to a devStatusAns issued by the network. The lora core network on which Live Objects relies sends a devStatusAns only every week, and the battery level is added into the Live Objects data message (metadata.network.lora.batteryLevel) only if the next payload sent by the device is not empty. Otherwise the battery information is not retrieved by Live Objects.
{
"metadata": {
"source": "urn:lo:nsid:lora:4883C7DF3001114B",
"encoding": "siconia_temperature_humidity_pressure",
"group": {
"path": "/",
"id": "root"
},
"device": {
"location": {
"provider": "static",
"lon": 2.545599,
"lat": 48.82198
}
},
"network": {
"lora": {
"rssi": -110,
"esp": -111.76,
"ack": false,
"fcnt": 27517,
"devEUI": "20635F0108000C8D",
"frequency": 868.5,
"signalLevel": 5,
"gatewayCnt": 5,
"sf": 10,
"messageType": "UNCONFIRMED_DATA_UP",
"port": 10,
"snr": 3,
"batteryLevel": 53, --> The value is collected by network and enriched in the datamessage
"location": {
"provider": "lora",
"alt": 0,
"accuracy": 10000,
"lon": 2.526197,
"lat": 48.83361
},
"missingFcnt": 0
}
}
},
"streamId": "urn:lora:20635F0108000C8D!uplink",
"created": "2021-05-30T19:02:46.789Z",
"extra": {
"_outdoor_source_alt_lat_lon",
},
"location": {
"provider": "static",
"alt": null,
"accuracy": null,
"lon": 2.545599,
"lat": 48.82198
},
"model": "lora_v0",
"id": "60b3e15603b409370d2d2b10",
"value": {
"payload": "e17aae4133333942bc8b0100",
"temperature": 21.81,
"humidity": 46.3,
"pressure": 1013.08
},
"timestamp": "2021-05-30T19:02:46.161Z",
"tags": []
}
-
Passing the information into the payload itself (field value.payload of the Live Objects datamessage). In this case a decoder is necessary to extract the information from the hexadecimal sequence
{
"metadata": {
"source": "urn:lo:nsid:lora:4883C7DF3001114B",
"encoding": "siconia_temperature_humidity_pressure",
"group": {
"path": "/",
"id": "root"
},
"device": {
"location": {
"provider": "static",
"lon": 2.545599,
"lat": 48.82198
}
},
"network": {
"lora": {
"rssi": -110,
"esp": -111.76,
"ack": false,
"fcnt": 27517,
"devEUI": "20635F0108000C8D",
"frequency": 868.5,
"signalLevel": 5,
"gatewayCnt": 5,
"sf": 10,
"messageType": "UNCONFIRMED_DATA_UP",
"port": 10,
"snr": 3,
"location": {
"provider": "lora",
"alt": 0,
"accuracy": 10000,
"lon": 2.526197,
"lat": 48.83361
},
"missingFcnt": 0
}
}
},
"streamId": "urn:lora:20635F0108000C8D!uplink",
"created": "2021-05-30T19:02:46.789Z",
"extra": {
"_outdoor_source_alt_lat_lon",
},
"location": {
"provider": "static",
"alt": null,
"accuracy": null,
"lon": 2.545599,
"lat": 48.82198
},
"model": "lora_v0",
"id": "60b3e15603b409370d2d2b10",
"value": {
"payload": "e17aae4133333942bc8b0100",
"temperature": 21.81,
"humidity": 46.3,
"pressure": 1013.08
"CustomBatteryLevel": 52, --> The value is published by device in the payload and readable only after decoding
},
"timestamp": "2021-05-30T19:02:46.161Z",
"tags": []
}
MQTT output
payload sent by device :
{
"value" : {
"revmin":9992,
"CO2":683,
"doorOpen":false,
"hygrometry":45,
"temperature":139,
"pressure":1367
},
"location":{
"provider":"GPS",
"lon":2.30886,
"lat":48.81839
}
}
stored data :
{
"metadata": {
"connector": "mqtt",
"source":"urn:lo:nsid:mqtt:12345",
"transformation": {
"published": {
"location": {
"provider": "GPS",
"lon": 2.30886,
"lat": 48.81839
}
}
},
"group": {
"path": "/",
"id": "root"
},
"network": {
"mqtt": {
"clientId":"<my_mqtt_client_id>"
}
}
},
"streamId":"urn:lo:nsid:mqtt:12345",
"created": "2021-06-17T09:21:54.377Z",
"extra": {
"propertyDevice1":"12:1b:2e"
},
"location": {
"provider": "GPS",
"lon": 2.30886,
"lat": 48.81839
},
"id": "60cb14322b9f5a61388d3b3b",
"value": {
"revmin": 9992,
"CO2": 683,
"doorOpen": false,
"hygrometry": 45,
"temperature": 139,
"pressure": 1367
},
"timestamp": "2021-06-17T09:21:54.372Z",
"tags": []
}
binary payload sent by device :
2101120000011006
stored data after decoding :
{
"metadata": {
"connector": "mqtt",
"source": "urn:lo:nsid:mySensor:11",
"encoding": "decoder_microtracker_v1.0",
"device": {
"location": {
"provider": "static",
"alt": 12,
"lon": 164.7337728,
"lat": 80.8596736
}
},
"group": {
"path": "/Binary devices",
"id": "41Uo8K"
},
"network": {
"mqtt": {
"clientId": "urn:lo:nsid:mySensor:11"
}
}
},
"streamId": "urn:lo:nsid:mySensor:11",
"created": "2020-09-11T12:33:17.465Z",
"extra": {
"GPS : DOWN": "GEO_CELLULAR : DOWN"
},
"location": {
"provider": "static",
"alt": 12,
"accuracy": null,
"lon": 164.7337728,
"lat": 80.8596736
},
"model": "my_microtracker_v1",
"id": "5f5b6e8db112b210b85e4012",
"value": {
"messageType": "TRACKER_HEARTBEAT",
"payload": "32313031313230303030303131303036",
"battery": {
"energyLevel": 49,
"charging": false,
"unmeasurable": false
},
"trackerMode": "CLASSIC"
},
"timestamp": "2020-09-11T12:33:17.450Z",
"tags": []
}
| The binary payload sent by device will be generated as hexBinary type, see MQTT binary data push. |
SMS ouput
payload sent by device :
{<<my payload>>}
stored data :
{
"metadata": {
"connector": "sms",
"source": "urn:lo:nsid:sms:331010101",
"group": {
"path": "/",
"id": "root"
},
"network": {
"mobile": {
"serverPhoneNumber": "20406",
"msisdn": "331010101",
"contentType": "TEXT"
}
}
},
"streamId": "urn:lo:nsid:sms:331010101",
"created": "2019-08-27T12:29:27.655Z",
"extra": {},
"location": null,
"model": "sms_v0",
"id": "5d652227a1a7e80da8b4635e",
"value": {
"payload": "{<<my payload>>}"
},
"timestamp": "2019-08-27T12:29:22Z",
"tags": []
}
binary payload sent by device :
056096850001010500020700
stored data after decoding :
{
"metadata": {
"connector": "sms",
"source": "urn:lo:nsid:sms:mySensor",
"encoding": "my_decoder_tracker_v1.3",
"group": {
"path": "/binary_devices",
"id": "An4NOl"
},
"network": {
"mobile": {
"serverPhoneNumber": "20259",
"msisdn": "337000003040131",
"contentType": "BINARY"
}
}
},
"streamId": "urn:lo:nsid:sms:mySensorData",
"created": "2020-09-09T10:00:25.696Z",
"extra": {},
"location": null,
"model": "mySensor_v5",
"id": "5f58a7b9b112b277cb82d34d",
"value": {
"adt": "UNUSED",
"bleFirmwareVersion": "2.7.0",
"messageType": "HEARTBEAT",
"payload": "303536303936383530303031303130353030303230373030",
"temperature": {
"unit": "°C",
"value": 23.28
},
"ack": 0,
"deviceModel": "mySensor_v5",
"resetCause": "POWER-ON-RESET",
"battery": {
"unit": "V",
"valueFirmwarePrev15": 3.39,
"value": 3.62,
"inCharge": false
},
"firmwareVersion": "1.5.0",
"status": {
"onDemand": false,
"appState": "idle",
"userAlert": false,
"periodic": false,
"moving": false,
"appMode": "motionStartEndTrack"
}
},
"timestamp": "2020-09-09T10:00:21Z",
"tags": []
}
Bulk injection output
data push payload :
{
"revmin":9992,
"CO2":683,
"doorOpen":false,
"hygrometry":45,
"temperature":139,
"pressure":1367
}
stored data :
{
"metadata": {
"connector": "http"
},
"streamId": "urn:lo:nsid:sensor:2327398!measures",
"created": "2020-06-09T15:18:58.050Z",
"extra": null,
"location": null,
"model": "data_model_v1",
"id": "5edfa862682ee74e3e297595",
"value": {
"revmin": 9992,
"CO2": 683,
"doorOpen": false,
"hygrometry": 45,
"temperature": 139,
"pressure": 1367
},
"timestamp": "2020-06-09T15:18:58.033Z",
"tags": []
}
Alarm output
Depending on the type of alarm activated, Live Objects store a second output message which is an additional message that describes the rules that triggered the alarm.
For more information about the IoT device and data alarming service, read.
Matching rule output
To learn more about Simple event alarm see.
{
"tenantId": "String",
"timestamp": "String",
"firingRule": {
// The originating firing rule
},
"matchingContext": {
"tenantId": "(String) the id of the tenant",
"timestamp": "(String) iso-8601 timestamp of the originating matching event",
"matchingRule": {
// the originating matching rule
},
"data": {
// the data message that triggered the matching rule and the firing rule
}
}
}
Fired event object model description:
tenantId |
String the tenant that issued the fired event, |
timestamp |
iso-8601 formatted timestamp, representing the date of emission of the fired event, |
firingRule |
The firing rule that triggered the event, |
matchingContext.tenantId |
String the tenant that issued the upstream matching event, |
matchingContext.timestamp |
ISO-8601 timestamp of the upstream matching event, |
matchingContext.matchingRule |
The rule that triggered the upstream matching event, |
matchingContext.data |
The Data Message that triggered the event chain, |
State rule output
To learn more about State event alarm see.
{
"stateKey": "String",
"previousState": "String",
"newState": "String",
"timestamp": "ISO-8601 Date Strin"g,
"stateProcessingRuleId": "String",
"data": "xref:lo_manual/messages-model/adoc/stored_data_msg.adoc#DATANEWMODEL[Data Message]"
}
State event object model description:
stateKey |
The state key value, |
previousState |
Name of the previous state of the stateKey, |
newState |
Name the new state of the stateKey, |
timestamp |
ISO-8601 timestamp of the state change event, |
stateProcessingRuleId |
id of the rule that generated this state change event, |
data |
the Data Message that triggered the state change, |
Activity rule output
To learn more about Activity event alarm see.
{
"deviceId": "String",
"deviceAdditionalInfo": {
"deviceName": "String",
"groupPath": "String"
},
"activityRule": "ActivityRule",
"state": "String 'SILENT' or 'ACTIVE'",
"numberOfAlarmReminders": "Integer",
"timestamp": "ISO-8601 Date String"
}
Activity event object model description:
deviceId |
Id of the device triggering this activity event |
deviceAdditionalInfo |
Additional information on the device. Consists of the name of the device and the path of the group it belongs to. |
activityRule |
ActivityRule triggering this activity event |
state |
Current state of device, either 'SILENT' or 'ACTIVE' |
numberOfAlarmReminders |
The number of times a reminder has been sent for the current state. |
timestamp |
ISO-8601 timestamp of the state change event |