Skip to content

Instantly share code, notes, and snippets.

@alistairhenderson
Last active August 1, 2023 09:15
Show Gist options
  • Save alistairhenderson/12d2457c1bb9f91fa7bbbee5e5fdde91 to your computer and use it in GitHub Desktop.
Save alistairhenderson/12d2457c1bb9f91fa7bbbee5e5fdde91 to your computer and use it in GitHub Desktop.
Example Node-Red Sparkplugb MQTT read
[
{
"id": "943c3fea54fbba52",
"type": "tab",
"label": "get-test-flow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f2f007029db2c813",
"type": "mqtt in",
"z": "943c3fea54fbba52",
"name": "",
"topic": "spBv1.0/RSL1/inoex/l1/DDATA",
"qos": "2",
"datatype": "auto-detect",
"broker": "f1515b8646ea8926",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 120,
"wires": [
[
"8a113ae139d9d9fc",
"a68e45ebc52918b2"
]
]
},
{
"id": "2046f0b639522cb5",
"type": "debug",
"z": "943c3fea54fbba52",
"name": "PROCESSED",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1020,
"y": 40,
"wires": []
},
{
"id": "8a113ae139d9d9fc",
"type": "debug",
"z": "943c3fea54fbba52",
"name": "RAW",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 710,
"y": 260,
"wires": []
},
{
"id": "a68e45ebc52918b2",
"type": "decode",
"z": "943c3fea54fbba52",
"name": "",
"protofile": "6f0d34e25e3b0a28",
"protoType": "Payload",
"x": 720,
"y": 100,
"wires": [
[
"2046f0b639522cb5"
]
]
},
{
"id": "9e6466cb0861e82e",
"type": "mqtt sparkplug in",
"z": "943c3fea54fbba52",
"name": "",
"topic": "spBv1.0/My Devices/DDATA/EoN Name/My Device",
"qos": "2",
"broker": "4dc45388473c78d3",
"x": 310,
"y": 400,
"wires": [
[
"8e3ef62ce85af272"
]
]
},
{
"id": "8e3ef62ce85af272",
"type": "debug",
"z": "943c3fea54fbba52",
"name": "Processed Sparkplug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1060,
"y": 400,
"wires": []
},
{
"id": "f1515b8646ea8926",
"type": "mqtt-broker",
"name": "acme.net",
"broker": "acme.net",
"port": "1883",
"tls": "",
"clientid": "nodered01",
"autoConnect": true,
"usetls": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": false,
"birthTopic": "",
"birthQos": "2",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "6f0d34e25e3b0a28",
"type": "protobuf-file",
"protopath": "/root/.node-red/sparkplug_b.proto",
"watchFile": true,
"keepCase": false
},
{
"id": "4dc45388473c78d3",
"type": "mqtt-sparkplug-broker",
"name": "acme.net",
"deviceGroup": "test-devices",
"eonName": "node-red",
"broker": "acme.net",
"port": "1883",
"tls": "",
"clientid": "nodered01",
"usetls": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": false,
"enableStoreForward": false,
"compressAlgorithm": "",
"aliasMetrics": false,
"primaryScada": ""
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment