|
[ |
|
{ |
|
"id": "425e2121f39ce206", |
|
"type": "tab", |
|
"label": "flow.deauther2influx", |
|
"disabled": false, |
|
"info": "", |
|
"env": [] |
|
}, |
|
{ |
|
"id": "9085235ef677fdf6", |
|
"type": "serial in", |
|
"z": "425e2121f39ce206", |
|
"name": "/dev/ttyUSBD: split \\n", |
|
"serial": "3d064dfe9c076d17", |
|
"x": 140, |
|
"y": 200, |
|
"wires": [ |
|
[ |
|
"7b38d3b1439b0de7", |
|
"344a9ebf3dbcbd38" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "7b38d3b1439b0de7", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: serial", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "payload", |
|
"targetType": "msg", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 350, |
|
"y": 200, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "d688858b48f461a6", |
|
"type": "switch", |
|
"z": "425e2121f39ce206", |
|
"name": "switch: msg.payload by scan", |
|
"property": "payload", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "regex", |
|
"v": "Starting scan", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "regex", |
|
"v": "Stopped scan", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "else" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 3, |
|
"x": 500, |
|
"y": 420, |
|
"wires": [ |
|
[ |
|
"a1f54b906e28ebcd" |
|
], |
|
[ |
|
"beccea9ab694f233" |
|
], |
|
[ |
|
"595e5b93df768168" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "6244a5dc817c7a64", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: delay", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 190, |
|
"y": 700, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "40df6bf40626f827", |
|
"type": "inject", |
|
"z": "425e2121f39ce206", |
|
"name": "inject: scan", |
|
"props": [ |
|
{ |
|
"p": "payload" |
|
}, |
|
{ |
|
"p": "count", |
|
"v": "1", |
|
"vt": "num" |
|
} |
|
], |
|
"repeat": "", |
|
"crontab": "", |
|
"once": false, |
|
"onceDelay": "0.1", |
|
"topic": "", |
|
"payload": "set ssid ||||||||||||;;set hidden true;;set webInterface false;;scan", |
|
"payloadType": "str", |
|
"x": 100, |
|
"y": 60, |
|
"wires": [ |
|
[ |
|
"4e0e0197cc3b51a5" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "080db2e6ef786cfa", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: inject", |
|
"active": true, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 590, |
|
"y": 40, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "26889a77e1bc32da", |
|
"type": "serial out", |
|
"z": "425e2121f39ce206", |
|
"name": "/dev/ttyUSBD: split \\n", |
|
"serial": "3d064dfe9c076d17", |
|
"x": 620, |
|
"y": 80, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "8d767de4233f9da7", |
|
"type": "trigger", |
|
"z": "425e2121f39ce206", |
|
"name": "trigger: {delay} timeout", |
|
"op1": "", |
|
"op2": "timeout", |
|
"op1type": "nul", |
|
"op2type": "str", |
|
"duration": "5", |
|
"extend": true, |
|
"overrideDelay": true, |
|
"units": "s", |
|
"reset": "", |
|
"bytopic": "all", |
|
"topic": "topic", |
|
"outputs": 1, |
|
"x": 220, |
|
"y": 740, |
|
"wires": [ |
|
[ |
|
"a4b9d97f9342c986", |
|
"0b5a43e9730528fa" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "0b5a43e9730528fa", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: timeout", |
|
"active": true, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 460, |
|
"y": 700, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "a1f54b906e28ebcd", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg/flow.delay 4s", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "msg", |
|
"to": "4000", |
|
"tot": "num" |
|
}, |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "flow", |
|
"to": "4000", |
|
"tot": "num" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 780, |
|
"y": 380, |
|
"wires": [ |
|
[ |
|
"784b5b296ff2ba3d" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "4680ee332b7276cc", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: print command by scan", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "payload", |
|
"pt": "msg", |
|
"to": "print /scan.json", |
|
"tot": "str" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 500, |
|
"y": 820, |
|
"wires": [ |
|
[ |
|
"257d0fd58367d87e" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "344a9ebf3dbcbd38", |
|
"type": "switch", |
|
"z": "425e2121f39ce206", |
|
"name": "switch: msg.payload /^#/g", |
|
"property": "payload", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "regex", |
|
"v": "^#|^\\/\\/\\ ", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "else" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 2, |
|
"x": 190, |
|
"y": 280, |
|
"wires": [ |
|
[ |
|
"4465386edee5eba2" |
|
], |
|
[ |
|
"79fcc95475fbbefe" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "a4b9d97f9342c986", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: flow.endtime", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "endtime", |
|
"pt": "flow", |
|
"to": "time", |
|
"tot": "msg" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 470, |
|
"y": 740, |
|
"wires": [ |
|
[ |
|
"5df241c35a10d41b" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "d639977793608c6c", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: flow.starttime", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "starttime", |
|
"pt": "flow", |
|
"to": "", |
|
"tot": "date" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 690, |
|
"y": 260, |
|
"wires": [ |
|
[ |
|
"a38c7bfd75159d95", |
|
"7fd921d4f9fea39b" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "4465386edee5eba2", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: flow.command", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "command", |
|
"pt": "flow", |
|
"to": "payload", |
|
"tot": "msg" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 450, |
|
"y": 260, |
|
"wires": [ |
|
[ |
|
"d639977793608c6c" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "1893072f4c746c2b", |
|
"type": "serial out", |
|
"z": "425e2121f39ce206", |
|
"name": "", |
|
"serial": "3d064dfe9c076d17", |
|
"x": 450, |
|
"y": 1060, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "91d3adb584bceb3c", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: json by print", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 990, |
|
"y": 560, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "79fcc95475fbbefe", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.command", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "command", |
|
"pt": "msg", |
|
"to": "command", |
|
"tot": "flow" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 450, |
|
"y": 300, |
|
"wires": [ |
|
[ |
|
"6aaecf1588d6a499" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "42615308cc87c5ee", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: result by print", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 480, |
|
"y": 480, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "4e0e0197cc3b51a5", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: flow.payload flow.count", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "payload", |
|
"pt": "flow", |
|
"to": "payload", |
|
"tot": "msg" |
|
}, |
|
{ |
|
"t": "set", |
|
"p": "count", |
|
"pt": "flow", |
|
"to": "count", |
|
"tot": "msg" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 340, |
|
"y": 60, |
|
"wires": [ |
|
[ |
|
"26889a77e1bc32da", |
|
"080db2e6ef786cfa" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "43a190bea8216735", |
|
"type": "json", |
|
"z": "425e2121f39ce206", |
|
"name": "json: result by print", |
|
"property": "payload", |
|
"action": "", |
|
"pretty": true, |
|
"x": 750, |
|
"y": 560, |
|
"wires": [ |
|
[ |
|
"91d3adb584bceb3c", |
|
"1942aa237e21a765" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "c8aa1f05fb142f6f", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: scan command by print", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "payload", |
|
"pt": "msg", |
|
"to": "set hidden true;;set webInterface false;;scan", |
|
"tot": "str" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 500, |
|
"y": 860, |
|
"wires": [ |
|
[ |
|
"e5b3ae76c7c8ab93" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "5cd8a0ca351dee5d", |
|
"type": "switch", |
|
"z": "425e2121f39ce206", |
|
"name": "switch: msg.command", |
|
"property": "command", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "regex", |
|
"v": "# scan", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "regex", |
|
"v": "# print", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "else" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 3, |
|
"x": 220, |
|
"y": 500, |
|
"wires": [ |
|
[ |
|
"4e806132ac5604c0", |
|
"d688858b48f461a6" |
|
], |
|
[ |
|
"42615308cc87c5ee", |
|
"6ec7251c0af26f76" |
|
], |
|
[ |
|
"ed406960dfab5504", |
|
"e824c21608c42ea6" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "4e806132ac5604c0", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: result by scan", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 480, |
|
"y": 380, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "ed406960dfab5504", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: result by other", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 480, |
|
"y": 580, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "6ec7251c0af26f76", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.delay 1s by print", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "msg", |
|
"to": "1000", |
|
"tot": "num" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 490, |
|
"y": 520, |
|
"wires": [ |
|
[ |
|
"43a190bea8216735", |
|
"a808aebc666fc67a" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "38d04090242960bd", |
|
"type": "link in", |
|
"z": "425e2121f39ce206", |
|
"name": "link in: timeout result", |
|
"links": [ |
|
"646ac2560a678420", |
|
"a808aebc666fc67a", |
|
"784b5b296ff2ba3d" |
|
], |
|
"x": 55, |
|
"y": 700, |
|
"wires": [ |
|
[ |
|
"8d767de4233f9da7", |
|
"6244a5dc817c7a64" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "a808aebc666fc67a", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: result by print", |
|
"mode": "link", |
|
"links": [ |
|
"38d04090242960bd" |
|
], |
|
"x": 675, |
|
"y": 520, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "784b5b296ff2ba3d", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: result by scan", |
|
"mode": "link", |
|
"links": [ |
|
"38d04090242960bd" |
|
], |
|
"x": 975, |
|
"y": 420, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "e824c21608c42ea6", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.delay 5s by other", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "msg", |
|
"to": "5000", |
|
"tot": "num" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 490, |
|
"y": 620, |
|
"wires": [ |
|
[ |
|
"646ac2560a678420" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "646ac2560a678420", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: result by other", |
|
"mode": "link", |
|
"links": [ |
|
"38d04090242960bd" |
|
], |
|
"x": 675, |
|
"y": 620, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "a016951403bfb188", |
|
"type": "switch", |
|
"z": "425e2121f39ce206", |
|
"name": "switch: msg.command", |
|
"property": "command", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "regex", |
|
"v": "# scan", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "regex", |
|
"v": "# print", |
|
"vt": "str", |
|
"case": true |
|
}, |
|
{ |
|
"t": "else" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 3, |
|
"x": 220, |
|
"y": 860, |
|
"wires": [ |
|
[ |
|
"4680ee332b7276cc" |
|
], |
|
[ |
|
"c8aa1f05fb142f6f" |
|
], |
|
[ |
|
"1bb71a803f047158" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "91fea338cafd9cab", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: result with command", |
|
"mode": "link", |
|
"links": [ |
|
"f00537217a5a0c45" |
|
], |
|
"x": 815, |
|
"y": 300, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "f00537217a5a0c45", |
|
"type": "link in", |
|
"z": "425e2121f39ce206", |
|
"name": "link in: switch result", |
|
"links": [ |
|
"91fea338cafd9cab" |
|
], |
|
"x": 55, |
|
"y": 500, |
|
"wires": [ |
|
[ |
|
"5cd8a0ca351dee5d" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "a38c7bfd75159d95", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: command now", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 1000, |
|
"y": 260, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "5df241c35a10d41b", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: timeout", |
|
"mode": "link", |
|
"links": [ |
|
"cdb0c235af2cf62f" |
|
], |
|
"x": 635, |
|
"y": 740, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "cdb0c235af2cf62f", |
|
"type": "link in", |
|
"z": "425e2121f39ce206", |
|
"name": "link in: switch timeout", |
|
"links": [ |
|
"5df241c35a10d41b" |
|
], |
|
"x": 55, |
|
"y": 860, |
|
"wires": [ |
|
[ |
|
"a016951403bfb188" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "1bb71a803f047158", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: scan command by other", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "payload", |
|
"pt": "msg", |
|
"to": "scan", |
|
"tot": "str" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 500, |
|
"y": 900, |
|
"wires": [ |
|
[ |
|
"e5b3ae76c7c8ab93" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "71f8eb1482742c03", |
|
"type": "link in", |
|
"z": "425e2121f39ce206", |
|
"name": "link in: next command", |
|
"links": [ |
|
"4e3d6eef37eabe97", |
|
"75f7aaed3c732fe9", |
|
"b9f326704d35f6f1" |
|
], |
|
"x": 55, |
|
"y": 1020, |
|
"wires": [ |
|
[ |
|
"4907e64bc44813ec" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "75f7aaed3c732fe9", |
|
"type": "link out", |
|
"z": "425e2121f39ce206", |
|
"name": "link out: command", |
|
"mode": "link", |
|
"links": [ |
|
"71f8eb1482742c03" |
|
], |
|
"x": 975, |
|
"y": 860, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "beccea9ab694f233", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg/flow.delay 1s", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "msg", |
|
"to": "1000", |
|
"tot": "num" |
|
}, |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "flow", |
|
"to": "1000", |
|
"tot": "num" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 780, |
|
"y": 420, |
|
"wires": [ |
|
[ |
|
"784b5b296ff2ba3d" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "595e5b93df768168", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.delay by flow.delay", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "delay", |
|
"pt": "msg", |
|
"to": "delay", |
|
"tot": "flow" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 800, |
|
"y": 460, |
|
"wires": [ |
|
[ |
|
"784b5b296ff2ba3d" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "605dc816621279db", |
|
"type": "inject", |
|
"z": "425e2121f39ce206", |
|
"name": "inject: print", |
|
"props": [ |
|
{ |
|
"p": "payload" |
|
}, |
|
{ |
|
"p": "count", |
|
"v": "1", |
|
"vt": "num" |
|
} |
|
], |
|
"repeat": "", |
|
"crontab": "", |
|
"once": false, |
|
"onceDelay": 0.1, |
|
"topic": "", |
|
"payload": "print /scan.json", |
|
"payloadType": "str", |
|
"x": 100, |
|
"y": 100, |
|
"wires": [ |
|
[ |
|
"4e0e0197cc3b51a5" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "e5b3ae76c7c8ab93", |
|
"type": "function", |
|
"z": "425e2121f39ce206", |
|
"name": "function: subtracting count", |
|
"func": "var count = flow.get('count');\nif (count > 0) {\n msg.count = count - 1;\n flow.set('count', msg.count);\n}\nreturn msg;", |
|
"outputs": 1, |
|
"timeout": 0, |
|
"noerr": 0, |
|
"initialize": "", |
|
"finalize": "", |
|
"libs": [], |
|
"x": 790, |
|
"y": 880, |
|
"wires": [ |
|
[ |
|
"75f7aaed3c732fe9" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "88750373fd618bbf", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: command next", |
|
"active": true, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 480, |
|
"y": 1020, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "4907e64bc44813ec", |
|
"type": "switch", |
|
"z": "425e2121f39ce206", |
|
"name": "switch: msg.count", |
|
"property": "count", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "eq", |
|
"v": "0", |
|
"vt": "num" |
|
}, |
|
{ |
|
"t": "else" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 2, |
|
"x": 210, |
|
"y": 1020, |
|
"wires": [ |
|
[ |
|
"598ebd1501de2d4b" |
|
], |
|
[ |
|
"88750373fd618bbf", |
|
"1893072f4c746c2b" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "598ebd1501de2d4b", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: command stop", |
|
"active": true, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 480, |
|
"y": 980, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "6aaecf1588d6a499", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.time", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "time", |
|
"pt": "msg", |
|
"to": "", |
|
"tot": "date" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 670, |
|
"y": 300, |
|
"wires": [ |
|
[ |
|
"91fea338cafd9cab" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "257d0fd58367d87e", |
|
"type": "change", |
|
"z": "425e2121f39ce206", |
|
"name": "set: msg.count by flow.count", |
|
"rules": [ |
|
{ |
|
"t": "set", |
|
"p": "count", |
|
"pt": "msg", |
|
"to": "count", |
|
"tot": "flow" |
|
} |
|
], |
|
"action": "", |
|
"property": "", |
|
"from": "", |
|
"to": "", |
|
"reg": false, |
|
"x": 800, |
|
"y": 820, |
|
"wires": [ |
|
[ |
|
"75f7aaed3c732fe9" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "1942aa237e21a765", |
|
"type": "function", |
|
"z": "425e2121f39ce206", |
|
"name": "function: to measurement", |
|
"func": "var all = []\n\nif (Array.isArray(msg.payload.aps)) {\n for (const ap of msg.payload.aps) {\n var item = {\n measurement: \"deauther_aps\",\n fields: {\n // SSID: ap[0],\n Name: ap[1],\n Ch: ap[2],\n RSSI: ap[3],\n // Enc: ap[4],\n // Mac: ap[5],\n Vendor: ap[6],\n Selected: ap[7]\n },\n tags: {\n SSID: ap[0],\n // Ch: ap[2],\n Enc: ap[4],\n Mac: ap[5],\n // Vendor: ap[6]\n Hostname: os.hostname()\n },\n timestamp: new Date(msg.time)\n };\n all.push(item);\n }\n}\n\nif (Array.isArray(msg.payload.stations)) {\n for (const station of msg.payload.stations) {\n var ap_index = station[5]\n var ap_array = msg.payload.aps[ap_index]\n var ap_name = ap_array[5]\n var item2 = {\n measurement: \"deauther_stations\",\n fields: {\n // MAC: station[0],\n Ch: station[1],\n Name: station[2],\n Vendor: station[3],\n Pkts: station[4],\n // AP: station[5],\n LastSeen: station[6],\n Selected: station[7]\n },\n tags: {\n MAC: station[0],\n // Ch: station[1],\n // Vendor: station[3],\n AP: ap_name,\n Hostname: os.hostname()\n },\n timestamp: new Date(msg.time)\n };\n all.push(item2);\n }\n}\n\nmsg.payload = all\nreturn msg;", |
|
"outputs": 1, |
|
"timeout": 0, |
|
"noerr": 0, |
|
"initialize": "", |
|
"finalize": "", |
|
"libs": [ |
|
{ |
|
"var": "os", |
|
"module": "os" |
|
} |
|
], |
|
"x": 1010, |
|
"y": 600, |
|
"wires": [ |
|
[ |
|
"d32a520181a44004", |
|
"37135ad2aea67e29" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "d32a520181a44004", |
|
"type": "debug", |
|
"z": "425e2121f39ce206", |
|
"name": "debug: measurement by print", |
|
"active": false, |
|
"tosidebar": true, |
|
"console": false, |
|
"tostatus": false, |
|
"complete": "msg", |
|
"targetType": "jsonata", |
|
"statusVal": "", |
|
"statusType": "auto", |
|
"x": 1020, |
|
"y": 660, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "37135ad2aea67e29", |
|
"type": "influxdb batch", |
|
"z": "425e2121f39ce206", |
|
"influxdb": "babbd073744e9a64", |
|
"precision": "", |
|
"retentionPolicy": "", |
|
"name": "influxdb/nodered", |
|
"database": "", |
|
"retentionPolicyV18Flux": "", |
|
"org": "", |
|
"bucket": "", |
|
"x": 990, |
|
"y": 700, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "7fd921d4f9fea39b", |
|
"type": "influxdb out", |
|
"z": "425e2121f39ce206", |
|
"influxdb": "babbd073744e9a64", |
|
"name": "influxdb/nodered", |
|
"measurement": "deauther_commands", |
|
"precision": "", |
|
"retentionPolicy": "", |
|
"database": "test", |
|
"precisionV18FluxV20": "ms", |
|
"retentionPolicyV18Flux": "", |
|
"org": "my-org", |
|
"bucket": "test", |
|
"x": 990, |
|
"y": 300, |
|
"wires": [] |
|
}, |
|
{ |
|
"id": "f05a57828a97d121", |
|
"type": "inject", |
|
"z": "425e2121f39ce206", |
|
"name": "inject: set ssid", |
|
"props": [ |
|
{ |
|
"p": "payload" |
|
}, |
|
{ |
|
"p": "count", |
|
"v": "1", |
|
"vt": "num" |
|
} |
|
], |
|
"repeat": "", |
|
"crontab": "", |
|
"once": false, |
|
"onceDelay": 0.1, |
|
"topic": "", |
|
"payload": "set ssid ||||||||||||", |
|
"payloadType": "str", |
|
"x": 110, |
|
"y": 140, |
|
"wires": [ |
|
[ |
|
"4e0e0197cc3b51a5" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "aa010ad01bc7f7bf", |
|
"type": "inject", |
|
"z": "425e2121f39ce206", |
|
"name": "inject: scan loop", |
|
"props": [ |
|
{ |
|
"p": "payload" |
|
}, |
|
{ |
|
"p": "count", |
|
"v": "-1", |
|
"vt": "num" |
|
} |
|
], |
|
"repeat": "", |
|
"crontab": "", |
|
"once": true, |
|
"onceDelay": "0.1", |
|
"topic": "", |
|
"payload": "stop;;set ssid ||||||||||||;;set hidden true;;set webInterface false;;scan", |
|
"payloadType": "str", |
|
"x": 120, |
|
"y": 20, |
|
"wires": [ |
|
[ |
|
"4e0e0197cc3b51a5" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "3d064dfe9c076d17", |
|
"type": "serial-port", |
|
"name": "/dev/ttyUSBDeauther: split \\n", |
|
"serialport": "/dev/ttyUSBDeauther", |
|
"serialbaud": "115200", |
|
"databits": "8", |
|
"parity": "none", |
|
"stopbits": "1", |
|
"waitfor": "", |
|
"dtr": "none", |
|
"rts": "none", |
|
"cts": "none", |
|
"dsr": "none", |
|
"newline": "\\n", |
|
"bin": "false", |
|
"out": "char", |
|
"addchar": "", |
|
"responsetimeout": "" |
|
}, |
|
{ |
|
"id": "babbd073744e9a64", |
|
"type": "influxdb", |
|
"hostname": "influxdb.lan", |
|
"port": "8086", |
|
"protocol": "http", |
|
"database": "nodered", |
|
"name": "nodered", |
|
"usetls": false, |
|
"tls": "", |
|
"influxdbVersion": "1.x", |
|
"url": "http://influxdb.lan:8086", |
|
"timeout": "10", |
|
"rejectUnauthorized": true |
|
} |
|
] |