node-red-contrib-axis-com
Version:
Simplified integration with Axis devices
936 lines • 23.1 kB
JSON
[
{
"id": "72041455aaaa31f9",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 120,
"wires": [
[
"e8d5b1f4e3276f0e"
]
]
},
{
"id": "8373c3061549a222",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 420,
"wires": [
[
"adc846b2b8aadf5e"
]
]
},
{
"id": "adc846b2b8aadf5e",
"type": "function",
"z": "67dc3ddced9a8159",
"name": "Data",
"func": "msg.payload = {\n timezone:\"Europe/Stockholm\",\n ntp:[\n \"0.pool.ntp.org\",\n \"1.pool.ntp.org\",\n ]\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 420,
"wires": [
[
"26616ae9da4053bb"
]
]
},
{
"id": "651bf1ca619c4624",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 180,
"wires": [
[
"77aeedcef04bffc9"
]
]
},
{
"id": "2baad69d72e7ad0b",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 300,
"wires": [
[
"64a8e8407c4dda71"
]
]
},
{
"id": "d893d1b6a8e2f5ee",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 480,
"wires": [
[
"203eb0387292f381"
]
]
},
{
"id": "203eb0387292f381",
"type": "function",
"z": "67dc3ddced9a8159",
"name": "Data",
"func": "msg.payload = {\n longitude:12.345,\n latitude: 23.456,\n direction:90,\n text: 'Some user defined text'\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 480,
"wires": [
[
"f2026fafc657c7d4"
]
]
},
{
"id": "cc5a2ec9a33908bf",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 780,
"wires": [
[
"1b84d66c62837e95"
]
]
},
{
"id": "1b84d66c62837e95",
"type": "file in",
"z": "67dc3ddced9a8159",
"name": "Firmware",
"filename": "/some/path/firmware.bin",
"filenameType": "str",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 300,
"y": 780,
"wires": [
[
"88e978b227e562c9"
]
]
},
{
"id": "56c08ee51f5ea023",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 600,
"wires": [
[
"5886b781130b995e"
]
]
},
{
"id": "5886b781130b995e",
"type": "function",
"z": "67dc3ddced9a8159",
"name": "MQTT Client settings",
"func": "msg.payload = {\n \"apiVersion\": \"1.0\",\n \"context\": \"some context\",\n \"method\": \"configureClient\",\n \"params\": {\n \"server\": {\n \"protocol\": \"ssl\",\n \"host\": \"somebroker.somewhere.com\",\n \"port\": 8883\n },\n\n \"username\": \"user_1\",\n \"password\": \"password_1\",\n \"keepExistingPassword\": false,\n \"clientId\": \"unique_id_on_broker\",\n \"keepAliveInterval\": 20,\n \"connectTimeout\": 30,\n \"cleanSession\": true,\n \"autoReconnect\": true,\n \"deviceTopicPrefix\": \"some/topic/prefix\",\n\n \"lastWillTestament\": {\n \"useDefault\": false,\n \"topic\": \"Camera_1/ConnectionStatus\",\n \"message\": \"Connection Lost\",\n \"retain\": true,\n \"qos\": 1\n },\n\n \"connectMessage\": {\n \"useDefault\": false,\n \"topic\": \"Camera_1/ConnectionStatus\",\n \"message\": \"Connected\",\n \"retain\": true,\n \"qos\": 1\n },\n\n \"disconnectMessage\": {\n \"useDefault\": false,\n \"topic\": \"Camera_1/ConnectionStatus\",\n \"message\": \"Disconnected\",\n \"retain\": true,\n \"qos\": 1\n },\n\n \"ssl\": {\n \"validateServerCert\": true\n }\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 600,
"wires": [
[
"091bb725ddc38447"
]
]
},
{
"id": "fb8419fb7b6b3b37",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 660,
"wires": [
[
"2c36a70c97eb7073"
]
]
},
{
"id": "2c36a70c97eb7073",
"type": "function",
"z": "67dc3ddced9a8159",
"name": "Request event declarations",
"func": "msg.payload = '<m:GetEventInstances xmlns:m=\"http://www.axis.com/vapix/ws/event1\"/>';\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 660,
"wires": [
[
"98a5b2068450b06b"
]
]
},
{
"id": "e8d5b1f4e3276f0e",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Device Info",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 120,
"wires": [
[
"cc2d57ea82fd8156"
]
]
},
{
"id": "77aeedcef04bffc9",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Connections",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 180,
"wires": [
[
"3fa64f4c97dce706"
]
]
},
{
"id": "cc2d57ea82fd8156",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 120,
"wires": []
},
{
"id": "64a8e8407c4dda71",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Get location",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 300,
"wires": [
[
"265fc401ca6ac1cb"
]
]
},
{
"id": "7eb3673f7999c3e3",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 240,
"wires": [
[
"a4ecec8b9285efc9"
]
]
},
{
"id": "a4ecec8b9285efc9",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Syslog",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 610,
"y": 240,
"wires": [
[
"2df29b7c0ee0285c"
]
]
},
{
"id": "26616ae9da4053bb",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Set time",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 600,
"y": 420,
"wires": [
[
"4a8ee7dbb3c76dd4"
]
]
},
{
"id": "f2026fafc657c7d4",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Set location",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 480,
"wires": [
[
"ac4a618f0f75f6b2"
]
]
},
{
"id": "88e978b227e562c9",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Upgrade firmware",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 570,
"y": 780,
"wires": [
[
"6501d1aaa1059e7d"
]
]
},
{
"id": "6bb538ba8fa7a85f",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 540,
"wires": [
[
"e8a807f221f4cd3f"
]
]
},
{
"id": "e8a807f221f4cd3f",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "HTTP Get",
"cgi": "/axis-cgi/param.cgi?action=list&group=Properties.System",
"data": "",
"options": "",
"filename": "",
"x": 600,
"y": 540,
"wires": [
[
"6289b4d4af2ffa07"
]
]
},
{
"id": "091bb725ddc38447",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "HTTP Post",
"cgi": "/axis-cgi/mqtt/client.cgi",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 600,
"wires": [
[
"e603338d3306c58e"
]
]
},
{
"id": "98a5b2068450b06b",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "SOAP Post",
"cgi": "/axis-cgi/mqtt/client.cgi",
"data": "",
"options": "",
"filename": "",
"x": 590,
"y": 660,
"wires": [
[
"4066986e253df38a"
]
]
},
{
"id": "5af42002cda0c105",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 720,
"wires": [
[
"79e95f103c12d6b7"
]
]
},
{
"id": "79e95f103c12d6b7",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Restart",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 600,
"y": 720,
"wires": [
[
"eed4f654c770dffd"
]
]
},
{
"id": "66eb74ddb71037ca",
"type": "inject",
"z": "67dc3ddced9a8159",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 360,
"wires": [
[
"4670919a089879f6"
]
]
},
{
"id": "4670919a089879f6",
"type": "function",
"z": "67dc3ddced9a8159",
"name": "Name",
"func": "msg.payload = \"democam\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 360,
"wires": [
[
"bb130a20be9f27cd"
]
]
},
{
"id": "bb130a20be9f27cd",
"type": "Axis device",
"z": "67dc3ddced9a8159",
"name": "",
"preset": "f869d7cd6eb9b911",
"action": "Set name",
"cgi": "",
"data": "",
"options": "",
"filename": "",
"x": 600,
"y": 360,
"wires": [
[
"4ffe36c9f0d6f772"
]
]
},
{
"id": "1d5ee7c48e28cc31",
"type": "catch",
"z": "67dc3ddced9a8159",
"name": "",
"scope": null,
"uncaught": true,
"x": 140,
"y": 60,
"wires": [
[
"8f124da93fede98d"
]
]
},
{
"id": "8f124da93fede98d",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Error",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 410,
"y": 60,
"wires": []
},
{
"id": "3fa64f4c97dce706",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 180,
"wires": []
},
{
"id": "2df29b7c0ee0285c",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 240,
"wires": []
},
{
"id": "265fc401ca6ac1cb",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 300,
"wires": []
},
{
"id": "4a8ee7dbb3c76dd4",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 420,
"wires": []
},
{
"id": "4ffe36c9f0d6f772",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 360,
"wires": []
},
{
"id": "ac4a618f0f75f6b2",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 480,
"wires": []
},
{
"id": "e603338d3306c58e",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 600,
"wires": []
},
{
"id": "6289b4d4af2ffa07",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 540,
"wires": []
},
{
"id": "4066986e253df38a",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 660,
"wires": []
},
{
"id": "eed4f654c770dffd",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 720,
"wires": []
},
{
"id": "6501d1aaa1059e7d",
"type": "debug",
"z": "67dc3ddced9a8159",
"name": "Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 780,
"wires": []
},
{
"id": "f869d7cd6eb9b911",
"type": "Device Access",
"name": "Demo camera",
"address": "",
"protocol": "http"
}
]