Application Data model
Data Model
Your application can be configured with a specific data model. This model will format your device information as expected by the Application Server.
Only 1 model can be applied per application server!
Here is below a non exhaustive list of data model available. Data models can be integrated/modified upon request to Wi6labs.
Smart Essential
The Smart Format allows you to get decoding output with the same formatting of measure regardless of the device manufacturer.
JSON Field | Description | Format |
---|---|---|
device_id | unique identifier of a device in Wiotys | integer |
deveui | unique identifier of a LoRaWAN device | 16 hexadecimal |
datetime | date and time of the information reception, it may not be real time | ISO 801 |
timestamp | timestamp of the information reception (from the gateway’s time) in UTC | timestamp |
payload_deciphered | payload data | hexadecimal data 0 to 104 character |
data | decoded data | Smart formating |
customElement | custom information field for the sensor | table |
Example :
{
"device_id": "1234",
"deveui": "0123456789ABCDEF",
"device_name": "MyDevice",
"datetime": "2020-10-04T11:37:56+00:00",
"timestamp": "1601811476",
"payload_deciphered": "7238837C4A8014",
"data": {
"columns": [
"type",
"ref",
"value"
],
"values": [
[
"Measure",
"Multi_Fluid|0|ICO2",
1120
],
[
"Measure",
"Multi_Fluid|0|IInstTemperature",
25.2
],
[
"Measure",
"Multi_Fluid|0|IHumidity",
68
]
]
},
"customElement": [
{
"name": "MyDeviceCustomValue",
"value": 35
}
],
"lorawan": {
"type": "uplink_unconfirmed",
"devaddr": "01234567",
"adr": "1",
"fcnt": 45613,
"fport": 2
},
"lora": {
"freq": 868.5,
"sf": 12,
"rssi": -58,
"snr": 8.1999998092651,
"esp": null
},
"gateway": {
"best": "7076FF0056050190",
"count": "unsupported"
}
}
Wi6labs extended
This is the format to get complete information of your devices with default decoded information and network statistics. For compatibility, this format is identical to the WiotysV4 format.
JSON Field | Description | Format |
---|---|---|
id | unique identifier of a device in Wiotys | integer |
deveui | unique identifier of a LoRa device | 16 hexadecimal |
timestamp | date and time of the information reception, local time (Europe/Paris) | Date-time RFC3339 |
payload_ciphered | payload encrypted by LoRaWAN protocol |
|
payload_deciphered | Device applicative payload | hexadecimal data 0 to 104 character |
data | decoded information | Default decoding. Format is depending of the device, configuration and codec selected |
lorawan | LoRaWAN detailed information |
|
lora | radio parameters of the frame |
|
gateway | Gateway ID with the best SNR and Number of gateway which seen the uplink |
|
gps | GPS coordinates | decimal degrees (geodetic system WGS 84) |
Example :
{
"id": "1453",
"deveui": "0123456789abcdef",
"timestamp": "2022-02-10T09:28:48+01:00",
"payload_ciphered": "4d0335affdec9e0ecf90ccbb188e9543",
"payload_deciphered": "4d4bf83bf203e101fd00d201ff00bdff",
"data": {
"battery": 75,
"humidity": 59,
"pressure": 1010,
"CO2_moy": 481,
"CO2_max": 466,
"temperature_moy": 25.3,
"temperature_max": 25.5,
"signal_quality": -67
}
"lorawan": {
"type": "unconfirmed_data_up", /* unconfirmed_data_up, confirmed_data_up */
"devaddr": "abcdef01", /* Device address on the network */
"adr": true, /* If set to true, the sensor authorizes network to set its data rate. */
"fcnt": 1234, /* Uplink frame counter */
"port": 1 /* LoRaWAN port */
},
"lora": {
"freq": 868.5, /* RX central frequency in MHz */
"data_rate": "SF7BW125", /* LoRa datarate identifier */
"rssi": -52, /* RSSI in dBm (1 dB precision) */
"lsnr": -1.5 /* LoRa SNR ratio in dB (0.1 dB precision) */
},
"gateway": {
"best": "ABCDEF0123456789",
"number": 1234
},
"gps": {
"lat": 48.6,
"lng": -1.6
}
}
WiotysV4 Legacy Deprecated
This format is not complete and will not be supported. It is only available to help some WiotysV4 migration.
JSON Field | Description | Format |
---|---|---|
DevAddr | Device address on the network | hexadecimal |
sensorInstallId | unique identifier of a LoRa device | 16 hexadecimal |
fcnt | Uplink frame counter | int |
data | decoded information | Format is depending of the device, configuration and codec selected |
rxpk.rssi | RSSI in dBm (1 dB precision) | int |
frame | payload | hexadecimal |
timestamp | timestamp of the information reception in UTC | timestamp |
This is the basic format to get essential information of your devices with default decoded information.
Example :
{
"DevAddr" : "0f034a6f",
"sensorInstallId" : "0123456789ABCDEF",
"fcnt" : 152,
"data" : {
"EndPoint" : 0,
"Report" : "Standard",
"CommandID" : "ReportAttributes",
"ClusterID" : "Temperature",
"AttributeID" : "MeasuredValue",
"AttributeType" : "Int16",
"Data" : 1879,
"Cause" : []
},
"rxpk" : {
"rssi": -58,
"freq": 868.5,
"datr": "SF12BW125",
"lsnr": 8.1999998092651
},
"frame" : "110a04020000290757",
"timestamp" : 1656408127,
"DevEUI" : "78d800b023926793"
}
Advanced Models
The advanced models are to be used only in specific use case. They are not be available from Wiotys Web Interface. Please contact Wi6labs support for more information about Advanced Models