node-red-subflow-axis-provisioning
Version:
Axis device staging and mass configuration
307 lines • 8.94 kB
JSON
[
{
"id": "ad504c207d746d76",
"type": "tab",
"label": "Provisioning Template",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1eedbfb8283456be",
"type": "debug",
"z": "ad504c207d746d76",
"name": "Status",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 320,
"wires": []
},
{
"id": "c58a36c668111207",
"type": "debug",
"z": "ad504c207d746d76",
"name": "Complete",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1040,
"y": 360,
"wires": []
},
{
"id": "58fe76bb5c453d39",
"type": "sf:6d42dc07fde7a1cc",
"z": "ad504c207d746d76",
"name": "",
"x": 800,
"y": 360,
"wires": [
[
"1eedbfb8283456be"
],
[
"c58a36c668111207"
],
[
"e84f275fdc49a818"
]
]
},
{
"id": "e84f275fdc49a818",
"type": "debug",
"z": "ad504c207d746d76",
"name": "Error",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 400,
"wires": []
},
{
"id": "fcbb6e877846f583",
"type": "comment",
"z": "ad504c207d746d76",
"name": "Documentation",
"info": "https://flows.nodered.org/node/node-red-subflow-axis-provisioning\n\n",
"x": 320,
"y": 80,
"wires": []
},
{
"id": "4568e0f21a6c73e8",
"type": "template",
"z": "ad504c207d746d76",
"name": "Adjust device configuration here",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\n \"accounts\": [\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Admin\" },\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Operator\" },\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Viewer\" }\n ],\n \"time\": {\n \"timezone\": \"Europe/Stockholm\",\n \"ntp\": [\"\"]\n },\n \"zipstream\": {\n \"strength\": 20,\n \"minfps\": 15\n },\n \"tls\": {\n \"policy\": \"HttpAndHttps\"\n },\n \"textOverlays\": [\n {\n \"text\": \"%F %X\",\n \"position\": \"topLeft\",\n \"textColor\": \"white\",\n \"textBGColor\": \"black\",\n \"fontSize\": 48\n },\n {\n \"text\": \"\",\n \"position\": \"topRight\",\n \"textColor\": \"white\",\n \"textBGColor\":\"transparent\",\n \"fontSize\": 48\n }\n ], \n \"imageOverlay\": {\n \"filepath\": \"\",\n \"position\":\"bottomRight\",\n \"scale\": true,\n \"alpha\": 0\n },\n \"onvif\": [\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Administrator\" },\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Administrator\" },\n { \"name\": \"\", \"password\": \"\", \"privileges\": \"Administrator\" }\n ],\n \"ssh\": false,\n \"mqtt\": {\n \"address\":\"\",\n \"port\": \"1883\",\n \"user\": \"\",\n \"password\":\"\"\n },\n \"publish\": [],\n \"acaps\": [\n ],\n \"vapix\": [\n ]\n}\n",
"output": "json",
"x": 530,
"y": 160,
"wires": [
[
"6912a0cdcda64be2"
]
]
},
{
"id": "deef134442e3fa06",
"type": "inject",
"z": "ad504c207d746d76",
"name": "Initialize",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 160,
"wires": [
[
"4568e0f21a6c73e8"
]
]
},
{
"id": "6912a0cdcda64be2",
"type": "change",
"z": "ad504c207d746d76",
"name": "",
"rules": [
{
"t": "set",
"p": "config",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 780,
"y": 160,
"wires": [
[
"238d04fed8bd29c1",
"efa93ca3215903b1"
]
]
},
{
"id": "238d04fed8bd29c1",
"type": "debug",
"z": "ad504c207d746d76",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 970,
"y": 160,
"wires": []
},
{
"id": "efa93ca3215903b1",
"type": "template",
"z": "ad504c207d746d76",
"name": "Adjust Device Inventory here",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "[\n {\n \"address\": \"\",\n \"properties\": {\n \"name\": \"\",\n \"valix\": []\n }\n } \n]",
"output": "json",
"x": 520,
"y": 220,
"wires": [
[
"6d90730629d83c19"
]
]
},
{
"id": "6d90730629d83c19",
"type": "change",
"z": "ad504c207d746d76",
"name": "",
"rules": [
{
"t": "set",
"p": "inventory",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 220,
"wires": [
[
"6e12bb1915b6c6a8"
]
]
},
{
"id": "6e12bb1915b6c6a8",
"type": "debug",
"z": "ad504c207d746d76",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 220,
"wires": []
},
{
"id": "38db885bd95bf1f5",
"type": "inject",
"z": "ad504c207d746d76",
"name": "Provision",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 360,
"wires": [
[
"0f315ac7eb03dc6c"
]
]
},
{
"id": "0f315ac7eb03dc6c",
"type": "change",
"z": "ad504c207d746d76",
"name": "",
"rules": [
{
"t": "set",
"p": "config",
"pt": "msg",
"to": "config",
"tot": "flow"
},
{
"t": "set",
"p": "inventory",
"pt": "msg",
"to": "inventory",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 360,
"wires": [
[
"58fe76bb5c453d39"
]
]
}
]