[
    {
        "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": "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": 1540,
        "wires": [
            [
                "4c28891936fb4ad9"
            ]
        ]
    },
    {
        "id": "544b9fb7aedad5bc",
        "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": 1580,
        "wires": [
            [
                "f51d81de2ccd6034"
            ]
        ]
    },
    {
        "id": "6aaf1040d24de471",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "Validate",
        "func": "var config = flow.get(\"config\");\nif(!config || typeof config !== \"object\") {\n    msg.topic = \"Input error\";\n    msg.payload = \"Set configuration\";\n    node.send([msg,null]);\n    return;\n}\n\nvar 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\nnode.send([null,msg]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 1840,
        "wires": [
            [
                "214751161cc7f9b5"
            ],
            [
                "55d15e9f5ece0f7c",
                "acfe133304c67d9c",
                "9ea3931a787bba3c"
            ]
        ]
    },
    {
        "id": "144d781246e42e83",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "g": "c772619ac39db87a",
        "name": "debug 260",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 900,
        "wires": []
    },
    {
        "id": "214751161cc7f9b5",
        "type": "ui_toast",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "",
        "x": 670,
        "y": 1840,
        "wires": [
            []
        ]
    },
    {
        "id": "55d15e9f5ece0f7c",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "Config Camera 1",
        "func": "var cam = flow.get(\"cam1\");\nif( !cam ) {\n    node.error(\"Cam 1 is undefined\",msg);\n    return;\n}\n\nvar name = flow.get(\"cam1Name\");\nif( !name ) {\n    node.error(\"Cam 1 position is undefined\",msg);\n    return;\n}\n\nvar address = null;\n\nif(name.toLowerCase() === \"left\")\n    address = \"192.168.100.2\";\n\nif(name.toLowerCase() === \"right\")\n    msg.payload.address = \"192.168.100.3\";\n\nif(name.toLowerCase() === \"sab\")\n    msg.payload.address = \"192.168.100.4\";\n\n\nmsg.inventory = [\n    {\n        \"address\": cam.address,\n        \"properties\": {\n            \"name\": name,\n            \"static\": {\n                \"address\": address,\n                \"router\": \"100.168.100.1\"\n            }\n        }\n    }        \n]\n\nmsg.inventory = [\n    {\n        \"address\": cam.address,\n        \"properties\": {}\n    }        \n]\n\nmsg.config = flow.get(\"config\");\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 690,
        "y": 1880,
        "wires": [
            [
                "10eede7d3cf6c96b"
            ]
        ]
    },
    {
        "id": "acfe133304c67d9c",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "Config Camera 2",
        "func": "var cam = flow.get(\"cam2\");\nif( !cam ) {\n    node.error(\"Cam 2 is undefined\",msg);\n    return;\n}\nvar name = flow.get(\"cam2Name\");\nif( !name ) {\n    node.error(\"Cam 2 position is undefined\",msg);\n    return;\n}\n\nvar address = null;\n\nif(name.toLowerCase() === \"left\")\n    address = \"192.168.100.2\";\n\nif(name.toLowerCase() === \"right\")\n    msg.payload.address = \"192.168.100.3\";\n\nif(name.toLowerCase() === \"sab\")\n    msg.payload.address = \"192.168.100.4\";\n\n\nmsg.inventory = [\n    {\n        \"address\": cam.address,\n        \"properties\": {\n            \"name\": name,\n            \"static\": {\n                \"address\": address,\n                \"router\": \"100.168.100.1\"\n            }\n        }\n    }        \n]\nmsg.config = flow.get(\"config\");\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 690,
        "y": 1920,
        "wires": [
            [
                "10eede7d3cf6c96b"
            ]
        ]
    },
    {
        "id": "9ea3931a787bba3c",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "Config Camera 3",
        "func": "var cam = flow.get(\"cam3\");\nif( !cam ) {\n    node.error(\"Cam 3 is undefined\",msg);\n    return;\n}\nvar name = flow.get(\"cam3Name\");\nif( !name ) {\n    node.error(\"Cam 3 position is undefined\",msg);\n    return;\n}\n\nvar address = null;\n\nif(name.toLowerCase() === \"left\")\n    address = \"192.168.100.2\";\n\nif(name.toLowerCase() === \"right\")\n    msg.payload.address = \"192.168.100.3\";\n\nif(name.toLowerCase() === \"sab\")\n    msg.payload.address = \"192.168.100.4\";\n\n\nmsg.inventory = [\n    {\n        \"address\": cam.address,\n        \"properties\": {\n            \"name\": name,\n            \"static\": {\n                \"address\": address,\n                \"router\": \"100.168.100.1\"\n            }\n        }\n    }        \n]\nmsg.config = flow.get(\"config\");\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 690,
        "y": 1960,
        "wires": [
            [
                "10eede7d3cf6c96b"
            ]
        ]
    },
    {
        "id": "95d2397c4bc9e2ef",
        "type": "link out",
        "z": "baaf29d7e5fb7669",
        "name": "link out 113",
        "mode": "link",
        "links": [
            "5ea6572359fca40c"
        ],
        "x": 1135,
        "y": 1020,
        "wires": []
    },
    {
        "id": "5ea6572359fca40c",
        "type": "link in",
        "z": "baaf29d7e5fb7669",
        "name": "link in 36",
        "links": [
            "95d2397c4bc9e2ef"
        ],
        "x": 175,
        "y": 1260,
        "wires": [
            [
                "f5c15bd293502687"
            ]
        ]
    },
    {
        "id": "4b62c93af9acbac3",
        "type": "ui_toast",
        "z": "baaf29d7e5fb7669",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "green",
        "sendall": true,
        "outputs": 1,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "Complete",
        "x": 1240,
        "y": 1880,
        "wires": [
            []
        ]
    },
    {
        "id": "01e3abc853f8dcdf",
        "type": "ui_toast",
        "z": "baaf29d7e5fb7669",
        "position": "top right",
        "displayTime": "3",
        "highlight": "gray",
        "sendall": true,
        "outputs": 0,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "Status Message",
        "x": 1260,
        "y": 1840,
        "wires": []
    },
    {
        "id": "3c4767d1a3d9f4ca",
        "type": "comment",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Update dashboard cameras",
        "info": "",
        "x": 420,
        "y": 1140,
        "wires": []
    },
    {
        "id": "2c4d4b2d8bd8c1b0",
        "type": "comment",
        "z": "baaf29d7e5fb7669",
        "name": "Reset",
        "info": "",
        "x": 190,
        "y": 80,
        "wires": []
    },
    {
        "id": "fd5288200dd0a206",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "name": "debug 263",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1250,
        "y": 1800,
        "wires": []
    },
    {
        "id": "5ccbbb0726d770e2",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "name": "Error",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1230,
        "y": 1920,
        "wires": []
    },
    {
        "id": "a4e58b08c0eea1e5",
        "type": "comment",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "Provision",
        "info": "",
        "x": 340,
        "y": 1780,
        "wires": []
    },
    {
        "id": "10eede7d3cf6c96b",
        "type": "sf:6d42dc07fde7a1cc",
        "z": "baaf29d7e5fb7669",
        "g": "5ab0ecbe31d1c1d1",
        "name": "",
        "x": 940,
        "y": 1880,
        "wires": [
            [
                "fd5288200dd0a206",
                "01e3abc853f8dcdf"
            ],
            [
                "4b62c93af9acbac3"
            ],
            [
                "5ccbbb0726d770e2"
            ]
        ]
    },
    {
        "id": "6b2dd716bfd57ffe",
        "type": "catch",
        "z": "baaf29d7e5fb7669",
        "name": "",
        "scope": null,
        "uncaught": true,
        "x": 1320,
        "y": 140,
        "wires": [
            [
                "aec7f5d76a83f51a",
                "b6c7d3f4026a63f6"
            ]
        ]
    },
    {
        "id": "aec7f5d76a83f51a",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "name": "Message Error",
        "func": "msg.topic = \"Error\";\nmsg.payload = msg.error.message;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1520,
        "y": 140,
        "wires": [
            [
                "5cfe5c1eeb88c2a3"
            ]
        ]
    },
    {
        "id": "5cfe5c1eeb88c2a3",
        "type": "ui_toast",
        "z": "baaf29d7e5fb7669",
        "position": "top left",
        "displayTime": "5",
        "highlight": "red",
        "sendall": false,
        "outputs": 0,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "",
        "x": 1750,
        "y": 140,
        "wires": []
    },
    {
        "id": "b6c7d3f4026a63f6",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "name": "debug 270",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1540,
        "y": 180,
        "wires": []
    },
    {
        "id": "ef84c2099eea1d95",
        "type": "inject",
        "z": "baaf29d7e5fb7669",
        "name": "Q6135-LE",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Q6135-LE",
        "payloadType": "str",
        "x": 120,
        "y": 2140,
        "wires": [
            [
                "27ac3c6e3fba5fd0"
            ]
        ]
    },
    {
        "id": "402fa62b68c611f5",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "name": "Firmware info",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1180,
        "y": 2320,
        "wires": []
    },
    {
        "id": "c869aa6f1722a58e",
        "type": "inject",
        "z": "baaf29d7e5fb7669",
        "name": "M3115-LVE",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "M3115-LVE",
        "payloadType": "str",
        "x": 110,
        "y": 2180,
        "wires": [
            [
                "27ac3c6e3fba5fd0"
            ]
        ]
    },
    {
        "id": "29fe3868eba16df7",
        "type": "http request",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 570,
        "y": 2140,
        "wires": [
            [
                "4e798e4b65d6bf12"
            ]
        ]
    },
    {
        "id": "4e798e4b65d6bf12",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Version",
        "func": "if(msg.statusCode >= 400) {\n    node.error(msg.error.message,msg);\n    return;\n}\nmsg.firmware.version = msg.payload;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 780,
        "y": 2140,
        "wires": [
            [
                "adc6e81b2aedb225"
            ]
        ]
    },
    {
        "id": "adc6e81b2aedb225",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Download",
        "func": "msg.url = msg.firmware.url + \"/\" + msg.firmware.model + \".bin\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 2200,
        "wires": [
            [
                "e7d2aa1c493ba25b"
            ]
        ]
    },
    {
        "id": "0a20ef46e7748b1e",
        "type": "file",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "filename": "filepath",
        "filenameType": "msg",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 2260,
        "wires": [
            [
                "563f8e70a85ad738"
            ]
        ]
    },
    {
        "id": "e7d2aa1c493ba25b",
        "type": "http request",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "method": "GET",
        "ret": "bin",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 570,
        "y": 2200,
        "wires": [
            [
                "ac478ff0fef25384"
            ]
        ]
    },
    {
        "id": "273320efbf98133c",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Filepath",
        "func": "msg.filepath = msg.firmware.filepath + \"/firmware.bin\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 2260,
        "wires": [
            [
                "0a20ef46e7748b1e"
            ]
        ]
    },
    {
        "id": "563f8e70a85ad738",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Info",
        "func": "msg.filepath = msg.firmware.filepath + \"/info.json\";\n\nmsg.firmware.filepath = msg.firmware.filepath + \"/firmware.bin\";\nvar firmwares = flow.get(\"firmwares\") || {};\nfirmwares[msg.firmware.model] = msg.firmware;\nflow.set(\"firmwares\",firmwares)\n\nmsg.payload = JSON.stringify(msg.firmware,null,2);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 350,
        "y": 2320,
        "wires": [
            [
                "cf7240d8048cc4b6"
            ]
        ]
    },
    {
        "id": "cf7240d8048cc4b6",
        "type": "file",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "filename": "filepath",
        "filenameType": "msg",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 2320,
        "wires": [
            [
                "402fa62b68c611f5",
                "c6c4e01f04fcd88f"
            ]
        ]
    },
    {
        "id": "93ee5874a33eb1a4",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Firmware",
        "func": "msg.firmware = {\n    model: msg.payload,\n    url: \"http://ftp.axis.com/pub_soft/MPQT/\" + msg.payload + \"/latest\",\n    filepath: \"Provisioning/\" + msg.payload\n}\nmsg.url = msg.firmware.url + \"/ver.txt\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 340,
        "y": 2140,
        "wires": [
            [
                "29fe3868eba16df7"
            ]
        ]
    },
    {
        "id": "ac478ff0fef25384",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Validate",
        "func": "if(msg.statusCode >= 400) {\n    node.error(\"Download error\",msg);\n    return;\n}\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 780,
        "y": 2200,
        "wires": [
            [
                "273320efbf98133c"
            ]
        ]
    },
    {
        "id": "fa6acc88e3f0b320",
        "type": "inject",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "Initialize",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 360,
        "y": 2100,
        "wires": [
            [
                "cb308b368444dd71"
            ]
        ]
    },
    {
        "id": "cd5b8e901bd3f230",
        "type": "file",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "filename": "filepath",
        "filenameType": "msg",
        "appendNewline": false,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 2380,
        "wires": [
            []
        ]
    },
    {
        "id": "c6c4e01f04fcd88f",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "firmwares.json",
        "func": "var firmwares = flow.get(\"firmwares\");\n\nmsg.filepath = \"Provisioning/firmwares.json\";\nmsg.payload = JSON.stringify(firmwares,null,2);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 2380,
        "wires": [
            [
                "cd5b8e901bd3f230"
            ]
        ]
    },
    {
        "id": "cb308b368444dd71",
        "type": "file in",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "filename": "Provisioning/firmwares.json",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 580,
        "y": 2100,
        "wires": [
            [
                "e8907f3f5da69b86"
            ]
        ]
    },
    {
        "id": "e8907f3f5da69b86",
        "type": "json",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 780,
        "y": 2100,
        "wires": [
            [
                "e0548a54a9683704"
            ]
        ]
    },
    {
        "id": "e0548a54a9683704",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "0d550e54e47689b7",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "firmwares",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 950,
        "y": 2100,
        "wires": [
            [
                "2e8efc22d9872a04"
            ]
        ]
    },
    {
        "id": "2e8efc22d9872a04",
        "type": "debug",
        "z": "baaf29d7e5fb7669",
        "name": "Firmwares",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1170,
        "y": 2100,
        "wires": []
    },
    {
        "id": "298785bdd8bed7e4",
        "type": "inject",
        "z": "baaf29d7e5fb7669",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 150,
        "y": 740,
        "wires": [
            [
                "467e2b90f4dc51d3"
            ]
        ]
    },
    {
        "id": "31f75a053a1b9d2e",
        "type": "ui_text_input",
        "z": "baaf29d7e5fb7669",
        "g": "f9bc83ab4cf50337",
        "name": "",
        "label": "Scan segement",
        "tooltip": "",
        "group": "a61337d7ab709dc5",
        "order": 5,
        "width": "3",
        "height": "1",
        "passthru": true,
        "mode": "text",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 440,
        "y": 560,
        "wires": [
            [
                "64348f40a2ed1457"
            ]
        ]
    },
    {
        "id": "64348f40a2ed1457",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "f9bc83ab4cf50337",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "segment",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 630,
        "y": 560,
        "wires": [
            []
        ]
    },
    {
        "id": "6b255422bc18b4f3",
        "type": "ui_button",
        "z": "baaf29d7e5fb7669",
        "g": "f9bc83ab4cf50337",
        "name": "",
        "group": "a61337d7ab709dc5",
        "order": 6,
        "width": "3",
        "height": "1",
        "passthru": false,
        "label": "Scan",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 410,
        "y": 600,
        "wires": [
            [
                "1f536258b6f5758a"
            ]
        ]
    },
    {
        "id": "1f536258b6f5758a",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "f9bc83ab4cf50337",
        "name": "For Each Address",
        "func": "var segement = flow.get(\"segment\");\n\nconst octets = segement.split('.');\nvar scan = null;\nif (octets.length === 3 || octets.length === 4) {\n    scan = octets[0] + '.' + octets[1] + '.' + octets[2] + '.';\n} else {\n    return;\n}\n\nfor( var i = 87; i < 255; i++) {\n    msg.payload = {address: scan + i}\n    node.send(msg);\n}\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 630,
        "y": 600,
        "wires": [
            [
                "a930b2480e311362"
            ]
        ]
    },
    {
        "id": "a930b2480e311362",
        "type": "link out",
        "z": "baaf29d7e5fb7669",
        "name": "link out 119",
        "mode": "link",
        "links": [
            "ee01690903557096"
        ],
        "x": 805,
        "y": 600,
        "wires": []
    },
    {
        "id": "ee01690903557096",
        "type": "link in",
        "z": "baaf29d7e5fb7669",
        "name": "link in 37",
        "links": [
            "a930b2480e311362"
        ],
        "x": 175,
        "y": 960,
        "wires": [
            [
                "226da00a2b2ddc51"
            ]
        ]
    },
    {
        "id": "83dcc8a4b378ebe3",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Firmware",
        "func": "var firmwares = flow.get(\"firmwares\");\nvar model = msg.payload.model;\nif( firmwares.hasOwnProperty(model) ) {\n    if( msg.payload.firmware === firmwares[model].version ) {\n        msg.topic = \"Firmware OK\";\n        msg.enabled = false;\n    } else {\n        msg.enabled = true;\n        msg.topic = \"Upgrade to \" + firmwares[model].version;\n    }\n} else {\n        msg.topic = \"Latest undefined\";\n        msg.enabled = false;\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1260,
        "wires": [
            [
                "0146fa286783dac4"
            ]
        ]
    },
    {
        "id": "0146fa286783dac4",
        "type": "ui_button",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "group": "8941b8cef6a84be4",
        "order": 3,
        "width": "5",
        "height": "1",
        "passthru": false,
        "label": "{{topic}}",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1220,
        "y": 1260,
        "wires": [
            [
                "9bb05421db4610f7"
            ]
        ]
    },
    {
        "id": "7be174206d1f58ae",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Firmware",
        "func": "var firmwares = flow.get(\"firmwares\");\nvar model = msg.payload.model;\nif( firmwares.hasOwnProperty(model) ) {\n    if( msg.payload.firmware === firmwares[model].version ) {\n        msg.topic = \"Firmware OK\";\n        msg.enabled = false;\n    } else {\n        msg.enabled = true;\n        msg.topic = \"Upgrade to \" + firmwares[model].version;\n    }\n} else {\n        msg.topic = \"Latest undefined\";\n        msg.enabled = false;\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1440,
        "wires": [
            [
                "243ac3ae81b9e32f"
            ]
        ]
    },
    {
        "id": "243ac3ae81b9e32f",
        "type": "ui_button",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "group": "a87a0b5f4aa850c8",
        "order": 3,
        "width": "5",
        "height": "1",
        "passthru": false,
        "label": "{{topic}}",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1220,
        "y": 1440,
        "wires": [
            [
                "930a008941deabaa"
            ]
        ]
    },
    {
        "id": "5a88c981d91dd3fb",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 940,
        "y": 1240,
        "wires": [
            [
                "0146fa286783dac4"
            ]
        ]
    },
    {
        "id": "5d86c9879d3e7a60",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 940,
        "y": 1420,
        "wires": [
            [
                "243ac3ae81b9e32f"
            ]
        ]
    },
    {
        "id": "6cca030ff5f1e232",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Firmware",
        "func": "var firmwares = flow.get(\"firmwares\");\nvar model = msg.payload.model;\nif( firmwares.hasOwnProperty(model) ) {\n    if( msg.payload.firmware === firmwares[model].version ) {\n        msg.topic = \"Firmware OK\";\n        msg.enabled = false;\n    } else {\n        msg.enabled = true;\n        msg.topic = \"Upgrade to \" + firmwares[model].version;\n    }\n} else {\n    msg.enabled = false;\n    msg.topic = \"Latest undefined\";\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1620,
        "wires": [
            [
                "fa54b36293acc994"
            ]
        ]
    },
    {
        "id": "fa54b36293acc994",
        "type": "ui_button",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "group": "bcb08f4722214ecf",
        "order": 3,
        "width": "5",
        "height": "1",
        "passthru": false,
        "label": "{{topic}}",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1220,
        "y": 1620,
        "wires": [
            [
                "578a2dbfbaaecf0b"
            ]
        ]
    },
    {
        "id": "cc8332c54408ea23",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 1600,
        "wires": [
            [
                "fa54b36293acc994"
            ]
        ]
    },
    {
        "id": "9bb05421db4610f7",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "func": "var cam = flow.get(\"cam1\");\nvar firmware = flow.get(\"firmwares\")[cam.model];\nif( !cam || !firmware ) {\n    msg.payload = \"Missing data\";\n    node.error(\"Cam 1 upgrade error\", msg);\n    return;\n}\n\nmsg.address = cam.address;\nmsg.user = flow.get(\"user\");\nmsg.password = flow.get(\"password\");\nmsg.filename = firmware.filepath;\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1300,
        "wires": [
            [
                "d51aefe33febdeb1",
                "5a88c981d91dd3fb"
            ]
        ]
    },
    {
        "id": "d51aefe33febdeb1",
        "type": "Axis device",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Upgrade firmware",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 830,
        "y": 1300,
        "wires": [
            [
                "3c25f12c1dd67c7c"
            ]
        ]
    },
    {
        "id": "3c25f12c1dd67c7c",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "Upgrade complete",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 1300,
        "wires": [
            [
                "0146fa286783dac4"
            ]
        ]
    },
    {
        "id": "930a008941deabaa",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "func": "var cam = flow.get(\"cam2\");\nvar firmware = flow.get(\"firmwares\")[cam.model];\nif( !cam || !firmware ) {\n    msg.payload = \"Missing data\";\n    node.error(\"Cam 1 upgrade error\", msg);\n    return;\n}\n\nmsg.address = cam.address;\nmsg.user = flow.get(\"user\");\nmsg.password = flow.get(\"password\");\nmsg.filename = firmware.filepath;\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1480,
        "wires": [
            [
                "5d86c9879d3e7a60",
                "2352d72e4f8efe33"
            ]
        ]
    },
    {
        "id": "578a2dbfbaaecf0b",
        "type": "function",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "Upgrade",
        "func": "var cam = flow.get(\"cam3\");\nvar firmware = flow.get(\"firmwares\")[cam.model];\nif( !cam || !firmware ) {\n    msg.payload = \"Missing data\";\n    node.error(\"Cam 1 upgrade error\", msg);\n    return;\n}\n\nmsg.address = cam.address;\nmsg.user = flow.get(\"user\");\nmsg.password = flow.get(\"password\");\nmsg.filename = firmware.filepath;\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1660,
        "wires": [
            [
                "7b37624c5d9b9dba",
                "cc8332c54408ea23"
            ]
        ]
    },
    {
        "id": "2352d72e4f8efe33",
        "type": "Axis device",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Upgrade firmware",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 830,
        "y": 1480,
        "wires": [
            [
                "d6745a1e07a4c7ec"
            ]
        ]
    },
    {
        "id": "d6745a1e07a4c7ec",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "Upgrade complete",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 1480,
        "wires": [
            [
                "243ac3ae81b9e32f"
            ]
        ]
    },
    {
        "id": "7b37624c5d9b9dba",
        "type": "Axis device",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Upgrade firmware",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 830,
        "y": 1660,
        "wires": [
            [
                "b4faf7220a4a0199"
            ]
        ]
    },
    {
        "id": "b4faf7220a4a0199",
        "type": "change",
        "z": "baaf29d7e5fb7669",
        "g": "08300987fdba579c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "Upgrade complete",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 1660,
        "wires": [
            [
                "fa54b36293acc994"
            ]
        ]
    },
    {
        "id": "a824a163027f6978",
        "type": "template",
        "z": "baaf29d7e5fb7669",
        "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            \"name\": \"\",\n            \"password\": \"\",\n            \"privileges\": \"Admin\"\n        },\n        {\n            \"name\": \"\",\n            \"password\": \"\",\n            \"privileges\": \"Admin\"\n        }\n    ],\n    \"timezone\": \"Europe/Stockholm\",\n    \"ntp\": [\"192.168.100.1\"],\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    \"imageOverlay\": {\n        \"filepath\": \"Provsioning/bauwatch.jpeg\",\n        \"position\":\"bottomRight\",\n        \"scale\": true,\n        \"alpha\": 0\n    },\n    \"onvif\": [\n        {\n            \"name\": \"\",\n            \"password\": \"\",\n            \"privileges\": \"Administrator\"\n        }\n    ],\n    \"acaps\": [\n        {\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        }    \n    ]\n}\n",
        "output": "json",
        "x": 300,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "13ca0dfb9ab387c0",
        "type": "ui_spacer",
        "z": "baaf29d7e5fb7669",
        "name": "spacer",
        "group": "a61337d7ab709dc5",
        "order": 7,
        "width": "2",
        "height": "1"
    },
    {
        "id": "a61337d7ab709dc5",
        "type": "ui_group",
        "name": "Settings",
        "tab": "3777e3cc19b30c1a",
        "order": 1,
        "disp": false,
        "width": "30",
        "collapse": false,
        "className": ""
    },
    {
        "id": "1af13a1540441ff9",
        "type": "Device Access",
        "name": "Provision",
        "address": "",
        "protocol": "http"
    },
    {
        "id": "8941b8cef6a84be4",
        "type": "ui_group",
        "name": "Cam 1",
        "tab": "3777e3cc19b30c1a",
        "order": 3,
        "disp": true,
        "width": "9",
        "collapse": false,
        "className": ""
    },
    {
        "id": "a87a0b5f4aa850c8",
        "type": "ui_group",
        "name": "Cam 2",
        "tab": "3777e3cc19b30c1a",
        "order": 4,
        "disp": true,
        "width": "9",
        "collapse": false,
        "className": ""
    },
    {
        "id": "bcb08f4722214ecf",
        "type": "ui_group",
        "name": "Cam 3",
        "tab": "3777e3cc19b30c1a",
        "order": 5,
        "disp": true,
        "width": "9",
        "collapse": false,
        "className": ""
    },
    {
        "id": "3777e3cc19b30c1a",
        "type": "ui_tab",
        "name": "BauWatch",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]