Files
meshtastic-node-red/meshtastic.json
2023-12-09 15:58:02 -08:00

1349 lines
40 KiB
JSON

[
{
"id": "f86392651850d084",
"type": "tab",
"label": "Meshtastic Flow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a832ad4ec196570a",
"type": "subflow",
"name": "Ingest Packets from MQTT",
"info": "",
"category": "",
"in": [],
"out": [
{
"x": 1510,
"y": 380,
"wires": [
{
"id": "0d0579462fe73908",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#3FADB5",
"outputLabels": [
"Decoded Packets"
],
"icon": "node-red/comment.svg"
},
{
"id": "f2f8954e5d01d9c6",
"type": "subflow",
"name": "Push to InfluxDB",
"info": "",
"category": "",
"in": [
{
"x": 180,
"y": 220,
"wires": [
{
"id": "330c1024763a96f8"
}
]
}
],
"out": [],
"env": [
{
"name": "Template",
"type": "str",
"value": ""
}
],
"meta": {},
"color": "#DDAA99"
},
{
"id": "d96c8f45d69c34f7",
"type": "influxdb",
"hostname": "influxdb",
"port": "8086",
"protocol": "http",
"database": "msh",
"name": "Local InfluxDB",
"usetls": false,
"tls": "",
"influxdbVersion": "1.x",
"url": "http://localhost:8086",
"rejectUnauthorized": true
},
{
"id": "07b2da65ae42f546",
"type": "mqtt-broker",
"name": "Mosquito",
"broker": "mqtt-mosquitto",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "node-red",
"birthQos": "0",
"birthRetain": "true",
"birthPayload": "node-red connected",
"birthMsg": {},
"closeTopic": "node-red",
"closeQos": "0",
"closeRetain": "true",
"closePayload": "node-red disconnected",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "8150da8a82682754",
"type": "function",
"z": "a832ad4ec196570a",
"name": "Translate Node Identifiers to Hex",
"func": "msg.payload.packet.toHex = '!' + msg.payload.packet.to.toString(16).padStart(8,0)\nmsg.payload.packet.fromHex = '!' + msg.payload.packet.from.toString(16).padStart(8, 0)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 840,
"y": 380,
"wires": [
[
"0d0579462fe73908",
"8b0bf419f2d0d299"
]
]
},
{
"id": "517d26c82b500334",
"type": "debug",
"z": "a832ad4ec196570a",
"name": "Original Messages",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 340,
"wires": []
},
{
"id": "7d7f8c87bd912724",
"type": "debug",
"z": "a832ad4ec196570a",
"name": "Duplicate Messages",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 420,
"wires": []
},
{
"id": "1aceb1178050204c",
"type": "mqtt in",
"z": "a832ad4ec196570a",
"name": "Injest from MQTT",
"topic": "msh/+/c/#",
"qos": "1",
"datatype": "auto-detect",
"broker": "07b2da65ae42f546",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 100,
"y": 380,
"wires": [
[
"ee2a2830c32d5593"
]
]
},
{
"id": "773f6b430fa18d6e",
"type": "debug",
"z": "a832ad4ec196570a",
"name": "Decoded Message",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 340,
"wires": []
},
{
"id": "8b0bf419f2d0d299",
"type": "debug",
"z": "a832ad4ec196570a",
"name": "Nodes Identified by Hex",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1130,
"y": 340,
"wires": []
},
{
"id": "0d0579462fe73908",
"type": "function",
"z": "a832ad4ec196570a",
"name": "Inject Node Names and Hardware",
"func": "var nodeShortNames = global.get('nodeShortNames')\nvar nodeLongNames = global.get('nodeLongNames')\nvar nodeHardware = global.get('nodeHardware')\n\nif (nodeShortNames === undefined) nodeShortNames = {}\nif (nodeLongNames === undefined) nodeLongNames = {}\nif (nodeHardware === undefined) nodeHardware = {}\n\nvar packet = msg.payload.packet\n\nvar unknown = \"unknown\"\n\nvar hardwareMap = {\n 0: \"UNSET\",\n 1: \"TLORA_V2\",\n 2: \"TLORA_V1\",\n 3: \"TLORA_V2_1_1.6\",\n 4: \"TBEAM\",\n 5: \"HELTEC_V2_0\",\n 6: \"TBEAM_V0.7\",\n 7: \"T_ECHO\",\n 8: \"TLORA_V1_1.3\",\n 9: \"RAK4631\",\n 10: \"HELTEC_V2_1\",\n 11: \"HELTEC_V1\",\n 12: \"LILYGO_TBEAM_S3_CORE\",\n 13: \"RAK11200\",\n 14: \"NANO_G1\",\n 15: \"TLORA_V2_1_1.8\",\n 16: \"TLORA_T3_S3\",\n 17: \"NANO_G1_EXPLORER\",\n 18: \"NANO_G2_ULTRA\",\n 19: \"LORA_TYPE\",\n 25: \"STATION_G1\",\n 26: \"RAK11310\",\n 32: \"LORA_RELAY_V1\",\n 33: \"NRF52840DK\",\n 34: \"PPR\",\n 35: \"GENIEBLOCKS\",\n 36: \"NRF52_UNKNOWN\",\n 37: \"PORTDUINO\",\n 38: \"ANDROID_SIM\",\n 39: \"DIY_V1\",\n 40: \"NRF52840_PCA10059\",\n 41: \"DR_DEV\",\n 42: \"M5STACK\",\n 43: \"HELTEC_V3\",\n 44: \"HELTEC_WSL_V3\",\n 45: \"BETAFPV_2400_TX\",\n 46: \"BETAFPV_900_NANO_TX\",\n 47: \"RPI_PICO\",\n 48: \"HELTEC_WIRELESS_TRACKER\",\n 49: \"HELTEC_WIRELESS_PAPER\",\n 50: \"T_DECK\",\n 51: \"T_WATCH_S3\",\n 52: \"PICOMPUTER_S3\",\n 53: \"HELTEC_HT62\",\n 54: \"EBYTE_ESP32_S3\",\n 255: \"PRIVATE_HW\"\n}\n\n// inject From names and hardware info\nif (nodeShortNames.hasOwnProperty(packet.fromHex)){\n packet.fromShortName = nodeShortNames[packet.fromHex]\n} else {\n packet.fromShortName = unknown\n}\n\nif (nodeShortNames.hasOwnProperty(packet.fromHex)) {\n packet.fromShortName = nodeShortNames[packet.fromHex]\n} else {\n packet.fromShortName = unknown\n}\n\nif (nodeLongNames.hasOwnProperty(packet.fromHex)) {\n packet.fromLongName = nodeLongNames[packet.fromHex]\n} else {\n packet.fromLongName = unknown\n}\n\nif (nodeHardware.hasOwnProperty(packet.fromHex)) {\n packet.fromHardware = hardwareMap[nodeHardware[packet.fromHex]]\n} else {\n packet.fromHardware = unknown\n}\n\n// handle messages to mesh\nif (packet.toHex === \"!ffffffff\") {\n packet.toShortName = \"mesh\"\n packet.toLongName = \"Mesh\"\n packet.toHardware = \"MESH\"\n return msg\n}\n\n// inject To names and hardware info\nif (nodeShortNames.hasOwnProperty(packet.toHex)) {\n packet.toShortName = nodeShortNames[packet.toHex]\n packet.toLongName = nodeLongNames[packet.toHex]\n packet.toHardware = hardwareMap[nodeHardware[packet.toHex]]\n} else {\n packet.toShortName = unknown\n packet.toLongName = unknown\n packet.toHardware = unknown\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1160,
"y": 380,
"wires": [
[
"63da12e4baeff017"
]
]
},
{
"id": "63da12e4baeff017",
"type": "debug",
"z": "a832ad4ec196570a",
"name": "Node Names and Hardware Injected",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1570,
"y": 420,
"wires": []
},
{
"id": "add09a79e135bd52",
"type": "function",
"z": "a832ad4ec196570a",
"name": "Deduplicate Packets by Id",
"func": "const packetIdCacheGloabalKey = 'packetIdCache'\nconst expirySeconds = 300;\nvar idCache = global.get(packetIdCacheGloabalKey)\n\nif (idCache === undefined) {\n idCache = {}\n}\n\n// clean dead keys\nfor (var key in idCache) {\n if (idCache[key] <= new Date().getTime()) {\n delete idCache[key];\n }\n};\n\nvar id = msg.payload.packet.id\n\nif (idCache[id]) {\n // message is a duplicate, send to the duplicate output and exit\n return [null, msg];\n}\n\nidCache[id] = new Date().getTime() + (expirySeconds * 1000)\n\nglobal.set(packetIdCacheGloabalKey, idCache);\n\nreturn [msg, null];",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 510,
"y": 380,
"wires": [
[
"8150da8a82682754",
"517d26c82b500334"
],
[
"7d7f8c87bd912724"
]
],
"outputLabels": [
"Original",
"Duplicate"
],
"icon": "node-red/split.svg"
},
{
"id": "ee2a2830c32d5593",
"type": "decode",
"z": "a832ad4ec196570a",
"x": 300,
"y": 380,
"wires": [
[
"add09a79e135bd52"
]
]
},
{
"id": "330c1024763a96f8",
"type": "template",
"z": "f2f8954e5d01d9c6",
"name": "Generate Packet Measurement",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{{env.Template}}",
"output": "json",
"x": 390,
"y": 220,
"wires": [
[
"ae93a5d5e05d1b8c",
"716232a19027c25a"
]
],
"icon": "font-awesome/fa-power-off"
},
{
"id": "ae93a5d5e05d1b8c",
"type": "influxdb out",
"z": "f2f8954e5d01d9c6",
"d": true,
"influxdb": "d96c8f45d69c34f7",
"name": "Write Packet Measurement",
"measurement": "Packet",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 700,
"y": 220,
"wires": []
},
{
"id": "716232a19027c25a",
"type": "debug",
"z": "f2f8954e5d01d9c6",
"name": "Subflow Packet Measurement",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 710,
"y": 260,
"wires": []
},
{
"id": "a047428628dbff56",
"type": "switch",
"z": "f86392651850d084",
"name": "Split by PortNum",
"property": "payload.packet.payloadVariant.decoded.portnum",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "2",
"vt": "num"
},
{
"t": "eq",
"v": "3",
"vt": "num"
},
{
"t": "eq",
"v": "4",
"vt": "num"
},
{
"t": "eq",
"v": "5",
"vt": "num"
},
{
"t": "eq",
"v": "6",
"vt": "num"
},
{
"t": "eq",
"v": "7",
"vt": "num"
},
{
"t": "eq",
"v": "8",
"vt": "num"
},
{
"t": "eq",
"v": "9",
"vt": "num"
},
{
"t": "eq",
"v": "10",
"vt": "num"
},
{
"t": "eq",
"v": "32",
"vt": "num"
},
{
"t": "eq",
"v": "33",
"vt": "num"
},
{
"t": "eq",
"v": "64",
"vt": "num"
},
{
"t": "eq",
"v": "65",
"vt": "num"
},
{
"t": "eq",
"v": "66",
"vt": "num"
},
{
"t": "eq",
"v": "67",
"vt": "num"
},
{
"t": "eq",
"v": "68",
"vt": "num"
},
{
"t": "eq",
"v": "69",
"vt": "num"
},
{
"t": "eq",
"v": "70",
"vt": "num"
},
{
"t": "eq",
"v": "71",
"vt": "num"
},
{
"t": "eq",
"v": "256",
"vt": "num"
},
{
"t": "eq",
"v": "257",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 24,
"x": 470,
"y": 700,
"wires": [
[
"0cbf9e15ee49dd3b"
],
[
"800ecb302b9aeda5"
],
[
"c444184615027953"
],
[
"af1ead55008aa3a1"
],
[
"32de28bb83f90d75"
],
[
"c8b2b611c4f4de8f"
],
[
"77bec82633bda9be"
],
[
"bbbae940dcf3ad57"
],
[
"54668b99186bd7d2"
],
[
"8cde754ffcfc7677"
],
[
"d6fd48624565b5c3"
],
[
"af9061b29a714914"
],
[
"4f36ea8401f4b411"
],
[
"8b87527e3a095dd2"
],
[
"23512665dd03b721"
],
[
"e6397214979b1171"
],
[
"5621d444d33ec358"
],
[
"5442b8ec1222dcf0"
],
[
"12cb863008575224"
],
[
"05dd3202f55db6c6"
],
[
"2769fe94db570fcb"
],
[
"f66a3825a2bc89b5"
],
[
"fb509c71a14a98a3"
],
[
"2ddb2d4afe427f56"
]
],
"outputLabels": [
"Unknown",
"Text Message",
"Remote Hardware",
"Position",
"Node Info",
"Routing",
"Admin",
"Compressed (Canned) Text Message",
"Waypoint",
"Audio",
"Detection Sensor",
"Reply",
"IP Tunnel",
"Serial",
"Store-Forward",
"Range Test",
"Telemetry",
"Zero-GPS Positioning System",
"Simulator",
"Trace Route",
"Neighbor Info",
"Private",
"ATAK Forwarder",
"Unmatched Port Number"
],
"icon": "font-awesome/fa-inbox"
},
{
"id": "61aa5d3ba2f9797f",
"type": "debug",
"z": "f86392651850d084",
"name": "Device Measurement",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1560,
"y": 800,
"wires": []
},
{
"id": "800ecb302b9aeda5",
"type": "debug",
"z": "f86392651850d084",
"name": "Text",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 260,
"wires": []
},
{
"id": "4663655785e75cd6",
"type": "debug",
"z": "f86392651850d084",
"name": "Neighbor Info",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1060,
"y": 1100,
"wires": []
},
{
"id": "0cbf9e15ee49dd3b",
"type": "debug",
"z": "f86392651850d084",
"name": "Unknown App",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 220,
"wires": []
},
{
"id": "7fa2849d08656963",
"type": "debug",
"z": "f86392651850d084",
"name": "NodeInfo",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1160,
"y": 420,
"wires": []
},
{
"id": "33c5dc88fcd1bf4b",
"type": "template",
"z": "f86392651850d084",
"name": "Generate Device Measurement",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "[{\n \"air_util_tx\": {{payload.packet.payloadVariant.decoded.payload.variant.deviceMetrics.airUtilTx}},\n \"battery_level\": {{payload.packet.payloadVariant.decoded.payload.variant.deviceMetrics.batteryLevel}},\n \"channel_utilization\": {{payload.packet.payloadVariant.decoded.payload.variant.deviceMetrics.channelUtilization}},\n \"voltage\": {{payload.packet.payloadVariant.decoded.payload.variant.deviceMetrics.voltage}}\n},\n{\n \"from\": \"{{payload.packet.fromHex}}\",\n \"fromShortName\": \"{{payload.packet.fromShortName}}\",\n \"fromLongName\": \"{{payload.packet.fromLongName}}\",\n \"fromHardware\": \"{{payload.packet.fromHardware}}\",\n \"to\": \"{{payload.packet.toHex}}\",\n \"toShortName\": \"{{payload.packet.toShortName}}\",\n \"toLongName\": \"{{payload.packet.toLongName}}\",\n \"toHardware\": \"{{payload.packet.toHardware}}\",\n \"channelId\": \"{{payload.channelId}}\",\n \"gatewayId\": \"{{payload.gatewayId}}\"\n}]",
"output": "json",
"x": 1230,
"y": 840,
"wires": [
[
"61aa5d3ba2f9797f",
"c7fd5f39b31851f5"
]
],
"icon": "font-awesome/fa-power-off"
},
{
"id": "5621d444d33ec358",
"type": "switch",
"z": "f86392651850d084",
"name": "Telemetry Type",
"property": "payload.packet.payloadVariant.decoded.payload.variant.oneofKind",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "deviceMetrics",
"vt": "str"
},
{
"t": "eq",
"v": "environmentMetrics",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 860,
"y": 920,
"wires": [
[
"33c5dc88fcd1bf4b"
],
[
"8569754e02703706"
],
[
"1a84a37a75dbd35f"
]
],
"outputLabels": [
"Device",
"Environment",
"Unknown"
],
"icon": "node-red/status.svg"
},
{
"id": "1a84a37a75dbd35f",
"type": "debug",
"z": "f86392651850d084",
"name": "Unknown Telemetry",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 980,
"wires": []
},
{
"id": "385f733a74c1a3e2",
"type": "catch",
"z": "f86392651850d084",
"name": "",
"scope": null,
"uncaught": false,
"x": 80,
"y": 60,
"wires": [
[
"459e35735d9b3edc"
]
]
},
{
"id": "459e35735d9b3edc",
"type": "debug",
"z": "f86392651850d084",
"name": "errors",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 230,
"y": 60,
"wires": []
},
{
"id": "af1ead55008aa3a1",
"type": "function",
"z": "f86392651850d084",
"name": "Generate Position Measurement",
"func": "var payload = msg.payload.packet.payloadVariant.decoded.payload\n\nvar out = [{\n \"latitude\": (payload.latitudeI * 1e-7),\n \"longitude\": (payload.longitudeI * 1e-7),\n \"altitude\": payload.altitude,\n \"satsInView\": payload.satsInView,\n \"groundSpeed\": payload.groundSpeed,\n \"groundTrack\": payload.groundTrack,\n \"pDOP\": payload.pDOP,\n},\n{\n \"from\": msg.payload.packet.fromHex,\n \"fromShortName\": msg.payload.packet.fromShortName,\n \"fromLongName\": msg.payload.packet.fromLongName,\n \"fromHardware\": msg.payload.packet.fromHardware,\n \"to\": msg.payload.packet.toHex,\n \"toShortName\": msg.payload.packet.toShortName,\n \"toLongName\": msg.payload.packet.toLongName,\n \"toHardware\": msg.payload.packet.toHardware,\n \"channelId\": msg.payload.channelId,\n \"gatewayId\": msg.payload.gatewayId\n}]\n\nmsg.payload = out\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 910,
"y": 380,
"wires": [
[
"99f9cca4b6a6bf62",
"8359de37e139c84e"
]
],
"icon": "font-awesome/fa-location-arrow"
},
{
"id": "05dd3202f55db6c6",
"type": "debug",
"z": "f86392651850d084",
"name": "Trace Route",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 1060,
"wires": []
},
{
"id": "8569754e02703706",
"type": "template",
"z": "f86392651850d084",
"name": "Generate Environment Measurement",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "[{\n \"barometric_pressure\": {{payload.packet.payloadVariant.decoded.payload.variant.environmentMetrics.barometricPressure}},\n \"gas_resistance\": {{payload.packet.payloadVariant.decoded.payload.variant.environmentMetrics.gasResistance}},\n \"relative_humidity\": {{payload.packet.payloadVariant.decoded.payload.variant.environmentMetrics.relativeHumidity}},\n \"temperature\": {{payload.packet.payloadVariant.decoded.payload.variant.environmentMetrics.temperature}}\n},\n{\n \"from\": \"{{payload.packet.fromHex}}\",\n \"fromShortName\": \"{{payload.packet.fromShortName}}\",\n \"fromLongName\": \"{{payload.packet.fromLongName}}\",\n \"fromHardware\": \"{{payload.packet.fromHardware}}\",\n \"to\": \"{{payload.packet.toHex}}\",\n \"toShortName\": \"{{payload.packet.toShortName}}\",\n \"toLongName\": \"{{payload.packet.toLongName}}\",\n \"toHardware\": \"{{payload.packet.toHardware}}\",\n \"channelId\": \"{{payload.channelId}}\",\n \"gatewayId\": \"{{payload.gatewayId}}\"\n}]",
"output": "json",
"x": 1250,
"y": 920,
"wires": [
[
"d714c7fefad20f11",
"a3c383330d74e1bb"
]
],
"icon": "font-awesome/fa-thermometer-2"
},
{
"id": "d714c7fefad20f11",
"type": "debug",
"z": "f86392651850d084",
"name": "Environment Measurement",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1580,
"y": 880,
"wires": []
},
{
"id": "99f9cca4b6a6bf62",
"type": "influxdb out",
"z": "f86392651850d084",
"influxdb": "d96c8f45d69c34f7",
"name": "Write Position Measurement",
"measurement": "Position",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 1220,
"y": 380,
"wires": []
},
{
"id": "c8b2b611c4f4de8f",
"type": "debug",
"z": "f86392651850d084",
"name": "Routing",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 460,
"wires": []
},
{
"id": "77bec82633bda9be",
"type": "debug",
"z": "f86392651850d084",
"name": "Admin",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 500,
"wires": []
},
{
"id": "bbbae940dcf3ad57",
"type": "debug",
"z": "f86392651850d084",
"name": "Canned",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 540,
"wires": []
},
{
"id": "54668b99186bd7d2",
"type": "debug",
"z": "f86392651850d084",
"name": "Waypoint",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 580,
"wires": []
},
{
"id": "8cde754ffcfc7677",
"type": "debug",
"z": "f86392651850d084",
"name": "Audio",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 620,
"wires": []
},
{
"id": "d6fd48624565b5c3",
"type": "debug",
"z": "f86392651850d084",
"name": "Detection Sensor",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 660,
"wires": []
},
{
"id": "af9061b29a714914",
"type": "debug",
"z": "f86392651850d084",
"name": "Reply",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 700,
"wires": []
},
{
"id": "4f36ea8401f4b411",
"type": "debug",
"z": "f86392651850d084",
"name": "IP Tunnel",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 740,
"wires": []
},
{
"id": "8b87527e3a095dd2",
"type": "debug",
"z": "f86392651850d084",
"name": "Serial",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 780,
"wires": []
},
{
"id": "23512665dd03b721",
"type": "debug",
"z": "f86392651850d084",
"name": "Store-Forward",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 820,
"wires": []
},
{
"id": "e6397214979b1171",
"type": "debug",
"z": "f86392651850d084",
"name": "Range Test",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 860,
"wires": []
},
{
"id": "c444184615027953",
"type": "debug",
"z": "f86392651850d084",
"name": "Remote Hardware",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 300,
"wires": []
},
{
"id": "5442b8ec1222dcf0",
"type": "debug",
"z": "f86392651850d084",
"name": "Zero-GPS Positioning",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 980,
"wires": []
},
{
"id": "12cb863008575224",
"type": "debug",
"z": "f86392651850d084",
"name": "Simulator",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 1020,
"wires": []
},
{
"id": "f66a3825a2bc89b5",
"type": "debug",
"z": "f86392651850d084",
"name": "Private",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 1140,
"wires": []
},
{
"id": "fb509c71a14a98a3",
"type": "debug",
"z": "f86392651850d084",
"name": "ATAK Forwarder",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 1180,
"wires": []
},
{
"id": "2ddb2d4afe427f56",
"type": "debug",
"z": "f86392651850d084",
"name": "New Application",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 1220,
"wires": []
},
{
"id": "8359de37e139c84e",
"type": "debug",
"z": "f86392651850d084",
"name": "Position Measurement",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1200,
"y": 340,
"wires": []
},
{
"id": "2769fe94db570fcb",
"type": "function",
"z": "f86392651850d084",
"name": "Decode Payload",
"func": "msg.payload.packet.payloadVariant.decoded.payload = Buffer.from(msg.payload.packet.payloadVariant.decoded.payload).toJSON()\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 860,
"y": 1100,
"wires": [
[
"4663655785e75cd6"
]
]
},
{
"id": "a3c383330d74e1bb",
"type": "influxdb out",
"z": "f86392651850d084",
"influxdb": "d96c8f45d69c34f7",
"name": "Write Environment Measurement",
"measurement": "Environment",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 1600,
"y": 920,
"wires": []
},
{
"id": "c7fd5f39b31851f5",
"type": "influxdb out",
"z": "f86392651850d084",
"influxdb": "d96c8f45d69c34f7",
"name": "Write Device Measurement",
"measurement": "Device",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 1580,
"y": 840,
"wires": []
},
{
"id": "ea40b1047dcb281e",
"type": "template",
"z": "f86392651850d084",
"name": "Generate Packet Measurement",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "[{\n \"rxTime\": {{payload.packet.rxTime}},\n \"rxSnr\": {{payload.packet.rxSnr}},\n \"hopLimit\": {{payload.packet.hopLimit}},\n \"priority\": {{payload.packet.priority}},\n \"rxRssi\": {{payload.packet.rxRssi}},\n \"delayed\": {{payload.packet.delayed}}\n},\n{\n \"from\": \"{{payload.packet.fromHex}}\",\n \"fromShortName\": \"{{payload.packet.fromShortName}}\",\n \"fromLongName\": \"{{payload.packet.fromLongName}}\",\n \"fromHardware\": \"{{payload.packet.fromHardware}}\",\n \"to\": \"{{payload.packet.toHex}}\",\n \"toShortName\": \"{{payload.packet.toShortName}}\",\n \"toLongName\": \"{{payload.packet.toLongName}}\",\n \"toHardware\": \"{{payload.packet.toHardware}}\",\n \"channelId\": \"{{payload.channelId}}\",\n \"gatewayId\": \"{{payload.gatewayId}}\"\n}]",
"output": "json",
"x": 510,
"y": 120,
"wires": [
[
"54c9586ca95b7ed1",
"eabe626826678b37"
]
],
"icon": "font-awesome/fa-power-off"
},
{
"id": "54c9586ca95b7ed1",
"type": "influxdb out",
"z": "f86392651850d084",
"influxdb": "d96c8f45d69c34f7",
"name": "Write Packet Measurement",
"measurement": "Packet",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 900,
"y": 100,
"wires": []
},
{
"id": "eabe626826678b37",
"type": "debug",
"z": "f86392651850d084",
"name": "Packet Measurement",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 140,
"wires": []
},
{
"id": "32de28bb83f90d75",
"type": "function",
"z": "f86392651850d084",
"name": "Add Node Info to Global Context",
"func": "var nodeShortNames = global.get('nodeShortNames')\nvar nodeLongNames = global.get('nodeLongNames')\nvar nodeHardware = global.get('nodeHardware')\n\nif (nodeShortNames === undefined) nodeShortNames = {}\nif (nodeLongNames === undefined) nodeLongNames = {}\nif (nodeHardware === undefined) nodeHardware = {}\n\nvar payload = msg.payload.packet.payloadVariant.decoded.payload\n\nif (!(nodeShortNames.hasOwnProperty(payload.id)) || !(nodeShortNames[payload.id] === payload.shortName)){\n nodeShortNames[payload.id] = payload.shortName\n}\n\nif (!(nodeLongNames.hasOwnProperty(payload.id)) || !(nodeLongNames[payload.id] === payload.longName)) {\n nodeLongNames[payload.id] = payload.longName\n}\n\nif (!(nodeHardware.hasOwnProperty(payload.id)) || !(nodeHardware[payload.id] === payload.hwModel)) {\n nodeHardware[payload.id] = payload.hwModel\n}\n\nglobal.set('nodeShortNames', nodeShortNames)\nglobal.set('nodeLongNames', nodeLongNames)\nglobal.set('nodeHardware', nodeHardware)\n\nconst nodeInfo = {\n nodeShortNames, \n nodeLongNames, \n nodeHardware}\n\nreturn [msg, nodeInfo];",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 910,
"y": 420,
"wires": [
[
"7fa2849d08656963"
],
[
"3442c0ba5b13848f"
]
]
},
{
"id": "3442c0ba5b13848f",
"type": "debug",
"z": "f86392651850d084",
"name": "Global Context Node Info",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1210,
"y": 460,
"wires": []
},
{
"id": "d65682898df0b2cb",
"type": "subflow:a832ad4ec196570a",
"z": "f86392651850d084",
"name": "",
"x": 130,
"y": 700,
"wires": [
[
"a047428628dbff56",
"ea40b1047dcb281e"
]
]
}
]