Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "90f50d13.e7349",
- "type": "mqtt in",
- "z": "cc7414fb.91f278",
- "name": "IKEA Button",
- "topic": "/home/zigbee/IKEA-Button",
- "qos": "2",
- "datatype": "json",
- "broker": "595dfa51.2c1224",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 110,
- "y": 240,
- "wires": [
- [
- "827685862394cc86"
- ]
- ]
- },
- {
- "id": "c9757d4f.fc9b7",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Ikea-Button",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 890,
- "y": 1000,
- "wires": []
- },
- {
- "id": "54c8c41b.3c689c",
- "type": "function",
- "z": "cc7414fb.91f278",
- "name": "",
- "func": "var words = msg.topic.split('/');\nvar Knoten = (words[3]);\n\nvar Click = msg.payload.action\nvar duration = msg.payload.duration\nvar qual = msg.payload.linkquality\nvar bat = msg.payload.battery\n\nmsg.payload = [{\n Room: Knoten,\n Click: Click,\n Duration: duration,\n Qual: qual,\n Bat: bat\n}]\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Click: \" + Click + \", Qual: \" + qual + \"%\" + \", Duration: \" + duration + \"sec\" });\n// node.status({fill:\"blue\",shape:\"ring\",text:\"Click: \" + Click + \", Qual: \" + qual + \"%\" });\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 570,
- "y": 1000,
- "wires": [
- [
- "c9757d4f.fc9b7"
- ]
- ]
- },
- {
- "id": "6b87e3c0.694bfc",
- "type": "switch",
- "z": "cc7414fb.91f278",
- "name": "Arrow Right",
- "property": "payload.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "arrow_right_click",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "arrow_right_hold",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "arrow_right_release",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 690,
- "y": 100,
- "wires": [
- [
- "15f262c.aba469d"
- ],
- [
- "c25b2666.b77318"
- ],
- [
- "e2e8c6e3.564d48"
- ]
- ]
- },
- {
- "id": "15f262c.aba469d",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Right_Click",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 890,
- "y": 40,
- "wires": []
- },
- {
- "id": "c25b2666.b77318",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Right_Hold",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 890,
- "y": 100,
- "wires": []
- },
- {
- "id": "e2e8c6e3.564d48",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Right_Release",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 900,
- "y": 160,
- "wires": []
- },
- {
- "id": "35c2421d.27180e",
- "type": "switch",
- "z": "cc7414fb.91f278",
- "name": "Arrow Left",
- "property": "payload.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "arrow_left_click",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "arrow_left_hold",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "arrow_left_release",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 690,
- "y": 300,
- "wires": [
- [
- "aff91674.8c7458"
- ],
- [
- "5bc7b784.9d95f8"
- ],
- [
- "8aad4afd.9c74b8"
- ]
- ]
- },
- {
- "id": "aff91674.8c7458",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Left_Click",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 890,
- "y": 240,
- "wires": []
- },
- {
- "id": "5bc7b784.9d95f8",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Left_Hold",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 890,
- "y": 300,
- "wires": []
- },
- {
- "id": "8aad4afd.9c74b8",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Arrow_Left_Release",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 900,
- "y": 360,
- "wires": []
- },
- {
- "id": "ca674756.f8bbc8",
- "type": "switch",
- "z": "cc7414fb.91f278",
- "name": "Brightness Up",
- "property": "payload.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "brightness_up_click",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "brightness_up_hold",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "brightness_up_release",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 680,
- "y": 500,
- "wires": [
- [
- "ab95a88.7281858"
- ],
- [
- "15c41dfd.ec9cd2"
- ],
- [
- "1f202961.d4bc77"
- ]
- ]
- },
- {
- "id": "dd05e125.7ba94",
- "type": "switch",
- "z": "cc7414fb.91f278",
- "name": "Brightness Down",
- "property": "payload.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "brightness_down_click",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "brightness_down_hold",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "brightness_down_release",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 670,
- "y": 700,
- "wires": [
- [
- "318f1334.a1295c"
- ],
- [
- "d3b6ba7e.a4c588"
- ],
- [
- "cd4b345f.188d38"
- ]
- ]
- },
- {
- "id": "318f1334.a1295c",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Down_Click",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 910,
- "y": 640,
- "wires": []
- },
- {
- "id": "d3b6ba7e.a4c588",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Down_Hold",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 910,
- "y": 700,
- "wires": []
- },
- {
- "id": "cd4b345f.188d38",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Down_Release",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 920,
- "y": 760,
- "wires": []
- },
- {
- "id": "ab95a88.7281858",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Up_Click",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 900,
- "y": 440,
- "wires": []
- },
- {
- "id": "15c41dfd.ec9cd2",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Up_Hold",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 900,
- "y": 500,
- "wires": []
- },
- {
- "id": "1f202961.d4bc77",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Brightness_Up_Release",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 910,
- "y": 560,
- "wires": []
- },
- {
- "id": "14c8b050.1758f",
- "type": "switch",
- "z": "cc7414fb.91f278",
- "name": "Toggle",
- "property": "payload.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "toggle",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "toggle_hold",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 2,
- "x": 710,
- "y": 880,
- "wires": [
- [
- "dad0115e.d5eb9",
- "1bbb8320c7a4a9e7"
- ],
- [
- "263283d1.2e596c"
- ]
- ]
- },
- {
- "id": "dad0115e.d5eb9",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Toggle",
- "active": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 850,
- "y": 840,
- "wires": []
- },
- {
- "id": "263283d1.2e596c",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Toggle_Hold",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 870,
- "y": 900,
- "wires": []
- },
- {
- "id": "77a8cceaa300de7d",
- "type": "mqtt in",
- "z": "cc7414fb.91f278",
- "name": "IKEA Button-1",
- "topic": "/home/zigbee/IKEA-Button-1",
- "qos": "2",
- "datatype": "json",
- "broker": "595dfa51.2c1224",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 110,
- "y": 300,
- "wires": [
- [
- "827685862394cc86"
- ]
- ]
- },
- {
- "id": "13efeab63f28384d",
- "type": "mqtt in",
- "z": "cc7414fb.91f278",
- "name": "IKEA Button-2",
- "topic": "/home/zigbee/IKEA-Button-2",
- "qos": "2",
- "datatype": "json",
- "broker": "595dfa51.2c1224",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 110,
- "y": 360,
- "wires": [
- [
- "827685862394cc86"
- ]
- ]
- },
- {
- "id": "1214c510b0c6a90f",
- "type": "mqtt in",
- "z": "cc7414fb.91f278",
- "name": "IKEA Button-3",
- "topic": "/home/zigbee/IKEA-Button-3",
- "qos": "2",
- "datatype": "json",
- "broker": "595dfa51.2c1224",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 110,
- "y": 420,
- "wires": [
- [
- "827685862394cc86"
- ]
- ]
- },
- {
- "id": "827685862394cc86",
- "type": "function",
- "z": "cc7414fb.91f278",
- "name": "",
- "func": "var words = msg.topic.split('/');\nvar KnotenName = (words[3]);\n\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 420,
- "y": 300,
- "wires": [
- [
- "6b87e3c0.694bfc",
- "35c2421d.27180e",
- "ca674756.f8bbc8",
- "dd05e125.7ba94",
- "54c8c41b.3c689c",
- "14c8b050.1758f"
- ]
- ]
- },
- {
- "id": "1bbb8320c7a4a9e7",
- "type": "link out",
- "z": "cc7414fb.91f278",
- "name": "IKEA-Button-Toggle-OUT",
- "mode": "link",
- "links": [
- "af8ae2683011ff9a"
- ],
- "x": 815,
- "y": 800,
- "wires": []
- },
- {
- "id": "595dfa51.2c1224",
- "type": "mqtt-broker",
- "name": "Kossdorf",
- "broker": "192.168.123.16",
- "port": "1883",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "4",
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement