Versuchs damit
[
{
"id": "763f4f1d4d634f73",
"type": "ui_button",
"z": "d7c2753f2fc39af9",
"name": "",
"group": "ccad5801a0091caa",
"order": 6,
"width": 0,
"height": 0,
"passthru": false,
"label": "Reset Scheinwerfer Relay",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "0",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 330,
"y": 2400,
"wires": [
[
"2315c8470b818770",
"5e7a50d13782d2f6"
]
]
},
{
"id": "a894b50a570a1f04",
"type": "ui_text_input",
"z": "d7c2753f2fc39af9",
"name": "",
"label": "Scheinwerfer Relay Connect Relay",
"tooltip": "mit komma getrennt Relaisnummer - \"1,4\" Schaltet Relay 1 mit Heizungstimer an",
"group": "ccad5801a0091caa",
"order": 5,
"width": 0,
"height": 0,
"passthru": false,
"mode": "text",
"delay": "600",
"topic": "",
"sendOnBlur": true,
"className": "",
"topicType": "str",
"x": 360,
"y": 2460,
"wires": [
[
"2315c8470b818770",
"5e7a50d13782d2f6"
]
]
},
{
"id": "5e7a50d13782d2f6",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "set global",
"func": " var str = msg.payload;\n\n global.set(\"ScheinwerferRelay\", str);\n \n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 2400,
"wires": [
[]
]
},
{
"id": "2315c8470b818770",
"type": "file",
"z": "d7c2753f2fc39af9",
"name": "",
"filename": "pekaway/Scheinwerfer ",
"appendNewline": false,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 660,
"y": 2460,
"wires": [
[
"55a182d50e2e6db2"
]
]
},
{
"id": "55a182d50e2e6db2",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "",
"func": "msg.payload =\"Setze ein neues Scheinwerfer Relay\"\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 880,
"y": 2460,
"wires": [
[
"b600941275ecda36"
]
]
},
{
"id": "b600941275ecda36",
"type": "ui_toast",
"z": "d7c2753f2fc39af9",
"position": "dialog",
"displayTime": "3",
"highlight": "",
"sendall": false,
"outputs": 1,
"ok": "OK",
"cancel": "",
"raw": false,
"className": "",
"topic": "",
"name": "",
"x": 1030,
"y": 2460,
"wires": [
[]
]
},
{
"id": "f816916703a946ec",
"type": "ui_switch",
"z": "d7c2753f2fc39af9",
"name": "ON/OFF Scheinwerfer ",
"label": "",
"tooltip": "",
"group": "ccad5801a0091caa",
"order": 1,
"width": 2,
"height": 1,
"passthru": true,
"decouple": "false",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "",
"oncolor": "",
"offvalue": "false",
"offvalueType": "bool",
"officon": "",
"offcolor": "",
"animate": false,
"className": "",
"x": 340,
"y": 2520,
"wires": [
[
"97239651fd07d7bf"
]
]
},
{
"id": "97239651fd07d7bf",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "set Global",
"func": "global.set(\"Scheinwerferonoff\", msg.payload);\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 2520,
"wires": [
[
"78200d9f2f87c691"
]
]
},
{
"id": "9e70de03f9c486bc",
"type": "ui_switch",
"z": "d7c2753f2fc39af9",
"name": "LED on/off",
"label": "",
"tooltip": "",
"group": "ccad5801a0091caa",
"order": 4,
"width": 1,
"height": 1,
"passthru": false,
"decouple": "true",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "radio_button_checked",
"oncolor": "lightGreen",
"offvalue": "false",
"offvalueType": "bool",
"officon": "radio_button_unchecked",
"offcolor": "Grey",
"animate": false,
"className": "",
"x": 850,
"y": 2520,
"wires": [
[]
]
},
{
"id": "9cf4bf55515293ed",
"type": "switch",
"z": "d7c2753f2fc39af9",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 750,
"y": 2620,
"wires": [
[
"0529c0b8f6b32834"
],
[
"593a274e0ebbfa42"
]
]
},
{
"id": "0529c0b8f6b32834",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "get connected relay",
"func": "msg.payload=global.get(\"ScheinwerferRelay\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 980,
"y": 2620,
"wires": [
[
"a8cafd67b5ece404"
]
]
},
{
"id": "593a274e0ebbfa42",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "get connected relay",
"func": "msg.payload=global.get(\"ScheinwerferRelay\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 980,
"y": 2660,
"wires": [
[
"b959df49122f633b",
"a894b50a570a1f04"
]
]
},
{
"id": "78200d9f2f87c691",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "Regler",
"func": "\nvar onoff = global.get(\"Scheinwerferonoff\");\n\n\n \n\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 650,
"y": 2580,
"wires": [
[
"9cf4bf55515293ed",
"9e70de03f9c486bc"
]
]
},
{
"id": "a8cafd67b5ece404",
"type": "link out",
"z": "d7c2753f2fc39af9",
"name": "Scheinwerfer true",
"mode": "link",
"links": [
"d9f49e6d5ae17958",
"a5f7be5c4192e50f"
],
"x": 1255,
"y": 2620,
"wires": []
},
{
"id": "b959df49122f633b",
"type": "link out",
"z": "d7c2753f2fc39af9",
"name": "Scheinwerfer false",
"mode": "link",
"links": [
"3fe2b2c1d74d6831",
"b0e15fb5116cca3d"
],
"x": 1255,
"y": 2660,
"wires": []
},
{
"id": "b6c4b8b9baf32cec",
"type": "file in",
"z": "d7c2753f2fc39af9",
"name": "",
"filename": "pekaway/Scheinwerfer ",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 580,
"y": 2340,
"wires": [
[
"5e7a50d13782d2f6"
]
]
},
{
"id": "54c3490df1b7f032",
"type": "inject",
"z": "d7c2753f2fc39af9",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "5",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 330,
"y": 2340,
"wires": [
[
"b6c4b8b9baf32cec"
]
]
},
{
"id": "9dea5f02dc2c6cc4",
"type": "switch",
"z": "d7c2753f2fc39af9",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "2",
"vt": "str"
},
{
"t": "eq",
"v": "3",
"vt": "str"
},
{
"t": "eq",
"v": "4",
"vt": "str"
},
{
"t": "eq",
"v": "5",
"vt": "str"
},
{
"t": "eq",
"v": "6",
"vt": "str"
},
{
"t": "eq",
"v": "7",
"vt": "str"
},
{
"t": "eq",
"v": "8",
"vt": "str"
},
{
"t": "eq",
"v": "9",
"vt": "str"
},
{
"t": "eq",
"v": "10",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 10,
"x": 1750,
"y": 2580,
"wires": [
[
"45e780c28cda85d5"
],
[
"f16a3c690e39fcc3"
],
[
"e3b14481ba4414f6"
],
[
"4da6707ec9fed1e1"
],
[
"6227f098c4452173"
],
[
"aa67b75277078908"
],
[
"2c5469e0bfcb972f"
],
[
"db635d1dad0d1f2a"
],
[],
[]
]
},
{
"id": "e3b14481ba4414f6",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"three\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2460,
"wires": [
[]
]
},
{
"id": "4da6707ec9fed1e1",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"four\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2500,
"wires": [
[]
]
},
{
"id": "6227f098c4452173",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"five\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2540,
"wires": [
[]
]
},
{
"id": "aa67b75277078908",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"six\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2580,
"wires": [
[]
]
},
{
"id": "2c5469e0bfcb972f",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"seven\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2620,
"wires": [
[]
]
},
{
"id": "db635d1dad0d1f2a",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"eight\", true);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2660,
"wires": [
[]
]
},
{
"id": "8cbec441227b4316",
"type": "switch",
"z": "d7c2753f2fc39af9",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "2",
"vt": "str"
},
{
"t": "eq",
"v": "3",
"vt": "str"
},
{
"t": "eq",
"v": "4",
"vt": "str"
},
{
"t": "eq",
"v": "5",
"vt": "str"
},
{
"t": "eq",
"v": "6",
"vt": "str"
},
{
"t": "eq",
"v": "7",
"vt": "str"
},
{
"t": "eq",
"v": "8",
"vt": "str"
},
{
"t": "eq",
"v": "9",
"vt": "str"
},
{
"t": "eq",
"v": "10",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 10,
"x": 1750,
"y": 2760,
"wires": [
[
"2931f2a3562fc413"
],
[
"62d26a8be5418dd3"
],
[
"781206757f091f01"
],
[
"2cddc6c109ab012f"
],
[
"5bd25bf859c21150"
],
[
"0c02474aa17b934f"
],
[
"7f09366876ffd002"
],
[
"c8a615f017a6f857"
],
[],
[]
]
},
{
"id": "2931f2a3562fc413",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"one\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2700,
"wires": [
[]
]
},
{
"id": "62d26a8be5418dd3",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"two\", false);\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2050,
"y": 2740,
"wires": [
[
"6b16829bb0f4c049"
]
]
},
{
"id": "781206757f091f01",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"three\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2780,
"wires": [
[]
]
},
{
"id": "2cddc6c109ab012f",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"four\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2820,
"wires": [
[]
]
},
{
"id": "5bd25bf859c21150",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"five\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2860,
"wires": [
[]
]
},
{
"id": "0c02474aa17b934f",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"six\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2900,
"wires": [
[]
]
},
{
"id": "7f09366876ffd002",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"seven\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2940,
"wires": [
[]
]
},
{
"id": "c8a615f017a6f857",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"eight\", false);\n",
"outputs": 1,
"noerr": 0,
"x": 2050,
"y": 2980,
"wires": [
[]
]
},
{
"id": "45e780c28cda85d5",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"one\", true);\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2050,
"y": 2380,
"wires": [
[]
]
},
{
"id": "f16a3c690e39fcc3",
"type": "function",
"z": "d7c2753f2fc39af9",
"name": "globalVariable set",
"func": "\nglobal.set(\"two\", true);\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2050,
"y": 2420,
"wires": [
[
"1227a303fe5eb6f0"
]
]
},
{
"id": "b27b623e8417b0f1",
"type": "split",
"z": "d7c2753f2fc39af9",
"name": "",
"splt": ",",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 1550,
"y": 2620,
"wires": [
[
"9dea5f02dc2c6cc4"
]
]
},
{
"id": "9d611d035d6306a2",
"type": "split",
"z": "d7c2753f2fc39af9",
"name": "",
"splt": ",",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 1550,
"y": 2660,
"wires": [
[
"8cbec441227b4316"
]
]
},
{
"id": "a5f7be5c4192e50f",
"type": "link in",
"z": "d7c2753f2fc39af9",
"name": "Relay EIN",
"links": [
"2980e8dc5f9221cc",
"4573a473dc8c9722",
"b164ca7196e54754",
"a8cafd67b5ece404"
],
"x": 1435,
"y": 2620,
"wires": [
[
"b27b623e8417b0f1"
]
]
},
{
"id": "b0e15fb5116cca3d",
"type": "link in",
"z": "d7c2753f2fc39af9",
"name": "Relay AUS",
"links": [
"0f6a4c30a94ebfc4",
"1e7f9f1e25a3b0cf",
"85b4ba79912be7a7",
"b959df49122f633b"
],
"x": 1435,
"y": 2660,
"wires": [
[
"9d611d035d6306a2"
]
]
},
{
"id": "1227a303fe5eb6f0",
"type": "debug",
"z": "d7c2753f2fc39af9",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 2250,
"y": 2420,
"wires": []
},
{
"id": "6b16829bb0f4c049",
"type": "debug",
"z": "d7c2753f2fc39af9",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 2250,
"y": 2740,
"wires": []
},
{
"id": "ccad5801a0091caa",
"type": "ui_group",
"name": "Scheinwerfer",
"tab": "87822ed60f29be33",
"order": 4,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "87822ed60f29be33",
"type": "ui_tab",
"name": "Test",
"icon": "build",
"order": 20,
"disabled": false,
"hidden": false
}
]
Im Linken Teil des Flow werden die Relays konfiguriert, und eingeschaltet.
im Rechten Teil an die Relays übergeben.
Wenn du im UI 1,2,3,4,5 eintägst schalten alle 5 Relays.