Open Edge Device Kit – Data Upload¶
This section describes the topics related to devices uploading time series data into {{ whitelabel.IOTtoolName }}. Modules running on the devices must publish the messages for data upload and subscribe to the topic for stopping the upload. The Open Edge Device Kit subscribes to the data upload topics and publishes messages for stopping the data upload.
Time Series Upload¶
Topic | runtime/inject/data/timeseries/{protocol_name}/{dataSourceName} |
---|---|
Description | Publishes time series data for upload into {{ whitelabel.IOTtoolName }}. The protocol and data source ID must be specified in the path, e.g. runtime/inject/data/timeseries/MODBUS/34abxcvh-3fd . The body is provided in JSON format. |
Quality of Service | 2 |
Retained | FALSE |
Sample Body:
[
{
"timestamp": "2018-05-21T15:47:17.873Z",
"values": [
{
"dataPointId": "122",
"value": 3333,
"qualityCode": 0
}
]
},
{
"timestamp": "2018-05-21T15:47:18.873Z",
"values": [
{
"dataPointId": "222",
"value": 3333,
"qualityCode": 0
},
{
"dataPointId": "223",
"value": 55,
"qualityCode": 0
}
]
}
]
Caching Data¶
The Open Edge Device Kit provides a caching mechanism for time series data upload to prevent data loss. The received time series data is encrypted and cached on local file system, if the MindConnect Exchange endpoint is not reachable. The stored data is uploaded when the endpoint is reachable again.
Attention
The cache size is limited and incoming data will start to overwrite the old cached data after a while. The cache size can be adjusted using the parameter offlineCache
> size
in the settings file.
Upload Diagnostics¶
Topic | runtime/inject/diag/timeseries/{protocol_name}/{dataSourceName} |
---|---|
Description | Reports data point status and data source status while reading time series data. The protocol and data source ID must be specified in the path. The body is provided in JSON format. Quality codes indicating problems should be negative. |
Quality of Service | 2 |
Retained | FALSE |
Sample Body:
[
{
"dataPointId": "321654351321",
"message": "Bad Item Address",
"qualityCode": -1343
}
]
For sending the connectivity status of the data source, omit the field dataPointId
as shown below:
[
{
"message": "Connection successful",
"qualityCode": 0
}
]
[
{
"message": "Connection failed",
"qualityCode": -13
}
]
Note
This message affects the LED status on BoxManager. Only send it when data source or data point cannot be reached.
File Upload¶
Topic | runtime/upload/file |
---|---|
Description | Publishes file path for upload the file into {{ whitelabel.IOTtoolName }}. |
Quality of Service | 2 |
Retained | FALSE |
Sample Body:
{
"path":"/persistent_massdata/somefile.txt"
}
Event Upload¶
Topic | runtime/inject/event |
---|---|
Description | Publishes event for upload the event into {{ whitelabel.IOTtoolName }}. |
Quality of Service | 2 |
Retained | FALSE |
Sample Body:
{
"severity":"2",
"type":"OEDKEvent",
"version":"1.0",
"details":{
"message":"Event message.",
"value":"Event value."
}
}
Stopping Data Upload¶
Topic | runtime/data/timeseries/stop/{{protocol_name}/{dataSourceName} |
---|---|
Description | Control messages sent by the Open Edge Device Kit. The module running on the device must stop publishing data from the specified data source, when it receives this message. |
Quality of Service | 2 |
Retained | FALSE |
Sample Body: empty body
Except where otherwise noted, content on this site is licensed under the Development License Agreement.