Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "cc7414fb.91f278",
- "type": "tab",
- "label": "Ikea-Button",
- "disabled": false,
- "info": ""
- },
- {
- "id": "90f50d13.e7349",
- "type": "mqtt in",
- "z": "cc7414fb.91f278",
- "name": "IKEA Button",
- "topic": "/home/zigbee/Ikea-Button",
- "qos": "2",
- "datatype": "auto",
- "broker": "595dfa51.2c1224",
- "inputs": 0,
- "x": 130,
- "y": 300,
- "wires": [
- [
- "a5a7d870.8eb7f8"
- ]
- ]
- },
- {
- "id": "c9757d4f.fc9b7",
- "type": "debug",
- "z": "cc7414fb.91f278",
- "name": "Ikea-Button",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "x": 890,
- "y": 1000,
- "wires": []
- },
- {
- "id": "54c8c41b.3c689c",
- "type": "function",
- "z": "cc7414fb.91f278",
- "name": "",
- "func": "var Knoten = \"Button\"\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,
- "x": 570,
- "y": 1000,
- "wires": [
- [
- "c9757d4f.fc9b7"
- ]
- ]
- },
- {
- "id": "a5a7d870.8eb7f8",
- "type": "json",
- "z": "cc7414fb.91f278",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 290,
- "y": 300,
- "wires": [
- [
- "54c8c41b.3c689c",
- "6b87e3c0.694bfc",
- "35c2421d.27180e",
- "ca674756.f8bbc8",
- "dd05e125.7ba94",
- "14c8b050.1758f"
- ]
- ]
- },
- {
- "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": 630,
- "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": 630,
- "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": 620,
- "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": 610,
- "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": 650,
- "y": 880,
- "wires": [
- [
- "dad0115e.d5eb9"
- ],
- [
- "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": true,
- "tosidebar": false,
- "console": false,
- "tostatus": true,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "payload",
- "statusType": "auto",
- "x": 870,
- "y": 900,
- "wires": []
- },
- {
- "id": "595dfa51.2c1224",
- "type": "mqtt-broker",
- "name": "",
- "broker": "192.168.123.16",
- "port": "1883",
- "clientid": "",
- "usetls": false,
- "compatmode": true,
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "closeTopic": "",
- "closePayload": "",
- "willTopic": "",
- "willQos": "0",
- "willPayload": ""
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement