Dashboard-OPCUA-Client
Dashboard-OPCUA-Client copied to clipboard
OPC UA gateway based on open62541 to subscribe to servers implementing umati endorsed companion specification and publish via MQTT to the broker for https://umati.app
umati Dashboard OPC UA Client
This is the OPC UA gateway specifically developed for the umati.app Dashboard.
The client subscribes to values from one or more machine instances on a single OPC UA server and then publishes them using MQTT in a JSON encoding format.
All instances are read based on OPC UA ObjectType-definitions.
Invalid instances (e.g., those missing mandatory nodes) are skipped.
To maintain uniform output via MQTT, additional nodes not specified are also ignored.
Features
Tested Companion Specifications
- Flatglass :waning_gibbous_moon:
- Textil Test Devices :waning_gibbous_moon:
- Geometrical Measuring Systems :heavy_check_mark:
- MachineTools :heavy_check_mark:
- PlasticsRubber :heavy_check_mark:
- WoodWorking :heavy_check_mark:
- Robotics :heavy_check_mark:
- Surface Technology :waning_gibbous_moon:
- Additive Manufacturing DRAFT :waning_gibbous_moon:
- MachineVision Part 2 Release Canidate :waning_gibbous_moon:
- IJT Tightening :waning_gibbous_moon:
Tested Features
- Typed Objects :heavy_check_mark:
- Objects with InterfaceType :heavy_check_mark:
- Custom DataType with TypeDictionary 1.04 :waning_gibbous_moon:
Upcoming Features
- Custom DataType based on DataTypeTypeDefinition
Usage
Installation and Configuration
The Dashboard-OPCUA-Client can be run either as a standalone application or as a container image.
To install and configure the client, please follow these instructions:
- Use as standalone
- Use as container
- Configure your client
You can use the client for instance testing or for connecting to the umati.app Dashboard.
Troubleshooting
see Troubleshooting
Usage for instance testing
Follow these instructions to use the client as a testing tool for your implementation: Model Testing usage
Local requirements
For the local instance testing you need to run your own MQTT Broker and a MQTT Client. See MQTT Doc for more information and instructions
Here is an docker-compose example including a mqtt broker, a umati Sample Server and the gateway. The example contains also the need configuration for the samples.
Usage for connecting a server to the dashboard
Follow these instructions to use the client for connecting your local OPC UA Server to the umati.app Dashboard: umati Dashboard Connection
Dependencies
- Easylogging
- JSON for Modern C++
- Eclipse Paho in C and C++
- tinyxml2
- Googletest
- Open62541
- Open62541Cpp
- Python
Build
This project uses cmake for building.
Ubuntu or Debian
The following packages are necessary for building:
- git
- build-essential
- gcc
- g++
- cmake
- python3
# Clone the repository and initialize the submodules
git clone [email protected]:umati/Dashboard-OPCUA-Client.git
cd Dashboard-OPCUA-Client
git submodule update --init --recursive
# Build the dependencies
cd .github
mkdir build
cd build
cmake ..
make
# Build the Dashboard OPC UA Client
cd ../..
mkdir build
cd build
cmake ..
make
# Adjust configuration regading your setup
cp configuration.json.example configuration.json
nano configuration.json
# Start the Dashboard OPC UA Client
./DashboardOpcUaClient
# Alternatively build everything in one go:
mkdir -p install
mkdir -p build
cd build
cmake ../.github/ -DCMAKE_INSTALL_PREFIX:PATH=<PATH/TO/>Dashboard-OPCUA-Client/install/ -DCMAKE_BUILD_TYPE=Debug
cmake --build .
Components
- ModelOpcUa An abstration for OPC UA Type Definitions and OPC UA Types (e.g. NodeId and BrowseName).
- DashboardClient Read available OPC UA types and check instances and prepare data for publishing. Defines Interfaces for the OPC UA client and the publisher.
- MachineObserver Looks for new machines and publishes a list of all online machines. Uses the interfaces defined by the DashboardClient.
- MqttPublisher Paho An implementation of a publisher for MQTT using Eclipse Paho.
- OpcUaClient Implementation of an OPC UA client for the Dashboard using open62541.
- Tests Some basic test, mainly for debugging past errors.
- Util General purpose code, e.g. Encoding of machine IDs.
License
Unless otherwise specified, source code in this repository is licensed under the Mozilla Public License v2.0 (MPLv2).