[ { "id": "fb46b192.c535a8", "type": "tab", "label": "Tanaman", "disabled": false, "info": "" }, { "id": "b6e150a9.fed6d8", "type": "ui_template", "z": "fb46b192.c535a8", "group": "5edeb23.aff5b4c", "name": "Status Pompa Irigasi", "order": 3, "width": "4", "height": "4", "format": "\n\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n", "storeOutMessages": true, "fwdInMessages": true, "templateScope": "local", "x": 1188.0003128051758, "y": 168.00010633468628, "wires": [ [] ] }, { "id": "b6260f5.1913c7", "type": "ui_chart", "z": "fb46b192.c535a8", "name": "", "group": "5edeb23.aff5b4c", "order": 6, "width": "12", "height": "10", "label": "Grafik Kelembaban Tanah", "chartType": "line", "legend": "true", "xformat": "HH:mm", "interpolate": "bezier", "nodata": "", "dot": true, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 1, "x": 1019.000171661377, "y": 555.0001602172852, "wires": [ [] ] }, { "id": "a2abc2a6.6ba1c8", "type": "ui_switch", "z": "fb46b192.c535a8", "name": "", "label": "Kontrol Manual Pompa Irigasi", "tooltip": "", "group": "dfa3466b.b943c8", "order": 2, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "", "style": "", "onvalue": "on", "onvalueType": "str", "onicon": "", "oncolor": "", "offvalue": "off", "offvalueType": "str", "officon": "", "offcolor": "", "x": 381, "y": 303.0000476837158, "wires": [ [ "238b8a47.c7e716", "1a04fffe.102c6" ] ] }, { "id": "238b8a47.c7e716", "type": "switch", "z": "fb46b192.c535a8", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "on", "vt": "str" }, { "t": "eq", "v": "off", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 636.0000495910645, "y": 208.00000953674316, "wires": [ [ "65ccfffb.04ba8" ], [ "fd72e2b.16b09a" ] ] }, { "id": "65ccfffb.04ba8", "type": "change", "z": "fb46b192.c535a8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "lime", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 878.0001640319824, "y": 107.00002956390381, "wires": [ [ "b6e150a9.fed6d8", "48aea1f1.9eae2" ] ] }, { "id": "fd72e2b.16b09a", "type": "change", "z": "fb46b192.c535a8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "black", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 875.0003509521484, "y": 225.0001106262207, "wires": [ [ "b6e150a9.fed6d8", "b169f323.ed418" ] ] }, { "id": "a813237b.d75e48", "type": "play audio", "z": "fb46b192.c535a8", "name": "", "voice": "11", "x": 1147.0000534057617, "y": 334.0000476837158, "wires": [] }, { "id": "b169f323.ed418", "type": "change", "z": "fb46b192.c535a8", "name": "nonaktif", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Pompa Irigasi di non aktifkan", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 858.0912933349609, "y": 329.54569816589355, "wires": [ [ "837a45f6.c3242", "a813237b.d75e48" ] ] }, { "id": "48aea1f1.9eae2", "type": "change", "z": "fb46b192.c535a8", "name": "aktif", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Pompa Irigasi di aktifkan", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 848.0002288818359, "y": 173.00008964538574, "wires": [ [ "837a45f6.c3242", "35668ab4.1add86" ] ] }, { "id": "837a45f6.c3242", "type": "ui_toast", "z": "fb46b192.c535a8", "position": "bottom right", "displayTime": "3", "highlight": "", "outputs": 0, "ok": "OK", "cancel": "", "topic": "", "name": "", "x": 1170.0000495910645, "y": 247.00010871887207, "wires": [] }, { "id": "ffaf71f1.68bc1", "type": "mqtt in", "z": "fb46b192.c535a8", "name": "", "topic": "sensor/data", "qos": "2", "datatype": "auto", "broker": "ce6d6177.dfa96", "x": 487.0000228881836, "y": 516.555585861206, "wires": [ [ "4dba06dc.da43c8" ] ] }, { "id": "4dba06dc.da43c8", "type": "json", "z": "fb46b192.c535a8", "name": "", "property": "payload", "action": "", "pretty": false, "x": 643.9999923706055, "y": 515.555585861206, "wires": [ [ "c7b5a8eb.795808", "b2e6e672.1f33f8" ] ] }, { "id": "c7b5a8eb.795808", "type": "function", "z": "fb46b192.c535a8", "name": "analog", "func": "var obj = msg.payload;\nmsg.payload = obj.analog;\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 810.1364212036133, "y": 435.53892040252686, "wires": [ [ "70ceced4.cf0fb" ] ] }, { "id": "b2e6e672.1f33f8", "type": "function", "z": "fb46b192.c535a8", "name": "persen", "func": "var obj = msg.payload;\nmsg.payload = obj.persen;\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 809.1167144775391, "y": 516.4389171600342, "wires": [ [ "edcc5030.9b395", "b6260f5.1913c7", "f4bc9b24.5b3a58" ] ] }, { "id": "edcc5030.9b395", "type": "ui_gauge", "z": "fb46b192.c535a8", "name": "", "group": "5edeb23.aff5b4c", "order": 1, "width": "4", "height": "4", "gtype": "gage", "title": "Kelembaban Tanah", "label": "Persen", "format": "{{value}}", "min": 0, "max": "100", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 999.5001068115234, "y": 490.42229080200195, "wires": [] }, { "id": "70ceced4.cf0fb", "type": "ui_gauge", "z": "fb46b192.c535a8", "name": "", "group": "5edeb23.aff5b4c", "order": 1, "width": "4", "height": "4", "gtype": "gage", "title": "Nilai ADC", "label": "Value", "format": "{{value}}", "min": 0, "max": "1024", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 976.0001068115234, "y": 435.55561923980713, "wires": [] }, { "id": "400ee7ea.482e18", "type": "timerswitch", "z": "fb46b192.c535a8", "name": "Jadwal Siram", "ontopic": "", "offtopic": "", "onpayload": "", "offpayload": "", "disabled": false, "schedules": [ { "on_h": "07", "on_m": "00", "on_s": "00", "off_h": "07", "off_m": "01", "off_s": "00", "valid": true }, { "on_h": "16", "on_m": "12", "on_s": "00", "off_h": "16", "off_m": "12", "off_s": "30", "valid": true } ], "x": 430.53355407714844, "y": 386.06688117980957, "wires": [ [ "1a04fffe.102c6" ] ] }, { "id": "35668ab4.1add86", "type": "play audio", "z": "fb46b192.c535a8", "name": "", "voice": "11", "x": 1156.5335083007812, "y": 89.00002813339233, "wires": [] }, { "id": "323159ee.2033a6", "type": "ui_template", "z": "fb46b192.c535a8", "group": "dfa3466b.b943c8", "name": "vid", "order": 1, "width": "", "height": "", "format": "", "storeOutMessages": true, "fwdInMessages": true, "templateScope": "local", "x": 959.6972198486328, "y": 747.2728490829468, "wires": [ [] ] }, { "id": "218ac5a8.8012ca", "type": "ui_template", "z": "fb46b192.c535a8", "group": "dfa3466b.b943c8", "name": "Status Tanaman", "order": 3, "width": "4", "height": "6", "format": "
\n Status Tanaman

\n \n\"Plant\"\n
\n\n", "storeOutMessages": true, "fwdInMessages": true, "templateScope": "local", "x": 974.2425518035889, "y": 642.7274312973022, "wires": [ [] ] }, { "id": "1a04fffe.102c6", "type": "mqtt out", "z": "fb46b192.c535a8", "name": "", "topic": "sensor/reply", "qos": "", "retain": "", "broker": "e193a762.a1e0f", "x": 648.7879524230957, "y": 324.84854888916016, "wires": [] }, { "id": "fa79e436.2cc698", "type": "inject", "z": "fb46b192.c535a8", "name": "", "topic": "", "payload": "https://i.ibb.co/4Y409C6/Subur.png", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 366.0002136230469, "y": 625.4547548294067, "wires": [ [] ] }, { "id": "42b08232.5f440c", "type": "inject", "z": "fb46b192.c535a8", "name": "", "topic": "", "payload": "https://i.ibb.co/dk4Xcg6/tidak-subur.png", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 363.2728958129883, "y": 664.5457019805908, "wires": [ [] ] }, { "id": "f4bc9b24.5b3a58", "type": "switch", "z": "fb46b192.c535a8", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "lte", "v": "40", "vt": "num" }, { "t": "gte", "v": "41", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 635.8182029724121, "y": 638.1212463378906, "wires": [ [ "7b7ceb96.160fa4" ], [ "5a2f001b.46eb2" ] ] }, { "id": "5a2f001b.46eb2", "type": "function", "z": "fb46b192.c535a8", "name": "Subur", "func": "var obj = msg.payload;\nmsg.payload = \"https://i.ibb.co/4Y409C6/Subur.png\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 772.3638153076172, "y": 688.484920501709, "wires": [ [ "218ac5a8.8012ca", "5e65c112.2192a" ] ] }, { "id": "7b7ceb96.160fa4", "type": "function", "z": "fb46b192.c535a8", "name": "Tidak Subur", "func": "var obj = msg.payload;\nmsg.payload = \"https://i.ibb.co/dk4Xcg6/tidak-subur.png\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 786.0000076293945, "y": 607.5758876800537, "wires": [ [ "218ac5a8.8012ca" ] ] }, { "id": "5e65c112.2192a", "type": "function", "z": "fb46b192.c535a8", "name": "set off", "func": "var obj = msg.payload;\nmsg.payload = \"off\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 934.0000360662286, "y": 687.8182220458984, "wires": [ [ "3a034a6a.38dbd6" ] ] }, { "id": "3a034a6a.38dbd6", "type": "mqtt out", "z": "fb46b192.c535a8", "name": "", "topic": "sensor/reply", "qos": "", "retain": "", "broker": "e193a762.a1e0f", "x": 1176.909091949463, "y": 714.8485765457153, "wires": [] }, { "id": "41de0326.d7276c", "type": "function", "z": "fb46b192.c535a8", "name": "", "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;", "outputs": 1, "noerr": 0, "x": 562.181826504794, "y": 72.06060929731889, "wires": [ [ "74a04e65.f9c48" ] ] }, { "id": "74a04e65.f9c48", "type": "debug", "z": "fb46b192.c535a8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 763.0909451571378, "y": 37.333332408558235, "wires": [] }, { "id": "5edeb23.aff5b4c", "type": "ui_group", "z": "", "name": "Sensor", "tab": "2d027502.24ab62", "order": 2, "disp": false, "width": "12", "collapse": false }, { "id": "dfa3466b.b943c8", "type": "ui_group", "z": "", "name": "Jadwal Penyiraman", "tab": "2d027502.24ab62", "order": 1, "disp": false, "width": "4", "collapse": false }, { "id": "ce6d6177.dfa96", "type": "mqtt-broker", "z": "", "name": "", "broker": "localhost", "port": "1883", "clientid": "", "usetls": false, "compatmode": true, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }, { "id": "e193a762.a1e0f", "type": "mqtt-broker", "z": "", "name": "", "broker": "127.0.0.1", "port": "1883", "clientid": "", "usetls": false, "compatmode": true, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }, { "id": "2d027502.24ab62", "type": "ui_tab", "z": "", "name": "Monitoring", "icon": "dashboard", "order": 1, "disabled": false, "hidden": false } ]