plantpulse-plugin (工业标准插件)
角色
工业标准协议集成插件。使外部系统/设备能够通过工业标准接口访问 PlantPulse 的数据。
| 项目 | 值 |
|---|---|
| 模块名 | plantpulse-plugin |
| 安装路径 | /opt/kopens/plantpulse-platform/plantpulse-plugin/ |
| OPC-UA 端口 | 11004 (TCP)、11005 (TLS) |
| AAS V2 端口 | 8007 |
| AAS V3 端口 | 8090 |
架构
目录结构
plantpulse-plugin/
├── opc-ua/ # OPC-UA 서버
│ ├── bin/start.sh stop.sh log-viewer.sh
│ ├── config/
│ │ ├── server.properties
│ │ └── address-space.xml
│ ├── lib/
│ └── logs/system.log
└── aasx-server/ # AAS (Asset Administration Shell)
├── bin/
├── config/
│ ├── BaSyx-V2.cfg
│ └── BaSyx-V3.cfg
├── lib/
└── logs/
OPC-UA Server (端口 11004)
将 PlantPulse 的标签/资产数据以 OPC-UA 标准向外部系统公开。
核心配置
# opc-ua/config/server.properties
opcua.server.port=${PP_OPCUA_TCP_PORT}
opcua.server.tls.port=${PP_OPCUA_TLS_PORT}
opcua.server.app.uri=${PP_TLS_OPCUA_APP_URI}
opcua.server.product.name=PlantPulse OPC-UA Server
opcua.security.policy=Basic256Sha256,None
opcua.security.user.token=Username,Anonymous
opcua.user=opcua
opcua.password=설치-시-변경
opcua.cassandra.host=${PP_CASSANDRA_HOST}
opcua.cassandra.keyspace=${PP_KEYSPACE}
客户端连接
OPC-UA 端点 URL:
opc.tcp://[HOST]:11004(None)opc.tcp://[HOST]:11005(Basic256Sha256, TLS)
已验证的 OPC-UA 客户端:
- UaExpert (Unified Automation)
- Prosys OPC UA Browser
- Node-RED
node-red-contrib-opcua
标准健康检查
内置的 Browse UI HTTP 服务器提供 GET /api/health(端口通过 opc.ua.browser.ui.port 配置,默认 12780):
curl -fsS http://127.0.0.1:12780/api/health
# → {"status":"UP","service":"plantpulse-plugin-opcua-server","ts":...}
AAS Server (资产管理壳)
ISO 23252 / IEC 63278 标准的数字孪生接口。在 Industrie 4.0 中以标准化的壳向外公开资产数据。
| 版本 | 端口 | 标准 |
|---|---|---|
| V2 (BaSyx) | 8007 | Plattform Industrie 4.0 V2 |
| V3 (BaSyx) | 8090 | IEC 63278 V3 |
API 端点
# V2
curl http://[HOST]:8007/registry/api/v1/registry
# V3
curl http://[HOST]:8090/api/v3.0/shells
# V3 표준 헬스체크 (익명, 순수 liveness)
curl http://[HOST]:8090/api/health
# → {"status":"UP","service":"plantpulse-plugin-aasx-server","ts":...}
运维命令
cd /opt/kopens/plantpulse-platform/plantpulse-datalake-cli/bin
./restart-plugin.sh # 플러그인 전체 재시작
./restart-opcua-server.sh # OPC-UA 만 재시작
./restart-aasx-server.sh # AAS 만 재시작
./status.sh # 11004 / 8007 / 8090 RUNNING 확인
常见问题
| 症状 | 原因 | 处理方法 |
|---|---|---|
| OPC-UA 客户端连接失败 | 防火墙/证书 | 检查 11004 端口 + prepare-ssl.sh 中的 OPC-UA app URI |
| OPC-UA "Bad Certificate" | 自签名证书不受信任 | 在客户端中从 rejected/ 转到 trusted/ |
| AAS 数据未更新 | 元数据缓存 | 重启或刷新 AAS Registry |