UNPKG

node-red-contrib-axis-com

Version:
1,965 lines 95.8 kB
[ { "id": "baaf29d7e5fb7669", "type": "tab", "label": "BauWatch Provision", "disabled": false, "info": "", "env": [] }, { "id": "5e540d0e9665bb68", "type": "group", "z": "baaf29d7e5fb7669", "name": "", "style": { "stroke": "#000000", "fill": "#ffffbf", "label": true, "color": "#000000" }, "nodes": [ "13444c8fb1d4f14a", "3ff69ead60fdb581", "c1e754358cc26e7c", "ad9a64cd7d99122f", "a94676571f69c64c", "cf6cab3a14c300b5", "2a5c6198e8d9273f", "5acccfb6d24631ee", "d00deaedb3535e3b" ], "x": 1534, "y": 279, "w": 552, "h": 262 }, { "id": "c772619ac39db87a", "type": "group", "z": "baaf29d7e5fb7669", "name": "", "style": { "stroke": "#000000", "fill": "#e3f3d3", "label": true, "color": "#000000" }, "nodes": [ "ecef40b3fafb62f1", "4c5b31614123fd2b", "3c4fa1078222bfd1", "bed6a73eb0b5f8af", "35587b7c1a40530e", "c20356359b9c43ac", "1ef8d6f62502603a", "226da00a2b2ddc51", "b64323816e73bbe5", "581b20bcaf9b1b8f", "612a8107c76591df", "2998cbf647becba4", "467e2b90f4dc51d3", "4cc6d7f7da06c8ab", "1a82dad16a5a532c", "144d781246e42e83" ], "x": 254, "y": 679, "w": 832, "h": 382 }, { "id": "f9bc83ab4cf50337", "type": "group", "z": "baaf29d7e5fb7669", "name": "", "style": { "stroke": "#000000", "fill": "#bfdbef", "label": true, "color": "#000000" }, "nodes": [ "aa8933d0b15e9412", "78c71a74de79172c", "e3ccb20672897a21", "952cd5b14e67b722", "9fd884726c4692b3", "dbb110ab22774deb", "636e0d617ac7057d", "92817c47ae35eb75", "203db81784abbeec", "acfd5def78555ef0", "14bffd4ab6c8baf4", "f06ae0071ba25c06", "3ad4cc80d2ca758f", "fb55fc6758f60171", "31f75a053a1b9d2e", "64348f40a2ed1457", "6b255422bc18b4f3", "1f536258b6f5758a" ], "x": 254, "y": 239, "w": 492, "h": 402 }, { "id": "08300987fdba579c", "type": "group", "z": "baaf29d7e5fb7669", "name": "", "style": { "stroke": "#000000", "fill": "#ffffbf", "label": true, "color": "#000000" }, "nodes": [ "d5b362cd8bc14cee", "dcc0d83686952d81", "4c28891936fb4ad9", "7361a080e1882f8a", "728598dea9ca8efa", "70f6909e40cefce8", "df2108c5cbe7111d", "c7fc63d555e0eb8a", "f51d81de2ccd6034", "7d2d13bb20c92c8b", "b3fe6212143c1ce5", "9ed19d27f3c9822b", "f5c15bd293502687", "0d128aefc3a2cf1b", "616b0b3e423d1291", "fa2e6d6596738beb", "ac9708af6bdb2ecb", "a4ea42a6efa9d3dd", "544b9fb7aedad5bc", "073ab99bbeb03c7d", "895a03be43f907e3", "0e46ac9ea0a33b99", "3c4767d1a3d9f4ca", "83dcc8a4b378ebe3", "0146fa286783dac4", "7be174206d1f58ae", "243ac3ae81b9e32f", "5a88c981d91dd3fb", "961becbc9e17af91", "22bdea916a3aa66c", "5d86c9879d3e7a60", "f7f000781e484962", "6cca030ff5f1e232", "fa54b36293acc994", "cc8332c54408ea23", "9bb05421db4610f7", "d51aefe33febdeb1", "3c25f12c1dd67c7c", "930a008941deabaa", "578a2dbfbaaecf0b", "2352d72e4f8efe33", "d6745a1e07a4c7ec", "7b37624c5d9b9dba", "b4faf7220a4a0199" ], "x": 254, "y": 1099, "w": 1072, "h": 602 }, { "id": "42c6ee118f421726", "type": "group", "z": "baaf29d7e5fb7669", "name": "Set Config", "style": { "stroke": "#000000", "fill": "#ffefbf", "label": true, "color": "#000000" }, "nodes": [ "f5dce390a2b35a8c", "48f35231a5c951c1" ], "x": 254, "y": 39, "w": 412, "h": 82 }, { "id": "5ab0ecbe31d1c1d1", "type": "group", "z": "baaf29d7e5fb7669", "name": "", "style": { "stroke": "#000000", "fill": "#dbcbe7", "label": true }, "nodes": [ "bd475ea514c3894f", "6aaf1040d24de471", "214751161cc7f9b5", "55d15e9f5ece0f7c", "acfe133304c67d9c", "9ea3931a787bba3c", "a4e58b08c0eea1e5", "10eede7d3cf6c96b" ], "x": 254, "y": 1739, "w": 812, "h": 262 }, { "id": "0d550e54e47689b7", "type": "group", "z": "baaf29d7e5fb7669", "name": "Download", "style": { "stroke": "#000000", "fill": "#ffffbf", "label": true, "color": "#000000" }, "nodes": [ "29fe3868eba16df7", "4e798e4b65d6bf12", "adc6e81b2aedb225", "0a20ef46e7748b1e", "e7d2aa1c493ba25b", "273320efbf98133c", "563f8e70a85ad738", "cf7240d8048cc4b6", "93ee5874a33eb1a4", "ac478ff0fef25384", "fa6acc88e3f0b320", "cd5b8e901bd3f230", "c6c4e01f04fcd88f", "cb308b368444dd71", "e8907f3f5da69b86", "e0548a54a9683704" ], "x": 254, "y": 2059, "w": 812, "h": 362 }, { "id": "fb55fc6758f60171", "type": "junction", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "x": 280, "y": 440, "wires": [ [ "92817c47ae35eb75", "acfd5def78555ef0", "f06ae0071ba25c06" ] ] }, { "id": "073ab99bbeb03c7d", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 520, "y": 1180, "wires": [ [ "0d128aefc3a2cf1b", "616b0b3e423d1291", "83dcc8a4b378ebe3" ] ] }, { "id": "895a03be43f907e3", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 500, "y": 1360, "wires": [ [ "fa2e6d6596738beb", "ac9708af6bdb2ecb", "7be174206d1f58ae" ] ] }, { "id": "0e46ac9ea0a33b99", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 500, "y": 1540, "wires": [ [ "a4ea42a6efa9d3dd", "544b9fb7aedad5bc", "6cca030ff5f1e232" ] ] }, { "id": "27ac3c6e3fba5fd0", "type": "junction", "z": "baaf29d7e5fb7669", "x": 240, "y": 2140, "wires": [ [ "93ee5874a33eb1a4" ] ] }, { "id": "961becbc9e17af91", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 980, "y": 1180, "wires": [ [ "7361a080e1882f8a" ] ] }, { "id": "22bdea916a3aa66c", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 980, "y": 1360, "wires": [ [ "728598dea9ca8efa" ] ] }, { "id": "f7f000781e484962", "type": "junction", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "x": 980, "y": 1540, "wires": [ [ "70f6909e40cefce8" ] ] }, { "id": "aa8933d0b15e9412", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "mast", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 530, "y": 400, "wires": [ [] ] }, { "id": "ecef40b3fafb62f1", "type": "ui_button", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "group": "a61337d7ab709dc5", "order": 4, "width": "4", "height": "1", "passthru": false, "label": "Reset/Discover", "tooltip": "", "color": "", "bgcolor": "", "className": "", "icon": "", "payload": "", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 360, "y": 780, "wires": [ [ "467e2b90f4dc51d3" ] ] }, { "id": "78c71a74de79172c", "type": "comment", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "User Input", "info": "", "x": 340, "y": 280, "wires": [] }, { "id": "4c5b31614123fd2b", "type": "function", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "Set Master account", "func": "msg.payload = {\n \"name\": msg.user,\n \"password\": msg.password,\n \"privileges\":\"Admin\"\n}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 430, "y": 1020, "wires": [ [ "3c4fa1078222bfd1" ] ] }, { "id": "3c4fa1078222bfd1", "type": "Axis Security", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "preset": "1af13a1540441ff9", "address": "", "action": "Set account", "data": "", "options": "", "x": 630, "y": 1020, "wires": [ [ "581b20bcaf9b1b8f" ] ] }, { "id": "d5b362cd8bc14cee", "type": "Axis camera", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "preset": "1af13a1540441ff9", "action": "JPEG Image", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 830, "y": 1180, "wires": [ [ "961becbc9e17af91" ] ] }, { "id": "dcc0d83686952d81", "type": "Axis camera", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "preset": "1af13a1540441ff9", "action": "JPEG Image", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 850, "y": 1360, "wires": [ [ "22bdea916a3aa66c" ] ] }, { "id": "4c28891936fb4ad9", "type": "Axis camera", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "preset": "1af13a1540441ff9", "action": "JPEG Image", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 850, "y": 1540, "wires": [ [ "f7f000781e484962" ] ] }, { "id": "7361a080e1882f8a", "type": "ui_template", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "8941b8cef6a84be4", "name": "Cam 1", "order": 3, "width": "9", "height": "6", "format": "<img src=\"data:image/jpeg;base64, {{msg.payload}}\" style=\"width:100%\">", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", "x": 1250, "y": 1180, "wires": [ [] ] }, { "id": "728598dea9ca8efa", "type": "ui_template", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "a87a0b5f4aa850c8", "name": "Cam 2", "order": 3, "width": "9", "height": "6", "format": "<img src=\"data:image/jpeg;base64, {{msg.payload}}\" style=\"width:100%\">", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", "x": 1250, "y": 1360, "wires": [ [] ] }, { "id": "70f6909e40cefce8", "type": "ui_template", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "bcb08f4722214ecf", "name": "Cam 3", "order": 3, "width": "9", "height": "6", "format": "<img src=\"data:image/jpeg;base64, {{msg.payload}}\" style=\"width:100%\">", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", "x": 1250, "y": 1540, "wires": [ [] ] }, { "id": "92817c47ae35eb75", "type": "ui_dropdown", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "Cam 1", "label": "", "tooltip": "", "place": "Select position", "group": "8941b8cef6a84be4", "order": 2, "width": "5", "height": "1", "passthru": true, "multiple": false, "options": [ { "label": "Left", "value": "Left", "type": "str" }, { "label": "Right", "value": "Right", "type": "str" }, { "label": "Sab", "value": "Sab", "type": "str" } ], "payload": "", "topic": "topic", "topicType": "msg", "className": "", "x": 410, "y": 440, "wires": [ [ "203db81784abbeec" ] ] }, { "id": "acfd5def78555ef0", "type": "ui_dropdown", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "Cam 2", "label": "", "tooltip": "", "place": "Select position", "group": "a87a0b5f4aa850c8", "order": 2, "width": "5", "height": "1", "passthru": true, "multiple": false, "options": [ { "label": "Left", "value": "Left", "type": "str" }, { "label": "Right", "value": "Right", "type": "str" }, { "label": "Sab", "value": "Sab", "type": "str" } ], "payload": "", "topic": "topic", "topicType": "msg", "className": "", "x": 410, "y": 480, "wires": [ [ "14bffd4ab6c8baf4" ] ] }, { "id": "f06ae0071ba25c06", "type": "ui_dropdown", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "Cam 3", "label": "", "tooltip": "", "place": "Select position", "group": "bcb08f4722214ecf", "order": 2, "width": "5", "height": "1", "passthru": true, "multiple": false, "options": [ { "label": "Left", "value": "Left", "type": "str" }, { "label": "Right", "value": "Right", "type": "str" }, { "label": "Sab", "value": "Sab", "type": "str" } ], "payload": "", "topic": "topic", "topicType": "msg", "className": "", "x": 410, "y": 520, "wires": [ [ "3ad4cc80d2ca758f" ] ] }, { "id": "df2108c5cbe7111d", "type": "ui_text", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "8941b8cef6a84be4", "order": 1, "width": "4", "height": "1", "name": "", "label": "Device", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 1250, "y": 1220, "wires": [] }, { "id": "c7fc63d555e0eb8a", "type": "ui_text", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "a87a0b5f4aa850c8", "order": 1, "width": "4", "height": "1", "name": "", "label": "Device", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 1250, "y": 1400, "wires": [] }, { "id": "f51d81de2ccd6034", "type": "ui_text", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "group": "bcb08f4722214ecf", "order": 1, "width": "4", "height": "1", "name": "", "label": "Device", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 1250, "y": 1580, "wires": [] }, { "id": "bed6a73eb0b5f8af", "type": "change", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "", "tot": "str" }, { "t": "set", "p": "cam1", "pt": "flow", "to": "null", "tot": "json" }, { "t": "set", "p": "cam2", "pt": "flow", "to": "null", "tot": "json" }, { "t": "set", "p": "cam3", "pt": "flow", "to": "null", "tot": "json" }, { "t": "set", "p": "cam1Name", "pt": "flow", "to": "null", "tot": "json" }, { "t": "set", "p": "cam2Name", "pt": "flow", "to": "null", "tot": "json" }, { "t": "set", "p": "cam3Name", "pt": "flow", "to": "null", "tot": "json" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 420, "y": 840, "wires": [ [ "c20356359b9c43ac", "04af5d767a401368" ] ] }, { "id": "d6b1925593bd4ca8", "type": "link in", "z": "baaf29d7e5fb7669", "name": "link in 23", "links": [ "04af5d767a401368" ], "x": 85, "y": 440, "wires": [ [ "fb55fc6758f60171" ] ] }, { "id": "7d2d13bb20c92c8b", "type": "link in", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "link in 26", "links": [ "04af5d767a401368" ], "x": 775, "y": 1240, "wires": [ [ "df2108c5cbe7111d", "5a88c981d91dd3fb", "961becbc9e17af91" ] ] }, { "id": "b3fe6212143c1ce5", "type": "link in", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "link in 27", "links": [ "04af5d767a401368" ], "x": 775, "y": 1420, "wires": [ [ "c7fc63d555e0eb8a", "22bdea916a3aa66c", "5d86c9879d3e7a60" ] ] }, { "id": "9ed19d27f3c9822b", "type": "link in", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "link in 28", "links": [ "04af5d767a401368" ], "x": 775, "y": 1600, "wires": [ [ "f51d81de2ccd6034", "f7f000781e484962", "cc8332c54408ea23" ] ] }, { "id": "4e4957541ad307fc", "type": "inject", "z": "baaf29d7e5fb7669", "name": "Click here to download", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 1350, "y": 380, "wires": [ [ "13444c8fb1d4f14a" ] ] }, { "id": "b5d5f5d1c2b50fca", "type": "debug", "z": "baaf29d7e5fb7669", "name": "Add to config.acaps[]", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 2240, "y": 500, "wires": [] }, { "id": "13444c8fb1d4f14a", "type": "http request", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "aarch64", "method": "GET", "ret": "bin", "paytoqs": "ignore", "url": "http://ftp.axis.com/pub_soft/applications/acap/MotionGuard/2_3_2/MotionGuard_2_3_2%288%29.eap", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 1620, "y": 380, "wires": [ [ "3ff69ead60fdb581" ] ] }, { "id": "3ff69ead60fdb581", "type": "change", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "", "rules": [ { "t": "set", "p": "filepath", "pt": "msg", "to": "Provisioning/MotionGuard/aarch64.eap", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1820, "y": 380, "wires": [ [ "c1e754358cc26e7c" ] ] }, { "id": "c1e754358cc26e7c", "type": "file", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "", "filename": "filepath", "filenameType": "msg", "appendNewline": false, "createDir": true, "overwriteFile": "true", "encoding": "none", "x": 2000, "y": 380, "wires": [ [ "ad9a64cd7d99122f" ] ] }, { "id": "ad9a64cd7d99122f", "type": "http request", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "armv7hf", "method": "GET", "ret": "bin", "paytoqs": "ignore", "url": "http://ftp.axis.com/pub_soft/applications/acap/MotionGuard/2_3_2/MotionGuard_2_3_2%287%29.eap", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 1640, "y": 440, "wires": [ [ "a94676571f69c64c" ] ] }, { "id": "a94676571f69c64c", "type": "change", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "", "rules": [ { "t": "set", "p": "filepath", "pt": "msg", "to": "Provisioning/MotionGuard/armv7hf.eap", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1820, "y": 440, "wires": [ [ "cf6cab3a14c300b5" ] ] }, { "id": "cf6cab3a14c300b5", "type": "file", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "", "filename": "filepath", "filenameType": "msg", "appendNewline": false, "createDir": true, "overwriteFile": "true", "encoding": "none", "x": 2000, "y": 440, "wires": [ [ "2a5c6198e8d9273f" ] ] }, { "id": "2a5c6198e8d9273f", "type": "function", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "Append output to Config", "func": "msg.filepath = \"Provisioning/MotionGuard/info.json\";\nmsg.payload = {\n package: \"motionguard\",\n version: \"2.3-2\",\n source: \"http://ftp.axis.com/pub_soft/applications/acap/MotionGuard/2_3_2/\",\n armv7hf: \"Provisioning/MotionGuard/armv7hf.eap\",\n aarch64: \"Provisioning/MotionGuard/aarch64.eap\",\n config: null\n}\nmsg.payload = JSON.stringify(msg.payload,null,2);\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1690, "y": 500, "wires": [ [ "d00deaedb3535e3b" ] ] }, { "id": "5acccfb6d24631ee", "type": "comment", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "Download MotionGuard", "info": "", "x": 1660, "y": 320, "wires": [] }, { "id": "d00deaedb3535e3b", "type": "file", "z": "baaf29d7e5fb7669", "g": "5e540d0e9665bb68", "name": "", "filename": "filepath", "filenameType": "msg", "appendNewline": false, "createDir": true, "overwriteFile": "true", "encoding": "none", "x": 1920, "y": 500, "wires": [ [ "b5d5f5d1c2b50fca" ] ] }, { "id": "f5dce390a2b35a8c", "type": "template", "z": "baaf29d7e5fb7669", "g": "42c6ee118f421726", "name": "System Config", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "{\n \"accounts\": [\n {\n \"name\": \"{{flow.user}}\",\n \"password\": \"{{flow.password}}\",\n \"privileges\": \"Admin\"\n }\n ],\n \"zipstream\": {\n \"strength\": 20,\n \"minfps\": 15\n },\n \"textOverlays\": [\n {\n \"text\": \"%F %X\",\n \"position\": \"topLeft\",\n \"textColor\": \"white\",\n \"textBGColor\": \"black\",\n \"fontSize\": 48\n },\n {\n \"text\": \"BW{{flow.mast}} - #n\",\n \"position\": \"topRight\",\n \"textColor\": \"white\",\n \"textBGColor\": \"transparent\",\n \"fontSize\": 48\n }\n ]\n}\n", "output": "json", "x": 360, "y": 80, "wires": [ [ "48f35231a5c951c1" ] ] }, { "id": "48f35231a5c951c1", "type": "change", "z": "baaf29d7e5fb7669", "g": "42c6ee118f421726", "name": "", "rules": [ { "t": "set", "p": "config", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 80, "wires": [ [ "32057d7a5d4c39ed" ] ] }, { "id": "35587b7c1a40530e", "type": "Axis Discovery", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "output": "Every", "x": 620, "y": 900, "wires": [ [ "226da00a2b2ddc51" ] ] }, { "id": "c20356359b9c43ac", "type": "trigger", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "op1": "true", "op2": "false", "op1type": "bool", "op2type": "bool", "duration": "15", "extend": false, "overrideDelay": false, "units": "s", "reset": "", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 410, "y": 900, "wires": [ [ "35587b7c1a40530e" ] ] }, { "id": "1ef8d6f62502603a", "type": "Axis device", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "preset": "1af13a1540441ff9", "action": "Device Info", "cgi": "", "data": "", "options": "", "filename": "", "x": 610, "y": 960, "wires": [ [ "b64323816e73bbe5" ] ] }, { "id": "226da00a2b2ddc51", "type": "change", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "rules": [ { "t": "set", "p": "address", "pt": "msg", "to": "payload.address", "tot": "msg" }, { "t": "set", "p": "user", "pt": "msg", "to": "root", "tot": "str" }, { "t": "set", "p": "password", "pt": "msg", "to": "password", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 420, "y": 960, "wires": [ [ "1ef8d6f62502603a" ] ] }, { "id": "e3ccb20672897a21", "type": "ui_text_input", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "label": "Account", "tooltip": "", "group": "a61337d7ab709dc5", "order": 1, "width": "3", "height": "1", "passthru": true, "mode": "text", "delay": 300, "topic": "topic", "sendOnBlur": true, "className": "", "topicType": "msg", "x": 340, "y": 320, "wires": [ [ "952cd5b14e67b722" ] ] }, { "id": "952cd5b14e67b722", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "user", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 530, "y": 320, "wires": [ [] ] }, { "id": "9fd884726c4692b3", "type": "ui_text_input", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "label": "Password", "tooltip": "", "group": "a61337d7ab709dc5", "order": 2, "width": "3", "height": "1", "passthru": true, "mode": "password", "delay": 300, "topic": "topic", "sendOnBlur": true, "className": "", "topicType": "msg", "x": 340, "y": 360, "wires": [ [ "dbb110ab22774deb" ] ] }, { "id": "dbb110ab22774deb", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "password", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 360, "wires": [ [] ] }, { "id": "b64323816e73bbe5", "type": "switch", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "Is Camera", "property": "payload.camera", "propertyType": "msg", "rules": [ { "t": "eq", "v": "true", "vt": "jsonata" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 790, "y": 960, "wires": [ [ "612a8107c76591df" ] ] }, { "id": "636e0d617ac7057d", "type": "ui_text_input", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "label": "Mast ID", "tooltip": "", "group": "a61337d7ab709dc5", "order": 3, "width": "3", "height": "1", "passthru": true, "mode": "text", "delay": 300, "topic": "topic", "sendOnBlur": true, "className": "", "topicType": "msg", "x": 340, "y": 400, "wires": [ [ "aa8933d0b15e9412" ] ] }, { "id": "581b20bcaf9b1b8f", "type": "function", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "flow.camX", "func": "if( !flow.get(\"cam1\") ) {\n flow.set(\"cam1\",msg.camera);\n msg.topic = \"cam1\";\n msg.payload = msg.camera;\n return msg;\n}\n\nif( !flow.get(\"cam2\") ) {\n flow.set(\"cam2\",msg.camera);\n msg.topic = \"cam2\";\n msg.payload = msg.camera;\n return msg;\n}\n\nif( !flow.get(\"cam3\") ) {\n flow.set(\"cam3\",msg.camera);\n msg.topic = \"cam3\";\n msg.payload = msg.camera;\n return msg;\n}\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 1020, "wires": [ [ "95d2397c4bc9e2ef" ] ] }, { "id": "612a8107c76591df", "type": "change", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "rules": [ { "t": "set", "p": "user", "pt": "msg", "to": "user", "tot": "flow" }, { "t": "set", "p": "password", "pt": "msg", "to": "password", "tot": "flow" }, { "t": "set", "p": "camera", "pt": "msg", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 980, "y": 960, "wires": [ [ "4c5b31614123fd2b" ] ] }, { "id": "2998cbf647becba4", "type": "catch", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "", "scope": [ "3c4fa1078222bfd1", "1ef8d6f62502603a" ], "uncaught": false, "x": 810, "y": 900, "wires": [ [ "144d781246e42e83" ] ] }, { "id": "467e2b90f4dc51d3", "type": "function", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "Validate", "func": "var user = flow.get(\"user\");\nif(!user || user.length < 3) {\n msg.topic = \"Input error\";\n msg.payload = \"Set account\";\n node.send([msg,null]);\n return;\n}\n\nvar password = flow.get(\"password\");\nif(!password || password.length < 4) {\n msg.topic = \"Input error\";\n msg.payload = \"Set password\";\n node.send([msg,null]);\n return;\n}\n\nvar mast = flow.get(\"mast\");\nif(!mast || mast.length < 4) {\n msg.topic = \"Input error\";\n msg.payload = \"Set Mast ID\";\n node.send([msg,null]);\n return;\n}\n\n\nnode.send([null,msg]);\n", "outputs": 2, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 520, "y": 780, "wires": [ [ "4cc6d7f7da06c8ab" ], [ "bed6a73eb0b5f8af" ] ] }, { "id": "4cc6d7f7da06c8ab", "type": "ui_toast", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "position": "dialog", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 1, "ok": "OK", "cancel": "", "raw": false, "className": "", "topic": "", "name": "", "x": 730, "y": 780, "wires": [ [] ] }, { "id": "04af5d767a401368", "type": "link out", "z": "baaf29d7e5fb7669", "name": "Reset", "mode": "link", "links": [ "4299226793d90175", "7d2d13bb20c92c8b", "90032c1ec86a40db", "9ed19d27f3c9822b", "a3b8f8d4e724b310", "b3fe6212143c1ce5", "d6b1925593bd4ca8", "b9af5167051216c7" ], "x": 1275, "y": 840, "wires": [] }, { "id": "ba0135996c1eefc5", "type": "comment", "z": "baaf29d7e5fb7669", "name": "Reset", "info": "", "x": 1170, "y": 840, "wires": [] }, { "id": "1a82dad16a5a532c", "type": "comment", "z": "baaf29d7e5fb7669", "g": "c772619ac39db87a", "name": "Scan and set master account", "info": "", "x": 400, "y": 720, "wires": [] }, { "id": "b9af5167051216c7", "type": "link in", "z": "baaf29d7e5fb7669", "name": "link in 35", "links": [ "04af5d767a401368" ], "x": 85, "y": 80, "wires": [ [ "f5dce390a2b35a8c" ] ] }, { "id": "32057d7a5d4c39ed", "type": "debug", "z": "baaf29d7e5fb7669", "name": "debug 259", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 80, "wires": [] }, { "id": "b4f046e9941fa824", "type": "comment", "z": "baaf29d7e5fb7669", "name": "Reset", "info": "", "x": 190, "y": 440, "wires": [] }, { "id": "203db81784abbeec", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "cam1Name", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 440, "wires": [ [] ] }, { "id": "14bffd4ab6c8baf4", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "cam2Name", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 480, "wires": [ [] ] }, { "id": "3ad4cc80d2ca758f", "type": "change", "z": "baaf29d7e5fb7669", "g": "f9bc83ab4cf50337", "name": "", "rules": [ { "t": "set", "p": "cam3Name", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 520, "wires": [ [] ] }, { "id": "bd475ea514c3894f", "type": "ui_button", "z": "baaf29d7e5fb7669", "g": "5ab0ecbe31d1c1d1", "name": "", "group": "a61337d7ab709dc5", "order": 8, "width": "5", "height": "1", "passthru": false, "label": "Commit", "tooltip": "", "color": "", "bgcolor": "green", "className": "", "icon": "", "payload": "", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 340, "y": 1840, "wires": [ [ "6aaf1040d24de471" ] ] }, { "id": "f5c15bd293502687", "type": "switch", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "cam1", "vt": "str" }, { "t": "eq", "v": "cam2", "vt": "str" }, { "t": "eq", "v": "cam3", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 3, "x": 330, "y": 1260, "wires": [ [ "073ab99bbeb03c7d" ], [ "895a03be43f907e3" ], [ "0e46ac9ea0a33b99" ] ] }, { "id": "0d128aefc3a2cf1b", "type": "change", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "rules": [ { "t": "set", "p": "address", "pt": "msg", "to": "payload.address", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 1180, "wires": [ [ "d5b362cd8bc14cee" ] ] }, { "id": "616b0b3e423d1291", "type": "change", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload.serial", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 1220, "wires": [ [ "df2108c5cbe7111d" ] ] }, { "id": "fa2e6d6596738beb", "type": "change", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "rules": [ { "t": "set", "p": "address", "pt": "msg", "to": "payload.address", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 1360, "wires": [ [ "dcc0d83686952d81" ] ] }, { "id": "ac9708af6bdb2ecb", "type": "change", "z": "baaf29d7e5fb7669", "g": "08300987fdba579c", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload.serial", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 1400, "wires": [ [ "c7fc63d555e0eb8a" ] ] }, { "id": "a4ea42a6efa9d3dd", "type": "change", "z": "baa