Skip to content

Commit

Permalink
feat: Describe setup and UA-Publisher use
Browse files Browse the repository at this point in the history
  • Loading branch information
GoetzGoerisch committed Jul 13, 2022
1 parent 4578b41 commit 43d763e
Show file tree
Hide file tree
Showing 3 changed files with 331 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PubSub.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ This page describe how to connect to the umati.app Dashboard by using PubSub ins

## Setup

The publisher could be implemented together with the OPC UA Server application on the same instance.
Additionally Gateways such as UA-Publisher or Azure OPC Publisher can be used to subscribe to the OPC UA Server and publish the information.
To connect with PubSub to the umati.app, the publisher could be implemented together with the OPC UA Server application on the same instance.
Additionally Gateways such as [UA-CloudPublisher](https://github.com/umati/UA-CloudPublisher) provided by Erich Barnstedt (@barnstee) or [OPC Pulisher (Microsoft Azure IoT)](https://github.com/Azure/Industrial-IoT#opc-publisher---standalone) can be used to subscribe to the OPC UA Server and publish the information.

OPC UA Server/Publisher -- MQTT/JSON --> MQTT Broker
`OPC UA Server/Publisher` -- MQTT/JSON --> `MQTT Broker`

OPC UA Server --TCO binary --> Gateway -- MQTT/JSON --> MQTT Broker
`OPC UA Server` -- TCP binary --> `Gateway` -- MQTT/JSON --> `MQTT Broker`

## MQTT Broker

Expand Down
80 changes: 80 additions & 0 deletions PubSub/UA-CloudPublisher/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# UA-CloudPublisher

The usage of the UA-Cloudpublisher is described [here](https://github.com/umati/UA-CloudPublisher).

For demonstration purpose we provide a sample [publishednodes.json](publishednodes.json) to show how to confiure for machine tool instance.

``` json
[
{
"EndpointUrl": "opc.tcp://opcua.umati.app:4843/UA", // replace according your endpoint
"OpcNodes": [
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55245", // replace with your concrete ExpandedNodeId
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
...

],
"OpcEvents": [],
"OpcAuthenticationMode": "Anonymous" // configuration see UA-CloudPublisher
}
]
```

## Data Example

``` json
{
"MessageId": "914",
"MessageType": "ua-data",
"PublisherId": "UACloudPublisher",
"Messages": [
{
"DataSetWriterId": 3383,
"Timestamp": "2022-07-11T10:48:02.9933409Z",
"Payload": {
"FeedOverride": {
"Type": 11,
"Body": 90
}
}
}
]
}
```

## Metadata Example

``` json
{
"MessageId": "782",
"MessageType": "ua-metadata",
"PublisherId": "UACloudPublisher",
"DataSetWriterId": 23389,
"MetaData": {
"Name": "urn:SampleServer;nsu=http://example.com/ShowcaseMachineTool/;i=55188",
"Fields": [
{
"Name": "CurrentState",
"FieldFlags": 0,
"BuiltInType": 21,
"DataType": {
"Id": 24
},
"ValueRank": -1,
"MaxStringLength": 0,
"DataSetFieldId": "f282a68f-7815-47f4-8f39-96ce3ea0d658"
}
],
"ConfigurationVersion": {
"MajorVersion": 1,
"MinorVersion": 1
}
}
}

```
247 changes: 247 additions & 0 deletions PubSub/UA-CloudPublisher/publishednodes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
[
{
"EndpointUrl": "opc.tcp://opcua.umati.app:4843/UA",
"OpcNodes": [
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55245",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55248",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55247",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55249",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55203",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55204",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55197",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55205",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55201",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55199",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55198",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55202",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55200",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55233",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55232",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55229",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55231",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55230",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55234",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55193",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55206",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55236",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55241",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55237",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55239",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55238",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55240",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55212",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55211",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55215",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55214",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55213",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55218",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
},
{
"Id": "nsu=http://example.com/ShowcaseMachineTool/;i=55217",
"OpcSamplingInterval": 500,
"OpcPublishingInterval": 1000,
"HeartbeatInterval": 0,
"SkipFirst": false
}
],
"OpcEvents": [],
"OpcAuthenticationMode": "Anonymous"
}
]

0 comments on commit 43d763e

Please sign in to comment.