
Basic Components of Connectware
From service commissioning files to connected systems.
Service Commissioning Files
# Cybus Connectware Service Commissioning File
description: OPC UA → MQTT with a tiny dashboard
metadata:
name: OPC UA to MQTT w/ Dashboard
version: '1.0.0'
resources:
opcuaConnection:
type: Cybus::Connection
properties:
protocol: Opcua
connection:
host: 192.168.0.10
port: 4840
options:
securityPolicy: None
# optional tuning (see docs)
connectionStrategy:
maxRetry: 100
initialDelay: 1000
serverStatus:
type: Cybus::Endpoint
properties:
protocol: Opcua
connection: !ref opcuaConnection
subscribe:
# Example node on many OPC UA servers; adjust to your model
nodeId: 'ns=0;i=2256'
machineRunState:
type: Cybus::Endpoint
properties:
protocol: Opcua
connection: !ref opcuaConnection
subscribe:
nodeId: 'ns=2;s=Machine/RunState'
opcuaToMqtt:
type: Cybus::Mapping
properties:
mappings:
- subscribe:
endpoint: !ref serverStatus
publish:
topic: factory/machine1/serverStatus
rules:
- burst:
interval: 1000 # ms
- subscribe:
endpoint: !ref machineRunState
publish:
topic: factory/machine1/runState
webContent:
type: Cybus::Volume
properties: {}
indexHtml:
type: Cybus::File
properties:
volume: !ref webContent
filepath: /usr/share/nginx/html/index.html
content: |
<!doctype html>
<html>
<head><meta charset="utf-8"><title>Machine KPI</title></head>
<body>
<h1>Machine KPI</h1>
<p>Status and run state via MQTT topics:</p>
<ul>
<li>factory/machine1/serverStatus</li>
<li>factory/machine1/runState</li>
</ul>
</body>
</html>
dashboard:
type: Cybus::Container
properties:
image: nginx:alpine
volumes:
- !sub webContent:/usr/share/nginx/html
dashboardRoute:
type: Cybus::IngressRoute
properties:
container: !ref dashboard
type: http
slug: kpi
# For raw TCP services, use type: tcp and the port fields
# containerPort: 80
# connectwarePort: 18080
dashboardLink:
type: Cybus::Link
properties:
name: Machine KPI Dashboard
ingressRoute: !ref dashboardRoute
href: '' # relative to the ingress route; empty = container rootServices
Resources
Connections & Endpoints
Endpoints
Mappings
Volumes
Files
Containers
Ingress Routes
Links
Agents
MQTT
Last updated
Was this helpful?

