Hier ist der Flow für den Rollershutter
[
{
"id": "4a96be9f.91d98",
"type": "enocean-out",
"z": "901363c1.e3c7b",
"serialport": "8b0fa525.9251c8",
"name": "",
"logOutput": true,
"x": 570,
"y": 100,
"wires": [
[]
]
},
{
"id": "94753a96.7ba2c8",
"type": "enocean-in",
"z": "901363c1.e3c7b",
"serialport": "8b0fa525.9251c8",
"name": "in",
"x": 70,
"y": 100,
"wires": [
[
"4c33ef26.53d5"
]
]
},
{
"id": "4c33ef26.53d5",
"type": "enocean-actor",
"z": "901363c1.e3c7b",
"name": "",
"channel": "52",
"adt": true,
"x": 210,
"y": 100,
"wires": [
[
"a86d6ce0.af3d5"
],
[]
]
},
{
"id": "a86d6ce0.af3d5",
"type": "function",
"z": "901363c1.e3c7b",
"name": "LRN und Status",
"func": "const Enocean = global.get('Enocean');\nvar channel = 52;\nvar homeeID = \" \";\nvar pay = msg.payload;\nif(pay === \"LRN\"){\nvar tel = Enocean.RadioERP1.from(\"55000a0701eba5441833800504f9780001ffffffff460024\")\ntel.senderId = global.get(\"enocean-base-id\") + channel\nnode.status({fill:\"blue\",shape:\"dot\",text:\"Channel:\"+channel}) \nreturn [{payload: tel.toString()},{payload: {\n \"type\": \"LRN\",\n \"eep\": \"a5-38-08\",\n \"senderId\": homeeID,\n \"name\": \"homee\",\n \"channel\": channel\n}}]\n} \nif (pay.FUNC.rawValue === 1 ){\n node.status({fill:\"green\",shape:\"dot\",text:\"Ch:\"+channel+ \" Rollo gestoppt \"});}// \nif (pay.FUNC.rawValue === 2 || (pay.P1.rawValue <= 80 && pay.FUNC.rawValue ===4)){\n node.status({fill:\"green\",shape:\"dot\",text:\"Ch:\"+channel+ \" Rollo offen \"+pay.P1.rawValue+\"%\"});\n return [{payload:{\n \"data\": {\n \"LRNB\": 1,\n \"BSP\": pay.P1.rawValue,\n \"AS\": 0,\n \"AN\": 1,\n \"PVF\": 0,\n \"AVF\": 0,\n \"ES\": 0,\n \"EP\": 2,\n \"ST\": 0,\n \"SM\": 0,\n \"MOTP\": 0\n },\n \"meta\": {\n \"eep\": \"a5-11-03\",\n \"channel\": channel,\n \"data\": 7\n }\n}\n},null]\n}\nelse if(pay.FUNC.rawValue === 3 || (pay.P1.rawValue >= 80 && pay.FUNC.rawValue ===4)){\n if(pay.P1.rawValue === 0){BSP = 100;} else BSP =pay.P1.rawValue;\n node.status({fill:\"red\",shape:\"dot\",text:\"Ch:\"+channel+ \" Rollo geschlossen \"+BSP+\"%\"})\n return[{payload:{\n \"data\": {\n \"LRNB\": 1,\n \"BSP\": BSP,\n \"AS\": 0,\n \"AN\": 1,\n \"PVF\": 0,\n \"AVF\": 0,\n \"ES\": 0,\n \"EP\": 3,\n \"ST\": 0,\n \"SM\": 0,\n \"MOTP\": 0\n },\n \"meta\": {\n \"eep\": \"a5-11-03\",\n \"channel\": channel,\n \"data\": 7\n }\n}\n},null]\n}\nreturn ",
"outputs": 2,
"noerr": 0,
"x": 380,
"y": 100,
"wires": [
[
"4a96be9f.91d98"
],
[
"4c33ef26.53d5"
]
]
},
{
"id": "558b3d64.560e04",
"type": "inject",
"z": "901363c1.e3c7b",
"name": "",
"topic": "",
"payload": "LRN",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 210,
"y": 60,
"wires": [
[
"a86d6ce0.af3d5"
]
]
},
{
"id": "8b0fa525.9251c8",
"type": "enocean-config-node",
"z": "",
"serialport": "/dev/ttyUSB0"
}]