Skip to content

Open Edge Device Kit – Data Upload

This section describes the topics related to devices uploading time series data into MindSphere. 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}/{data_source_id}
Description Publishes time series data for upload into MindSphere. The protocol and data source ID must be specified in the path, e.g.: runtime/inject/data/timeseries/MODBUS/freezer12/34abxcvh-3fd. The body is provided in JSON format.
Quality of Service 2
Retained FALSE

Sample Body:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[
  {
    "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}/{data_source_id}
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:

1
2
3
4
5
6
7
[
  {
    "dataPointId": "321654351321",
      "message": "Bad Item Address",
      "qualityCode": -1343
  }
]

For sending the connectivity status of the data source, omit the field dataPointId as shown below:

1
2
3
4
5
6
[
  {
      "message": "Connection successful",
      "qualityCode": 0
  }
]
1
2
3
4
5
6
[
  {
      "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.

Stopping Data Upload

Topic runtime/data/timeseries/stop/{protocol}/{data_source_id}
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

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.