grove-vision-ai-v2-kit/nodered-flow.json
2025-01-23 11:06:14 +00:00

227 lines
5.6 KiB
JSON

[
{
"id": "820464e1e8b08b98",
"type": "tab",
"label": "Flow 5",
"disabled": false,
"info": "",
"env": []
},
{
"id": "af726d45933680e7",
"type": "mqtt in",
"z": "820464e1e8b08b98",
"name": "",
"topic": "/vision_ai/data",
"qos": "2",
"datatype": "auto-detect",
"broker": "ec7d072cfbe377c3",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 180,
"y": 80,
"wires": [
[
"2"
]
]
},
{
"id": "2",
"type": "function",
"z": "820464e1e8b08b98",
"name": "Extract Score",
"func": "// Check if payload and boxes exist\nif (msg.payload && msg.payload.boxes && msg.payload.boxes[0]) {\n let score = msg.payload.boxes[0].score; // Extrahiere den Score-Wert\n if (score > 70) {\n msg.payload = score; // Setze den Score als neue Payload\n return msg; // Sende die Nachricht nur, wenn Score > 40\n }\n}\n// Wenn die Bedingung nicht erfüllt ist, ignoriere die Nachricht\nreturn null;\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 80,
"wires": [
[
"3",
"a21e33088a66bf25"
]
]
},
{
"id": "3",
"type": "debug",
"z": "820464e1e8b08b98",
"name": "Score Output",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 80,
"wires": []
},
{
"id": "a21e33088a66bf25",
"type": "trigger",
"z": "820464e1e8b08b98",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "30",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 590,
"y": 140,
"wires": [
[
"10f102b739a73c2f",
"0c95c988ea6f3da4"
]
]
},
{
"id": "10f102b739a73c2f",
"type": "debug",
"z": "820464e1e8b08b98",
"name": "debug 10",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 140,
"wires": []
},
{
"id": "09d3a894fe6a8d1c",
"type": "telegram sender",
"z": "98",
"name": "",
"bot": "8",
"haserroroutput": false,
"outputs": 1,
"x": 1000,
"y": 200,
"wires": [
[]
]
},
{
"id": "d1b95759670f38c9",
"type": "function",
"z": "820464e1e8b08b98",
"name": "function 4",
"func": "var msg1 = msg.payload.text;\nmsg.payload = {}\nmsg.payload.chatId = xxxxx\nmsg.payload.type = \"message\"\nmsg.payload.content = \"Vision AI hat ein Gesicht erkannt\";\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 820,
"y": 200,
"wires": [
[
"09d3a894fe6a8d1c"
]
]
},
{
"id": "0c95c988ea6f3da4",
"type": "switch",
"z": "820464e1e8b08b98",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 670,
"y": 200,
"wires": [
[
"d1b95759670f38c9"
]
]
},
{
"id": "ec7d072cfbe377c3",
"type": "mqtt-broker",
"name": "192.168.1.1",
"broker": "192.168.1.1",
"port": 1883,
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": 4,
"keepalive": 60,
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "564dc6ebc99bca08",
"type": "telegram bot",
"botname": "xxxx_bot",
"usernames": "xxxx",
"chatids": "",
"baseapiurl": "",
"updatemode": "polling",
"pollinterval": 300,
"usesocks": false,
"sockshost": "",
"socksprotocol": "socks5",
"socksport": 6667,
"socksusername": "anonymous",
"sockspassword": "",
"bothost": "",
"botpath": "",
"localbotport": 8443,
"publicbotport": 8443,
"privatekey": "",
"certificate": "",
"useselfsignedcertificate": false,
"sslterminated": false,
"verboselogging": false
}
]