fix in readme

This commit is contained in:
Wolfgang Hottgenroth
2022-02-22 17:19:21 +01:00
parent 578023fbd4
commit 813470fd03

View File

@ -11,35 +11,33 @@
## Configuration ## Configuration
`` {
{ "mqtt": {
"mqtt": { "broker": "172.16.2.16",
"broker": "172.16.2.16", "port": 1883,
"port": 1883, "publishTopicPrefix": "opcua"
"publishTopicPrefix": "opcua" },
}, "stats": {
"stats": { "topic": "statistics",
"topic": "statistics", "period": 60
"period": 60 },
}, "opcua": [
"opcua": [ {
{ "enabled": "true",
"enabled": "true", "type": "flat",
"type": "flat", "url": "opc.tcp://172.16.3.60:4840",
"url": "opc.tcp://172.16.3.60:4840", "name": "apl",
"name": "apl", "period": 1.0,
"period": 1.0, "timeout": 1.0,
"timeout": 1.0, "nodes": [
"nodes": [ { "ns": 0, "n": "i=345", "d": "pv" },
{ "ns": 0, "n": "i=345", "d": "pv" }, { "ns": 0, "n": "i=348", "d": "sv" },
{ "ns": 0, "n": "i=348", "d": "sv" }, { "ns": 0, "n": "i=351", "d": "tv" },
{ "ns": 0, "n": "i=351", "d": "tv" }, { "ns": 0, "n": "i=354", "d": "qv" }
{ "ns": 0, "n": "i=354", "d": "qv" } ]
] }
} ]
] }
}
``
The configuration object consists of three parts: `mqtt`, `stats` and `opcua`. The configuration object consists of three parts: `mqtt`, `stats` and `opcua`.
@ -57,25 +55,21 @@ In `flat` mode the final topic will be `${mqtt.publicTopicPrefix}/${opcua.name}/
An example for the MQTT messages according to the above configuration in `flat` mode is: An example for the MQTT messages according to the above configuration in `flat` mode is:
`` opcua/apl/0/pv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "pv", "value": 19.849281311035156}
opcua/apl/0/pv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "pv", "value": 19.849281311035156} opcua/apl/0/sv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "sv", "value": 1688.5152587890625}
opcua/apl/0/sv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "sv", "value": 1688.5152587890625} opcua/apl/0/tv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "tv", "value": 22.574615478515625}
opcua/apl/0/tv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "tv", "value": 22.574615478515625} opcua/apl/0/qv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "qv", "value": NaN}
opcua/apl/0/qv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "qv", "value": NaN} opcua/apl/0/pv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "pv", "value": 19.849281311035156}
opcua/apl/0/pv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "pv", "value": 19.849281311035156} opcua/apl/0/sv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "sv", "value": 1688.5152587890625}
opcua/apl/0/sv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "sv", "value": 1688.5152587890625} opcua/apl/0/tv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "tv", "value": 22.574615478515625}
opcua/apl/0/tv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "tv", "value": 22.574615478515625} opcua/apl/0/qv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "qv", "value": NaN}
opcua/apl/0/qv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "qv", "value": NaN}
``
In `structured` mode the final topic will be `${mqtt.publicTopicPrefix}/${opcua.name}` In `structured` mode the final topic will be `${mqtt.publicTopicPrefix}/${opcua.name}`
An example for the MQTT messages according to the above configuration in `flat` mode is: An example for the MQTT messages according to the above configuration in `flat` mode is:
`` opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN}
opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN} opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN}
opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN} opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN}
opcua/apl {"pv": 19.844480514526367, "sv": 1689.9193115234375, "tv": 22.68524169921875, "qv": NaN} opcua/apl {"pv": 19.844480514526367, "sv": 1689.93701171875, "tv": 22.620391845703125, "qv": NaN}
opcua/apl {"pv": 19.844480514526367, "sv": 1689.93701171875, "tv": 22.620391845703125, "qv": NaN}
``