ilikedatsyuk

Untitled

Mar 10th, 2023 (edited)
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 5.06 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "2b6b5ed9516fb9c3",
  4.         "type": "group",
  5.         "z": "af8d5ef0f61db63b",
  6.         "name": "Zigbee device low battery detection",
  7.         "style": {
  8.             "label": true
  9.         },
  10.         "nodes": [
  11.             "9efd4b51adad95ee",
  12.             "4e660536152e06be",
  13.             "1a8c47c287afba4d",
  14.             "b2b12ef0aac414d4",
  15.             "7e3396f573f44cb7"
  16.         ],
  17.         "x": 34,
  18.         "y": 4659,
  19.         "w": 1032,
  20.         "h": 82
  21.     },
  22.     {
  23.         "id": "9efd4b51adad95ee",
  24.         "type": "api-call-service",
  25.         "z": "af8d5ef0f61db63b",
  26.         "g": "2b6b5ed9516fb9c3",
  27.         "name": "",
  28.         "server": "4f2312d6.a0c58c",
  29.         "version": 5,
  30.         "debugenabled": false,
  31.         "domain": "notify",
  32.         "service": "mobile_app_iphone_14",
  33.         "areaId": [],
  34.         "deviceId": [],
  35.         "entityId": [],
  36.         "data": "{\"title\":\"Low battery alert\",\"message\":\"{{{payload}}}\"}",
  37.         "dataType": "json",
  38.         "mergeContext": "",
  39.         "mustacheAltTags": false,
  40.         "outputProperties": [],
  41.         "queue": "none",
  42.         "x": 920,
  43.         "y": 4700,
  44.         "wires": [
  45.             []
  46.         ]
  47.     },
  48.     {
  49.         "id": "4e660536152e06be",
  50.         "type": "delay",
  51.         "z": "af8d5ef0f61db63b",
  52.         "g": "2b6b5ed9516fb9c3",
  53.         "name": "",
  54.         "pauseType": "rate",
  55.         "timeout": "5",
  56.         "timeoutUnits": "seconds",
  57.         "rate": "1",
  58.         "nbRateUnits": "1",
  59.         "rateUnits": "hour",
  60.         "randomFirst": "1",
  61.         "randomLast": "5",
  62.         "randomUnits": "seconds",
  63.         "drop": true,
  64.         "allowrate": false,
  65.         "outputs": 1,
  66.         "x": 710,
  67.         "y": 4700,
  68.         "wires": [
  69.             [
  70.                 "9efd4b51adad95ee"
  71.             ]
  72.         ]
  73.     },
  74.     {
  75.         "id": "1a8c47c287afba4d",
  76.         "type": "time-range-switch",
  77.         "z": "af8d5ef0f61db63b",
  78.         "g": "2b6b5ed9516fb9c3",
  79.         "name": "",
  80.         "lat": "",
  81.         "lon": "",
  82.         "startTime": "07:00",
  83.         "endTime": "21:00",
  84.         "startOffset": 0,
  85.         "endOffset": 0,
  86.         "x": 550,
  87.         "y": 4700,
  88.         "wires": [
  89.             [
  90.                 "4e660536152e06be"
  91.             ],
  92.             []
  93.         ]
  94.     },
  95.     {
  96.         "id": "b2b12ef0aac414d4",
  97.         "type": "function",
  98.         "z": "af8d5ef0f61db63b",
  99.         "g": "2b6b5ed9516fb9c3",
  100.         "name": "Detect low battery levels",
  101.         "func": "var device_name = msg.topic.replace(\"zigbee2mqtt/\", \"\")\nvar device_battery = parseInt(msg.payload.battery);\nvar alert_percent = 10;\n\nif (device_battery < alert_percent) {\n    msg.payload = \"Alert: \" + device_name + \" battery level is \" + device_battery + \"%\";\n    return msg;\n}\n\nreturn 0;",
  102.         "outputs": 1,
  103.         "noerr": 0,
  104.         "initialize": "",
  105.         "finalize": "",
  106.         "libs": [],
  107.         "x": 350,
  108.         "y": 4700,
  109.         "wires": [
  110.             [
  111.                 "1a8c47c287afba4d"
  112.             ]
  113.         ]
  114.     },
  115.     {
  116.         "id": "7e3396f573f44cb7",
  117.         "type": "mqtt in",
  118.         "z": "af8d5ef0f61db63b",
  119.         "g": "2b6b5ed9516fb9c3",
  120.         "name": "",
  121.         "topic": "zigbee2mqtt/+",
  122.         "qos": "2",
  123.         "datatype": "auto-detect",
  124.         "broker": "edc56f1f21cdfb66",
  125.         "nl": false,
  126.         "rap": true,
  127.         "rh": 0,
  128.         "inputs": 0,
  129.         "x": 140,
  130.         "y": 4700,
  131.         "wires": [
  132.             [
  133.                 "b2b12ef0aac414d4"
  134.             ]
  135.         ]
  136.     },
  137.     {
  138.         "id": "4f2312d6.a0c58c",
  139.         "type": "server",
  140.         "name": "Home Assistant",
  141.         "version": 5,
  142.         "rejectUnauthorizedCerts": true,
  143.         "ha_boolean": "y|yes|true|on|home|open",
  144.         "connectionDelay": true,
  145.         "cacheJson": true,
  146.         "heartbeat": false,
  147.         "heartbeatInterval": 30,
  148.         "areaSelector": "friendlyName",
  149.         "deviceSelector": "friendlyName",
  150.         "entitySelector": "friendlyName",
  151.         "statusSeparator": "at: ",
  152.         "statusYear": "hidden",
  153.         "statusMonth": "short",
  154.         "statusDay": "numeric",
  155.         "statusHourCycle": "h23",
  156.         "statusTimeFormat": "h:m",
  157.         "enableGlobalContextStore": true
  158.     },
  159.     {
  160.         "id": "edc56f1f21cdfb66",
  161.         "type": "mqtt-broker",
  162.         "name": "",
  163.         "broker": "10.239.3.2",
  164.         "port": "1883",
  165.         "clientid": "",
  166.         "autoConnect": true,
  167.         "usetls": false,
  168.         "protocolVersion": "4",
  169.         "keepalive": "60",
  170.         "cleansession": true,
  171.         "birthTopic": "",
  172.         "birthQos": "0",
  173.         "birthRetain": "false",
  174.         "birthPayload": "",
  175.         "birthMsg": {},
  176.         "closeTopic": "",
  177.         "closeQos": "0",
  178.         "closeRetain": "false",
  179.         "closePayload": "",
  180.         "closeMsg": {},
  181.         "willTopic": "",
  182.         "willQos": "0",
  183.         "willRetain": "false",
  184.         "willPayload": "",
  185.         "willMsg": {},
  186.         "userProps": "",
  187.         "sessionExpiry": ""
  188.     }
  189. ]
Advertisement
Add Comment
Please, Sign In to add comment