Advertisement
NittyGritty

IKEA 5 Buttons

Jun 2nd, 2023
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 15.50 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "90f50d13.e7349",
  4.         "type": "mqtt in",
  5.         "z": "cc7414fb.91f278",
  6.         "name": "IKEA Button",
  7.         "topic": "/home/zigbee/IKEA-Button",
  8.         "qos": "2",
  9.         "datatype": "json",
  10.         "broker": "595dfa51.2c1224",
  11.         "nl": false,
  12.         "rap": false,
  13.         "inputs": 0,
  14.         "x": 110,
  15.         "y": 240,
  16.         "wires": [
  17.             [
  18.                 "827685862394cc86"
  19.             ]
  20.         ]
  21.     },
  22.     {
  23.         "id": "c9757d4f.fc9b7",
  24.         "type": "debug",
  25.         "z": "cc7414fb.91f278",
  26.         "name": "Ikea-Button",
  27.         "active": true,
  28.         "tosidebar": true,
  29.         "console": false,
  30.         "tostatus": false,
  31.         "complete": "payload",
  32.         "targetType": "msg",
  33.         "statusVal": "",
  34.         "statusType": "auto",
  35.         "x": 890,
  36.         "y": 1000,
  37.         "wires": []
  38.     },
  39.     {
  40.         "id": "54c8c41b.3c689c",
  41.         "type": "function",
  42.         "z": "cc7414fb.91f278",
  43.         "name": "",
  44.         "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;",
  45.         "outputs": 1,
  46.         "noerr": 0,
  47.         "initialize": "",
  48.         "finalize": "",
  49.         "libs": [],
  50.         "x": 570,
  51.         "y": 1000,
  52.         "wires": [
  53.             [
  54.                 "c9757d4f.fc9b7"
  55.             ]
  56.         ]
  57.     },
  58.     {
  59.         "id": "6b87e3c0.694bfc",
  60.         "type": "switch",
  61.         "z": "cc7414fb.91f278",
  62.         "name": "Arrow Right",
  63.         "property": "payload.action",
  64.         "propertyType": "msg",
  65.         "rules": [
  66.             {
  67.                 "t": "eq",
  68.                 "v": "arrow_right_click",
  69.                 "vt": "str"
  70.             },
  71.             {
  72.                 "t": "eq",
  73.                 "v": "arrow_right_hold",
  74.                 "vt": "str"
  75.             },
  76.             {
  77.                 "t": "eq",
  78.                 "v": "arrow_right_release",
  79.                 "vt": "str"
  80.             }
  81.         ],
  82.         "checkall": "true",
  83.         "repair": false,
  84.         "outputs": 3,
  85.         "x": 690,
  86.         "y": 100,
  87.         "wires": [
  88.             [
  89.                 "15f262c.aba469d"
  90.             ],
  91.             [
  92.                 "c25b2666.b77318"
  93.             ],
  94.             [
  95.                 "e2e8c6e3.564d48"
  96.             ]
  97.         ]
  98.     },
  99.     {
  100.         "id": "15f262c.aba469d",
  101.         "type": "debug",
  102.         "z": "cc7414fb.91f278",
  103.         "name": "Arrow_Right_Click",
  104.         "active": true,
  105.         "tosidebar": false,
  106.         "console": false,
  107.         "tostatus": true,
  108.         "complete": "payload",
  109.         "targetType": "msg",
  110.         "statusVal": "payload",
  111.         "statusType": "auto",
  112.         "x": 890,
  113.         "y": 40,
  114.         "wires": []
  115.     },
  116.     {
  117.         "id": "c25b2666.b77318",
  118.         "type": "debug",
  119.         "z": "cc7414fb.91f278",
  120.         "name": "Arrow_Right_Hold",
  121.         "active": true,
  122.         "tosidebar": false,
  123.         "console": false,
  124.         "tostatus": true,
  125.         "complete": "payload",
  126.         "targetType": "msg",
  127.         "statusVal": "payload",
  128.         "statusType": "auto",
  129.         "x": 890,
  130.         "y": 100,
  131.         "wires": []
  132.     },
  133.     {
  134.         "id": "e2e8c6e3.564d48",
  135.         "type": "debug",
  136.         "z": "cc7414fb.91f278",
  137.         "name": "Arrow_Right_Release",
  138.         "active": true,
  139.         "tosidebar": false,
  140.         "console": false,
  141.         "tostatus": true,
  142.         "complete": "payload",
  143.         "targetType": "msg",
  144.         "statusVal": "payload",
  145.         "statusType": "auto",
  146.         "x": 900,
  147.         "y": 160,
  148.         "wires": []
  149.     },
  150.     {
  151.         "id": "35c2421d.27180e",
  152.         "type": "switch",
  153.         "z": "cc7414fb.91f278",
  154.         "name": "Arrow Left",
  155.         "property": "payload.action",
  156.         "propertyType": "msg",
  157.         "rules": [
  158.             {
  159.                 "t": "eq",
  160.                 "v": "arrow_left_click",
  161.                 "vt": "str"
  162.             },
  163.             {
  164.                 "t": "eq",
  165.                 "v": "arrow_left_hold",
  166.                 "vt": "str"
  167.             },
  168.             {
  169.                 "t": "eq",
  170.                 "v": "arrow_left_release",
  171.                 "vt": "str"
  172.             }
  173.         ],
  174.         "checkall": "true",
  175.         "repair": false,
  176.         "outputs": 3,
  177.         "x": 690,
  178.         "y": 300,
  179.         "wires": [
  180.             [
  181.                 "aff91674.8c7458"
  182.             ],
  183.             [
  184.                 "5bc7b784.9d95f8"
  185.             ],
  186.             [
  187.                 "8aad4afd.9c74b8"
  188.             ]
  189.         ]
  190.     },
  191.     {
  192.         "id": "aff91674.8c7458",
  193.         "type": "debug",
  194.         "z": "cc7414fb.91f278",
  195.         "name": "Arrow_Left_Click",
  196.         "active": true,
  197.         "tosidebar": false,
  198.         "console": false,
  199.         "tostatus": true,
  200.         "complete": "payload",
  201.         "targetType": "msg",
  202.         "statusVal": "payload",
  203.         "statusType": "auto",
  204.         "x": 890,
  205.         "y": 240,
  206.         "wires": []
  207.     },
  208.     {
  209.         "id": "5bc7b784.9d95f8",
  210.         "type": "debug",
  211.         "z": "cc7414fb.91f278",
  212.         "name": "Arrow_Left_Hold",
  213.         "active": true,
  214.         "tosidebar": false,
  215.         "console": false,
  216.         "tostatus": true,
  217.         "complete": "payload",
  218.         "targetType": "msg",
  219.         "statusVal": "payload",
  220.         "statusType": "auto",
  221.         "x": 890,
  222.         "y": 300,
  223.         "wires": []
  224.     },
  225.     {
  226.         "id": "8aad4afd.9c74b8",
  227.         "type": "debug",
  228.         "z": "cc7414fb.91f278",
  229.         "name": "Arrow_Left_Release",
  230.         "active": true,
  231.         "tosidebar": false,
  232.         "console": false,
  233.         "tostatus": true,
  234.         "complete": "payload",
  235.         "targetType": "msg",
  236.         "statusVal": "payload",
  237.         "statusType": "auto",
  238.         "x": 900,
  239.         "y": 360,
  240.         "wires": []
  241.     },
  242.     {
  243.         "id": "ca674756.f8bbc8",
  244.         "type": "switch",
  245.         "z": "cc7414fb.91f278",
  246.         "name": "Brightness Up",
  247.         "property": "payload.action",
  248.         "propertyType": "msg",
  249.         "rules": [
  250.             {
  251.                 "t": "eq",
  252.                 "v": "brightness_up_click",
  253.                 "vt": "str"
  254.             },
  255.             {
  256.                 "t": "eq",
  257.                 "v": "brightness_up_hold",
  258.                 "vt": "str"
  259.             },
  260.             {
  261.                 "t": "eq",
  262.                 "v": "brightness_up_release",
  263.                 "vt": "str"
  264.             }
  265.         ],
  266.         "checkall": "true",
  267.         "repair": false,
  268.         "outputs": 3,
  269.         "x": 680,
  270.         "y": 500,
  271.         "wires": [
  272.             [
  273.                 "ab95a88.7281858"
  274.             ],
  275.             [
  276.                 "15c41dfd.ec9cd2"
  277.             ],
  278.             [
  279.                 "1f202961.d4bc77"
  280.             ]
  281.         ]
  282.     },
  283.     {
  284.         "id": "dd05e125.7ba94",
  285.         "type": "switch",
  286.         "z": "cc7414fb.91f278",
  287.         "name": "Brightness Down",
  288.         "property": "payload.action",
  289.         "propertyType": "msg",
  290.         "rules": [
  291.             {
  292.                 "t": "eq",
  293.                 "v": "brightness_down_click",
  294.                 "vt": "str"
  295.             },
  296.             {
  297.                 "t": "eq",
  298.                 "v": "brightness_down_hold",
  299.                 "vt": "str"
  300.             },
  301.             {
  302.                 "t": "eq",
  303.                 "v": "brightness_down_release",
  304.                 "vt": "str"
  305.             }
  306.         ],
  307.         "checkall": "true",
  308.         "repair": false,
  309.         "outputs": 3,
  310.         "x": 670,
  311.         "y": 700,
  312.         "wires": [
  313.             [
  314.                 "318f1334.a1295c"
  315.             ],
  316.             [
  317.                 "d3b6ba7e.a4c588"
  318.             ],
  319.             [
  320.                 "cd4b345f.188d38"
  321.             ]
  322.         ]
  323.     },
  324.     {
  325.         "id": "318f1334.a1295c",
  326.         "type": "debug",
  327.         "z": "cc7414fb.91f278",
  328.         "name": "Brightness_Down_Click",
  329.         "active": true,
  330.         "tosidebar": false,
  331.         "console": false,
  332.         "tostatus": true,
  333.         "complete": "payload",
  334.         "targetType": "msg",
  335.         "statusVal": "payload",
  336.         "statusType": "auto",
  337.         "x": 910,
  338.         "y": 640,
  339.         "wires": []
  340.     },
  341.     {
  342.         "id": "d3b6ba7e.a4c588",
  343.         "type": "debug",
  344.         "z": "cc7414fb.91f278",
  345.         "name": "Brightness_Down_Hold",
  346.         "active": true,
  347.         "tosidebar": false,
  348.         "console": false,
  349.         "tostatus": true,
  350.         "complete": "payload",
  351.         "targetType": "msg",
  352.         "statusVal": "payload",
  353.         "statusType": "auto",
  354.         "x": 910,
  355.         "y": 700,
  356.         "wires": []
  357.     },
  358.     {
  359.         "id": "cd4b345f.188d38",
  360.         "type": "debug",
  361.         "z": "cc7414fb.91f278",
  362.         "name": "Brightness_Down_Release",
  363.         "active": true,
  364.         "tosidebar": false,
  365.         "console": false,
  366.         "tostatus": true,
  367.         "complete": "payload",
  368.         "targetType": "msg",
  369.         "statusVal": "payload",
  370.         "statusType": "auto",
  371.         "x": 920,
  372.         "y": 760,
  373.         "wires": []
  374.     },
  375.     {
  376.         "id": "ab95a88.7281858",
  377.         "type": "debug",
  378.         "z": "cc7414fb.91f278",
  379.         "name": "Brightness_Up_Click",
  380.         "active": true,
  381.         "tosidebar": false,
  382.         "console": false,
  383.         "tostatus": true,
  384.         "complete": "payload",
  385.         "targetType": "msg",
  386.         "statusVal": "payload",
  387.         "statusType": "auto",
  388.         "x": 900,
  389.         "y": 440,
  390.         "wires": []
  391.     },
  392.     {
  393.         "id": "15c41dfd.ec9cd2",
  394.         "type": "debug",
  395.         "z": "cc7414fb.91f278",
  396.         "name": "Brightness_Up_Hold",
  397.         "active": true,
  398.         "tosidebar": false,
  399.         "console": false,
  400.         "tostatus": true,
  401.         "complete": "payload",
  402.         "targetType": "msg",
  403.         "statusVal": "payload",
  404.         "statusType": "auto",
  405.         "x": 900,
  406.         "y": 500,
  407.         "wires": []
  408.     },
  409.     {
  410.         "id": "1f202961.d4bc77",
  411.         "type": "debug",
  412.         "z": "cc7414fb.91f278",
  413.         "name": "Brightness_Up_Release",
  414.         "active": true,
  415.         "tosidebar": false,
  416.         "console": false,
  417.         "tostatus": true,
  418.         "complete": "payload",
  419.         "targetType": "msg",
  420.         "statusVal": "payload",
  421.         "statusType": "auto",
  422.         "x": 910,
  423.         "y": 560,
  424.         "wires": []
  425.     },
  426.     {
  427.         "id": "14c8b050.1758f",
  428.         "type": "switch",
  429.         "z": "cc7414fb.91f278",
  430.         "name": "Toggle",
  431.         "property": "payload.action",
  432.         "propertyType": "msg",
  433.         "rules": [
  434.             {
  435.                 "t": "eq",
  436.                 "v": "toggle",
  437.                 "vt": "str"
  438.             },
  439.             {
  440.                 "t": "eq",
  441.                 "v": "toggle_hold",
  442.                 "vt": "str"
  443.             }
  444.         ],
  445.         "checkall": "true",
  446.         "repair": false,
  447.         "outputs": 2,
  448.         "x": 710,
  449.         "y": 880,
  450.         "wires": [
  451.             [
  452.                 "dad0115e.d5eb9",
  453.                 "1bbb8320c7a4a9e7"
  454.             ],
  455.             [
  456.                 "263283d1.2e596c"
  457.             ]
  458.         ]
  459.     },
  460.     {
  461.         "id": "dad0115e.d5eb9",
  462.         "type": "debug",
  463.         "z": "cc7414fb.91f278",
  464.         "name": "Toggle",
  465.         "active": true,
  466.         "tosidebar": false,
  467.         "console": false,
  468.         "tostatus": true,
  469.         "complete": "payload",
  470.         "targetType": "msg",
  471.         "statusVal": "payload",
  472.         "statusType": "auto",
  473.         "x": 850,
  474.         "y": 840,
  475.         "wires": []
  476.     },
  477.     {
  478.         "id": "263283d1.2e596c",
  479.         "type": "debug",
  480.         "z": "cc7414fb.91f278",
  481.         "name": "Toggle_Hold",
  482.         "active": false,
  483.         "tosidebar": true,
  484.         "console": false,
  485.         "tostatus": true,
  486.         "complete": "payload",
  487.         "targetType": "msg",
  488.         "statusVal": "payload",
  489.         "statusType": "auto",
  490.         "x": 870,
  491.         "y": 900,
  492.         "wires": []
  493.     },
  494.     {
  495.         "id": "77a8cceaa300de7d",
  496.         "type": "mqtt in",
  497.         "z": "cc7414fb.91f278",
  498.         "name": "IKEA Button-1",
  499.         "topic": "/home/zigbee/IKEA-Button-1",
  500.         "qos": "2",
  501.         "datatype": "json",
  502.         "broker": "595dfa51.2c1224",
  503.         "nl": false,
  504.         "rap": false,
  505.         "inputs": 0,
  506.         "x": 110,
  507.         "y": 300,
  508.         "wires": [
  509.             [
  510.                 "827685862394cc86"
  511.             ]
  512.         ]
  513.     },
  514.     {
  515.         "id": "13efeab63f28384d",
  516.         "type": "mqtt in",
  517.         "z": "cc7414fb.91f278",
  518.         "name": "IKEA Button-2",
  519.         "topic": "/home/zigbee/IKEA-Button-2",
  520.         "qos": "2",
  521.         "datatype": "json",
  522.         "broker": "595dfa51.2c1224",
  523.         "nl": false,
  524.         "rap": false,
  525.         "inputs": 0,
  526.         "x": 110,
  527.         "y": 360,
  528.         "wires": [
  529.             [
  530.                 "827685862394cc86"
  531.             ]
  532.         ]
  533.     },
  534.     {
  535.         "id": "1214c510b0c6a90f",
  536.         "type": "mqtt in",
  537.         "z": "cc7414fb.91f278",
  538.         "name": "IKEA Button-3",
  539.         "topic": "/home/zigbee/IKEA-Button-3",
  540.         "qos": "2",
  541.         "datatype": "json",
  542.         "broker": "595dfa51.2c1224",
  543.         "nl": false,
  544.         "rap": false,
  545.         "inputs": 0,
  546.         "x": 110,
  547.         "y": 420,
  548.         "wires": [
  549.             [
  550.                 "827685862394cc86"
  551.             ]
  552.         ]
  553.     },
  554.     {
  555.         "id": "827685862394cc86",
  556.         "type": "function",
  557.         "z": "cc7414fb.91f278",
  558.         "name": "",
  559.         "func": "var words = msg.topic.split('/');\nvar KnotenName = (words[3]);\n\nreturn msg;",
  560.         "outputs": 1,
  561.         "noerr": 0,
  562.         "initialize": "",
  563.         "finalize": "",
  564.         "libs": [],
  565.         "x": 420,
  566.         "y": 300,
  567.         "wires": [
  568.             [
  569.                 "6b87e3c0.694bfc",
  570.                 "35c2421d.27180e",
  571.                 "ca674756.f8bbc8",
  572.                 "dd05e125.7ba94",
  573.                 "54c8c41b.3c689c",
  574.                 "14c8b050.1758f"
  575.             ]
  576.         ]
  577.     },
  578.     {
  579.         "id": "1bbb8320c7a4a9e7",
  580.         "type": "link out",
  581.         "z": "cc7414fb.91f278",
  582.         "name": "IKEA-Button-Toggle-OUT",
  583.         "mode": "link",
  584.         "links": [
  585.             "af8ae2683011ff9a"
  586.         ],
  587.         "x": 815,
  588.         "y": 800,
  589.         "wires": []
  590.     },
  591.     {
  592.         "id": "595dfa51.2c1224",
  593.         "type": "mqtt-broker",
  594.         "name": "Kossdorf",
  595.         "broker": "192.168.123.16",
  596.         "port": "1883",
  597.         "clientid": "",
  598.         "autoConnect": true,
  599.         "usetls": false,
  600.         "protocolVersion": "4",
  601.         "keepalive": "60",
  602.         "cleansession": true,
  603.         "birthTopic": "",
  604.         "birthQos": "0",
  605.         "birthPayload": "",
  606.         "birthMsg": {},
  607.         "closeTopic": "",
  608.         "closePayload": "",
  609.         "closeMsg": {},
  610.         "willTopic": "",
  611.         "willQos": "0",
  612.         "willPayload": "",
  613.         "willMsg": {},
  614.         "userProps": "",
  615.         "sessionExpiry": ""
  616.     }
  617. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement