Falls Du es mit NodeRed versuchen willst ( läuft ja auf dem Raspi ) hier mal mein Flow.
Die XXX und PASSWORT musst Du natürlich ersetzen, Pos. 2 ist eingetragen, Aufnahmedauer steht auf 30s.
Wenn Du noch Fragen zur Einstellung des Alarmservers hast, hau raus. Falls ich helfen kann, mach ich das.
Gruß
Franz
[
{
"id": "ad9fa0840f720812",
"type": "tab",
"label": "Garage",
"disabled": false,
"info": "",
"env": \[\]
},
{
"id": "500dd4ba6da20e06",
"type": "http response",
"z": "ad9fa0840f720812",
"name": "",
"statusCode": "",
"headers": {},
"x": 470,
"y": 100,
"wires": \[\]
},
{
"id": "774cc227f6f81b17",
"type": "template",
"z": "ad9fa0840f720812",
"name": "page",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<html>\\n <head></head>\\n <body>\\n <h2>Camera: {{req.query.camera}}</h2>\\n <h2>Test Value 2: {{req.query.query2}}</h2>\\n <h2>Test Value 3: {{req.query.query3}}</h2>\\n <h2>Active: {{req.query.active}}</h2>\\n </body>\\n</html>",
"x": 350,
"y": 100,
"wires": \[
\[
"500dd4ba6da20e06"
\]
\]
},
{
"id": "cdd629a5b5104e8d",
"type": "http in",
"z": "ad9fa0840f720812",
"name": "Webhook with URL Query",
"url": "/as-webhook/garage",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 150,
"y": 140,
"wires": \[
\[
"774cc227f6f81b17",
"8c48ac2b560814ca"
\]
\]
},
{
"id": "8c48ac2b560814ca",
"type": "function",
"z": "ad9fa0840f720812",
"name": "extract query",
"func": "msg.payload = msg.req.query;\\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": \[\],
"x": 370,
"y": 180,
"wires": \[
\[
"e75a6e6837df3460",
"78415ef4938d8579",
"94595faa522319ce",
"f65d7412627afb49"
\]
\]
},
{
"id": "8b660d18a412787f",
"type": "debug",
"z": "ad9fa0840f720812",
"name": "Old Alarmserver",
"active": false,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 730,
"y": 80,
"wires": \[\]
},
{
"id": "e75a6e6837df3460",
"type": "change",
"z": "ad9fa0840f720812",
"name": "active",
"rules": \[
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.trigger",
"tot": "msg"
}
\],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 530,
"y": 140,
"wires": \[
\[
"8b660d18a412787f"
\]
\]
},
{
"id": "78415ef4938d8579",
"type": "change",
"z": "ad9fa0840f720812",
"name": "trigger",
"rules": \[
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.trigger",
"tot": "msg"
}
\],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 530,
"y": 180,
"wires": \[
\[
"b54ffe54e910bf35"
\]
\]
},
{
"id": "94595faa522319ce",
"type": "change",
"z": "ad9fa0840f720812",
"name": "object",
"rules": \[
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.object",
"tot": "msg"
}
\],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 530,
"y": 220,
"wires": \[
\[
"c981538d88840d89"
\]
\]
},
{
"id": "9130db790bbe1e04",
"type": "debug",
"z": "ad9fa0840f720812",
"name": "New Alarmserver",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1170,
"y": 140,
"wires": \[\]
},
{
"id": "c981538d88840d89",
"type": "debug",
"z": "ad9fa0840f720812",
"name": "Detected Object",
"active": false,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 730,
"y": 360,
"wires": \[\]
},
{
"id": "b54ffe54e910bf35",
"type": "switch",
"z": "ad9fa0840f720812",
"name": "BW Ex",
"property": "payload",
"propertyType": "msg",
"rules": \[
{
"t": "eq",
"v": "32",
"vt": "str"
},
{
"t": "eq",
"v": "32",
"vt": "str"
}
\],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 670,
"y": 180,
"wires": \[
\[
"417c7c51a2da7fa6"
\],
\[
"f7d66e0eb0cdcf26"
\]
\]
},
{
"id": "5c4ec323ae9aa2eb",
"type": "http request",
"z": "ad9fa0840f720812",
"name": "Start REC",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://admin:PASSWORT@192.168.178.XXX/param.cgi?cmd=startrec&time=30",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": \[\],
"x": 1000,
"y": 140,
"wires": \[
\[
"9130db790bbe1e04"
\]
\]
},
{
"id": "f7d66e0eb0cdcf26",
"type": "http request",
"z": "ad9fa0840f720812",
"name": "Fahre Preset",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://admin:PASSWORT@192.168.178.XXX/param.cgi?cmd=getptzpreset&act=goto&index=2",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": \[\],
"x": 830,
"y": 220,
"wires": \[
\[
"c615816c350c9f97"
\]
\]
},
{
"id": "417c7c51a2da7fa6",
"type": "delay",
"z": "ad9fa0840f720812",
"name": "",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 820,
"y": 140,
"wires": \[
\[
"5c4ec323ae9aa2eb"
\]
\]
},
{
"id": "c615816c350c9f97",
"type": "debug",
"z": "ad9fa0840f720812",
"name": "New Alarmserver",
"active": false,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1030,
"y": 220,
"wires": \[\]
},
{
"id": "f65d7412627afb49",
"type": "debug",
"z": "ad9fa0840f720812",
"name": "payload",
"active": false,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 500,
"y": 360,
"wires": \[\]
}
]