Advertisement
-Teme-

Shelly I4 button mapping

Nov 14th, 2022 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 13.88 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "58b181928b360da1",
  4.         "type": "subflow",
  5.         "name": "I4 btn action",
  6.         "info": "",
  7.         "category": "",
  8.         "in": [
  9.             {
  10.                 "x": 80,
  11.                 "y": 460,
  12.                 "wires": [
  13.                     {
  14.                         "id": "5a8e35321a082689"
  15.                     }
  16.                 ]
  17.             }
  18.         ],
  19.         "out": [
  20.             {
  21.                 "x": 840,
  22.                 "y": 60,
  23.                 "wires": [
  24.                     {
  25.                         "id": "c2991fdf334bc78f",
  26.                         "port": 0
  27.                     }
  28.                 ]
  29.             },
  30.             {
  31.                 "x": 900,
  32.                 "y": 100,
  33.                 "wires": [
  34.                     {
  35.                         "id": "c2991fdf334bc78f",
  36.                         "port": 1
  37.                     }
  38.                 ]
  39.             },
  40.             {
  41.                 "x": 840,
  42.                 "y": 140,
  43.                 "wires": [
  44.                     {
  45.                         "id": "c2991fdf334bc78f",
  46.                         "port": 2
  47.                     }
  48.                 ]
  49.             },
  50.             {
  51.                 "x": 900,
  52.                 "y": 180,
  53.                 "wires": [
  54.                     {
  55.                         "id": "c2991fdf334bc78f",
  56.                         "port": 3
  57.                     }
  58.                 ]
  59.             },
  60.             {
  61.                 "x": 840,
  62.                 "y": 260,
  63.                 "wires": [
  64.                     {
  65.                         "id": "7f7123c5939ead14",
  66.                         "port": 0
  67.                     }
  68.                 ]
  69.             },
  70.             {
  71.                 "x": 900,
  72.                 "y": 300,
  73.                 "wires": [
  74.                     {
  75.                         "id": "7f7123c5939ead14",
  76.                         "port": 1
  77.                     }
  78.                 ]
  79.             },
  80.             {
  81.                 "x": 840,
  82.                 "y": 340,
  83.                 "wires": [
  84.                     {
  85.                         "id": "7f7123c5939ead14",
  86.                         "port": 2
  87.                     }
  88.                 ]
  89.             },
  90.             {
  91.                 "x": 900,
  92.                 "y": 380,
  93.                 "wires": [
  94.                     {
  95.                         "id": "7f7123c5939ead14",
  96.                         "port": 3
  97.                     }
  98.                 ]
  99.             },
  100.             {
  101.                 "x": 840,
  102.                 "y": 460,
  103.                 "wires": [
  104.                     {
  105.                         "id": "191542cc5f6c8406",
  106.                         "port": 0
  107.                     }
  108.                 ]
  109.             },
  110.             {
  111.                 "x": 900,
  112.                 "y": 500,
  113.                 "wires": [
  114.                     {
  115.                         "id": "191542cc5f6c8406",
  116.                         "port": 1
  117.                     }
  118.                 ]
  119.             },
  120.             {
  121.                 "x": 840,
  122.                 "y": 540,
  123.                 "wires": [
  124.                     {
  125.                         "id": "191542cc5f6c8406",
  126.                         "port": 2
  127.                     }
  128.                 ]
  129.             },
  130.             {
  131.                 "x": 900,
  132.                 "y": 580,
  133.                 "wires": [
  134.                     {
  135.                         "id": "191542cc5f6c8406",
  136.                         "port": 3
  137.                     }
  138.                 ]
  139.             },
  140.             {
  141.                 "x": 840,
  142.                 "y": 660,
  143.                 "wires": [
  144.                     {
  145.                         "id": "5f5b417858c495ec",
  146.                         "port": 0
  147.                     }
  148.                 ]
  149.             },
  150.             {
  151.                 "x": 900,
  152.                 "y": 700,
  153.                 "wires": [
  154.                     {
  155.                         "id": "5f5b417858c495ec",
  156.                         "port": 1
  157.                     }
  158.                 ]
  159.             },
  160.             {
  161.                 "x": 840,
  162.                 "y": 740,
  163.                 "wires": [
  164.                     {
  165.                         "id": "5f5b417858c495ec",
  166.                         "port": 2
  167.                     }
  168.                 ]
  169.             },
  170.             {
  171.                 "x": 900,
  172.                 "y": 780,
  173.                 "wires": [
  174.                     {
  175.                         "id": "5f5b417858c495ec",
  176.                         "port": 3
  177.                     }
  178.                 ]
  179.             }
  180.         ],
  181.         "env": [],
  182.         "meta": {},
  183.         "color": "#DDAA99"
  184.     },
  185.     {
  186.         "id": "c2991fdf334bc78f",
  187.         "type": "button-events",
  188.         "z": "58b181928b360da1",
  189.         "name": "",
  190.         "outputs": 4,
  191.         "inputField": "payload",
  192.         "inputFieldType": "msg",
  193.         "outputField": "payload",
  194.         "outputFieldType": "msg",
  195.         "downValue": "true",
  196.         "downValueType": "bool",
  197.         "upValue": "false",
  198.         "upValueType": "bool",
  199.         "idleValue": "1",
  200.         "buttonEventsConfig": "2b5f554fba088ec9",
  201.         "clickedInterval": null,
  202.         "pressedInterval": null,
  203.         "debounceInterval": null,
  204.         "events": [
  205.             {
  206.                 "type": "clicked"
  207.             },
  208.             {
  209.                 "type": "double_clicked"
  210.             },
  211.             {
  212.                 "type": "triple_clicked"
  213.             },
  214.             {
  215.                 "type": "pressed"
  216.             }
  217.         ],
  218.         "x": 600,
  219.         "y": 320,
  220.         "wires": [
  221.             [],
  222.             [],
  223.             [],
  224.             []
  225.         ]
  226.     },
  227.     {
  228.         "id": "5a8e35321a082689",
  229.         "type": "switch",
  230.         "z": "58b181928b360da1",
  231.         "name": "button",
  232.         "property": "payload.params",
  233.         "propertyType": "msg",
  234.         "rules": [
  235.             {
  236.                 "t": "hask",
  237.                 "v": "input:0",
  238.                 "vt": "str"
  239.             },
  240.             {
  241.                 "t": "hask",
  242.                 "v": "input:1",
  243.                 "vt": "str"
  244.             },
  245.             {
  246.                 "t": "hask",
  247.                 "v": "input:2",
  248.                 "vt": "str"
  249.             },
  250.             {
  251.                 "t": "hask",
  252.                 "v": "input:3",
  253.                 "vt": "str"
  254.             }
  255.         ],
  256.         "checkall": "false",
  257.         "repair": false,
  258.         "outputs": 4,
  259.         "x": 190,
  260.         "y": 460,
  261.         "wires": [
  262.             [
  263.                 "9c8a8aa9ea574125"
  264.             ],
  265.             [
  266.                 "3a42bb71265f34bf"
  267.             ],
  268.             [
  269.                 "f8b1bd70338f73cc"
  270.             ],
  271.             [
  272.                 "40ca29a9d69c1764"
  273.             ]
  274.         ]
  275.     },
  276.     {
  277.         "id": "9c8a8aa9ea574125",
  278.         "type": "change",
  279.         "z": "58b181928b360da1",
  280.         "name": "to payload",
  281.         "rules": [
  282.             {
  283.                 "t": "move",
  284.                 "p": "payload.params[\"input:0\"].state",
  285.                 "pt": "msg",
  286.                 "to": "payload",
  287.                 "tot": "msg"
  288.             }
  289.         ],
  290.         "action": "",
  291.         "property": "",
  292.         "from": "",
  293.         "to": "",
  294.         "reg": false,
  295.         "x": 390,
  296.         "y": 380,
  297.         "wires": [
  298.             [
  299.                 "c2991fdf334bc78f"
  300.             ]
  301.         ]
  302.     },
  303.     {
  304.         "id": "3a42bb71265f34bf",
  305.         "type": "change",
  306.         "z": "58b181928b360da1",
  307.         "name": "to payload",
  308.         "rules": [
  309.             {
  310.                 "t": "move",
  311.                 "p": "payload.params[\"input:1\"].state",
  312.                 "pt": "msg",
  313.                 "to": "payload",
  314.                 "tot": "msg"
  315.             }
  316.         ],
  317.         "action": "",
  318.         "property": "",
  319.         "from": "",
  320.         "to": "",
  321.         "reg": false,
  322.         "x": 390,
  323.         "y": 440,
  324.         "wires": [
  325.             [
  326.                 "7f7123c5939ead14"
  327.             ]
  328.         ]
  329.     },
  330.     {
  331.         "id": "f8b1bd70338f73cc",
  332.         "type": "change",
  333.         "z": "58b181928b360da1",
  334.         "name": "to payload",
  335.         "rules": [
  336.             {
  337.                 "t": "move",
  338.                 "p": "payload.params[\"input:2\"].state",
  339.                 "pt": "msg",
  340.                 "to": "payload",
  341.                 "tot": "msg"
  342.             }
  343.         ],
  344.         "action": "",
  345.         "property": "",
  346.         "from": "",
  347.         "to": "",
  348.         "reg": false,
  349.         "x": 390,
  350.         "y": 500,
  351.         "wires": [
  352.             [
  353.                 "191542cc5f6c8406"
  354.             ]
  355.         ]
  356.     },
  357.     {
  358.         "id": "40ca29a9d69c1764",
  359.         "type": "change",
  360.         "z": "58b181928b360da1",
  361.         "name": "to payload",
  362.         "rules": [
  363.             {
  364.                 "t": "move",
  365.                 "p": "payload.params[\"input:3\"].state",
  366.                 "pt": "msg",
  367.                 "to": "payload",
  368.                 "tot": "msg"
  369.             }
  370.         ],
  371.         "action": "",
  372.         "property": "",
  373.         "from": "",
  374.         "to": "",
  375.         "reg": false,
  376.         "x": 390,
  377.         "y": 560,
  378.         "wires": [
  379.             [
  380.                 "5f5b417858c495ec"
  381.             ]
  382.         ]
  383.     },
  384.     {
  385.         "id": "7f7123c5939ead14",
  386.         "type": "button-events",
  387.         "z": "58b181928b360da1",
  388.         "name": "",
  389.         "outputs": 4,
  390.         "inputField": "payload",
  391.         "inputFieldType": "msg",
  392.         "outputField": "payload",
  393.         "outputFieldType": "msg",
  394.         "downValue": "true",
  395.         "downValueType": "bool",
  396.         "upValue": "false",
  397.         "upValueType": "bool",
  398.         "idleValue": "1",
  399.         "buttonEventsConfig": "2b5f554fba088ec9",
  400.         "clickedInterval": null,
  401.         "pressedInterval": null,
  402.         "debounceInterval": null,
  403.         "events": [
  404.             {
  405.                 "type": "clicked"
  406.             },
  407.             {
  408.                 "type": "double_clicked"
  409.             },
  410.             {
  411.                 "type": "triple_clicked"
  412.             },
  413.             {
  414.                 "type": "pressed"
  415.             }
  416.         ],
  417.         "x": 600,
  418.         "y": 420,
  419.         "wires": [
  420.             [],
  421.             [],
  422.             [],
  423.             []
  424.         ]
  425.     },
  426.     {
  427.         "id": "191542cc5f6c8406",
  428.         "type": "button-events",
  429.         "z": "58b181928b360da1",
  430.         "name": "",
  431.         "outputs": 4,
  432.         "inputField": "payload",
  433.         "inputFieldType": "msg",
  434.         "outputField": "payload",
  435.         "outputFieldType": "msg",
  436.         "downValue": "true",
  437.         "downValueType": "bool",
  438.         "upValue": "false",
  439.         "upValueType": "bool",
  440.         "idleValue": "1",
  441.         "buttonEventsConfig": "2b5f554fba088ec9",
  442.         "clickedInterval": null,
  443.         "pressedInterval": null,
  444.         "debounceInterval": null,
  445.         "events": [
  446.             {
  447.                 "type": "clicked"
  448.             },
  449.             {
  450.                 "type": "double_clicked"
  451.             },
  452.             {
  453.                 "type": "triple_clicked"
  454.             },
  455.             {
  456.                 "type": "pressed"
  457.             }
  458.         ],
  459.         "x": 600,
  460.         "y": 520,
  461.         "wires": [
  462.             [],
  463.             [],
  464.             [],
  465.             []
  466.         ]
  467.     },
  468.     {
  469.         "id": "5f5b417858c495ec",
  470.         "type": "button-events",
  471.         "z": "58b181928b360da1",
  472.         "name": "",
  473.         "outputs": 4,
  474.         "inputField": "payload",
  475.         "inputFieldType": "msg",
  476.         "outputField": "payload",
  477.         "outputFieldType": "msg",
  478.         "downValue": "true",
  479.         "downValueType": "bool",
  480.         "upValue": "false",
  481.         "upValueType": "bool",
  482.         "idleValue": "1",
  483.         "buttonEventsConfig": "2b5f554fba088ec9",
  484.         "clickedInterval": null,
  485.         "pressedInterval": null,
  486.         "debounceInterval": null,
  487.         "events": [
  488.             {
  489.                 "type": "clicked"
  490.             },
  491.             {
  492.                 "type": "double_clicked"
  493.             },
  494.             {
  495.                 "type": "triple_clicked"
  496.             },
  497.             {
  498.                 "type": "pressed"
  499.             }
  500.         ],
  501.         "x": 600,
  502.         "y": 620,
  503.         "wires": [
  504.             [],
  505.             [],
  506.             [],
  507.             []
  508.         ]
  509.     },
  510.     {
  511.         "id": "2b5f554fba088ec9",
  512.         "type": "button-events-config",
  513.         "name": "ShellyI4",
  514.         "clickedInterval": "200",
  515.         "pressedInterval": "750",
  516.         "debounceInterval": "15"
  517.     },
  518.     {
  519.         "id": "31da8329692b364b",
  520.         "type": "subflow:58b181928b360da1",
  521.         "z": "a8f9a50fa0468a1d",
  522.         "name": "",
  523.         "x": 1490,
  524.         "y": 1620,
  525.         "wires": [
  526.             [
  527.                 "ce34bc9faebbca85"
  528.             ],
  529.             [
  530.                 "ce34bc9faebbca85"
  531.             ],
  532.             [
  533.                 "ce34bc9faebbca85"
  534.             ],
  535.             [
  536.                 "ce34bc9faebbca85"
  537.             ],
  538.             [],
  539.             [],
  540.             [],
  541.             [],
  542.             [],
  543.             [],
  544.             [],
  545.             [],
  546.             [],
  547.             [],
  548.             [],
  549.             []
  550.         ],
  551.         "inputLabels": [
  552.             "mqtt in"
  553.         ],
  554.         "outputLabels": [
  555.             "Btn1 clicked",
  556.             "Btn1 double clicked",
  557.             "Btn1 triple clicked",
  558.             "Btn1 pressed",
  559.             "Btn2 clicked",
  560.             "Btn2 double clicked",
  561.             "Btn2 triple clicked",
  562.             "Btn2 pressed",
  563.             "Btn3 clicked",
  564.             "Btn3 double clicked",
  565.             "Btn3 triple clicked",
  566.             "Btn3 pressed",
  567.             "Btn4 clicked",
  568.             "Btn4 double clicked",
  569.             "Btn4 triple clicked",
  570.             "Btn4 pressed"
  571.         ],
  572.         "icon": "node-red-contrib-shelly/shelly.png"
  573.     }
  574. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement