2 different types of messages are sent:
- DataProviderInfo
Contains basic information about a sensor such as manufacturer/name as well as its inputs or measured values.
This message is only sent the first time after activating the sensor, subsequently only the individual measured values are transmitted via "DataSteamValue" message. - DataStreamValue
Contains data about a current sensor value, whereby a value is sent in a message, i.e. a sensor generates one message per input per time interval.
DataProviderInfo
Contains basic information (master data) of the sensor. This includes the descriptions of the inputs including internal IDs. These are used for the current messages (DataStreamInfo Messages).
Example (air quality sensor)
- {
- "messageId": "aaaaaaaaaa-bbb-cccc-ddd-eeeeeeeeeeeeeeeeee",
- "header": {
- "message": "DataProviderInfo",
- "bodySchema": "DataProviderInfo-1.0.0",
- "trigger": {
- "type": "EVENT",
- "name": "DATA_PROVIDER_CREATED"
- },
- "createdAt": 1234567899000
- },
- "body": {
- "id": "01234567890abcdef01234567890abcd",
- "customKey": "",
- "title": "air quality sensor",
- "dataProviderStatus": {
- "status": "",
- "reason": "",
- "since": 0
- },
- "onlineStatus": {
- "status": "",
- "since": 0,
- "lastMessageAt": 0
- },
- "type": "LORA_NODE",
- "typeObject": {
- "lmId": "12345",
- "devEui": "01234567890abcde",
- "article": {
- "articleNumber": "",
- "name": "",
- "imageUrl": ""
- },
- "vendor": {
- "name": "",
- "articleNumber": ""
- },
- "location": ""
- },
- "supportedCommands": [],
- "supportedQueries": [],
- "supportedSystemStreams": [],
- "dataStreams": [
- {
- "id": "01234567890abcdef01234567890abc1",
- "title": "Signal Strength",
- "measurement": {
- "type": "",
- "unit": ""
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": ""
- },
- {
- "id": "01234567890abcdef01234567890abc2",
- "title": "Battery Level",
- "measurement": {
- "type": "",
- "unit": ""
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": "ANALOGUE"
- },
- {
- "id": "01234567890abcdef01234567890abc3",
- "title": "temperature",
- "measurement": {
- "type": "temperature",
- "unit": "centigrade"
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": "ANALOGUE"
- },
- {
- "id": "01234567890abcdef01234567890abc4",
- "title": "Online Status",
- "measurement": {
- "type": "",
- "unit": ""
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": "DIGITAL"
- },
- {
- "id": "01234567890abcdef01234567890abc5",
- "title": "CO2",
- "measurement": {
- "type": "air_quality",
- "unit": "ppm"
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": "ANALOGUE"
- },
- {
- "id": "01234567890abcdef01234567890abc6",
- "title": "humidification",
- "measurement": {
- "type": "humidity",
- "unit": "percent"
- },
- "range": {
- "min": 0,
- "max": 0
- },
- "type": "ANALOGUE"
- }
- ]
- }
- }
Scheme
The description of the scheme in the form of aJSONSchemacan also be found in the attached files underDataStreamValue-1.0.0.schema.json
messageId
string | Unique message ID (UUID) |
header
{ } | message
string | Scheme Name
Possible values:DataProviderInfo | bodySchema
string | Schema Name/Version
Possible values:DataProviderInfo-1.0.0 | trigger
{ } | type
string | Trigger Type (dzt. only 'EVENT')
Possible values:Events | name
string | Trigger Type (dzt. only 'DATA_PROVIDER_CREATED' (sensor created)
Possible values:Data_provider_created |
| createdAt
number | Timestamp of the sensor system (Unix Timestamp in ms) |
|
body
{ } | id
string | Unique ID of the message | customKey
string | Sensor self-assigned ID | title
string | Sensor name | dataProviderStatus
{ } | status
string | Not yet implemented | reason
string | Not yet implemented | since
number | Not yet implemented |
| online status
{ } | status
string | Not yet implemented | since
number | Not yet implemented | lastMessageAt
number | Not yet implemented |
| type
string | Type of sensor
Possible values:Lora_node | typeObject
{ } | lmId
string | linemetrics sensor ID | devEui
string | Unique sensor ID awarded by the manufacturer | article
{ } | articleNumber
| Not yet implemented | name
| Not yet implemented | imageUrl
| Not yet implemented |
| vendor
{ } | name
| Not yet implemented | articleNumber
| Not yet implemented |
| location
string | Not yet implemented |
| supportedCommands
| Not yet implemented | supportedQueries
| Not yet implemented | supportedSystemStreams
| Not yet implemented | dataStreams
[ { } ] | id
string | Unique ID of sensor value | title
string | Unique name of sensor value | measurement
{ } | type
string | Type of sensor value (e.g. temperature) | unit
string | Unit of sensor value (e.g. centigrade) |
| range
{ } | min
number | Not yet implemented | max
number | Not yet implemented |
| type
string | Type of sensor value
Possible values:Analogue, digital |
|
|
DataStreamValue
Example (air quality sensor)
- {
- "messageId": "aaaaaaaaaa-bbb-cccc-ddd-eeeeeeeeeeeeeeeeee",
- "header": {
- "message": "DataStreamValue",
- "bodySchema": "DataStreamValue-1.0.0",
- "trigger": {
- "type": "EVENT",
- "name": "SENSOR_DATA_SENT"
- },
- "createdAt": 1234567899000
- },
- "body": {
- "id": "01234567890abcdef01234567890abcd",
- "dataProviderId": "01234567890abcdef01234567890abcd",
- "timestamp": 1234567899000,
- "value": {
- "val": 123
- },
- "type": "RAW"
- }
- }
Scheme
The description of the scheme in the form of aJSONSchemacan also be found in the attached files underDataStreamValue-1.0.0.schema.json
messageId
string | Unique message ID (UUID v4) |
header
{ } | message
string | Scheme Name
Possible values:DataStreamValue | bodySchema
string | Schema Name/Version
Possible values:DataStreamValue-1.0.0 | trigger
{ } | type
string | Trigger Type (dzt. only 'EVENT')
Possible values:Events | name
string | Trigger Type (dzt. only 'SENSOR_DATA_SENT' (sensor data sent)
Possible values:Sensor_data_sent |
| createdAt
number | Message creation timestamp (Unix timestamp in milliseconds) |
|
body
{ } | id
string | Stream ID | dataProviderId
string | Dataprovider (sensor) ID | timestamp
number | Time stamp of recording the value (Unix timestamp in milliseconds) | value
{ } | valves
number | Sensor value | rssi
number optional | Signal Strength/RSSI (Only for 'Signal Strength' Streams) | snr
number optional | Signal/Noise Ratio (SNR) |
| type
string | Type of value (currently only 'RAW')
Possible values:Raw |
|