UNPKG

node-red-contrib-axis-com

Version:
754 lines 18.5 kB
[ { "id": "18a6e5641aa75e93", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 120, "wires": [ [ "6c93753be2ba2ef2" ] ] }, { "id": "5660f2b7cadbf404", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 180, "wires": [ [ "c9cfdf20d5483f92" ] ] }, { "id": "ab1443cb25a96479", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 240, "wires": [ [ "ee85e72ea1c48971" ] ] }, { "id": "7c9ce6375bae498d", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 300, "wires": [ [ "79e721c602d5cf2b" ] ] }, { "id": "79e721c602d5cf2b", "type": "function", "z": "4a305f37a96bf169", "name": "Image settings", "func": "msg.payload = {\n Brightness: 50,\n ColorLevel: 50,\n DayLevel: 100\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 300, "wires": [ [ "564fa00c43e5d08b" ] ] }, { "id": "a7127613c321e53d", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 800, "y": 180, "wires": [] }, { "id": "6ff0428fa684ced9", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 800, "y": 240, "wires": [] }, { "id": "9d9d493fae191c02", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 800, "y": 300, "wires": [] }, { "id": "9e321868e28db3f9", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "JPEG Image", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 610, "y": 120, "wires": [ [ "0be3d3ae2d5245d3" ] ] }, { "id": "c9cfdf20d5483f92", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Camera Info", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 610, "y": 180, "wires": [ [ "a7127613c321e53d" ] ] }, { "id": "ee85e72ea1c48971", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Get image settings", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 590, "y": 240, "wires": [ [ "6ff0428fa684ced9" ] ] }, { "id": "564fa00c43e5d08b", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Set image settings", "resolution": "640x360", "output": "Base64", "filename": "", "options": "", "data": "", "x": 590, "y": 300, "wires": [ [ "9d9d493fae191c02" ] ] }, { "id": "6c93753be2ba2ef2", "type": "function", "z": "4a305f37a96bf169", "name": "Resolution", "func": "msg.resolution = \"1280x720\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 370, "y": 120, "wires": [ [ "9e321868e28db3f9" ] ] }, { "id": "0be3d3ae2d5245d3", "type": "ui_template", "z": "4a305f37a96bf169", "group": "77b88125b159ae08", "name": "", "order": 0, "width": "13", "height": "8", "format": "<img src=\"data:image/jpeg;base64, {{msg.payload}}\">", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", "x": 800, "y": 120, "wires": [ [] ] }, { "id": "6cfcabbaa4561be2", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 560, "wires": [ [ "dd807f8827665049" ] ] }, { "id": "56653149e9dd9e55", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 800, "y": 560, "wires": [] }, { "id": "dd807f8827665049", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Set video filter", "resolution": "640x360", "output": "Base64", "filename": "", "options": "None", "data": "", "x": 600, "y": 560, "wires": [ [ "56653149e9dd9e55" ] ] }, { "id": "e61d7259216ad347", "type": "catch", "z": "4a305f37a96bf169", "name": "", "scope": null, "uncaught": true, "x": 140, "y": 60, "wires": [ [ "60ee12f982b66d17" ] ] }, { "id": "60ee12f982b66d17", "type": "debug", "z": "4a305f37a96bf169", "name": "Error", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 370, "y": 60, "wires": [] }, { "id": "c81c2a3e12c8eaab", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 360, "wires": [ [ "ceb2283f15a12ef4" ] ] }, { "id": "9cd71337d940d3a3", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 800, "y": 400, "wires": [] }, { "id": "1877eb3872da442c", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Recordings", "resolution": "640x360", "output": "Base64", "filename": "", "options": "None", "data": "", "x": 610, "y": 360, "wires": [ [ "9cd71337d940d3a3", "793b2864d891f344" ] ] }, { "id": "ceb2283f15a12ef4", "type": "function", "z": "4a305f37a96bf169", "name": "function 1", "func": "msg.payload = {\n// from: new Date(\"2022-09-29\"),\n// to: new Date(\"2022-09-30\")\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 340, "y": 360, "wires": [ [ "1877eb3872da442c" ] ] }, { "id": "cce8d14655f197d8", "type": "ui_table", "z": "4a305f37a96bf169", "group": "bc5bc4dfb29f7fdd", "name": "", "order": 0, "width": "16", "height": "12", "columns": [ { "field": "storage", "title": "Storage", "width": "15%", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } }, { "field": "resolution", "title": "Resolution", "width": "15%", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } }, { "field": "start", "title": "Time", "width": "30%", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } }, { "field": "duration", "title": "Duration (s)", "width": "15%", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } }, { "field": "type", "title": "Type", "width": "12%", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } }, { "field": "link", "title": "Download", "width": "12%", "align": "left", "formatter": "html", "formatterParams": { "target": "_blank" } } ], "outputs": 0, "cts": false, "x": 990, "y": 360, "wires": [] }, { "id": "793b2864d891f344", "type": "function", "z": "4a305f37a96bf169", "name": "Add properties", "func": "msg.payload.forEach( function( item ){\n item.link = '<a href=\"' + item.url + '\" target=\"_blank\">Download</a>';\n item.resolution = item.width + \"x\" + item.height;\n});\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 360, "wires": [ [ "cce8d14655f197d8" ] ] }, { "id": "0963861120079180", "type": "inject", "z": "4a305f37a96bf169", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 460, "wires": [ [ "b0ebb574f0bc59b5" ] ] }, { "id": "c2176e2c088daa70", "type": "debug", "z": "4a305f37a96bf169", "name": "Success", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1060, "y": 460, "wires": [] }, { "id": "b0ebb574f0bc59b5", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Start recording", "resolution": "640x360", "output": "Base64", "filename": "", "options": "None", "data": "", "x": 360, "y": 460, "wires": [ [ "51d3cbfc982ad303", "0cca16931bccebdb" ] ] }, { "id": "51d3cbfc982ad303", "type": "delay", "z": "4a305f37a96bf169", "name": "", "pauseType": "delay", "timeout": "5", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 580, "y": 460, "wires": [ [ "4d1bba3b3b53dc38" ] ] }, { "id": "4d1bba3b3b53dc38", "type": "Axis camera", "z": "4a305f37a96bf169", "name": "", "preset": "f869d7cd6eb9b911", "action": "Stop recording", "resolution": "640x360", "output": "Base64", "filename": "", "options": "None", "data": "", "x": 800, "y": 460, "wires": [ [ "c2176e2c088daa70" ] ] }, { "id": "0cca16931bccebdb", "type": "debug", "z": "4a305f37a96bf169", "name": "Recording ID", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 590, "y": 500, "wires": [] }, { "id": "f869d7cd6eb9b911", "type": "Device Access", "name": "Demo camera", "address": "", "protocol": "http" }, { "id": "77b88125b159ae08", "type": "ui_group", "name": "Image", "tab": "b06550e8db67ab14", "order": 1, "disp": true, "width": "13", "collapse": false, "className": "" }, { "id": "bc5bc4dfb29f7fdd", "type": "ui_group", "name": "Recordings", "tab": "b06550e8db67ab14", "order": 2, "disp": true, "width": "16", "collapse": false, "className": "" }, { "id": "b06550e8db67ab14", "type": "ui_tab", "name": "Camera", "icon": "dashboard", "disabled": false, "hidden": false } ]