{
	"id": "6d42dc07fde7a1cc",
	"type": "subflow",
	"name": "Provision Axis Devices",
	"info": "",
	"category": "",
        "in": [
            {
                "x": 60,
                "y": 60,
                "wires": [
                    {
                        "id": "0d89bccafa5fc67a"
                    }
                ]
            }
        ],
        "out": [
            {
                "x": 580,
                "y": 60,
                "wires": [
                    {
                        "id": "ab0de88705f5928e",
                        "port": 0
                    }
                ]
            },
            {
                "x": 580,
                "y": 120,
                "wires": [
                    {
                        "id": "e99455cc43f63f88",
                        "port": 0
                    }
                ]
            },
            {
                "x": 580,
                "y": 180,
                "wires": [
                    {
                        "id": "1288c92df25e4db9",
                        "port": 0
                    },
                    {
                        "id": "a078b3a81d2fdcda",
                        "port": 0
                    }
                ]
            }
        ],
	"env": [],
	"meta": {},
	"category": "Axis",
	"color": "#FFCC33",
	"icon": "font-awesome/fa-gears",
	"flow": [
    {
        "id": "ab0de88705f5928e",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Status",
        "links": [
            "5e8692de0f04745a",
            "86dea86e82867012",
            "806a20e46c8be199",
            "60d9101a39b4e980",
            "57496831298e1a7d",
            "161b25e016f50fa3",
            "886c0134bc92f6bf",
            "21d4834648058d9e",
            "a328953bf81d973e",
            "c0e63e2b0e8caac6",
            "071c52e45c343d11",
            "5994b5fc8ca27421",
            "9e58ee7279b9d333",
            "2f2ed863cefd4060",
            "7972e64eb0ed4c3f",
            "52df476c353f8a8f",
            "0728568abda0a7ac"
        ],
        "x": 265,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "fddb3534c2517406",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "name": "Status",
        "info": "",
        "x": 370,
        "y": 60,
        "wires": []
    },
    {
        "id": "1288c92df25e4db9",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "scope": null,
        "uncaught": true,
        "x": 400,
        "y": 220,
        "wires": [
            []
        ]
    },
    {
        "id": "ac6949d903ee205c",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Complete",
        "links": [
            "287cb6ace8dd5738",
            "932db199393f0a2d"
        ],
        "x": 265,
        "y": 120,
        "wires": [
            [
                "e99455cc43f63f88"
            ]
        ]
    },
    {
        "id": "e99455cc43f63f88",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "name": "Complete",
        "func": "msg.topic = \"complete\";\nmsg.payload = msg.device.serial + \": Complete\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "a078b3a81d2fdcda",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Error",
        "links": [
            "513453f276e3a282",
            "a046d81f10eda1c3",
            "a1132cb83f9eb7b6",
            "b316b11b63286616",
            "60a1051c99471b64",
            "2f92d0e0f42d8935",
            "0a770118f48df09e",
            "5814c39c90c89a88",
            "b285ad40911ab7da",
            "004dce845d45232d",
            "16b4a91457d2045e",
            "d09d6605ad808f1f",
            "c633865739c6a14a",
            "58f5540be0ce9b09",
            "360f1c59d0d2a83b",
            "1c5d0374e6c83aba",
            "a334af77b4380ea2",
            "3ef024f5d8a5f052",
            "04c98396adc5499d"
        ],
        "x": 265,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "65b64f2e59d37cef",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "name": "Error",
        "info": "",
        "x": 370,
        "y": 180,
        "wires": []
    },
    {
        "id": "e437846c69820d56",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "Device",
        "mode": "link",
        "links": [
            "8db313cfcad2d6aa"
        ],
        "x": 1325,
        "y": 540,
        "wires": []
    },
    {
        "id": "2694ca95763e24a2",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "name": "For Each Device",
        "info": "",
        "x": 1200,
        "y": 540,
        "wires": []
    },
    {
        "id": "c1471f737727d07a",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Set Name",
        "links": [
            "c7996c7136a87da7"
        ],
        "x": 175,
        "y": 1060,
        "wires": [
            [
                "131edbc69bf7b518"
            ]
        ]
    },
    {
        "id": "b804be045840899a",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 85",
        "mode": "link",
        "links": [
            "191e5e0998507551"
        ],
        "x": 785,
        "y": 1140,
        "wires": []
    },
    {
        "id": "8db313cfcad2d6aa",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Add accounts",
        "links": [
            "e437846c69820d56"
        ],
        "x": 165,
        "y": 760,
        "wires": [
            [
                "3c0225d0216bb766"
            ]
        ]
    },
    {
        "id": "c7996c7136a87da7",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 76",
        "mode": "link",
        "links": [
            "c1471f737727d07a"
        ],
        "x": 1235,
        "y": 880,
        "wires": []
    },
    {
        "id": "8bc568d811a27608",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Account \" + msg.config.accounts[0].name + \" set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 720,
        "y": 760,
        "wires": [
            [
                "acbd4d1e2563f3b4"
            ]
        ]
    },
    {
        "id": "86dea86e82867012",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 90",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 785,
        "y": 1060,
        "wires": []
    },
    {
        "id": "5e8692de0f04745a",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 89",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1235,
        "y": 760,
        "wires": []
    },
    {
        "id": "b316b11b63286616",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 122",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1235,
        "y": 840,
        "wires": []
    },
    {
        "id": "60a1051c99471b64",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 123",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 785,
        "y": 1100,
        "wires": []
    },
    {
        "id": "c9c7c7b318d48036",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "For Each Cameras",
        "func": "msg.inventory.forEach(function(device){\n    msg.address = device.address;\n    msg.properties = device.properties || null;\n    node.send(msg);\n});\n",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 570,
        "y": 420,
        "wires": [
            [
                "91a3709e3a1593af"
            ]
        ]
    },
    {
        "id": "91a3709e3a1593af",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "Main Account",
        "func": "if (!msg.config.hasOwnProperty(\"accounts\") || !msg.config.accounts || !Array.isArray(msg.config.accounts)) {\n    node.error(\"Invalid accounts in config config\", msg);\n    return;\n}\n\nif( msg.config.accounts.length === 0 ) {\n    node.error(\"No accounts defined\", msg);\n    return;\n}\n\nif (!msg.config.accounts[0].hasOwnProperty(\"name\") || msg.config.accounts[0].name.length < 2) {\n    node.error(\"Invalid account name\", msg);\n    return;\n}\n\nif (!msg.config.accounts[0].hasOwnProperty(\"password\") || msg.config.accounts[0].password.length < 5) {\n    node.error(\"Invalid account password\", msg);\n    return;\n}\n\nmsg.user = msg.config.accounts[0].name;\nmsg.password = msg.config.accounts[0].password;\n\nmsg.payload = {\n    \"name\": msg.user,\n    \"password\": msg.password,\n    \"privileges\": \"Admin\"\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 800,
        "y": 420,
        "wires": [
            [
                "ea562c7b8a1f4275"
            ]
        ]
    },
    {
        "id": "ea562c7b8a1f4275",
        "type": "Axis Security",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "",
        "preset": "1af13a1540441ff9",
        "address": "",
        "action": "Set account",
        "data": "",
        "options": "",
        "x": 1010,
        "y": 420,
        "wires": [
            [
                "affed36236d1f218"
            ]
        ]
    },
    {
        "id": "affed36236d1f218",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Device Info",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 350,
        "y": 480,
        "wires": [
            [
                "769ff43a69fc38a7"
            ]
        ]
    },
    {
        "id": "769ff43a69fc38a7",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "msg.device",
        "rules": [
            {
                "t": "set",
                "p": "device",
                "pt": "msg",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 570,
        "y": 480,
        "wires": [
            [
                "e76f222c6b9b1ea4"
            ]
        ]
    },
    {
        "id": "80f1193e220c911b",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "Run staging",
        "info": "",
        "x": 320,
        "y": 360,
        "wires": []
    },
    {
        "id": "e76f222c6b9b1ea4",
        "type": "Axis camera",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Camera Info",
        "resolution": "640x360",
        "output": "Base64",
        "filename": "",
        "options": "",
        "data": "",
        "x": 350,
        "y": 540,
        "wires": [
            [
                "13caf90fc2de50a9"
            ]
        ]
    },
    {
        "id": "13caf90fc2de50a9",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "msg.camera",
        "rules": [
            {
                "t": "set",
                "p": "camera",
                "pt": "msg",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 570,
        "y": 540,
        "wires": [
            [
                "d836cad2f50a5457"
            ]
        ]
    },
    {
        "id": "9f513e6861088740",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "",
        "scope": [
            "e76f222c6b9b1ea4"
        ],
        "uncaught": false,
        "x": 340,
        "y": 580,
        "wires": [
            [
                "c2d84c7da4c38380"
            ]
        ]
    },
    {
        "id": "c2d84c7da4c38380",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "msg.camera",
        "rules": [
            {
                "t": "set",
                "p": "camera",
                "pt": "msg",
                "to": "null",
                "tot": "json"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 570,
        "y": 580,
        "wires": [
            [
                "d836cad2f50a5457"
            ]
        ]
    },
    {
        "id": "2169731c96098748",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "name": "Validate",
        "func": "if(!msg.config || typeof msg.config !== \"object\"){\n    node.error(\"Config undefined\", msg);\n    return;\n}\n\nif(!msg.inventory || !Array.isArray(msg.inventory) || msg.inventory.length === 0){\n    node.error(\"Inventory undefined\", msg);\n    return;\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 340,
        "y": 420,
        "wires": [
            [
                "c9c7c7b318d48036"
            ]
        ]
    },
    {
        "id": "d1ab771eab9eb53f",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Set name",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 480,
        "y": 1060,
        "wires": [
            [
                "50dedcee8b98d13d",
                "63dfe84fecef5567"
            ]
        ]
    },
    {
        "id": "926d536c882b9c39",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "name": "Set name for host, PnP and Bonjour",
        "info": "",
        "x": 380,
        "y": 1000,
        "wires": []
    },
    {
        "id": "63dfe84fecef5567",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Name set to \" + msg.properties.name;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 670,
        "y": 1060,
        "wires": [
            [
                "86dea86e82867012"
            ]
        ]
    },
    {
        "id": "131edbc69bf7b518",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "name": "Name",
        "func": "if( !msg.hasOwnProperty(\"properties\") || !msg.properties  ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.properties.hasOwnProperty(\"name\") || !msg.properties.name || typeof msg.properties.name !== \"string\" || msg.properties.name.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = msg.properties.name;\nnode.send([msg],null);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 1060,
        "wires": [
            [
                "d1ab771eab9eb53f"
            ],
            [
                "e5ee3b4d153d64d5"
            ]
        ]
    },
    {
        "id": "d6164839df4a17f5",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "name": "",
        "scope": [
            "d1ab771eab9eb53f"
        ],
        "uncaught": false,
        "x": 480,
        "y": 1100,
        "wires": [
            [
                "60a1051c99471b64",
                "50dedcee8b98d13d"
            ]
        ]
    },
    {
        "id": "3c0225d0216bb766",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "2:nd Account",
        "func": "if( msg.config.accounts.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.config.accounts[1].hasOwnProperty(\"name\") || !msg.config.accounts[1].name || msg.config.accounts[1].name.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.config.accounts[1].hasOwnProperty(\"password\") || !msg.config.accounts[1].password || msg.config.accounts[1].password.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nmsg.payload = {\n    name: msg.config.accounts[1].name,\n    password: msg.config.accounts[1].password,\n    privileges: msg.config.accounts[1].privileges\n}\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 310,
        "y": 760,
        "wires": [
            [
                "2edb98203af01703"
            ],
            [
                "89dc8d2d67998f73"
            ]
        ]
    },
    {
        "id": "2edb98203af01703",
        "type": "Axis Security",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "",
        "preset": "1af13a1540441ff9",
        "address": "",
        "action": "Set account",
        "data": "",
        "options": "",
        "x": 550,
        "y": 760,
        "wires": [
            [
                "4ea6ebd542b86370",
                "8bc568d811a27608"
            ]
        ]
    },
    {
        "id": "4ea6ebd542b86370",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "3:nd Account",
        "func": "if( msg.config.accounts.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.config.accounts[2].hasOwnProperty(\"name\") || !msg.config.accounts[2].name || msg.config.accounts[2].name.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.config.accounts[2].hasOwnProperty(\"password\") || !msg.config.accounts[2].password || msg.config.accounts[2].password.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    name: msg.config.accounts[2].name,\n    password: msg.config.accounts[2].password,\n    privileges: msg.config.accounts[2].privileges\n}\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 710,
        "y": 800,
        "wires": [
            [
                "eb200af9820293b5"
            ],
            [
                "288d0df563040762"
            ]
        ]
    },
    {
        "id": "eb200af9820293b5",
        "type": "Axis Security",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "",
        "preset": "1af13a1540441ff9",
        "address": "",
        "action": "Set account",
        "data": "",
        "options": "",
        "x": 910,
        "y": 800,
        "wires": [
            [
                "f759fcf09dcac666",
                "53f828d169db79fb"
            ]
        ]
    },
    {
        "id": "be8ea6786bdd3d39",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "Add additional accounts",
        "info": "",
        "x": 340,
        "y": 700,
        "wires": []
    },
    {
        "id": "53f828d169db79fb",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Account \" + msg.config.accounts[1].name + \" set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1090,
        "y": 800,
        "wires": [
            [
                "acbd4d1e2563f3b4"
            ]
        ]
    },
    {
        "id": "5f694fba9c51a72a",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "name": "",
        "scope": [
            "2edb98203af01703",
            "eb200af9820293b5"
        ],
        "uncaught": false,
        "x": 910,
        "y": 840,
        "wires": [
            [
                "b316b11b63286616",
                "f759fcf09dcac666"
            ]
        ]
    },
    {
        "id": "f661fdf2bf34b1c5",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "SSH",
        "links": [
            "1ad70f1f83167917"
        ],
        "x": 175,
        "y": 3880,
        "wires": [
            [
                "679feabbdc4c2c75"
            ]
        ]
    },
    {
        "id": "8d03416383ccd583",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 77",
        "mode": "link",
        "links": [
            "af454b1b04a6b644"
        ],
        "x": 1365,
        "y": 3960,
        "wires": []
    },
    {
        "id": "3d534640c60e6a85",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "MQTT",
        "links": [
            "5432395a324f6d6b"
        ],
        "x": 175,
        "y": 3460,
        "wires": [
            [
                "b475f62b037384e9"
            ]
        ]
    },
    {
        "id": "1ad70f1f83167917",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 78",
        "mode": "link",
        "links": [
            "f661fdf2bf34b1c5"
        ],
        "x": 2165,
        "y": 3720,
        "wires": []
    },
    {
        "id": "af454b1b04a6b644",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "ACAPS",
        "links": [
            "8d03416383ccd583"
        ],
        "x": 175,
        "y": 4120,
        "wires": [
            [
                "cf069fc7b849fdde"
            ]
        ]
    },
    {
        "id": "2f2ed863cefd4060",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 79",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 2065,
        "y": 4200,
        "wires": []
    },
    {
        "id": "d007bf03b471e4c1",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "TLS",
        "links": [
            "38174e52c149c06d"
        ],
        "x": 165,
        "y": 2080,
        "wires": [
            [
                "663a2017c1b1b044"
            ]
        ]
    },
    {
        "id": "e484f5dc92c5eba1",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 80",
        "mode": "link",
        "links": [
            "727f7885b185355b"
        ],
        "x": 1745,
        "y": 2160,
        "wires": []
    },
    {
        "id": "b62b17d9f455d06a",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Text Overlays",
        "links": [
            "b64a17ac0e500ddc"
        ],
        "x": 165,
        "y": 2940,
        "wires": [
            [
                "e08e1844c2ca78fb"
            ]
        ]
    },
    {
        "id": "c7680999c23267ca",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 81",
        "mode": "link",
        "links": [
            "ba200e8e2941c6d9"
        ],
        "x": 1705,
        "y": 3060,
        "wires": []
    },
    {
        "id": "727f7885b185355b",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "ONVIF",
        "links": [
            "e484f5dc92c5eba1"
        ],
        "x": 165,
        "y": 2340,
        "wires": [
            [
                "1589857e7040c711"
            ]
        ]
    },
    {
        "id": "1f48ecb7127e748a",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 82",
        "mode": "link",
        "links": [
            "b739739b90136125"
        ],
        "x": 2305,
        "y": 2520,
        "wires": []
    },
    {
        "id": "b739739b90136125",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Remove overlays",
        "links": [
            "1f48ecb7127e748a"
        ],
        "x": 165,
        "y": 2700,
        "wires": [
            [
                "3dd31cedf03be8b6"
            ]
        ]
    },
    {
        "id": "b64a17ac0e500ddc",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 83",
        "mode": "link",
        "links": [
            "b62b17d9f455d06a"
        ],
        "x": 2255,
        "y": 2780,
        "wires": []
    },
    {
        "id": "ba200e8e2941c6d9",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Image Overlays",
        "links": [
            "c7680999c23267ca"
        ],
        "x": 165,
        "y": 3220,
        "wires": [
            [
                "d6aea0ddd6f87fd4"
            ]
        ]
    },
    {
        "id": "5432395a324f6d6b",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 84",
        "mode": "link",
        "links": [
            "3d534640c60e6a85"
        ],
        "x": 1415,
        "y": 3300,
        "wires": []
    },
    {
        "id": "191e5e0998507551",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Timezone",
        "links": [
            "b804be045840899a"
        ],
        "x": 175,
        "y": 1300,
        "wires": [
            [
                "aefd78b4397260fe"
            ]
        ]
    },
    {
        "id": "47ae6c3fec806929",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 86",
        "mode": "link",
        "links": [
            "4fa416059885f4ac"
        ],
        "x": 815,
        "y": 1380,
        "wires": []
    },
    {
        "id": "c629be351ef2984f",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Zipstream",
        "links": [
            "edeb2af62b5c8894"
        ],
        "x": 165,
        "y": 1780,
        "wires": [
            [
                "d756c942f3c2f3fe"
            ]
        ]
    },
    {
        "id": "38174e52c149c06d",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 87",
        "mode": "link",
        "links": [
            "d007bf03b471e4c1"
        ],
        "x": 1935,
        "y": 1920,
        "wires": []
    },
    {
        "id": "57496831298e1a7d",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 93",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1745,
        "y": 2080,
        "wires": []
    },
    {
        "id": "161b25e016f50fa3",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 94",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 2295,
        "y": 2340,
        "wires": []
    },
    {
        "id": "21d4834648058d9e",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 95",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1705,
        "y": 2940,
        "wires": []
    },
    {
        "id": "a328953bf81d973e",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 96",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1415,
        "y": 3220,
        "wires": []
    },
    {
        "id": "c0e63e2b0e8caac6",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 97",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 2165,
        "y": 3460,
        "wires": []
    },
    {
        "id": "071c52e45c343d11",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 98",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1365,
        "y": 3880,
        "wires": []
    },
    {
        "id": "60d9101a39b4e980",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 92",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1935,
        "y": 1780,
        "wires": []
    },
    {
        "id": "806a20e46c8be199",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 91",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 815,
        "y": 1300,
        "wires": []
    },
    {
        "id": "c503f405e50a5c52",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 108",
        "mode": "link",
        "links": [
            "259734a2ea35c73b",
            "2ff71a0ff5e4e9a2"
        ],
        "x": 2065,
        "y": 4320,
        "wires": []
    },
    {
        "id": "52df476c353f8a8f",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 109",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1455,
        "y": 4940,
        "wires": []
    },
    {
        "id": "4bb73f307d5961f6",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "link in 32",
        "links": [
            "cc693c5fc7a2061e",
            "23959cbded70f3a9"
        ],
        "x": 155,
        "y": 4940,
        "wires": [
            [
                "8948ca6d5679cc07"
            ]
        ]
    },
    {
        "id": "932db199393f0a2d",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 110",
        "mode": "link",
        "links": [
            "ac6949d903ee205c"
        ],
        "x": 1455,
        "y": 5040,
        "wires": []
    },
    {
        "id": "7d77a0375c134bc3",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "name": "When Adding more configurations, add them below this comment before potentially device changes to fixed IP",
        "info": "",
        "x": 620,
        "y": 4800,
        "wires": []
    },
    {
        "id": "2ff71a0ff5e4e9a2",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "ACAPS",
        "links": [
            "c503f405e50a5c52"
        ],
        "x": 175,
        "y": 4500,
        "wires": [
            [
                "4f2f75bda542e219"
            ]
        ]
    },
    {
        "id": "23959cbded70f3a9",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 114",
        "mode": "link",
        "links": [
            "4bb73f307d5961f6"
        ],
        "x": 1365,
        "y": 4640,
        "wires": []
    },
    {
        "id": "5994b5fc8ca27421",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 115",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1365,
        "y": 4440,
        "wires": []
    },
    {
        "id": "58f5540be0ce9b09",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 116",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1365,
        "y": 4480,
        "wires": []
    },
    {
        "id": "360f1c59d0d2a83b",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 117",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1365,
        "y": 4560,
        "wires": []
    },
    {
        "id": "9e58ee7279b9d333",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 118",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 1365,
        "y": 4520,
        "wires": []
    },
    {
        "id": "c633865739c6a14a",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 119",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1365,
        "y": 3920,
        "wires": []
    },
    {
        "id": "d09d6605ad808f1f",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 120",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 2165,
        "y": 3500,
        "wires": []
    },
    {
        "id": "2f92d0e0f42d8935",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 124",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 815,
        "y": 1340,
        "wires": []
    },
    {
        "id": "0a770118f48df09e",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 125",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1935,
        "y": 1880,
        "wires": []
    },
    {
        "id": "5814c39c90c89a88",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 126",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1745,
        "y": 2120,
        "wires": []
    },
    {
        "id": "b285ad40911ab7da",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 127",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 2255,
        "y": 2740,
        "wires": []
    },
    {
        "id": "004dce845d45232d",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 128",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1705,
        "y": 3020,
        "wires": []
    },
    {
        "id": "16b4a91457d2045e",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 129",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1415,
        "y": 3260,
        "wires": []
    },
    {
        "id": "1c5d0374e6c83aba",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 130",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 2065,
        "y": 4240,
        "wires": []
    },
    {
        "id": "3ef024f5d8a5f052",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 132",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 1455,
        "y": 5000,
        "wires": []
    },
    {
        "id": "8a98c5949d648bbd",
        "type": "Axis Security",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "",
        "preset": "1af13a1540441ff9",
        "address": "",
        "action": "Allow SSH",
        "data": "",
        "options": "",
        "x": 490,
        "y": 3880,
        "wires": [
            [
                "8099cb431deb2f71"
            ]
        ]
    },
    {
        "id": "f1258ee2314fd616",
        "type": "Axis Security",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "",
        "preset": "1af13a1540441ff9",
        "address": "",
        "action": "Set SSH User",
        "data": "",
        "options": "",
        "x": 880,
        "y": 3880,
        "wires": [
            [
                "c317139745f68a20",
                "5f4c58bb85964adb"
            ]
        ]
    },
    {
        "id": "5101afc97ee05028",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "Enable SSH",
        "info": "",
        "x": 310,
        "y": 3820,
        "wires": []
    },
    {
        "id": "679feabbdc4c2c75",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "SSH",
        "func": "if( !msg.config.hasOwnProperty(\"ssh\") ) {\n  node.send([null,msg]);\n  return;\n}\n\nif( msg.config.ssh === false || msg.config.ssh === null )\n    msg.payload = false;\nelse    \n    msg.payload = true;\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 3880,
        "wires": [
            [
                "8a98c5949d648bbd"
            ],
            [
                "ac87f5fc9f5922f3"
            ]
        ]
    },
    {
        "id": "5f4c58bb85964adb",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": SSH user \" + msg.config.ssh.user;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1230,
        "y": 3880,
        "wires": [
            [
                "071c52e45c343d11"
            ]
        ]
    },
    {
        "id": "8099cb431deb2f71",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "user",
        "func": "if( !msg.config.ssh.hasOwnProperty(\"user\") || msg.config.ssh.user.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.config.ssh.hasOwnProperty(\"password\") || msg.config.ssh.password.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    name: msg.config.ssh.user,\n    password: msg.config.ssh.password\n}\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 660,
        "y": 3880,
        "wires": [
            [
                "f1258ee2314fd616"
            ],
            [
                "73595c38012c7322"
            ]
        ]
    },
    {
        "id": "0b2c3e8b5e4be2ab",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "",
        "scope": [
            "f1258ee2314fd616"
        ],
        "uncaught": false,
        "x": 860,
        "y": 3920,
        "wires": [
            [
                "79472532c41693b0"
            ]
        ]
    },
    {
        "id": "fea7d448d4978f7d",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "",
        "scope": [
            "8a98c5949d648bbd"
        ],
        "uncaught": false,
        "x": 480,
        "y": 3920,
        "wires": [
            [
                "73595c38012c7322"
            ]
        ]
    },
    {
        "id": "79472532c41693b0",
        "type": "switch",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "name": "!409",
        "property": "payload.statusCode",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "409",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1070,
        "y": 3920,
        "wires": [
            [
                "261fe59b90fc81fa",
                "5f4c58bb85964adb"
            ],
            [
                "261fe59b90fc81fa",
                "c633865739c6a14a"
            ]
        ]
    },
    {
        "id": "b7939f8c31487dc5",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "MQTT Config",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\n    \"apiVersion\":\"1.5\",\n    \"method\":\"configureClient\",\n    \"params\":{\n        \"autoReconnect\":true,\n        \"cleanSession\":true,\n        \"clientId\": \"{{device.serial}}\",\n        \"connectTimeout\":60,\n        \"deviceTopicPrefix\":\"axis\",\n        \"id\":\"MqttClientConfig\",\n        \"keepAliveInterval\":60,\n        \"server\":{\n            \"host\": \"{{config.mqtt.address}}\",\n            \"id\":\"MqttClientServer\",\n            \"port\":1883,\n            \"protocol\":\"tcp\"\n        },\n        \"username\": \"{{config.mqtt.user}}\",\n        \"password\": \"{{config.mqtt.password}}\",\n        \"keepExistingPassword\":false\n    }\n}\n\n",
        "output": "str",
        "x": 540,
        "y": 3460,
        "wires": [
            [
                "c69b1dd211251243"
            ]
        ],
        "info": "https://www.axis.com/vapix-library/subjects/t10175981/section/t10152603/display?section=t10152603-t10152921\r\n\r\n{\r\n  \"apiVersion\": \"<Major>.<Minor>\",\r\n  \"context\": <string>,\r\n  \"method\": \"configureClient\",\r\n  \"params\": {\r\n\r\n    \"server\": {\r\n      \"protocol\": <string>,\r\n      \"host\": <string>,\r\n      \"port\": <integer>,\r\n      \"basepath\": <string>,\r\n      \"alpnProtocol\": <string>\r\n    },\r\n\r\n    \"httpProxy\": <string>,\r\n    \"httpsProxy\": <string>,\r\n    \"username\": <string>,\r\n    \"password\": <string>,\r\n    \"keepExistingPassword\": <boolean>\r\n    \"clientId\": <string>,\r\n    \"keepAliveInterval\": <int>,\r\n    \"connectTimeout\": <int>,\r\n    \"cleanSession\": <boolean>,\r\n    \"autoReconnect\": <boolean>,\r\n    \"deviceTopicPrefix\": <string>,\r\n\r\n    \"lastWillTestament\": {\r\n      \"useDefault\": <boolean>,\r\n      \"topic\": <string>,\r\n      \"message\": <string>,\r\n      \"retain\": <boolean>,\r\n      \"qos\": <int>\r\n    },\r\n\r\n    \"connectMessage\": {\r\n      \"useDefault\": <boolean>,\r\n      \"topic\": <string>,\r\n      \"message\": <string>,\r\n      \"retain\": <boolean>,\r\n      \"qos\": <int>\r\n    },\r\n\r\n    \"disconnectMessage\": {\r\n      \"useDefault\": <boolean>,\r\n      \"topic\": <string>,\r\n      \"message\": <string>,\r\n      \"retain\": <boolean>,\r\n      \"qos\": <int>\r\n    },\r\n    \"ssl\": {\r\n      \"validateServerCert\": <boolean>,\r\n      \"clientCertID\": <string>,\r\n      \"CACertID\": <string>\r\n    }\r\n  }\r\n}\r\n"
    },
    {
        "id": "c9c75d5877ea8b51",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Start MQTT",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\n    \"apiVersion\":\"1.5\",\n    \"method\":\"activateClient\"\n}",
        "output": "str",
        "x": 990,
        "y": 3540,
        "wires": [
            [
                "8df9b212caea4e6d"
            ]
        ]
    },
    {
        "id": "c69b1dd211251243",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "/axis-cgi/mqtt/client.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/mqtt/client.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 770,
        "y": 3460,
        "wires": [
            [
                "c9c75d5877ea8b51",
                "50b088fc6c0639b8"
            ]
        ]
    },
    {
        "id": "8df9b212caea4e6d",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "/axis-cgi/mqtt/client.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/mqtt/client.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1210,
        "y": 3540,
        "wires": [
            [
                "402bdd2f0b0a4293",
                "a0b9ca89a432c8b4"
            ]
        ]
    },
    {
        "id": "efb36d54d284127c",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "MQTT Client setup",
        "info": "",
        "x": 330,
        "y": 3400,
        "wires": []
    },
    {
        "id": "b475f62b037384e9",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Set MQTT Client",
        "func": "if (!msg.config.hasOwnProperty(\"mqtt\") || !msg.config.mqtt || typeof msg.config.mqtt !== \"object\" ) {\n    node.send([null, msg]);\n    return;\n}\n\nif (!msg.config.mqtt.hasOwnProperty(\"address\") || msg.config.mqtt.address.length < 5) {\n    node.send([null, msg]);\n    return;\n}\n\nif (!msg.config.mqtt.hasOwnProperty(\"port\") )\n    msg.config.mqtt.port = \"1880\";\n\nif (!msg.config.mqtt.hasOwnProperty(\"user\"))\n    msg.config.mqtt.user = \"\";\n\nif (!msg.config.mqtt.hasOwnProperty(\"password\"))\n    msg.config.mqtt.pasword = \"\";\n\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 3460,
        "wires": [
            [
                "b7939f8c31487dc5"
            ],
            [
                "30754429244e62df"
            ]
        ]
    },
    {
        "id": "402bdd2f0b0a4293",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Publish",
        "func": "if (!msg.config.mqtt.hasOwnProperty(\"publish\") || !Array.isArray(msg.config.mqtt.publish) || msg.config.mqtt.publish.length === 0 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    apiVersion: \"1.2\",\n    method: \"configureEventPublication\",\n    params: {\n        appendEventTopic: true,\n        customTopicPrefix: \"event\",\n        eventFilterList: msg.config.mqtt.publish,\n        includeSerialNumberInPayload: true,\n        includeTopicNamespaces: false,\n        topicPrefix: \"custom\"\n    }\n}\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1460,
        "y": 3620,
        "wires": [
            [
                "bc56cb551d4fa6a5"
            ],
            [
                "a65438f413dc22b1"
            ]
        ]
    },
    {
        "id": "bc56cb551d4fa6a5",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "/axis-cgi/mqtt/event.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/mqtt/event.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1690,
        "y": 3620,
        "wires": [
            [
                "f87da7beee206827",
                "f8de5588d6daa74f"
            ]
        ]
    },
    {
        "id": "f8de5588d6daa74f",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": MQTT publish set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1950,
        "y": 3620,
        "wires": [
            [
                "e08225805615ac2c"
            ]
        ]
    },
    {
        "id": "a1d9e22b19f1234f",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "",
        "scope": [
            "c69b1dd211251243"
        ],
        "uncaught": false,
        "x": 720,
        "y": 3500,
        "wires": [
            [
                "4a6c139598a368be",
                "e964cd01347f5f01"
            ]
        ]
    },
    {
        "id": "50b088fc6c0639b8",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": MQTT client set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1950,
        "y": 3460,
        "wires": [
            [
                "e08225805615ac2c"
            ]
        ]
    },
    {
        "id": "a0b9ca89a432c8b4",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": MQTT client started\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1950,
        "y": 3540,
        "wires": [
            [
                "e08225805615ac2c"
            ]
        ]
    },
    {
        "id": "55b062244bf0aefd",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "",
        "scope": [
            "8df9b212caea4e6d"
        ],
        "uncaught": false,
        "x": 1260,
        "y": 3580,
        "wires": [
            [
                "e964cd01347f5f01",
                "ac48075cf0388668"
            ]
        ]
    },
    {
        "id": "9d9e870581a4496e",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "name": "",
        "scope": [
            "bc56cb551d4fa6a5"
        ],
        "uncaught": false,
        "x": 1740,
        "y": 3660,
        "wires": [
            [
                "a33774e6e8ea21c6",
                "f87da7beee206827"
            ]
        ]
    },
    {
        "id": "cf069fc7b849fdde",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "ACAPS",
        "func": "if( !msg.config.hasOwnProperty(\"acaps\") || msg.config.acaps.length === 0 ) {\n    node.send([null,msg]);\n    return;\n}\nmsg.payload = msg.config.acaps;\nnode.send([msg],null);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 300,
        "y": 4120,
        "wires": [
            [
                "27f8122088aee7f3"
            ],
            [
                "67293eea0fb6cc0b"
            ]
        ]
    },
    {
        "id": "27f8122088aee7f3",
        "type": "split",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 470,
        "y": 4120,
        "wires": [
            [
                "61d0de95ba03d708"
            ]
        ]
    },
    {
        "id": "61d0de95ba03d708",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "acap",
                "pt": "msg",
                "to": "payload",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.package",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 640,
        "y": 4120,
        "wires": [
            [
                "dcf39d26ea9c1cd4"
            ]
        ]
    },
    {
        "id": "dcf39d26ea9c1cd4",
        "type": "Axis ACAP",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "ACAP Status",
        "acap": "",
        "filename": "",
        "x": 840,
        "y": 4120,
        "wires": [
            [
                "393bb9e158ed1c12"
            ]
        ]
    },
    {
        "id": "ee05b84335f596ba",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Installation required",
        "scope": [
            "dcf39d26ea9c1cd4"
        ],
        "uncaught": false,
        "x": 620,
        "y": 4200,
        "wires": [
            [
                "c7ff9899a9d6ce57"
            ]
        ]
    },
    {
        "id": "c7ff9899a9d6ce57",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Install ACAP",
        "func": "msg.filename = msg.acap[msg.device.platform];\nmsg.payload = msg.filename;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 4200,
        "wires": [
            [
                "47b5942821a3e241"
            ]
        ]
    },
    {
        "id": "47b5942821a3e241",
        "type": "Axis ACAP",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Install ACAP",
        "acap": "",
        "filename": "",
        "x": 1130,
        "y": 4200,
        "wires": [
            [
                "8459203f91061712"
            ]
        ]
    },
    {
        "id": "393bb9e158ed1c12",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Need Update",
        "func": "if( msg.acap.version === msg.payload.Version ) {\n    msg.payload = msg.payload.Name;\n    node.send([msg,null]);\n    return;\n}\nmsg.payload = msg.payload.Name;\nnode.send([null,msg]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1020,
        "y": 4120,
        "wires": [
            [
                "8459203f91061712"
            ],
            [
                "c7ff9899a9d6ce57",
                "96b92e2199a11364"
            ]
        ]
    },
    {
        "id": "8459203f91061712",
        "type": "Axis ACAP",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Start ACAP",
        "acap": "",
        "filename": "",
        "x": 1330,
        "y": 4200,
        "wires": [
            [
                "2bed77b96886d9e0"
            ]
        ]
    },
    {
        "id": "42a9f86d7f11223f",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Install ACAPS",
        "info": "",
        "x": 320,
        "y": 4060,
        "wires": []
    },
    {
        "id": "8e062b0f85916bbc",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": \" + msg.acap.package + \" installed and started\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1830,
        "y": 4200,
        "wires": [
            [
                "2c66daa476f039f6"
            ]
        ]
    },
    {
        "id": "911a1a0f515d0ba4",
        "type": "join",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "mode": "auto",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": true,
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 1830,
        "y": 4280,
        "wires": [
            [
                "cfe1be0e0db99c19"
            ]
        ]
    },
    {
        "id": "36d6ad5e86b7448b",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "scope": [
            "47b5942821a3e241",
            "8459203f91061712"
        ],
        "uncaught": false,
        "x": 1310,
        "y": 4240,
        "wires": [
            [
                "1c5d0374e6c83aba",
                "4320f177528e9f38"
            ]
        ]
    },
    {
        "id": "96b92e2199a11364",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Installing ACAP\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1210,
        "y": 4120,
        "wires": [
            [
                "ca43f8769ea3d0bc"
            ]
        ]
    },
    {
        "id": "2f3ff6d43eb76593",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "Set TLS Policy",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\">\n <Header/>\n <Body >\n<SetWebServerTlsConfiguration xmlns=\"http://www.axis.com/vapix/ws/webserver\" xmlns:acert=\"http://www.axis.com/vapix/ws/cert\">\n          <Configuration>\n              <Tls>true</Tls>\n              <ConnectionPolicies>\n                  <Admin>{{config.tls.policy}}</Admin>\n              </ConnectionPolicies>\n              <Ciphers>\n                  <acert:Cipher>ECDHE-ECDSA-AES128-GCM-SHA256</acert:Cipher><acert:Cipher>ECDHE-RSA-AES128-GCM-SHA256</acert:Cipher><acert:Cipher>ECDHE-ECDSA-AES256-GCM-SHA384</acert:Cipher><acert:Cipher>ECDHE-RSA-AES256-GCM-SHA384</acert:Cipher><acert:Cipher>ECDHE-ECDSA-CHACHA20-POLY1305</acert:Cipher><acert:Cipher>ECDHE-RSA-CHACHA20-POLY1305</acert:Cipher><acert:Cipher>DHE-RSA-AES128-GCM-SHA256</acert:Cipher><acert:Cipher>DHE-RSA-AES256-GCM-SHA384</acert:Cipher>\n              </Ciphers>\n              <CertificateSet>\n                  <acert:Certificates><acert:Id>{{payload}}</acert:Id></acert:Certificates>\n                  <acert:CACertificates></acert:CACertificates>\n                  <acert:TrustedCertificates></acert:TrustedCertificates>\n              </CertificateSet>\n          </Configuration>\n      </SetWebServerTlsConfiguration>\n </Body>\n</Envelope>",
        "output": "str",
        "x": 1220,
        "y": 2080,
        "wires": [
            [
                "75cdbae6af92bd00"
            ]
        ]
    },
    {
        "id": "75cdbae6af92bd00",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "/vapix/services",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/vapix/services",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1420,
        "y": 2080,
        "wires": [
            [
                "eb3fbabf5618cd80",
                "60f3e332b6bb59c5"
            ]
        ]
    },
    {
        "id": "303706b276563b3a",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "Get TLS Policy",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\">\n <Header/>\n <Body >\n<GetWebServerTlsConfiguration xmlns=\"http://www.axis.com/vapix/ws/webserver\">\n    </GetWebServerTlsConfiguration>\n </Body>\n</Envelope>",
        "output": "str",
        "x": 500,
        "y": 2080,
        "wires": [
            [
                "b4c449edb1819093"
            ]
        ]
    },
    {
        "id": "b4c449edb1819093",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "/vapix/services",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/vapix/services",
        "data": "",
        "options": "",
        "filename": "",
        "x": 700,
        "y": 2080,
        "wires": [
            [
                "402f7bb3910e511b"
            ]
        ]
    },
    {
        "id": "402f7bb3910e511b",
        "type": "xml",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "",
        "property": "payload",
        "attr": "",
        "chr": "",
        "x": 870,
        "y": 2080,
        "wires": [
            [
                "f4cfc942067b3453"
            ]
        ]
    },
    {
        "id": "f4cfc942067b3453",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "Certificate ID",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload['SOAP-ENV:Envelope']['SOAP-ENV:Body'][0]['aweb:GetWebServerTlsConfigurationResponse'][0]['aweb:Configuration'][0]['aweb:CertificateSet'][0]['acert:Certificates'][0]['acert:Id'][0]",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1030,
        "y": 2080,
        "wires": [
            [
                "2f3ff6d43eb76593"
            ]
        ]
    },
    {
        "id": "c594f34e281e7df6",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "Set access policy (HTTP and/or HTTP)",
        "info": "",
        "x": 390,
        "y": 2020,
        "wires": []
    },
    {
        "id": "663a2017c1b1b044",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "TLS policy",
        "func": "if( !msg.config.hasOwnProperty(\"tls\") || !msg.config.tls || typeof msg.config.tls !== \"string\" || msg.config.tls.length < 4) {\n  node.send([null,msg]);\n  return;\n}\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 310,
        "y": 2080,
        "wires": [
            [
                "303706b276563b3a"
            ],
            [
                "22fe10ab761f0d1c"
            ]
        ]
    },
    {
        "id": "60f3e332b6bb59c5",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Connection policy set to \" + msg.config.tls.policy;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1610,
        "y": 2080,
        "wires": [
            [
                "57496831298e1a7d"
            ]
        ]
    },
    {
        "id": "809cac5e711fb33e",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "name": "",
        "scope": [
            "75cdbae6af92bd00",
            "b4c449edb1819093"
        ],
        "uncaught": false,
        "x": 1400,
        "y": 2120,
        "wires": [
            [
                "5814c39c90c89a88",
                "eb3fbabf5618cd80"
            ]
        ]
    },
    {
        "id": "99f4ac680b72fed9",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "XML",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<? xml version = \"1.0\" encoding = \"UTF-8\" ?>\n<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\">\n    <Header />\n    <Body >\n        <CreateUsers xmlns=\"http://www.onvif.org/ver10/device/wsdl\" xmlns:tt=\"http://www.onvif.org/ver10/schema\">\n            <User>\n                <tt:Username>{{payload.name}}</tt:Username>\n                <tt:Password>{{payload.password}}</tt:Password>\n                <tt:UserLevel>{{payload.privileges}}</tt:UserLevel>\n            </User>\n        </CreateUsers>\n    </Body>\n</Envelope>\n",
        "output": "str",
        "x": 550,
        "y": 2340,
        "wires": [
            [
                "355c36781e9e859d"
            ]
        ]
    },
    {
        "id": "1589857e7040c711",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "ONVIF USER 1",
        "func": "if (!msg.config.hasOwnProperty(\"onvif\") || !msg.config.onvif || !Array.isArray(msg.config.onvif) || msg.config.onvif.length < 1 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif (!msg.config.onvif[0].hasOwnProperty(\"name\") || !msg.config.onvif[0].name || typeof msg.config.onvif[0].name !== \"string\" || msg.config.onvif[0].name.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif (!msg.config.onvif[0].hasOwnProperty(\"password\") || !msg.config.onvif[0].password || typeof msg.config.onvif[0].password !== \"string\" || msg.config.onvif[0].password.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nmsg.payload = msg.config.onvif[0];\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 2340,
        "wires": [
            [
                "99f4ac680b72fed9"
            ],
            [
                "a27447bf69600291"
            ]
        ]
    },
    {
        "id": "355c36781e9e859d",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Add ONVIF User 1",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/vapix/services",
        "data": "",
        "options": "",
        "filename": "",
        "x": 730,
        "y": 2340,
        "wires": [
            [
                "0c245b9b85c344a7",
                "5c2c9fac51935dbf"
            ]
        ]
    },
    {
        "id": "dd4b571117b25387",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "",
        "scope": [
            "355c36781e9e859d"
        ],
        "uncaught": false,
        "x": 300,
        "y": 2400,
        "wires": [
            [
                "5d1cae2ffd251998"
            ]
        ]
    },
    {
        "id": "0bcc80baa3b65524",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "XML",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<? xml version = \"1.0\" encoding = \"UTF-8\" ?>\n<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\">\n    <Header />\n    <Body >\n        <CreateUsers xmlns=\"http://www.onvif.org/ver10/device/wsdl\" xmlns:tt=\"http://www.onvif.org/ver10/schema\">\n            <User>\n                <tt:Username>{{payload.name}}</tt:Username>\n                <tt:Password>{{payload.password}}</tt:Password>\n                <tt:UserLevel>{{payload.privileges}}</tt:UserLevel>\n            </User>\n        </CreateUsers>\n    </Body>\n</Envelope>\n",
        "output": "str",
        "x": 1130,
        "y": 2400,
        "wires": [
            [
                "4d27c040e4a9dee8"
            ]
        ]
    },
    {
        "id": "0c245b9b85c344a7",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "ONVIF USER 2",
        "func": "if (!msg.config.hasOwnProperty(\"onvif\") ||  !msg.config.onvif ||  !Array.isArray(msg.config.onvif) || msg.config.onvif.length < 2) {\n    node.send([null, msg]);\n    return;\n}\n\nif (!msg.config.onvif[1].hasOwnProperty(\"name\") || !msg.config.onvif[1].name || typeof msg.config.onvif[1].name !== \"string\" || msg.config.onvif[1].name.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif (!msg.config.onvif[1].hasOwnProperty(\"password\") || !msg.config.onvif[1].password || typeof msg.config.onvif[1].password !== \"string\" || msg.config.onvif[1].password.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nmsg.payload = msg.config.onvif[1];\nnode.send([msg, null]);",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 960,
        "y": 2400,
        "wires": [
            [
                "0bcc80baa3b65524"
            ],
            [
                "091309482b1a94b5"
            ]
        ]
    },
    {
        "id": "4d27c040e4a9dee8",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Add ONVIF User 2",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/vapix/services",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1310,
        "y": 2400,
        "wires": [
            [
                "a153f309623e9fdb",
                "1097d2f340523ce9"
            ]
        ]
    },
    {
        "id": "8fd4f7ad86e44448",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "",
        "scope": [
            "4d27c040e4a9dee8"
        ],
        "uncaught": false,
        "x": 850,
        "y": 2460,
        "wires": [
            [
                "b636a585a0a7d5ad"
            ]
        ]
    },
    {
        "id": "162e5e1ca3bec5e5",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Set ONVIF users",
        "info": "",
        "x": 330,
        "y": 2280,
        "wires": []
    },
    {
        "id": "8607d16073bfda16",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "On error, user already exists.",
        "info": "",
        "x": 440,
        "y": 2440,
        "wires": []
    },
    {
        "id": "a153f309623e9fdb",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "ONVIF USER 3",
        "func": "if (!msg.config.hasOwnProperty(\"onvif\") ||  !msg.config.onvif || !Array.isArray(msg.config.onvif) || msg.config.onvif.length < 3) {\n    node.send([null, msg]);\n    return;\n}\n\n\nif (!msg.config.onvif[2].hasOwnProperty(\"name\") || !msg.config.onvif[2].name || typeof msg.config.onvif[2].name !== \"string\" || msg.config.onvif[2].name.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\nif (!msg.config.onvif[2].hasOwnProperty(\"password\") || !msg.config.onvif[2].password || typeof msg.config.onvif[2].password !== \"string\" || msg.config.onvif[2].password.length < 3 ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nmsg.payload = msg.config.onvif[2];\nnode.send([msg, null]);",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1540,
        "y": 2460,
        "wires": [
            [
                "98fdb92f73b1f1cc"
            ],
            [
                "c0ac684f02ff278c"
            ]
        ]
    },
    {
        "id": "98fdb92f73b1f1cc",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "XML",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<? xml version = \"1.0\" encoding = \"UTF-8\" ?>\n<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\">\n    <Header />\n    <Body >\n        <CreateUsers xmlns=\"http://www.onvif.org/ver10/device/wsdl\" xmlns:tt=\"http://www.onvif.org/ver10/schema\">\n            <User>\n                <tt:Username>{{payload.name}}</tt:Username>\n                <tt:Password>{{payload.password}}</tt:Password>\n                <tt:UserLevel>{{payload.privileges}}</tt:UserLevel>\n            </User>\n        </CreateUsers>\n    </Body>\n</Envelope>\n",
        "output": "str",
        "x": 1710,
        "y": 2460,
        "wires": [
            [
                "7fd055ac542558f3"
            ]
        ]
    },
    {
        "id": "7fd055ac542558f3",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Add ONVIF User 3",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/vapix/services",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1930,
        "y": 2460,
        "wires": [
            [
                "6922b3877f779fef",
                "42d37940f574c6e7"
            ]
        ]
    },
    {
        "id": "7d3d459ca01af293",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "",
        "scope": [
            "7fd055ac542558f3"
        ],
        "uncaught": false,
        "x": 1430,
        "y": 2520,
        "wires": [
            [
                "1845b34bbc4cee46"
            ]
        ]
    },
    {
        "id": "5d1cae2ffd251998",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "error",
        "rules": [
            {
                "t": "delete",
                "p": "error",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 2400,
        "wires": [
            [
                "a27447bf69600291"
            ]
        ]
    },
    {
        "id": "b636a585a0a7d5ad",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "error",
        "rules": [
            {
                "t": "delete",
                "p": "error",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 990,
        "y": 2460,
        "wires": [
            [
                "091309482b1a94b5"
            ]
        ]
    },
    {
        "id": "1845b34bbc4cee46",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "error",
        "rules": [
            {
                "t": "delete",
                "p": "error",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1570,
        "y": 2520,
        "wires": [
            [
                "c0ac684f02ff278c"
            ]
        ]
    },
    {
        "id": "5c2c9fac51935dbf",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": ONVIF User \" + msg.config.onvif[0].name;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2110,
        "y": 2340,
        "wires": [
            [
                "fa53c1f68726257c"
            ]
        ]
    },
    {
        "id": "1097d2f340523ce9",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": ONVIF User \" + msg.config.onvif[1].name;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2110,
        "y": 2400,
        "wires": [
            [
                "fa53c1f68726257c"
            ]
        ]
    },
    {
        "id": "42d37940f574c6e7",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": ONVIF User \" + msg.config.onvif[2].name;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2110,
        "y": 2460,
        "wires": [
            [
                "fa53c1f68726257c"
            ]
        ]
    },
    {
        "id": "a4cde0c9371cfb42",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "dynamicoverlay.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/dynamicoverlay/dynamicoverlay.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 530,
        "y": 2940,
        "wires": [
            [
                "67ea516e91f6fb68"
            ]
        ]
    },
    {
        "id": "778f0054e4e1954c",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "dynamicoverlay.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/dynamicoverlay/dynamicoverlay.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1150,
        "y": 2980,
        "wires": [
            [
                "8a0e37ee8974675b"
            ]
        ]
    },
    {
        "id": "00e37ff3f0632664",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "Set Text Overlays",
        "info": "",
        "x": 330,
        "y": 2880,
        "wires": []
    },
    {
        "id": "67ea516e91f6fb68",
        "type": "delay",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "",
        "pauseType": "delay",
        "timeout": "250",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 730,
        "y": 2940,
        "wires": [
            [
                "4d930eec2c668b76",
                "d4007a00da9a159d"
            ]
        ]
    },
    {
        "id": "8a0e37ee8974675b",
        "type": "delay",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "",
        "pauseType": "delay",
        "timeout": "250",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1350,
        "y": 2980,
        "wires": [
            [
                "1e072fb54d49fdf6",
                "3822c5d617be5ef9"
            ]
        ]
    },
    {
        "id": "e08e1844c2ca78fb",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "Set Overlay 1",
        "func": "if (!msg.config.hasOwnProperty(\"textOverlays\") || !msg.config.textOverlays || !Array.isArray(msg.config.textOverlays) || msg.config.textOverlays.length < 1 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    apiVersion: \"1.6\",\n    method: \"addText\",\n    params: {\n        text: msg.config.textOverlays[0].text || \"%F %X\",\n        camera: 1,\n        position: msg.config.textOverlays[0].position || \"topLeft\",\n        reference: \"channel\",\n        textColor: msg.config.textOverlays[0].textColor || \"white\",\n        textBGColor: msg.config.textOverlays[0].textBGColor || \"black\",\n        textOLColor: \"transparent\",\n        fontSize: msg.config.textOverlays[0].fontSize || 48\n    }\n}\nreturn msg; \n",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 2940,
        "wires": [
            [
                "a4cde0c9371cfb42"
            ],
            [
                "55596631f19e11e9"
            ]
        ]
    },
    {
        "id": "4d930eec2c668b76",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "Set Overlay 2",
        "func": "if (!msg.config.hasOwnProperty(\"textOverlays\") || !msg.config.textOverlays || !Array.isArray(msg.config.textOverlays) || msg.config.textOverlays.length < 2 ) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    apiVersion: \"1.6\",\n    method: \"addText\",\n    params: {\n        text: msg.config.textOverlays[1].text || \"%F %X\",\n        camera: 1,\n        position: msg.config.textOverlays[1].position || \"topLeft\",\n        reference: \"channel\",\n        textColor: msg.config.textOverlays[1].textColor || \"white\",\n        textBGColor: msg.config.textOverlays[1].textBGColor || \"black\",\n        textOLColor: \"transparent\",\n        fontSize: msg.config.textOverlays[1].fontSize || 48\n    }\n}\nreturn msg; \n",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 920,
        "y": 2980,
        "wires": [
            [
                "778f0054e4e1954c"
            ],
            [
                "1c5790ebe6844e1c"
            ]
        ]
    },
    {
        "id": "d4007a00da9a159d",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Overlay 1 set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1530,
        "y": 2940,
        "wires": [
            [
                "2e34df99d2dbae19"
            ]
        ]
    },
    {
        "id": "3822c5d617be5ef9",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Overlay 2 set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1530,
        "y": 2980,
        "wires": [
            [
                "2e34df99d2dbae19"
            ]
        ]
    },
    {
        "id": "84efb86b3a961442",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "name": "",
        "scope": [
            "a4cde0c9371cfb42",
            "778f0054e4e1954c"
        ],
        "uncaught": false,
        "x": 1340,
        "y": 3020,
        "wires": [
            [
                "004dce845d45232d",
                "1e072fb54d49fdf6"
            ]
        ]
    },
    {
        "id": "3dd31cedf03be8b6",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "List Overlay",
        "func": "if (!msg.config.hasOwnProperty(\"textOverlays\") || !Array.isArray(msg.config.textOverlays) || msg.config.textOverlays.length === 0) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.payload = {\n    \"apiVersion\": \"1.6\",\n    \"method\": \"list\",\n    \"params\": {}\n}\nreturn msg;",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 310,
        "y": 2700,
        "wires": [
            [
                "b6b03f1035180ecf"
            ],
            [
                "f86b396e4859443e"
            ]
        ]
    },
    {
        "id": "91f0eac8480116ec",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "Check error",
        "func": "if( msg.payload.hasOwnProperty(\"error\") ) {\n    node.error( msg.payload.error.message, msg);\n    return;\n}\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 710,
        "y": 2700,
        "wires": [
            [
                "3b5981b91ecb0452"
            ]
        ]
    },
    {
        "id": "b6b03f1035180ecf",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "dynamicoverlay.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/dynamicoverlay/dynamicoverlay.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 510,
        "y": 2700,
        "wires": [
            [
                "91f0eac8480116ec"
            ]
        ]
    },
    {
        "id": "3b5981b91ecb0452",
        "type": "change",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "textOverlays",
        "rules": [
            {
                "t": "set",
                "p": "imageOverlays",
                "pt": "msg",
                "to": "payload.imageOverlays",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.data.textOverlays",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 890,
        "y": 2700,
        "wires": [
            [
                "81304ad89332f77d"
            ]
        ]
    },
    {
        "id": "ca3f54247d2362d5",
        "type": "split",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 1250,
        "y": 2700,
        "wires": [
            [
                "15d5dbbc4219288a"
            ]
        ]
    },
    {
        "id": "15d5dbbc4219288a",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "Remove",
        "func": "msg.payload = {\n    \"apiVersion\": \"1.6\",\n    \"method\": \"remove\",\n    \"params\": {\n         \"identity\": msg.payload.identity \n    }\n}\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1400,
        "y": 2700,
        "wires": [
            [
                "58d9bb20e0892f38"
            ]
        ]
    },
    {
        "id": "58d9bb20e0892f38",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "dynamicoverlay.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/dynamicoverlay/dynamicoverlay.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1590,
        "y": 2700,
        "wires": [
            [
                "7587666dadfe5021"
            ]
        ]
    },
    {
        "id": "7587666dadfe5021",
        "type": "join",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "",
        "mode": "auto",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": "false",
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "x": 1770,
        "y": 2700,
        "wires": [
            [
                "2eae551b74314130"
            ]
        ]
    },
    {
        "id": "81304ad89332f77d",
        "type": "switch",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "Found previous",
        "property": "payload.length",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1080,
        "y": 2700,
        "wires": [
            [
                "ca3f54247d2362d5"
            ],
            [
                "8953ac790a699e41"
            ]
        ]
    },
    {
        "id": "356a0daa682631f3",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "Remove previous overlays",
        "info": "",
        "x": 350,
        "y": 2640,
        "wires": []
    },
    {
        "id": "2eae551b74314130",
        "type": "delay",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "",
        "pauseType": "delay",
        "timeout": "250",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1930,
        "y": 2700,
        "wires": [
            [
                "886f83b61c0874b5",
                "b7bc268e803e34d5"
            ]
        ]
    },
    {
        "id": "8ce48005d64f93c1",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "",
        "scope": [
            "b6b03f1035180ecf",
            "58d9bb20e0892f38"
        ],
        "uncaught": false,
        "x": 1780,
        "y": 2740,
        "wires": [
            [
                "b285ad40911ab7da",
                "886f83b61c0874b5"
            ]
        ]
    },
    {
        "id": "b7bc268e803e34d5",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Previous overlays removed\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2110,
        "y": 2700,
        "wires": [
            [
                "886c0134bc92f6bf"
            ]
        ]
    },
    {
        "id": "e22b72c9c74ac9b0",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "Set Image Overlay",
        "info": "",
        "x": 330,
        "y": 3160,
        "wires": []
    },
    {
        "id": "d6aea0ddd6f87fd4",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "Upload Overlay",
        "func": "if (!msg.config.hasOwnProperty(\"imageOverlay\") || !msg.config.imageOverlay || typeof msg.config.imageOverlay !== \"object\") {\n    node.send([null, msg]);\n    return;\n}\n\n\nif( !msg.config.imageOverlay.hasOwnProperty(\"filepath\") || msg.config.imageOverlay.filepath.length === 0 ) {\n    node.send([null, msg]);\n    return;\n}\n\nmsg.filename = msg.config.imageOverlay.filepath;\n\nmsg.payload = {\n    scale: msg.config.imageOverlay.scale || true\n//    alpha: msg.config.imageOverlay.alpha || 0\n}\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 3220,
        "wires": [
            [
                "289d567568b4c009"
            ],
            [
                "8409bb233da1e959"
            ]
        ]
    },
    {
        "id": "289d567568b4c009",
        "type": "Axis camera",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Upload overlay",
        "resolution": "640x360",
        "output": "Base64",
        "filename": "",
        "options": "",
        "data": "",
        "x": 540,
        "y": 3220,
        "wires": [
            [
                "23988a1b51a22d71"
            ]
        ]
    },
    {
        "id": "23988a1b51a22d71",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "Set Overlay",
        "func": "var paths = msg.config.imageOverlay.filepath.split('/');\nvar name = paths[paths.length-1].split('.')[0]\n\nmsg.payload = {\n    apiVersion:\"1.6\",\n    method:\"addImage\",\n    params:{\n        camera:1,\n        overlayPath: \"/etc/overlays/\" + name + \".ovl\",\n        position: msg.config.imageOverlay.position || \"bottomRight\"\n    }\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 830,
        "y": 3220,
        "wires": [
            [
                "cc347e5d1bfc37b9"
            ]
        ]
    },
    {
        "id": "cc347e5d1bfc37b9",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/dynamicoverlay/dynamicoverlay.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1010,
        "y": 3220,
        "wires": [
            [
                "90e8a9c85077a247"
            ]
        ]
    },
    {
        "id": "1a2e89d1cd18a65b",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "",
        "scope": [
            "289d567568b4c009"
        ],
        "uncaught": false,
        "x": 570,
        "y": 3260,
        "wires": [
            [
                "23988a1b51a22d71"
            ]
        ]
    },
    {
        "id": "90e8a9c85077a247",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "Status",
        "func": "if( msg.payload.hasOwnProperty(\"error\") )\n    node.error(msg.cgi + \" failed: \" + msg.payload.error.message, msg );\n\nmsg.payload = msg.device.serial + \": Image Overlay set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1190,
        "y": 3220,
        "wires": [
            [
                "a328953bf81d973e",
                "d9daa186964b202f"
            ]
        ]
    },
    {
        "id": "4f7575c162c693c3",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "name": "",
        "scope": [
            "cc347e5d1bfc37b9"
        ],
        "uncaught": false,
        "x": 1000,
        "y": 3260,
        "wires": [
            [
                "16b4a91457d2045e",
                "d9daa186964b202f"
            ]
        ]
    },
    {
        "id": "d1715ad5b78bc6f0",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "Set time",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 530,
        "y": 1300,
        "wires": [
            [
                "50774c773a9ff69d",
                "3188c8c315fd342a"
            ]
        ]
    },
    {
        "id": "aefd78b4397260fe",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "name": "Timezone & NTP",
        "func": "if( !msg.config.hasOwnProperty(\"time\") || !msg.config.time || typeof msg.config.time !== \"object\") {\n  node.send([null,msg]);\n  return;\n}\n\nmsg.payload = msg.config.time\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 1300,
        "wires": [
            [
                "d1715ad5b78bc6f0"
            ],
            [
                "dc3160792b728ac6"
            ]
        ]
    },
    {
        "id": "2f3965c347243aa5",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "name": "Timezone                                            ",
        "info": "",
        "x": 300,
        "y": 1240,
        "wires": []
    },
    {
        "id": "3188c8c315fd342a",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Time set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 700,
        "y": 1300,
        "wires": [
            [
                "806a20e46c8be199"
            ]
        ]
    },
    {
        "id": "e1b1d2ebafe156ba",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "name": "",
        "scope": [
            "d1715ad5b78bc6f0"
        ],
        "uncaught": false,
        "x": 530,
        "y": 1340,
        "wires": [
            [
                "2f92d0e0f42d8935",
                "50774c773a9ff69d"
            ]
        ]
    },
    {
        "id": "d756c942f3c2f3fe",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "Settings",
        "func": "if( !msg.config.hasOwnProperty(\"zipstream\") || !msg.config.zipstream || typeof msg.config.zipstream !== \"object\" || !msg.config.zipstream.hasOwnProperty(\"strength\")) {\n    node.send([null,msg]);\n    return;\n}\n\nmsg.cgi = \"/axis-cgi/zipstream/setstrength.cgi?schemaversion=1\";\nmsg.cgi += \"&strength=\" + msg.config.zipstream.strength;\n//msg.cgi += \"&fpsmode=fixed\"\nmsg.cgi += \"&camera=1\";\nnode.send([msg,null]);",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 300,
        "y": 1780,
        "wires": [
            [
                "e3d220ccb8ec88cf"
            ],
            [
                "5a21e12c518799f3"
            ]
        ]
    },
    {
        "id": "e3d220ccb8ec88cf",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "/axis-cgi/zipstream/setstrength.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Get",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 540,
        "y": 1780,
        "wires": [
            [
                "13b82623403de44b",
                "47dc2dd5830c58a3"
            ]
        ]
    },
    {
        "id": "d034d47d5b9b62c8",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "Zip Stream",
        "info": "",
        "x": 300,
        "y": 1720,
        "wires": []
    },
    {
        "id": "13b82623403de44b",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "Min FPS",
        "func": "if (!msg.config.hasOwnProperty(\"zipstream\") || typeof msg.config.zipstream !== \"object\" || !msg.config.zipstream.hasOwnProperty(\"minfps\")) {\n    node.send([null, msg]);\n    return;\n}\n\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 780,
        "y": 1840,
        "wires": [
            [
                "e98d8dcac446e72e"
            ],
            [
                "3f41df45f1068162"
            ]
        ]
    },
    {
        "id": "2a03ef87fffbeadc",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "/axis-cgi/zipstream/setminfps.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Get",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1530,
        "y": 1840,
        "wires": [
            [
                "1d549cbf72b51ffd",
                "e40bfb03d78efa91"
            ]
        ]
    },
    {
        "id": "e98d8dcac446e72e",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "/axis-cgi/zipstream/setfpsmode.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Get",
        "cgi": "/axis-cgi/zipstream/setfpsmode.cgi?schemaversion=1&fpsmode=dynamic&camera=1",
        "data": "",
        "options": "",
        "filename": "",
        "x": 1040,
        "y": 1840,
        "wires": [
            [
                "92c8b7dbc461c8f2"
            ]
        ]
    },
    {
        "id": "92c8b7dbc461c8f2",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "minfps",
        "func": "msg.cgi = \"/axis-cgi/zipstream/setminfps.cgi?schemaversion=1\";\nmsg.cgi += \"&minfps=\" + msg.config.zipstream.minfps;\nmsg.cgi += \"&camera=1\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1270,
        "y": 1840,
        "wires": [
            [
                "2a03ef87fffbeadc"
            ]
        ]
    },
    {
        "id": "47dc2dd5830c58a3",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "Status",
        "func": "\nmsg.payload = msg.device.serial + \": Zipstream strength set to \" + msg.config.zipstream.strength;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1770,
        "y": 1780,
        "wires": [
            [
                "7dfc0e43c00b47c3"
            ]
        ]
    },
    {
        "id": "e40bfb03d78efa91",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Zipstream min. fps set to \" + msg.config.zipstream.minfps;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1770,
        "y": 1840,
        "wires": [
            [
                "7dfc0e43c00b47c3"
            ]
        ]
    },
    {
        "id": "cbfd5b21bc15987d",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "name": "",
        "scope": [
            "e3d220ccb8ec88cf",
            "2a03ef87fffbeadc",
            "e98d8dcac446e72e"
        ],
        "uncaught": false,
        "x": 1450,
        "y": 1880,
        "wires": [
            [
                "0a770118f48df09e",
                "1d549cbf72b51ffd"
            ]
        ]
    },
    {
        "id": "56606517cb3d2228",
        "type": "template",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "setIPv4AddressConfiguration",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\n  \"apiVersion\": \"1.0\",\n  \"context\": \"Nodered\",\n  \"method\": \"setIPv4AddressConfiguration\",\n  \"params\": {\n    \"deviceName\": \"eth0\",\n    \"configurationMode\": \"static\",\n    \"staticDefaultRouter\": \"{{payload.router}}\",\n    \"staticAddressConfigurations\": [\n      {\n        \"address\": \"{{payload.address}}\",\n        \"prefixLength\": 24\n      }\n    ]\n  }\n}",
        "output": "json",
        "x": 620,
        "y": 4940,
        "wires": [
            [
                "1dbcd45c7dae05f4"
            ]
        ]
    },
    {
        "id": "1dbcd45c7dae05f4",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "/axis-cgi/network_settings.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/network_settings.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 920,
        "y": 4940,
        "wires": [
            [
                "0c5f3fbb0287e1c8",
                "c7d79f8f8c24e9b0"
            ]
        ]
    },
    {
        "id": "0c5f3fbb0287e1c8",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "Catch error",
        "func": "if( msg.payload.hasOwnProperty(\"error\"))\n    node.error(msg.payload.error.message,msg);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1170,
        "y": 4940,
        "wires": [
            [
                "1c3feebbb2f8c1e2"
            ]
        ]
    },
    {
        "id": "8948ca6d5679cc07",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "Static Address",
        "func": "if( !msg.hasOwnProperty(\"properties\") || !msg.properties  ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nif( !msg.properties.hasOwnProperty(\"static\") || !msg.properties.static || typeof msg.properties.static !== \"object\" ) {\n    node.send([null,msg]);\n    return;\n}\n\n\nif( !msg.properties.static.hasOwnProperty(\"address\") || !msg.properties.static.address || typeof msg.properties.static.address !== \"string\" || msg.properties.static.address < 3 ) {\n    node.error(\"Missing static name\",msg);\n    node.send([null,msg]);\n    return;\n}\n\nif( !msg.properties.static.hasOwnProperty(\"router\") || !msg.properties.static.router || typeof msg.properties.static.router !== \"string\" || msg.properties.static.router < 3 ) {\n    node.error(\"Missing static router\",msg);\n    node.send([null,msg]);\n    return;\n}\n\n\nmsg.payload = {\n    address: msg.properties.static.address,\n    router:  msg.properties.static.router\n}\n\nnode.send([msg],null);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 340,
        "y": 4940,
        "wires": [
            [
                "56606517cb3d2228"
            ],
            [
                "d98170d90a5870e6"
            ]
        ]
    },
    {
        "id": "1c3feebbb2f8c1e2",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "Status",
        "func": "msg.payload = msg.device.serial + \": Static address set to \" + msg.properties.static.address;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1330,
        "y": 4940,
        "wires": [
            [
                "52df476c353f8a8f"
            ]
        ]
    },
    {
        "id": "07ba62083c478acb",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "Static IPv4",
        "info": "",
        "x": 310,
        "y": 4880,
        "wires": []
    },
    {
        "id": "9c8c2083783c5fca",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "name": "",
        "scope": [
            "1dbcd45c7dae05f4"
        ],
        "uncaught": false,
        "x": 1150,
        "y": 5000,
        "wires": [
            [
                "3ef024f5d8a5f052",
                "3cffd52011c516ca"
            ]
        ]
    },
    {
        "id": "4f2f75bda542e219",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "VAPIX",
        "func": "msg.payload = [];\n\nif (msg.config.hasOwnProperty(\"vapix\") && Array.isArray(msg.config.vapix) && msg.config.vapix.length > 0 )\n    msg.payload = msg.payload.concat(msg.config.vapix);\n\nif( msg.properties && msg.properties.hasOwnProperty(\"vapix\") && Array.isArray(msg.properties.vapix) && msg.properties.vapix.length > 0 )\n    msg.payload = msg.payload.concat(msg.properties.vapix);\n\nif ( msg.payload.length === 0 ) {\n    msg.payload = null;\n    node.send([null,msg]);\n    return;\n}\nnode.send([msg],null);\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 4500,
        "wires": [
            [
                "448b01068fc51d47"
            ],
            [
                "4f6cda02e3249abc"
            ]
        ]
    },
    {
        "id": "448b01068fc51d47",
        "type": "split",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 480,
        "y": 4500,
        "wires": [
            [
                "41def48e497b1a7a"
            ]
        ]
    },
    {
        "id": "41def48e497b1a7a",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "function 1",
        "func": "if( !msg.payload.hasOwnProperty(\"method\") ) {\n    node.send([null,null,msg]);\n    return;\n}\n\nif( typeof msg.payload.method !== \"string\" || msg.payload.method.length < 2 ) {\n    node.send([null,null,msg]);\n    return;\n}\n\nif( !msg.payload.hasOwnProperty(\"cgi\") ) {\n    node.send([null,null,msg]);\n    return;\n}\n\nif( typeof msg.payload.cgi !== \"string\" || msg.payload.cgi.length < 5 ) {\n    node.send([null,null,msg]);\n    return;\n}\n\nvar body = null;\nif( msg.payload.hasOwnProperty(\"body\") )\n    body = msg.payload.body;\nif( msg.payload.hasOwnProperty(\"data\") )\n    body = msg.payload.data;\nif( msg.payload.hasOwnProperty(\"payload\") )\n    body = msg.payload.payload;\n\nswitch( msg.payload.method ) {\n    case \"get\":\n        msg.cgi = msg.payload.cgi;\n        node.send([msg,null,null]);\n        break;\n    case \"post\":\n        if(!body) {\n            node.error(\"No body\",msg);\n            node.error(\"HTTP Popst body missing\");\n            node.send([null,null,msg]);\n            return;\n        }\n        msg.cgi = msg.payload.cgi;\n        msg.payload = body;\n        node.send([null,msg,null]);\n        break;\n    default:\n        node.send([null,null,msg]);\n        break;\n}\n",
        "outputs": 3,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 660,
        "y": 4500,
        "wires": [
            [
                "e8f2508f3782b8f2"
            ],
            [
                "144efd0dc1c91e8f"
            ],
            [
                "03b6cf1d59521f1b"
            ]
        ]
    },
    {
        "id": "a5bf4ea4a3323a42",
        "type": "join",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "mode": "auto",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": "false",
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "x": 1160,
        "y": 4600,
        "wires": [
            [
                "6e84a7a5d642b4f2"
            ]
        ]
    },
    {
        "id": "e8f2508f3782b8f2",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Get",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 850,
        "y": 4440,
        "wires": [
            [
                "71b53def2e583a54",
                "a5bf4ea4a3323a42"
            ]
        ]
    },
    {
        "id": "71b53def2e583a54",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "Message",
        "func": "if( msg.payload.hasOwnProperty(\"error\") )\n    node.error(msg.cgi + \" failed: \" + msg.payload.error.message, msg );\n\nmsg.response = msg.payload;\nmsg.payload = \"HTTP Get: \" + msg.cgi;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1030,
        "y": 4440,
        "wires": [
            [
                "5994b5fc8ca27421"
            ]
        ]
    },
    {
        "id": "aa9a34387889adab",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "scope": [
            "e8f2508f3782b8f2"
        ],
        "uncaught": false,
        "x": 840,
        "y": 4480,
        "wires": [
            [
                "a5bf4ea4a3323a42",
                "58f5540be0ce9b09"
            ]
        ]
    },
    {
        "id": "144efd0dc1c91e8f",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "",
        "data": "",
        "options": "",
        "filename": "",
        "x": 850,
        "y": 4520,
        "wires": [
            [
                "245e1691931a2ce2",
                "a5bf4ea4a3323a42"
            ]
        ]
    },
    {
        "id": "245e1691931a2ce2",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "Vapix Post Message",
        "func": "if( msg.payload.hasOwnProperty(\"error\") )\n    node.error(msg.cgi + \" failed: \" + msg.payload.error.message, msg );\nmsg.response = msg.payload;\nmsg.payload = \"HTTP Post : \" + msg.cgi;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1080,
        "y": 4520,
        "wires": [
            [
                "9e58ee7279b9d333"
            ]
        ]
    },
    {
        "id": "3b4aedb441f7307d",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "",
        "scope": [
            "144efd0dc1c91e8f"
        ],
        "uncaught": false,
        "x": 840,
        "y": 4560,
        "wires": [
            [
                "360f1c59d0d2a83b",
                "a5bf4ea4a3323a42"
            ]
        ]
    },
    {
        "id": "b441ba9c5d0814e7",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "name": "VAPIX",
        "info": "",
        "x": 290,
        "y": 4420,
        "wires": []
    },
    {
        "id": "886c0134bc92f6bf",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 133",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 2255,
        "y": 2700,
        "wires": []
    },
    {
        "id": "11ca121801dd1a0b",
        "type": "delay",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "",
        "pauseType": "delayv",
        "timeout": "2",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1680,
        "y": 4200,
        "wires": [
            [
                "911a1a0f515d0ba4",
                "8e062b0f85916bbc"
            ]
        ]
    },
    {
        "id": "4fa416059885f4ac",
        "type": "link in",
        "z": "6d42dc07fde7a1cc",
        "name": "Timezone",
        "links": [
            "47ae6c3fec806929"
        ],
        "x": 185,
        "y": 1540,
        "wires": [
            [
                "03b1897731687613"
            ]
        ]
    },
    {
        "id": "edeb2af62b5c8894",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 136",
        "mode": "link",
        "links": [
            "c629be351ef2984f"
        ],
        "x": 985,
        "y": 1620,
        "wires": []
    },
    {
        "id": "0728568abda0a7ac",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 137",
        "mode": "link",
        "links": [
            "ab0de88705f5928e"
        ],
        "x": 985,
        "y": 1540,
        "wires": []
    },
    {
        "id": "04c98396adc5499d",
        "type": "link out",
        "z": "6d42dc07fde7a1cc",
        "name": "link out 138",
        "mode": "link",
        "links": [
            "a078b3a81d2fdcda"
        ],
        "x": 985,
        "y": 1580,
        "wires": []
    },
    {
        "id": "4dc5e09bdc21026b",
        "type": "Axis device",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "name": "/axis-cgi/network_settings.cgi",
        "preset": "1af13a1540441ff9",
        "action": "HTTP Post",
        "cgi": "/axis-cgi/network_settings.cgi",
        "data": "",
        "options": "",
        "filename": "",
        "x": 590,
        "y": 1540,
        "wires": [
            [
                "645250b62c9be742",
                "eeaca61564461b7d"
            ]
        ]
    },
    {
        "id": "03b1897731687613",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "name": "DNS",
        "func": "if( !msg.config.hasOwnProperty(\"dns\") || !msg.config.dns ) {\n  node.send([null,msg]);\n  return;\n}\n\nvar dnsServers = [];\nif( typeof msg.config.dns === \"string\" )\n    dnsServers.push(msg.config.dns);\nif( Array.isArray(msg.config.dns) )\n    dnsServers = msg.config.dns;\n\nif( dnsServers.length === 0 ) {\n  node.send([null,msg]);\n  return;\n}\n\nmsg.payload = {\n\t\"apiVersion\": \"1.0\",\n    \"context\": \"abc\",\n\t\"method\": \"setResolverConfiguration\",\n\t\"params\": {\n\t\t\"useDhcpResolverInfo\": false,\n\t\t\"staticNameServers\": dnsServers\n\t}\n};\n\nnode.send([msg,null]);\n",
        "outputs": 2,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 1540,
        "wires": [
            [
                "4dc5e09bdc21026b"
            ],
            [
                "5774f01737ab7386"
            ]
        ]
    },
    {
        "id": "58a4418e8a13b7d8",
        "type": "comment",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "name": "DNS",
        "info": "",
        "x": 290,
        "y": 1480,
        "wires": []
    },
    {
        "id": "eeaca61564461b7d",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "name": "Status",
        "func": "if( msg.payload.hasOwnProperty(\"error\") ) {\n    node.error(msg.payload.error,msg);\n    return;\n}\nmsg.payload = msg.device.serial + \": DNS set\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 840,
        "y": 1540,
        "wires": [
            [
                "0728568abda0a7ac"
            ]
        ]
    },
    {
        "id": "763916da6a9b1a78",
        "type": "catch",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "name": "",
        "scope": [
            "4dc5e09bdc21026b"
        ],
        "uncaught": false,
        "x": 520,
        "y": 1580,
        "wires": [
            [
                "04c98396adc5499d",
                "645250b62c9be742"
            ]
        ]
    },
    {
        "id": "2bed77b96886d9e0",
        "type": "function",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "name": "Wait delay",
        "func": "msg.delay = 2000;\nif( msg.acap.hasOwnProperty(\"wait\") )\n    msg.delay = msg.acap.wait * 1000;\nmsg.payload = msg.delay;    \nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1510,
        "y": 4200,
        "wires": [
            [
                "11ca121801dd1a0b"
            ]
        ]
    },
    {
        "id": "d836cad2f50a5457",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "9dfd156e1950cc7f",
        "x": 820,
        "y": 540,
        "wires": [
            [
                "e437846c69820d56"
            ]
        ]
    },
    {
        "id": "e5ee3b4d153d64d5",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "x": 400,
        "y": 1140,
        "wires": [
            [
                "50dedcee8b98d13d"
            ]
        ]
    },
    {
        "id": "50dedcee8b98d13d",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "c9792688d8d9aa19",
        "x": 620,
        "y": 1140,
        "wires": [
            [
                "b804be045840899a"
            ]
        ]
    },
    {
        "id": "89dc8d2d67998f73",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "x": 480,
        "y": 800,
        "wires": [
            [
                "4ea6ebd542b86370"
            ]
        ]
    },
    {
        "id": "288d0df563040762",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "x": 850,
        "y": 880,
        "wires": [
            [
                "f759fcf09dcac666"
            ]
        ]
    },
    {
        "id": "f759fcf09dcac666",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "x": 1050,
        "y": 880,
        "wires": [
            [
                "c7996c7136a87da7"
            ]
        ]
    },
    {
        "id": "acbd4d1e2563f3b4",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5ef259fcb1cdf8e3",
        "x": 1160,
        "y": 760,
        "wires": [
            [
                "5e8692de0f04745a"
            ]
        ]
    },
    {
        "id": "2c66daa476f039f6",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "x": 1960,
        "y": 4200,
        "wires": [
            [
                "2f2ed863cefd4060"
            ]
        ]
    },
    {
        "id": "e964cd01347f5f01",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "x": 1460,
        "y": 3500,
        "wires": [
            [
                "a33774e6e8ea21c6"
            ]
        ]
    },
    {
        "id": "a33774e6e8ea21c6",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "x": 1860,
        "y": 3500,
        "wires": [
            [
                "d09d6605ad808f1f"
            ]
        ]
    },
    {
        "id": "3cffd52011c516ca",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "x": 1270,
        "y": 5040,
        "wires": [
            [
                "932db199393f0a2d"
            ]
        ]
    },
    {
        "id": "ac87f5fc9f5922f3",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "x": 430,
        "y": 3960,
        "wires": [
            [
                "73595c38012c7322"
            ]
        ]
    },
    {
        "id": "c317139745f68a20",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "x": 1040,
        "y": 3960,
        "wires": [
            [
                "261fe59b90fc81fa"
            ]
        ]
    },
    {
        "id": "73595c38012c7322",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "x": 760,
        "y": 3960,
        "wires": [
            [
                "c317139745f68a20"
            ]
        ]
    },
    {
        "id": "261fe59b90fc81fa",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "0547b0a6bfac8451",
        "x": 1180,
        "y": 3960,
        "wires": [
            [
                "8d03416383ccd583"
            ]
        ]
    },
    {
        "id": "30754429244e62df",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 490,
        "y": 3720,
        "wires": [
            [
                "4a6c139598a368be"
            ]
        ]
    },
    {
        "id": "a65438f413dc22b1",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 1580,
        "y": 3720,
        "wires": [
            [
                "f87da7beee206827"
            ]
        ]
    },
    {
        "id": "f87da7beee206827",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 1860,
        "y": 3720,
        "wires": [
            [
                "1ad70f1f83167917"
            ]
        ]
    },
    {
        "id": "e08225805615ac2c",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 2080,
        "y": 3460,
        "wires": [
            [
                "c0e63e2b0e8caac6"
            ]
        ]
    },
    {
        "id": "4a6c139598a368be",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 860,
        "y": 3720,
        "wires": [
            [
                "ac48075cf0388668"
            ]
        ]
    },
    {
        "id": "ac48075cf0388668",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "24c142e5479761b6",
        "x": 1400,
        "y": 3720,
        "wires": [
            [
                "a65438f413dc22b1"
            ]
        ]
    },
    {
        "id": "67293eea0fb6cc0b",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "x": 410,
        "y": 4320,
        "wires": [
            [
                "cfe1be0e0db99c19"
            ]
        ]
    },
    {
        "id": "cfe1be0e0db99c19",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "x": 1960,
        "y": 4320,
        "wires": [
            [
                "c503f405e50a5c52"
            ]
        ]
    },
    {
        "id": "22fe10ab761f0d1c",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "x": 420,
        "y": 2160,
        "wires": [
            [
                "eb3fbabf5618cd80"
            ]
        ]
    },
    {
        "id": "eb3fbabf5618cd80",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "95d5855612fbaf04",
        "x": 1540,
        "y": 2160,
        "wires": [
            [
                "e484f5dc92c5eba1"
            ]
        ]
    },
    {
        "id": "091309482b1a94b5",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "x": 1080,
        "y": 2460,
        "wires": [
            [
                "a153f309623e9fdb"
            ]
        ]
    },
    {
        "id": "a27447bf69600291",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "x": 560,
        "y": 2400,
        "wires": [
            [
                "0c245b9b85c344a7"
            ]
        ]
    },
    {
        "id": "c0ac684f02ff278c",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "x": 1680,
        "y": 2520,
        "wires": [
            [
                "6922b3877f779fef"
            ]
        ]
    },
    {
        "id": "6922b3877f779fef",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "x": 2080,
        "y": 2520,
        "wires": [
            [
                "1f48ecb7127e748a"
            ]
        ]
    },
    {
        "id": "fa53c1f68726257c",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "090f59f3bf955f61",
        "x": 2220,
        "y": 2340,
        "wires": [
            [
                "161b25e016f50fa3"
            ]
        ]
    },
    {
        "id": "55596631f19e11e9",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "x": 440,
        "y": 2980,
        "wires": [
            [
                "4d930eec2c668b76"
            ]
        ]
    },
    {
        "id": "1c5790ebe6844e1c",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "x": 1060,
        "y": 3060,
        "wires": [
            [
                "1e072fb54d49fdf6"
            ]
        ]
    },
    {
        "id": "2e34df99d2dbae19",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "x": 1640,
        "y": 2940,
        "wires": [
            [
                "21d4834648058d9e"
            ]
        ]
    },
    {
        "id": "1e072fb54d49fdf6",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "78c6e6986a199d6e",
        "x": 1480,
        "y": 3060,
        "wires": [
            [
                "c7680999c23267ca"
            ]
        ]
    },
    {
        "id": "f86b396e4859443e",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "x": 440,
        "y": 2780,
        "wires": [
            [
                "8953ac790a699e41"
            ]
        ]
    },
    {
        "id": "8953ac790a699e41",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "x": 1220,
        "y": 2780,
        "wires": [
            [
                "886f83b61c0874b5"
            ]
        ]
    },
    {
        "id": "886f83b61c0874b5",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "5fc5d229e6d680dd",
        "x": 2060,
        "y": 2780,
        "wires": [
            [
                "b64a17ac0e500ddc"
            ]
        ]
    },
    {
        "id": "8409bb233da1e959",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "x": 460,
        "y": 3300,
        "wires": [
            [
                "d9daa186964b202f"
            ]
        ]
    },
    {
        "id": "d9daa186964b202f",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "772392a3ac895b10",
        "x": 1340,
        "y": 3300,
        "wires": [
            [
                "5432395a324f6d6b"
            ]
        ]
    },
    {
        "id": "dc3160792b728ac6",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "x": 470,
        "y": 1380,
        "wires": [
            [
                "50774c773a9ff69d"
            ]
        ]
    },
    {
        "id": "50774c773a9ff69d",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "427a43a10126bb6b",
        "x": 650,
        "y": 1380,
        "wires": [
            [
                "47ae6c3fec806929"
            ]
        ]
    },
    {
        "id": "5a21e12c518799f3",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "x": 420,
        "y": 1920,
        "wires": [
            [
                "3f41df45f1068162"
            ]
        ]
    },
    {
        "id": "3f41df45f1068162",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "x": 880,
        "y": 1920,
        "wires": [
            [
                "1d549cbf72b51ffd"
            ]
        ]
    },
    {
        "id": "1d549cbf72b51ffd",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "x": 1720,
        "y": 1920,
        "wires": [
            [
                "38174e52c149c06d"
            ]
        ]
    },
    {
        "id": "7dfc0e43c00b47c3",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "cc6164988702abef",
        "x": 1860,
        "y": 1780,
        "wires": [
            [
                "60d9101a39b4e980"
            ]
        ]
    },
    {
        "id": "d98170d90a5870e6",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "x": 460,
        "y": 5040,
        "wires": [
            [
                "c7d79f8f8c24e9b0"
            ]
        ]
    },
    {
        "id": "c7d79f8f8c24e9b0",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "f68c0c2e22f05ba6",
        "x": 1100,
        "y": 5040,
        "wires": [
            [
                "3cffd52011c516ca"
            ]
        ]
    },
    {
        "id": "4f6cda02e3249abc",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "x": 410,
        "y": 4640,
        "wires": [
            [
                "6e84a7a5d642b4f2"
            ]
        ]
    },
    {
        "id": "03b6cf1d59521f1b",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "x": 790,
        "y": 4600,
        "wires": [
            [
                "a5bf4ea4a3323a42"
            ]
        ]
    },
    {
        "id": "6e84a7a5d642b4f2",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "ae7d6bc7ba8ef710",
        "x": 1270,
        "y": 4640,
        "wires": [
            [
                "23959cbded70f3a9"
            ]
        ]
    },
    {
        "id": "ca43f8769ea3d0bc",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "x": 1880,
        "y": 4120,
        "wires": [
            [
                "2c66daa476f039f6"
            ]
        ]
    },
    {
        "id": "5774f01737ab7386",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "x": 480,
        "y": 1620,
        "wires": [
            [
                "645250b62c9be742"
            ]
        ]
    },
    {
        "id": "645250b62c9be742",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "dda97e7d43ed99c9",
        "x": 810,
        "y": 1620,
        "wires": [
            [
                "edeb2af62b5c8894"
            ]
        ]
    },
    {
        "id": "4320f177528e9f38",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "g": "6380162e329f9c69",
        "x": 1440,
        "y": 4280,
        "wires": [
            [
                "911a1a0f515d0ba4"
            ]
        ]
    },
    {
        "id": "0d89bccafa5fc67a",
        "type": "junction",
        "z": "6d42dc07fde7a1cc",
        "x": 170,
        "y": 420,
        "wires": [
            [
                "2169731c96098748"
            ]
        ]
    },
    {
        "id": "9dfd156e1950cc7f",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "c9c7c7b318d48036",
            "91a3709e3a1593af",
            "ea562c7b8a1f4275",
            "affed36236d1f218",
            "769ff43a69fc38a7",
            "80f1193e220c911b",
            "e76f222c6b9b1ea4",
            "13caf90fc2de50a9",
            "9f513e6861088740",
            "c2d84c7da4c38380",
            "d836cad2f50a5457",
            "2169731c96098748"
        ],
        "x": 224,
        "y": 319,
        "w": 882,
        "h": 302
    },
    {
        "id": "c9792688d8d9aa19",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "label": true,
            "stroke": "#000000",
            "fill": "#ffffbf",
            "color": "#000000"
        },
        "nodes": [
            "d1ab771eab9eb53f",
            "926d536c882b9c39",
            "e5ee3b4d153d64d5",
            "50dedcee8b98d13d",
            "63dfe84fecef5567",
            "131edbc69bf7b518",
            "d6164839df4a17f5"
        ],
        "x": 214,
        "y": 959,
        "w": 532,
        "h": 207
    },
    {
        "id": "5ef259fcb1cdf8e3",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "3c0225d0216bb766",
            "2edb98203af01703",
            "4ea6ebd542b86370",
            "eb200af9820293b5",
            "be8ea6786bdd3d39",
            "89dc8d2d67998f73",
            "288d0df563040762",
            "f759fcf09dcac666",
            "53f828d169db79fb",
            "acbd4d1e2563f3b4",
            "5f694fba9c51a72a"
        ],
        "x": 214,
        "y": 659,
        "w": 972,
        "h": 247
    },
    {
        "id": "0547b0a6bfac8451",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "8a98c5949d648bbd",
            "f1258ee2314fd616",
            "5101afc97ee05028",
            "679feabbdc4c2c75",
            "ac87f5fc9f5922f3",
            "c317139745f68a20",
            "5f4c58bb85964adb",
            "8099cb431deb2f71",
            "73595c38012c7322",
            "0b2c3e8b5e4be2ab",
            "fea7d448d4978f7d",
            "79472532c41693b0",
            "261fe59b90fc81fa"
        ],
        "x": 214,
        "y": 3779,
        "w": 1092,
        "h": 207
    },
    {
        "id": "24c142e5479761b6",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "label": true,
            "stroke": "#000000",
            "fill": "#ffffbf",
            "color": "#000000"
        },
        "nodes": [
            "b7939f8c31487dc5",
            "c9c75d5877ea8b51",
            "c69b1dd211251243",
            "8df9b212caea4e6d",
            "efb36d54d284127c",
            "b475f62b037384e9",
            "30754429244e62df",
            "402bdd2f0b0a4293",
            "bc56cb551d4fa6a5",
            "a65438f413dc22b1",
            "f87da7beee206827",
            "f8de5588d6daa74f",
            "a1d9e22b19f1234f",
            "50b088fc6c0639b8",
            "e08225805615ac2c",
            "a0b9ca89a432c8b4",
            "4a6c139598a368be",
            "55b062244bf0aefd",
            "ac48075cf0388668",
            "9d9e870581a4496e"
        ],
        "x": 214,
        "y": 3359,
        "w": 1892,
        "h": 387
    },
    {
        "id": "6380162e329f9c69",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#ffffbf"
        },
        "nodes": [
            "cf069fc7b849fdde",
            "27f8122088aee7f3",
            "61d0de95ba03d708",
            "dcf39d26ea9c1cd4",
            "ee05b84335f596ba",
            "c7ff9899a9d6ce57",
            "47b5942821a3e241",
            "393bb9e158ed1c12",
            "8459203f91061712",
            "42a9f86d7f11223f",
            "8e062b0f85916bbc",
            "67293eea0fb6cc0b",
            "cfe1be0e0db99c19",
            "911a1a0f515d0ba4",
            "36d6ad5e86b7448b",
            "96b92e2199a11364",
            "11ca121801dd1a0b",
            "2c66daa476f039f6",
            "ca43f8769ea3d0bc",
            "2bed77b96886d9e0",
            "4320f177528e9f38"
        ],
        "x": 214,
        "y": 4019,
        "w": 1772,
        "h": 327
    },
    {
        "id": "95d5855612fbaf04",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "2f3ff6d43eb76593",
            "75cdbae6af92bd00",
            "303706b276563b3a",
            "b4c449edb1819093",
            "402f7bb3910e511b",
            "f4cfc942067b3453",
            "c594f34e281e7df6",
            "663a2017c1b1b044",
            "22fe10ab761f0d1c",
            "eb3fbabf5618cd80",
            "60f3e332b6bb59c5",
            "809cac5e711fb33e"
        ],
        "x": 214,
        "y": 1979,
        "w": 1472,
        "h": 207
    },
    {
        "id": "090f59f3bf955f61",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "fill": "#ffffbf",
            "label": true
        },
        "nodes": [
            "99f4ac680b72fed9",
            "1589857e7040c711",
            "355c36781e9e859d",
            "dd4b571117b25387",
            "0bcc80baa3b65524",
            "0c245b9b85c344a7",
            "4d27c040e4a9dee8",
            "8fd4f7ad86e44448",
            "091309482b1a94b5",
            "162e5e1ca3bec5e5",
            "8607d16073bfda16",
            "a27447bf69600291",
            "a153f309623e9fdb",
            "98fdb92f73b1f1cc",
            "7fd055ac542558f3",
            "7d3d459ca01af293",
            "c0ac684f02ff278c",
            "5d1cae2ffd251998",
            "b636a585a0a7d5ad",
            "1845b34bbc4cee46",
            "6922b3877f779fef",
            "5c2c9fac51935dbf",
            "1097d2f340523ce9",
            "fa53c1f68726257c",
            "42d37940f574c6e7"
        ],
        "x": 214,
        "y": 2239,
        "w": 2032,
        "h": 322
    },
    {
        "id": "78c6e6986a199d6e",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "label": true,
            "stroke": "#000000",
            "fill": "#ffffbf",
            "color": "#000000"
        },
        "nodes": [
            "a4cde0c9371cfb42",
            "778f0054e4e1954c",
            "00e37ff3f0632664",
            "67ea516e91f6fb68",
            "8a0e37ee8974675b",
            "e08e1844c2ca78fb",
            "4d930eec2c668b76",
            "55596631f19e11e9",
            "1c5790ebe6844e1c",
            "d4007a00da9a159d",
            "2e34df99d2dbae19",
            "1e072fb54d49fdf6",
            "3822c5d617be5ef9",
            "84efb86b3a961442"
        ],
        "x": 214,
        "y": 2839,
        "w": 1452,
        "h": 247
    },
    {
        "id": "5fc5d229e6d680dd",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "label": true,
            "stroke": "#000000",
            "fill": "#ffffbf",
            "color": "#000000"
        },
        "nodes": [
            "3dd31cedf03be8b6",
            "91f0eac8480116ec",
            "b6b03f1035180ecf",
            "3b5981b91ecb0452",
            "ca3f54247d2362d5",
            "15d5dbbc4219288a",
            "58d9bb20e0892f38",
            "7587666dadfe5021",
            "81304ad89332f77d",
            "356a0daa682631f3",
            "f86b396e4859443e",
            "8953ac790a699e41",
            "2eae551b74314130",
            "886f83b61c0874b5",
            "8ce48005d64f93c1",
            "b7bc268e803e34d5"
        ],
        "x": 214,
        "y": 2599,
        "w": 1972,
        "h": 207
    },
    {
        "id": "772392a3ac895b10",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "e22b72c9c74ac9b0",
            "d6aea0ddd6f87fd4",
            "289d567568b4c009",
            "23988a1b51a22d71",
            "cc347e5d1bfc37b9",
            "8409bb233da1e959",
            "d9daa186964b202f",
            "1a2e89d1cd18a65b",
            "90e8a9c85077a247",
            "4f7575c162c693c3"
        ],
        "x": 214,
        "y": 3119,
        "w": 1152,
        "h": 207
    },
    {
        "id": "427a43a10126bb6b",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "d1715ad5b78bc6f0",
            "aefd78b4397260fe",
            "2f3965c347243aa5",
            "dc3160792b728ac6",
            "3188c8c315fd342a",
            "50774c773a9ff69d",
            "e1b1d2ebafe156ba"
        ],
        "x": 214,
        "y": 1199,
        "w": 562,
        "h": 207
    },
    {
        "id": "cc6164988702abef",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "d756c942f3c2f3fe",
            "e3d220ccb8ec88cf",
            "d034d47d5b9b62c8",
            "13b82623403de44b",
            "2a03ef87fffbeadc",
            "e98d8dcac446e72e",
            "92c8b7dbc461c8f2",
            "5a21e12c518799f3",
            "3f41df45f1068162",
            "1d549cbf72b51ffd",
            "47dc2dd5830c58a3",
            "e40bfb03d78efa91",
            "7dfc0e43c00b47c3",
            "cbfd5b21bc15987d"
        ],
        "x": 214,
        "y": 1679,
        "w": 1672,
        "h": 267
    },
    {
        "id": "f68c0c2e22f05ba6",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "56606517cb3d2228",
            "1dbcd45c7dae05f4",
            "0c5f3fbb0287e1c8",
            "8948ca6d5679cc07",
            "1c3feebbb2f8c1e2",
            "07ba62083c478acb",
            "d98170d90a5870e6",
            "c7d79f8f8c24e9b0",
            "9c8c2083783c5fca"
        ],
        "x": 224,
        "y": 4839,
        "w": 1182,
        "h": 227
    },
    {
        "id": "ae7d6bc7ba8ef710",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "4f2f75bda542e219",
            "448b01068fc51d47",
            "41def48e497b1a7a",
            "a5bf4ea4a3323a42",
            "e8f2508f3782b8f2",
            "71b53def2e583a54",
            "aa9a34387889adab",
            "144efd0dc1c91e8f",
            "245e1691931a2ce2",
            "3b4aedb441f7307d",
            "4f6cda02e3249abc",
            "03b6cf1d59521f1b",
            "6e84a7a5d642b4f2",
            "b441ba9c5d0814e7"
        ],
        "x": 214,
        "y": 4379,
        "w": 1082,
        "h": 287
    },
    {
        "id": "dda97e7d43ed99c9",
        "type": "group",
        "z": "6d42dc07fde7a1cc",
        "name": "",
        "style": {
            "stroke": "#000000",
            "fill": "#ffffbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "4dc5e09bdc21026b",
            "03b1897731687613",
            "58a4418e8a13b7d8",
            "5774f01737ab7386",
            "eeaca61564461b7d",
            "645250b62c9be742",
            "763916da6a9b1a78"
        ],
        "x": 214,
        "y": 1439,
        "w": 702,
        "h": 207
    },
    {
        "id": "1af13a1540441ff9",
        "type": "Device Access",
        "name": "Provision",
        "address": "",
        "protocol": "http"
    }
]
}
