{"id":19994587,"url":"https://github.com/barnstee/ua-cloudpublisher","last_synced_at":"2025-05-04T13:31:26.898Z","repository":{"id":41130285,"uuid":"411567106","full_name":"barnstee/UA-CloudPublisher","owner":"barnstee","description":"A cross-platform OPC UA cloud publisher reference implementation leveraging OPC UA PubSub over MQTT or Kafka. It runs in a Docker container on standard Docker hosts or on Kubernetes and comes with an easy-to-use web user interface.","archived":false,"fork":false,"pushed_at":"2024-11-02T20:10:06.000Z","size":4583,"stargazers_count":37,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-02T20:22:20.907Z","etag":null,"topics":["iot","mqtt","opcua"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barnstee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-29T07:08:08.000Z","updated_at":"2024-11-02T20:10:10.000Z","dependencies_parsed_at":"2024-06-18T19:16:28.315Z","dependency_job_id":"d2bd7bae-6075-4abe-b1ec-4100c0d0bdf2","html_url":"https://github.com/barnstee/UA-CloudPublisher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnstee%2FUA-CloudPublisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnstee%2FUA-CloudPublisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnstee%2FUA-CloudPublisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnstee%2FUA-CloudPublisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barnstee","download_url":"https://codeload.github.com/barnstee/UA-CloudPublisher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224393744,"owners_count":17303717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","mqtt","opcua"],"created_at":"2024-11-13T04:56:45.097Z","updated_at":"2025-05-04T13:31:26.892Z","avatar_url":"https://github.com/barnstee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UA Cloud Publisher\n\nA cross-platform OPC UA cloud publisher reference implementation leveraging OPC UA PubSub over MQTT and Kafka. It runs in a container image on standard Docker hosts or on Kubernetes and comes with an easy-to-use web user interface.\n\n## Features\n\n- Cross-plattform - Runs natively on Windows and Linux\n- Runs inside a Docker container and on Kubernetes\n- UI for connecting to, browsing of, reading nodes from and publishing nodes from an OPC UA server\n- Generates a CSV file containing all OPC UA nodes from a connected server\n- Generates a `publishednodes.json` file containing all OPC UA variable nodes from a connected server\n- Uses OPC UA PubSub JSON encoding\n- Uses MQTT broker as publishing endpoint\n- Uses Kafka broker as publishing endpoint\n- Support for multiple Kafka brokers for publishing (one for UA data, one more UA metadata)\n- Support for subscribing to MQTT broker to read UA PubSub data and re-encode it, with metadata, as UA JSON to be published (the broker bridge design pattern)\n- Support for websockets transport with MQTT broker\n- Support for username/password authentication for Kafka broker\n- Support for username/password authentication for MQTT broker\n- Support for certificate authentication for MQTT broker\n- Support for sending OPC UA metadata to an alternative broker\n- Support for reverse connects from OPC UA servers\n- Support for subscriptions transfer when server connections are temporarily interrupted\n- OPC UA Variables publishing\n- OPC UA Alarms, Conditions \u0026 other events publishing\n- OPC UA Event filtering\n- OPC UA Complex Types publishing\n- OPC UA metadata messages publishing\n- OPC UA status messages publishing\n- Diagnostics info publishing\n- UI for displaying the list of publishes nodes\n- UI for displaying diagnostic information\n- UI for configuration\n- Publishing from the cloud via a broker\n- Publishing on data changes or on regular intervals\n- Supports `publishednodes.json` input file format\n- Support for storing configuration files locally\n- Support for Store \u0026 Forward during internet connection outages\n- Support for username and password authentication\n- Support for Intel/AMD `x64` and `arm64` architectures (Raspberry Pi4, etc.) with pre-built container images ready for use\n- Integration with [UA Edge Translator](https://github.com/barnstee/UA-EdgeTranslator)\n- Support for generating the Web of Things Thing Descriptions for UA Edge Translator automatically using ChatGPT\n- Support for issuing a new X509 certificate and trust list to connected OPC UA servers (GDS Server Push functionality)\n\n## Build Status\n\n[![Docker](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml)\n\n## Screenshots\n\n### Browser\n\n![Browser](screenshots/browser.png)\n\n### Published Nodes Management\n\n![Published Nodes Management](screenshots/publishednodesmanagement.png)\n\n### Diagnostics\n\n![Diagnostics](screenshots/diagnostics.png)\n\n### Configuration\n\n![Configuration](screenshots/configuration.png)\n\n### UA Edge Translator Integration\n\n![Configuration](screenshots/translator.png)\n\n## Usage\n\nDocker containers are automatically built and published. Simply run the UA Cloud Publisher on a Docker-enabled computer via:\n\n`docker run -itd -p 80:8080 ghcr.io/barnstee/ua-cloudpublisher:main`\n\nAnd then point your browser to \u003chttp://yourIPAddress\u003e.\n\nNote: We have also provided a [test environment](./TestEnvironment/readme.md) to get you started.\n\n### Persisting Logs, Settings, Published Nodes and OPC UA Certificates\n\nUA Cloud Publisher logs, settings, published nodes and OPC UA certificates can be persisted locally across Docker container restarts by running:\n\n`docker run -itd -v c:/publisher/logs:/app/logs -v c:/publisher/settings:/app/settings -v c:/publisher/pki:/app/pki -p 80:8080 ghcr.io/barnstee/ua-cloudpublisher:main`\n\nFor Linux hosts, remove the `c:` instances from the command above.\n\nAnd then point your browser to `http://yourIPAddress`.\n\n## Using the Alternative Broker\n\nUA Cloud Publisher contains a second broker client that can be used either to **send** OPC UA PubSub metadata via Kafka to a second broker **or** it can be used to **receive** OPC UA PubSub data via MQTT. However, both features together can't be used right now.\n\n## Optional Environment Variables\n\n- AZURE_OPENAI_API_ENDPOINT - the endpoint URL of the Azure OpenAI instance to use in the form https://[yourinstancename].openai.azure.com/\n- AZURE_OPENAI_API_KEY - the key to use\n- AZURE_OPENAI_API_DEPLOYMENT_NAME - the deployment to use\n- OPCUA_USERNAME - OPC UA server username to use when none is specified in publishednodes.json file\n- OPCUA_PASSWORD - OPC UA server password to use when none is specified in publishednodes.json file\n\n## PublishedNodes.json File Format\n\n(All intervals must be specified in milliseconds)\n\n```json\n[\n  {\n    \"EndpointUrl\": \"string\", // e.g. \"opc.tcp://opcua.example.com/\"\n    \"OpcNodes\": [\n      {\n        \"Id\": \"string\", // Expanded Node Id\n        \"OpcSamplingInterval\": 1000,\n        \"OpcPublishingInterval\": 1000,\n        \"HeartbeatInterval\": 0, // set to a value \u003e 0 if you want to publish static values on regular intervals\n        \"SkipFirst\": false\n      }\n    ],\n    \"OpcEvents\": [\n      {\n        \"ExpandedNodeId\": \"string\", // e.g. \"nsu=http://example.com/Instance/;i=56643\"\n        \"Filter\": [\n          {\n            \"OfType\": \"string\" // Expanded node ID of event type to filter by e.g. \"nsu=http://opcfoundation.org/UA/MachineTool/;i=39\"\n          }\n        ]\n      }\n    ],\n    \"OpcAuthenticationMode\": \"Anonymous\", // or \"UsernamePassword\"\n    \"UserName\": \"string\",\n    \"Password\": \"string\"\n  }\n]\n```\n\n## Sub-topics for Configuration from the Cloud\n\n### PublishNodes\n\nPayload:\n(All intervals must be specified in milliseconds)\n\n```json\n{\n  \"Command\": \"publishnodes\",\n  \"CorrelationId\": \"D892A987-56FB-4724-AF14-5EC6A7EBDD07\", // a GUID\n  \"TimeStamp\": \"2022-11-28T12:01:00.0923534Z\", // sender timestamp in UTC\n  \"EndpointUrl\": \"string\",\n  \"OpcNodes\": [\n    {\n      \"Id\": \"string\", // Expanded Node Id\n      \"OpcSamplingInterval\": 1000,\n      \"OpcPublishingInterval\": 1000,\n      \"HeartbeatInterval\": 0,\n      \"SkipFirst\": false\n    }\n  ],\n  \"OpcEvents\": [\n    {\n      \"ExpandedNodeId\": \"string\",\n      \"Filter\": [\n        {\n          \"OfType\": \"string\" // Expanded node ID of event type to filter by\n        }\n      ]\n    }\n  ],\n  \"OpcAuthenticationMode\": \"Anonymous\", // or \"UsernamePassword\"\n  \"UserName\": \"string\",\n  \"Password\": \"string\"\n}\n```\n\nResponse:\n\n```json\n{\n [\n  \"string\"\n ]\n}\n```\n\n### UnpublishNodes\n\nPayload:\n\n```json\n{\n  \"Command\": \"unpublishnodes\",\n  \"CorrelationId\": \"D892A987-56FB-4724-AF14-5EC6A7EBDD07\", // a GUID\n  \"TimeStamp\": \"2022-11-28T12:01:00.0923534Z\", // sender timestamp in UTC\n  \"EndpointUrl\": \"string\",\n  \"OpcNodes\": [\n    {\n      \"Id\": \"string\" // Expanded Node Id\n    }\n  ],\n  \"OpcEvents\": [\n    {\n      \"ExpandedNodeId\": \"string\"\n    }\n  ]\n}\n```\n\nResponse:\n\n```json\n{\n [\n  \"string\"\n ]\n}\n```\n\n### UnpublishAllNodes\n\nPayload:\n\n```json\n{\n  \"Command\": \"unpublishallnodes\",\n  \"CorrelationId\": \"D892A987-56FB-4724-AF14-5EC6A7EBDD07\", // a GUID\n  \"TimeStamp\": \"2022-11-28T12:01:00.0923534Z\" // sender timestamp in UTC\n}\n```\n\nResponse:\n\n```json\n{\n [\n  \"string\"\n ]\n}\n```\n\n### GetPublishedNodes\n\nPayload:\n\n```json\n{\n  \"Command\": \"getpublishednodes\",\n  \"CorrelationId\": \"D892A987-56FB-4724-AF14-5EC6A7EBDD07\", // a GUID\n  \"TimeStamp\": \"2022-11-28T12:01:00.0923534Z\" // sender timestamp in UTC\n}\n```\n\nResponse:\n(All intervals are in milliseconds)\n\n```json\n[\n  {\n    \"EndpointUrl\": \"string\",\n    \"OpcNodes\": [\n      {\n        \"Id\": \"string\", // Expanded Node Id\n        \"OpcSamplingInterval\": 1000,\n        \"OpcPublishingInterval\": 1000,\n        \"HeartbeatInterval\": 0,\n        \"SkipFirst\": false\n      }\n    ],\n    \"OpcEvents\": [\n      {\n        \"ExpandedNodeId\": \"string\",\n        \"Filter\": [\n          {\n            \"OfType\": \"string\"\n          }\n        ]\n      }\n    ],\n    \"OpcAuthenticationMode\": \"string\"\n  }\n]\n```\n\n### GetInfo\n\nPayload:\n\n```json\n{\n  \"Command\": \"getinfo\",\n  \"CorrelationId\": \"D892A987-56FB-4724-AF14-5EC6A7EBDD07\", // a GUID\n  \"TimeStamp\": \"2022-11-28T12:01:00.0923534Z\" // sender timestamp in UTC\n}\n```\n\nResponse:\n\n```json\n{\n  \"DiagnosticInfos\": [\n    {\n      \"PublisherStartTime\": \"2022-02-22T22:22:22.222Z\",\n      \"ConnectedToBroker\": false,\n      \"NumberOfOpcSessionsConnected\": 0,\n      \"NumberOfOpcSubscriptionsConnected\": 0,\n      \"NumberOfOpcMonitoredItemsMonitored\": 0,\n      \"MonitoredItemsQueueCount\": 0,\n      \"EnqueueCount\": 0,\n      \"EnqueueFailureCount\": 0,\n      \"NumberOfEvents\": 0,\n      \"MissedSendIntervalCount\": 0,\n      \"TooLargeCount\": 0,\n      \"SentBytes\": 0,\n      \"SentMessages\": 0,\n      \"SentLastTime\": \"2022-02-22T22:22:22.222Z\",\n      \"FailedMessages\": 0,\n      \"AverageMessageLatency\": 0,\n      \"AverageNotificationsInBrokerMessage\": 0\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarnstee%2Fua-cloudpublisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarnstee%2Fua-cloudpublisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarnstee%2Fua-cloudpublisher/lists"}