Advertisement
bangnaga

Flow Node-Red MQTT Mousturise

Feb 25th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 21.84 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "fb46b192.c535a8",
  4.         "type": "tab",
  5.         "label": "Tanaman",
  6.         "disabled": false,
  7.         "info": ""
  8.     },
  9.     {
  10.         "id": "b6e150a9.fed6d8",
  11.         "type": "ui_template",
  12.         "z": "fb46b192.c535a8",
  13.         "group": "5edeb23.aff5b4c",
  14.         "name": "Status Pompa Irigasi",
  15.         "order": 3,
  16.         "width": "4",
  17.         "height": "4",
  18.         "format": "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"-492 -146.3 1000 1000\" style=\"enable-background:new -492 -146.3 1000 1000;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0{fill:{{msg.payload}};}\n</style>\n<g>\n\t<g transform=\"translate(0.000000,511.000000) scale(0.100000,-0.100000)\">\n\t\t<path class=\"st0\" d=\"M-1709.9,5246c-567.6-108.4-1062.9-444.3-1360.5-920.5c-85-138.2-374.1-848.2-926.8-2278.9l-110.7-284.8\n\t\t\tl-355-287c-197.7-159.4-357.1-293.3-357.1-299.7c0-8.5,646.2-659,1434.9-1447.7C-1952.3-1705.4-1952.3-1705.4-1907.7-1665\n\t\t\tc34,29.8,510.2,140.3,1930.2,446.4l1885.6,406l6.4,280.6l6.4,280.6h-261.5H1398L804.9,341.7L211.8,934.8L428.6,1192\n\t\t\tc121.2,142.4,210.4,267.8,202,280.6c-6.4,12.8-17,63.8-21.3,112.7c-17,227.5-270,824.8-484.7,1147.9\n\t\t\tc-176.4,263.6-157.3,255.1-391.1,178.6c-176.5-59.5-193.5-68-167.9-99.9c17-19.1,187.1-229.6,376.3-469.8\n\t\t\tc191.3-240.2,414.5-516.6,495.3-616.5c91.4-110.5-287,253-969.4,933.2C-1559,3683.6-1652.5,3770.7-1688.7,3743.1\n\t\t\tc-21.3-17-408.1-338-861-716.4c-454.9-376.3-824.8-678.1-824.8-667.5c0,10.6,123.3,333.8,274.2,718.5\n\t\t\tc148.8,384.8,284.9,735.5,299.7,780.2c40.4,127.5,221.1,380.5,361.4,512.3c342.3,314.6,824.8,474,1271.2,418.8\n\t\t\tc656.9-82.9,1162.8-508.1,1345.6-1133.1c34-116.9,46.8-221.1,51-420.9l2.1-267.8l87.2-125.4c46.8-70.1,116.9-184.9,155.2-253\n\t\t\tl72.3-125.4l38.3,114.8c82.9,242.3,108.4,435.8,95.7,739.8c-8.5,229.6-21.3,327.4-65.9,478.3c-176.4,591-554.8,1031-1109.7,1292.5\n\t\t\tc-97.8,44.6-250.8,102-342.3,125.4C-1053.1,5271.5-1493.1,5286.4-1709.9,5246z M398.9,173.8l425.2-425.2H41.8\n\t\t\tc-620.7,0-780.2,6.4-767.4,27.6C-693.7-170.7-51.7,598.9-39,598.9C-32.7,599,165,407.7,398.9,173.8z\"/>\n\t\t<path class=\"st0\" d=\"M2592.7,490.6C2573.6,326.9,2480,180.2,2327,71.8c-95.7-65.9-142.4-119-182.8-199.8\n\t\t\tc-51-102-55.3-131.8-55.3-386.9c0-327.4,27.6-412.4,172.2-525.1c187.1-146.7,270-246.6,306.1-361.4c17-61.7,31.9-133.9,31.9-161.6\n\t\t\tc0-46.7,6.4-48.9,170.1-48.9h170.1v187.1v185l42.5-68c44.6-72.3,140.3-133.9,212.6-133.9c116.9,0,255.1,138.2,255.1,255.1\n\t\t\ts-138.3,255-255.2,255c-72.3,0-167.9-61.6-212.6-133.9l-42.5-68v287v287l42.5-68c44.6-74.4,140.3-133.9,216.8-133.9\n\t\t\tc114.8,0,250.8,140.3,250.8,259.4c0,112.7-140.3,250.8-255.1,250.8c-72.3,0-167.9-61.6-212.6-133.9l-42.5-68v287v287l42.5-68\n\t\t\tC3026.2-19.4,3121.9-81,3194.2-81c116.9,0,255.1,138.2,255.1,255.1s-138.2,255.1-255.1,255.1c-72.3,0-167.9-61.6-212.6-133.9\n\t\t\tl-42.5-68v187.1v185h-167.9h-165.8L2592.7,490.6z\"/>\n\t\t<path class=\"st0\" d=\"M3923.5,301.4c-72.3-44.6-133.9-140.3-133.9-212.6c0-114.8,138.2-255.1,250.8-255.1\n\t\t\tc121.2,0,259.3,136.1,259.3,255.1c0,119.1-138.2,255.1-259.3,255.1C4012.8,343.9,3961.7,324.8,3923.5,301.4z\"/>\n\t\t<path class=\"st0\" d=\"M4603.7-293.8c-72.3-44.6-133.9-140.3-133.9-212.6c0-114.8,138.2-255.1,250.8-255.1\n\t\t\tc121.2,0,259.4,136.1,259.4,255.1c0,119.1-138.2,255.1-259.4,255.1C4693-251.3,4642-270.4,4603.7-293.8z\"/>\n\t\t<path class=\"st0\" d=\"M3753.4-548.9c-72.3-44.6-133.9-140.3-133.9-212.6c0-114.8,138.2-255.1,250.8-255.1\n\t\t\tc121.2,0,259.4,136.1,259.4,255.1c0,119.1-138.2,255.1-259.4,255.1C3842.7-506.4,3791.7-525.5,3753.4-548.9z\"/>\n\t\t<path class=\"st0\" d=\"M4263.6-1059.1c-72.3-44.6-133.9-140.3-133.9-212.6c0-114.8,138.2-255.1,250.8-255.1\n\t\t\tc121.2,0,259.4,136.1,259.4,255.1c0,119.1-138.2,255.1-259.4,255.1C4352.9-1016.6,4301.9-1035.7,4263.6-1059.1z\"/>\n\t\t<path class=\"st0\" d=\"M3753.4-1654.4c-72.3-44.6-133.9-140.3-133.9-212.6c0-114.8,138.2-255.1,250.8-255.1\n\t\t\tc121.2,0,259.4,136.1,259.4,255.1s-138.2,255.1-259.4,255.1C3842.7-1611.8,3791.7-1631,3753.4-1654.4z\"/>\n\t</g>\n</g>\n</svg>\n",
  19.         "storeOutMessages": true,
  20.         "fwdInMessages": true,
  21.         "templateScope": "local",
  22.         "x": 1188.0003128051758,
  23.         "y": 168.00010633468628,
  24.         "wires": [
  25.             []
  26.         ]
  27.     },
  28.     {
  29.         "id": "b6260f5.1913c7",
  30.         "type": "ui_chart",
  31.         "z": "fb46b192.c535a8",
  32.         "name": "",
  33.         "group": "5edeb23.aff5b4c",
  34.         "order": 6,
  35.         "width": "12",
  36.         "height": "10",
  37.         "label": "Grafik Kelembaban Tanah",
  38.         "chartType": "line",
  39.         "legend": "true",
  40.         "xformat": "HH:mm",
  41.         "interpolate": "bezier",
  42.         "nodata": "",
  43.         "dot": true,
  44.         "ymin": "",
  45.         "ymax": "",
  46.         "removeOlder": 1,
  47.         "removeOlderPoints": "",
  48.         "removeOlderUnit": "60",
  49.         "cutout": 0,
  50.         "useOneColor": false,
  51.         "colors": [
  52.             "#1f77b4",
  53.             "#aec7e8",
  54.             "#ff7f0e",
  55.             "#2ca02c",
  56.             "#98df8a",
  57.             "#d62728",
  58.             "#ff9896",
  59.             "#9467bd",
  60.             "#c5b0d5"
  61.         ],
  62.         "useOldStyle": false,
  63.         "outputs": 1,
  64.         "x": 1019.000171661377,
  65.         "y": 555.0001602172852,
  66.         "wires": [
  67.             []
  68.         ]
  69.     },
  70.     {
  71.         "id": "a2abc2a6.6ba1c8",
  72.         "type": "ui_switch",
  73.         "z": "fb46b192.c535a8",
  74.         "name": "",
  75.         "label": "Kontrol Manual Pompa Irigasi",
  76.         "tooltip": "",
  77.         "group": "dfa3466b.b943c8",
  78.         "order": 2,
  79.         "width": "0",
  80.         "height": "0",
  81.         "passthru": true,
  82.         "decouple": "false",
  83.         "topic": "",
  84.         "style": "",
  85.         "onvalue": "on",
  86.         "onvalueType": "str",
  87.         "onicon": "",
  88.         "oncolor": "",
  89.         "offvalue": "off",
  90.         "offvalueType": "str",
  91.         "officon": "",
  92.         "offcolor": "",
  93.         "x": 381,
  94.         "y": 303.0000476837158,
  95.         "wires": [
  96.             [
  97.                 "238b8a47.c7e716",
  98.                 "1a04fffe.102c6"
  99.             ]
  100.         ]
  101.     },
  102.     {
  103.         "id": "238b8a47.c7e716",
  104.         "type": "switch",
  105.         "z": "fb46b192.c535a8",
  106.         "name": "",
  107.         "property": "payload",
  108.         "propertyType": "msg",
  109.         "rules": [
  110.             {
  111.                 "t": "eq",
  112.                 "v": "on",
  113.                 "vt": "str"
  114.             },
  115.             {
  116.                 "t": "eq",
  117.                 "v": "off",
  118.                 "vt": "str"
  119.             }
  120.         ],
  121.         "checkall": "true",
  122.         "repair": false,
  123.         "outputs": 2,
  124.         "x": 636.0000495910645,
  125.         "y": 208.00000953674316,
  126.         "wires": [
  127.             [
  128.                 "65ccfffb.04ba8"
  129.             ],
  130.             [
  131.                 "fd72e2b.16b09a"
  132.             ]
  133.         ]
  134.     },
  135.     {
  136.         "id": "65ccfffb.04ba8",
  137.         "type": "change",
  138.         "z": "fb46b192.c535a8",
  139.         "name": "",
  140.         "rules": [
  141.             {
  142.                 "t": "set",
  143.                 "p": "payload",
  144.                 "pt": "msg",
  145.                 "to": "lime",
  146.                 "tot": "str"
  147.             }
  148.         ],
  149.         "action": "",
  150.         "property": "",
  151.         "from": "",
  152.         "to": "",
  153.         "reg": false,
  154.         "x": 878.0001640319824,
  155.         "y": 107.00002956390381,
  156.         "wires": [
  157.             [
  158.                 "b6e150a9.fed6d8",
  159.                 "48aea1f1.9eae2"
  160.             ]
  161.         ]
  162.     },
  163.     {
  164.         "id": "fd72e2b.16b09a",
  165.         "type": "change",
  166.         "z": "fb46b192.c535a8",
  167.         "name": "",
  168.         "rules": [
  169.             {
  170.                 "t": "set",
  171.                 "p": "payload",
  172.                 "pt": "msg",
  173.                 "to": "black",
  174.                 "tot": "str"
  175.             }
  176.         ],
  177.         "action": "",
  178.         "property": "",
  179.         "from": "",
  180.         "to": "",
  181.         "reg": false,
  182.         "x": 875.0003509521484,
  183.         "y": 225.0001106262207,
  184.         "wires": [
  185.             [
  186.                 "b6e150a9.fed6d8",
  187.                 "b169f323.ed418"
  188.             ]
  189.         ]
  190.     },
  191.     {
  192.         "id": "a813237b.d75e48",
  193.         "type": "play audio",
  194.         "z": "fb46b192.c535a8",
  195.         "name": "",
  196.         "voice": "11",
  197.         "x": 1147.0000534057617,
  198.         "y": 334.0000476837158,
  199.         "wires": []
  200.     },
  201.     {
  202.         "id": "b169f323.ed418",
  203.         "type": "change",
  204.         "z": "fb46b192.c535a8",
  205.         "name": "nonaktif",
  206.         "rules": [
  207.             {
  208.                 "t": "set",
  209.                 "p": "payload",
  210.                 "pt": "msg",
  211.                 "to": "Pompa Irigasi di non aktifkan",
  212.                 "tot": "str"
  213.             }
  214.         ],
  215.         "action": "",
  216.         "property": "",
  217.         "from": "",
  218.         "to": "",
  219.         "reg": false,
  220.         "x": 858.0912933349609,
  221.         "y": 329.54569816589355,
  222.         "wires": [
  223.             [
  224.                 "837a45f6.c3242",
  225.                 "a813237b.d75e48"
  226.             ]
  227.         ]
  228.     },
  229.     {
  230.         "id": "48aea1f1.9eae2",
  231.         "type": "change",
  232.         "z": "fb46b192.c535a8",
  233.         "name": "aktif",
  234.         "rules": [
  235.             {
  236.                 "t": "set",
  237.                 "p": "payload",
  238.                 "pt": "msg",
  239.                 "to": "Pompa Irigasi di aktifkan",
  240.                 "tot": "str"
  241.             }
  242.         ],
  243.         "action": "",
  244.         "property": "",
  245.         "from": "",
  246.         "to": "",
  247.         "reg": false,
  248.         "x": 848.0002288818359,
  249.         "y": 173.00008964538574,
  250.         "wires": [
  251.             [
  252.                 "837a45f6.c3242",
  253.                 "35668ab4.1add86"
  254.             ]
  255.         ]
  256.     },
  257.     {
  258.         "id": "837a45f6.c3242",
  259.         "type": "ui_toast",
  260.         "z": "fb46b192.c535a8",
  261.         "position": "bottom right",
  262.         "displayTime": "3",
  263.         "highlight": "",
  264.         "outputs": 0,
  265.         "ok": "OK",
  266.         "cancel": "",
  267.         "topic": "",
  268.         "name": "",
  269.         "x": 1170.0000495910645,
  270.         "y": 247.00010871887207,
  271.         "wires": []
  272.     },
  273.     {
  274.         "id": "ffaf71f1.68bc1",
  275.         "type": "mqtt in",
  276.         "z": "fb46b192.c535a8",
  277.         "name": "",
  278.         "topic": "sensor/data",
  279.         "qos": "2",
  280.         "datatype": "auto",
  281.         "broker": "ce6d6177.dfa96",
  282.         "x": 487.0000228881836,
  283.         "y": 516.555585861206,
  284.         "wires": [
  285.             [
  286.                 "4dba06dc.da43c8"
  287.             ]
  288.         ]
  289.     },
  290.     {
  291.         "id": "4dba06dc.da43c8",
  292.         "type": "json",
  293.         "z": "fb46b192.c535a8",
  294.         "name": "",
  295.         "property": "payload",
  296.         "action": "",
  297.         "pretty": false,
  298.         "x": 643.9999923706055,
  299.         "y": 515.555585861206,
  300.         "wires": [
  301.             [
  302.                 "c7b5a8eb.795808",
  303.                 "b2e6e672.1f33f8"
  304.             ]
  305.         ]
  306.     },
  307.     {
  308.         "id": "c7b5a8eb.795808",
  309.         "type": "function",
  310.         "z": "fb46b192.c535a8",
  311.         "name": "analog",
  312.         "func": "var obj = msg.payload;\nmsg.payload = obj.analog;\nreturn msg;\n",
  313.         "outputs": 1,
  314.         "noerr": 0,
  315.         "x": 810.1364212036133,
  316.         "y": 435.53892040252686,
  317.         "wires": [
  318.             [
  319.                 "70ceced4.cf0fb"
  320.             ]
  321.         ]
  322.     },
  323.     {
  324.         "id": "b2e6e672.1f33f8",
  325.         "type": "function",
  326.         "z": "fb46b192.c535a8",
  327.         "name": "persen",
  328.         "func": "var obj = msg.payload;\nmsg.payload = obj.persen;\nreturn msg;\n",
  329.         "outputs": 1,
  330.         "noerr": 0,
  331.         "x": 809.1167144775391,
  332.         "y": 516.4389171600342,
  333.         "wires": [
  334.             [
  335.                 "edcc5030.9b395",
  336.                 "b6260f5.1913c7",
  337.                 "f4bc9b24.5b3a58"
  338.             ]
  339.         ]
  340.     },
  341.     {
  342.         "id": "edcc5030.9b395",
  343.         "type": "ui_gauge",
  344.         "z": "fb46b192.c535a8",
  345.         "name": "",
  346.         "group": "5edeb23.aff5b4c",
  347.         "order": 1,
  348.         "width": "4",
  349.         "height": "4",
  350.         "gtype": "gage",
  351.         "title": "Kelembaban Tanah",
  352.         "label": "Persen",
  353.         "format": "{{value}}",
  354.         "min": 0,
  355.         "max": "100",
  356.         "colors": [
  357.             "#00b500",
  358.             "#e6e600",
  359.             "#ca3838"
  360.         ],
  361.         "seg1": "",
  362.         "seg2": "",
  363.         "x": 999.5001068115234,
  364.         "y": 490.42229080200195,
  365.         "wires": []
  366.     },
  367.     {
  368.         "id": "70ceced4.cf0fb",
  369.         "type": "ui_gauge",
  370.         "z": "fb46b192.c535a8",
  371.         "name": "",
  372.         "group": "5edeb23.aff5b4c",
  373.         "order": 1,
  374.         "width": "4",
  375.         "height": "4",
  376.         "gtype": "gage",
  377.         "title": "Nilai ADC",
  378.         "label": "Value",
  379.         "format": "{{value}}",
  380.         "min": 0,
  381.         "max": "1024",
  382.         "colors": [
  383.             "#00b500",
  384.             "#e6e600",
  385.             "#ca3838"
  386.         ],
  387.         "seg1": "",
  388.         "seg2": "",
  389.         "x": 976.0001068115234,
  390.         "y": 435.55561923980713,
  391.         "wires": []
  392.     },
  393.     {
  394.         "id": "400ee7ea.482e18",
  395.         "type": "timerswitch",
  396.         "z": "fb46b192.c535a8",
  397.         "name": "Jadwal Siram",
  398.         "ontopic": "",
  399.         "offtopic": "",
  400.         "onpayload": "",
  401.         "offpayload": "",
  402.         "disabled": false,
  403.         "schedules": [
  404.             {
  405.                 "on_h": "07",
  406.                 "on_m": "00",
  407.                 "on_s": "00",
  408.                 "off_h": "07",
  409.                 "off_m": "01",
  410.                 "off_s": "00",
  411.                 "valid": true
  412.             },
  413.             {
  414.                 "on_h": "16",
  415.                 "on_m": "12",
  416.                 "on_s": "00",
  417.                 "off_h": "16",
  418.                 "off_m": "12",
  419.                 "off_s": "30",
  420.                 "valid": true
  421.             }
  422.         ],
  423.         "x": 430.53355407714844,
  424.         "y": 386.06688117980957,
  425.         "wires": [
  426.             [
  427.                 "1a04fffe.102c6"
  428.             ]
  429.         ]
  430.     },
  431.     {
  432.         "id": "35668ab4.1add86",
  433.         "type": "play audio",
  434.         "z": "fb46b192.c535a8",
  435.         "name": "",
  436.         "voice": "11",
  437.         "x": 1156.5335083007812,
  438.         "y": 89.00002813339233,
  439.         "wires": []
  440.     },
  441.     {
  442.         "id": "323159ee.2033a6",
  443.         "type": "ui_template",
  444.         "z": "fb46b192.c535a8",
  445.         "group": "dfa3466b.b943c8",
  446.         "name": "vid",
  447.         "order": 1,
  448.         "width": "",
  449.         "height": "",
  450.         "format": "<iframe width=\"360\" height=\"288\" align=\"middle\" src=\"http://192.168.1.7:8080/video\" frameborder=\"0\" allowfullscreen></iframe>",
  451.         "storeOutMessages": true,
  452.         "fwdInMessages": true,
  453.         "templateScope": "local",
  454.         "x": 959.6972198486328,
  455.         "y": 747.2728490829468,
  456.         "wires": [
  457.             []
  458.         ]
  459.     },
  460.     {
  461.         "id": "218ac5a8.8012ca",
  462.         "type": "ui_template",
  463.         "z": "fb46b192.c535a8",
  464.         "group": "dfa3466b.b943c8",
  465.         "name": "Status Tanaman",
  466.         "order": 3,
  467.         "width": "4",
  468.         "height": "6",
  469.         "format": "<div align=\"center\">\n  Status Tanaman <BR><BR>\n      \n<img src=\"{{msg.payload}}\" alt=\"Plant\" height=\"225\" width=\"200\">\n</div>\n\n",
  470.         "storeOutMessages": true,
  471.         "fwdInMessages": true,
  472.         "templateScope": "local",
  473.         "x": 974.2425518035889,
  474.         "y": 642.7274312973022,
  475.         "wires": [
  476.             []
  477.         ]
  478.     },
  479.     {
  480.         "id": "1a04fffe.102c6",
  481.         "type": "mqtt out",
  482.         "z": "fb46b192.c535a8",
  483.         "name": "",
  484.         "topic": "sensor/reply",
  485.         "qos": "",
  486.         "retain": "",
  487.         "broker": "e193a762.a1e0f",
  488.         "x": 648.7879524230957,
  489.         "y": 324.84854888916016,
  490.         "wires": []
  491.     },
  492.     {
  493.         "id": "fa79e436.2cc698",
  494.         "type": "inject",
  495.         "z": "fb46b192.c535a8",
  496.         "name": "",
  497.         "topic": "",
  498.         "payload": "https://i.ibb.co/4Y409C6/Subur.png",
  499.         "payloadType": "str",
  500.         "repeat": "",
  501.         "crontab": "",
  502.         "once": false,
  503.         "onceDelay": 0.1,
  504.         "x": 366.0002136230469,
  505.         "y": 625.4547548294067,
  506.         "wires": [
  507.             []
  508.         ]
  509.     },
  510.     {
  511.         "id": "42b08232.5f440c",
  512.         "type": "inject",
  513.         "z": "fb46b192.c535a8",
  514.         "name": "",
  515.         "topic": "",
  516.         "payload": "https://i.ibb.co/dk4Xcg6/tidak-subur.png",
  517.         "payloadType": "str",
  518.         "repeat": "",
  519.         "crontab": "",
  520.         "once": false,
  521.         "onceDelay": 0.1,
  522.         "x": 363.2728958129883,
  523.         "y": 664.5457019805908,
  524.         "wires": [
  525.             []
  526.         ]
  527.     },
  528.     {
  529.         "id": "f4bc9b24.5b3a58",
  530.         "type": "switch",
  531.         "z": "fb46b192.c535a8",
  532.         "name": "",
  533.         "property": "payload",
  534.         "propertyType": "msg",
  535.         "rules": [
  536.             {
  537.                 "t": "lte",
  538.                 "v": "40",
  539.                 "vt": "num"
  540.             },
  541.             {
  542.                 "t": "gte",
  543.                 "v": "41",
  544.                 "vt": "str"
  545.             }
  546.         ],
  547.         "checkall": "true",
  548.         "repair": false,
  549.         "outputs": 2,
  550.         "x": 635.8182029724121,
  551.         "y": 638.1212463378906,
  552.         "wires": [
  553.             [
  554.                 "7b7ceb96.160fa4"
  555.             ],
  556.             [
  557.                 "5a2f001b.46eb2"
  558.             ]
  559.         ]
  560.     },
  561.     {
  562.         "id": "5a2f001b.46eb2",
  563.         "type": "function",
  564.         "z": "fb46b192.c535a8",
  565.         "name": "Subur",
  566.         "func": "var obj = msg.payload;\nmsg.payload = \"https://i.ibb.co/4Y409C6/Subur.png\";\nreturn msg;\n",
  567.         "outputs": 1,
  568.         "noerr": 0,
  569.         "x": 772.3638153076172,
  570.         "y": 688.484920501709,
  571.         "wires": [
  572.             [
  573.                 "218ac5a8.8012ca",
  574.                 "5e65c112.2192a"
  575.             ]
  576.         ]
  577.     },
  578.     {
  579.         "id": "7b7ceb96.160fa4",
  580.         "type": "function",
  581.         "z": "fb46b192.c535a8",
  582.         "name": "Tidak Subur",
  583.         "func": "var obj = msg.payload;\nmsg.payload = \"https://i.ibb.co/dk4Xcg6/tidak-subur.png\";\nreturn msg;\n",
  584.         "outputs": 1,
  585.         "noerr": 0,
  586.         "x": 786.0000076293945,
  587.         "y": 607.5758876800537,
  588.         "wires": [
  589.             [
  590.                 "218ac5a8.8012ca"
  591.             ]
  592.         ]
  593.     },
  594.     {
  595.         "id": "5e65c112.2192a",
  596.         "type": "function",
  597.         "z": "fb46b192.c535a8",
  598.         "name": "set off",
  599.         "func": "var obj = msg.payload;\nmsg.payload = \"off\";\nreturn msg;\n",
  600.         "outputs": 1,
  601.         "noerr": 0,
  602.         "x": 934.0000360662286,
  603.         "y": 687.8182220458984,
  604.         "wires": [
  605.             [
  606.                 "3a034a6a.38dbd6"
  607.             ]
  608.         ]
  609.     },
  610.     {
  611.         "id": "3a034a6a.38dbd6",
  612.         "type": "mqtt out",
  613.         "z": "fb46b192.c535a8",
  614.         "name": "",
  615.         "topic": "sensor/reply",
  616.         "qos": "",
  617.         "retain": "",
  618.         "broker": "e193a762.a1e0f",
  619.         "x": 1176.909091949463,
  620.         "y": 714.8485765457153,
  621.         "wires": []
  622.     },
  623.     {
  624.         "id": "41de0326.d7276c",
  625.         "type": "function",
  626.         "z": "fb46b192.c535a8",
  627.         "name": "",
  628.         "func": "\n\n\nvar a = flow.get('nonaktif');           //  The global thing you are watching for change.\nvar b = context.get('nonaktif');     //  A local store so it knows if the global thing has changed.\nif (a !=b)\n{\n var obj = msg.payload;\nmsg.payload = \"Non Aktif\";\n\n}\n\nreturn msg;",
  629.         "outputs": 1,
  630.         "noerr": 0,
  631.         "x": 562.181826504794,
  632.         "y": 72.06060929731889,
  633.         "wires": [
  634.             [
  635.                 "74a04e65.f9c48"
  636.             ]
  637.         ]
  638.     },
  639.     {
  640.         "id": "74a04e65.f9c48",
  641.         "type": "debug",
  642.         "z": "fb46b192.c535a8",
  643.         "name": "",
  644.         "active": true,
  645.         "tosidebar": true,
  646.         "console": false,
  647.         "tostatus": false,
  648.         "complete": "false",
  649.         "x": 763.0909451571378,
  650.         "y": 37.333332408558235,
  651.         "wires": []
  652.     },
  653.     {
  654.         "id": "5edeb23.aff5b4c",
  655.         "type": "ui_group",
  656.         "z": "",
  657.         "name": "Sensor",
  658.         "tab": "2d027502.24ab62",
  659.         "order": 2,
  660.         "disp": false,
  661.         "width": "12",
  662.         "collapse": false
  663.     },
  664.     {
  665.         "id": "dfa3466b.b943c8",
  666.         "type": "ui_group",
  667.         "z": "",
  668.         "name": "Jadwal Penyiraman",
  669.         "tab": "2d027502.24ab62",
  670.         "order": 1,
  671.         "disp": false,
  672.         "width": "4",
  673.         "collapse": false
  674.     },
  675.     {
  676.         "id": "ce6d6177.dfa96",
  677.         "type": "mqtt-broker",
  678.         "z": "",
  679.         "name": "",
  680.         "broker": "localhost",
  681.         "port": "1883",
  682.         "clientid": "",
  683.         "usetls": false,
  684.         "compatmode": true,
  685.         "keepalive": "60",
  686.         "cleansession": true,
  687.         "birthTopic": "",
  688.         "birthQos": "0",
  689.         "birthPayload": "",
  690.         "closeTopic": "",
  691.         "closePayload": "",
  692.         "willTopic": "",
  693.         "willQos": "0",
  694.         "willPayload": ""
  695.     },
  696.     {
  697.         "id": "e193a762.a1e0f",
  698.         "type": "mqtt-broker",
  699.         "z": "",
  700.         "name": "",
  701.         "broker": "127.0.0.1",
  702.         "port": "1883",
  703.         "clientid": "",
  704.         "usetls": false,
  705.         "compatmode": true,
  706.         "keepalive": "60",
  707.         "cleansession": true,
  708.         "birthTopic": "",
  709.         "birthQos": "0",
  710.         "birthPayload": "",
  711.         "closeTopic": "",
  712.         "closePayload": "",
  713.         "willTopic": "",
  714.         "willQos": "0",
  715.         "willPayload": ""
  716.     },
  717.     {
  718.         "id": "2d027502.24ab62",
  719.         "type": "ui_tab",
  720.         "z": "",
  721.         "name": "Monitoring",
  722.         "icon": "dashboard",
  723.         "order": 1,
  724.         "disabled": false,
  725.         "hidden": false
  726.     }
  727. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement