extended output and readme

This commit is contained in:
Wolfgang Hottgenroth
2022-02-22 18:07:21 +01:00
parent 9ce5395547
commit da6574632c
6 changed files with 110 additions and 29 deletions

View File

@ -54,26 +54,88 @@ The attribute `nodes` finally contains the list of variables to be queried. It c
## Example Output
Besides the value itself the output contains the status of the value and a couple of timestamps (from device `t1`, server `t2` and bridge `t3`).
In `flat` mode the final topic will be `${mqtt.publicTopicPrefix}/${opcua.name}/${opcua.node.ns}/${opcua.node.d}`
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/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/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/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/qv {"serverName": "apl", "nameSpaceIndex": 0, "variableName": "qv", "value": NaN}
opcua/apl/0/pv {
"server": "apl",
"ns": 0,
"d": "pv",
"value": 19.833280563354492,
"status": "Good",
"t1": "2022-02-22 17:03:41.189000",
"t2": "2022-02-22 17:03:41.189000",
"t3": "2022-02-22 17:03:41.575504"
}
opcua/apl/0/sv {
"server": "apl",
"ns": 0,
"d": "sv",
"value": 1706.15771484375,
"status": "Good",
"t1": "2022-02-22 17:03:41.189000",
"t2": "2022-02-22 17:03:41.189000",
"t3": "2022-02-22 17:03:41.625721"
}
opcua/apl/0/tv {
"server": "apl",
"ns": 0,
"d": "tv",
"value": 23.29559326171875,
"status": "Good",
"t1": "2022-02-22 17:03:41.189000",
"t2": "2022-02-22 17:03:41.189000",
"t3": "2022-02-22 17:03:41.675352"
}
opcua/apl/0/qv {
"server": "apl",
"ns": 0,
"d": "qv",
"value": NaN,
"status": "Good",
"t1": "2022-02-22 17:03:41.189000",
"t2": "2022-02-22 17:03:41.189000",
"t3": "2022-02-22 17:03:41.725487"
}
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:
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": {
"value": 19.835201263427734,
"status": "Good",
"t1": "2022-02-22 16:58:21.188000",
"t2": "2022-02-22 16:58:21.188000",
"t3": "2022-02-22 16:58:22.071619"
},
"sv": {
"value": 1704.4019775390625,
"status": "Good",
"t1": "2022-02-22 16:58:21.188000",
"t2": "2022-02-22 16:58:21.188000",
"t3": "2022-02-22 16:58:22.121559"
},
"tv": {
"value": 23.08197021484375,
"status": "Good",
"t1": "2022-02-22 16:58:21.188000",
"t2": "2022-02-22 16:58:21.188000",
"t3": "2022-02-22 16:58:22.171498"
},
"qv": {
"value": NaN,
"status": "Good",
"t1": "2022-02-22 16:58:21.188000",
"t2": "2022-02-22 16:58:21.188000",
"t3": "2022-02-22 16:58:22.221639"
}
}