[
{
"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": "<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",
"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": "<iframe width=\"360\" height=\"288\" align=\"middle\" src=\"http://192.168.1.7:8080/video\" frameborder=\"0\" allowfullscreen></iframe>",
"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": "<div align=\"center\">\n Status Tanaman <BR><BR>\n \n<img src=\"{{msg.payload}}\" alt=\"Plant\" height=\"225\" width=\"200\">\n</div>\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
}
]
Comments