The MindConnect OPC UA PubSub API provides messaging operations for device agents to define their asset or event models and to upload data accordingly stored as either asset timeseries data or events.
The communication protocol is based on the OPC UA PubSub Spec Part 14 Release 1.04. Additional restrictions are described in the message schemas of this API spec. For the full message schemas refer to the mentioned OPC UA PubSub standard documentation.
The asset model as well as event model is defined using the same OPC UA PubSub message types. The uploading of timeseries data according to the asset model and the creation of event instances also is based on the same OPC UA PubSub message types. The concrete conversion to either asset and timeseries data or to event types and instances is chosen by the client by publishing to the corresponding message topics. The mappings from OPC UA PubSub message to MindSphere data model are described in the accompanying documents of this service in the MindSphere Developer Documentation. Note that, in order to upload timeseries data first a corresponding asset model must be defined. Similarly, to upload event data first a corresponding event model must be defined.
The API currently works with:
Limitations:
Please see the MindConnect OPC UA PubSub section in the MindSphere Developer Documentation page to get more details.
MQTT Broker which offers below described topics. Detailed information on the MindSphere MQTT Broker can be found in the page Connecting to OPC UA PubSub Service via MQTT, part of the "APIs & Services / OPC UA PubSub Service" section of the MindSphere Developer Documentation.
Defines in which area it works.
Define asset model, based on OPC UA PubSub MetaDataMessage.
See the MindSphere Developer Documentation overview page for this API to get more details.
Accepts the following message:
Metadata of Timeseries Messages
Contains data model of publisher as OPC UA PubSub NetworkMessage specified as MetaDataMessage. The following OPC UA Message types have to be used:
This message can be used to either create a MindSphere asset model or to create a MindSphere event model, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
{
"payload": {
"messages": {
"discoveryResponseMessage": {
"metaData": {
"fields": [
{
"dataType": {}
}
],
"structureDataTypes": [
{
"structureDefinition": {
"baseDataType": {},
"fields": [
{
"dataType": {}
}
]
}
}
]
}
}
}
}
}
{
"networkMessageHeader": {
"publisherId": "PublisherId-123"
}
}
Upload timeseries data according to defined asset model, based on OPC UA PubSub DataSetMessage.
See the MindSphere Developer Documentation overview page for this API to get more details.
Accepts the following message:
Data of Timeseries Messages
Upload data values as OPC UA PubSub NetworkMessage specified as DataSetMessage. The following OPC UA Message types have to be used:
The provided data values are either stored as timeseries data or as event instances, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
{
"payload": {
"messages": {
"dataSetMessageHeader": {
"timestamp": {}
},
"dataSetMessage": []
}
}
}
{
"networkMessageHeader": {
"publisherId": "PublisherId-123"
}
}
Define event model, based on OPC UA PubSub MetaDataMessage.
See the MindSphere Developer Documentation overview page for this API to get more details.
Accepts the following message:
Metadata of Event Messages
Contains data model of publisher as OPC UA PubSub NetworkMessage specified as MetaDataMessage. The following OPC UA Message types have to be used:
This message can be used to either create a MindSphere asset model or to create a MindSphere event model, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
{
"payload": {
"messages": {
"discoveryResponseMessage": {
"metaData": {
"fields": [
{
"dataType": {}
}
],
"structureDataTypes": [
{
"structureDefinition": {
"baseDataType": {},
"fields": [
{
"dataType": {}
}
]
}
}
]
}
}
}
}
}
{
"networkMessageHeader": {
"publisherId": "PublisherId-123"
}
}
Upload event data according to defined event model, based on OPC UA PubSub DataSetMessage.
See the MindSphere Developer Documentation overview page for this API to get more details.
Accepts the following message:
Event Operations
Upload data values as OPC UA PubSub NetworkMessage specified as DataSetMessage. The following OPC UA Message types have to be used:
The provided data values are either stored as timeseries data or as event instances, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
{
"payload": {
"messages": {
"dataSetMessageHeader": {
"timestamp": {}
},
"dataSetMessage": []
}
}
}
{
"networkMessageHeader": {
"publisherId": "PublisherId-123"
}
}
Contains data model of publisher as OPC UA PubSub NetworkMessage specified as MetaDataMessage. The following OPC UA Message types have to be used:
This message can be used to either create a MindSphere asset model or to create a MindSphere event model, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
Upload data values as OPC UA PubSub NetworkMessage specified as DataSetMessage. The following OPC UA Message types have to be used:
The provided data values are either stored as timeseries data or as event instances, depending on the operation used.
The message schemas only describe differences to the original OPC UA PubSub specification. The full schema is defined in the OPC UA PubSub specification.
Fields of NetworkMessageHeaders need to be align with the spec.