diff --git a/PubSub.md b/PubSub.md index 9615196..6d1c3c0 100644 --- a/PubSub.md +++ b/PubSub.md @@ -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 diff --git a/PubSub/UA-CloudPublisher/Readme.md b/PubSub/UA-CloudPublisher/Readme.md new file mode 100644 index 0000000..064ac2a --- /dev/null +++ b/PubSub/UA-CloudPublisher/Readme.md @@ -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 + } + } +} + +``` diff --git a/PubSub/UA-CloudPublisher/publishednodes.json b/PubSub/UA-CloudPublisher/publishednodes.json new file mode 100644 index 0000000..a68dd7f --- /dev/null +++ b/PubSub/UA-CloudPublisher/publishednodes.json @@ -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" + } +] \ No newline at end of file