[{"id":"90487385.d672c","type":"mqtt in","z":"b65b2107.5eee2","name":"","topic":"node26/reading/#","qos":"2","broker":"a86115be.40797","x":130,"y":420,"wires":[["8e20bf67.3009d8"]]},{"id":"b7644050.fe88f8","type":"mqtt out","z":"b65b2107.5eee2","name":"","topic":"node26/cmd","qos":"","retain":"","broker":"a86115be.40797","x":470,"y":160,"wires":[]},{"id":"4a3bf8da.129df8","type":"inject","z":"b65b2107.5eee2","name":"","topic":"","payload":"event,activate","payloadType":"str","repeat":"900","crontab":"","once":true,"onceDelay":0.1,"x":140,"y":160,"wires":[["b7644050.fe88f8","d0f1da76.259378","71b3be93.0519f8"]]},{"id":"8e20bf67.3009d8","type":"json","z":"b65b2107.5eee2","name":"","property":"payload","action":"","pretty":false,"x":310,"y":420,"wires":[["6f2bf8b6.ceb368"]]},{"id":"21c0d0c7.7039d","type":"mqtt in","z":"b65b2107.5eee2","name":"","topic":"node26/status/#","qos":"2","broker":"a86115be.40797","x":120,"y":340,"wires":[["98e3758b.824498"]]},{"id":"58d969.107eb698","type":"ui_gauge","z":"b65b2107.5eee2","name":"Basil gauge","group":"7ff60025.11e29","order":2,"width":"4","height":"3","gtype":"gage","title":"PAW","label":"","format":"{{value}}","min":0,"max":10,"colors":["#ff8000","#008000","#400040"],"seg1":"3","seg2":"7","x":1130,"y":120,"wires":[]},{"id":"c8f93c80.81c9","type":"ui_text","z":"b65b2107.5eee2","group":"7ff60025.11e29","order":3,"width":"7","height":"1","name":"Basil condition","label":"","format":" {{msg.payload}} ","layout":"row-center","x":1140,"y":160,"wires":[]},{"id":"85112efe.5a2d18","type":"ui_text","z":"b65b2107.5eee2","group":"7ff60025.11e29","order":4,"width":"7","height":"1","name":"Basil action","label":"","format":" {{msg.payload}} ","layout":"row-center","x":1130,"y":220,"wires":[]},{"id":"7a70b2ff.03bb2c","type":"function","z":"b65b2107.5eee2","name":"Condition","func":"var msg_condition = {};\nvar msg_action = {};\nvar msg_time_date = {};\nvar msg_color = {};\n\nvar status = flow.get(\"basil_watchdog\");\n if (status == \"expired\")\n {\n msg.payload = 0;\n msg_condition = \"The soil sensor appears to be OFFLINE\";\n msg_action = \"Please check the battery and connections\";\n msg_color = \"red\";\n }\n else {\n\nif (msg.payload < 3) \n {\n msg_condition = \"The soil in my plant pot is very DRY\";\n msg_action = \"Please water me URGENTLY!\";\n msg_color = \"red\";\n } \nelse if (msg.payload < 4) \n {\n msg_condition = \"The soil in my plant pot is getting DRY\";\n msg_action = \"Please water me!\";\n msg_color = \"brown\";\n } \n \nelse if (msg.payload < 8)\n {\n msg_condition =\"The soil in my plant pot is still MOIST\";\n msg_action = \"You can sit back and relax... I'm OK\"\n msg_color = \"green\";\n }\nelse \n {\n msg_condition =\"The soil in my plant pot is WET\";\n msg_action = \"Please, please DO NOT water me\";\n msg_color = \"blue\";\n }\n}\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update was on: \"+dd + \"/\" + mm + \"/\" + yyyy + \" at \" + hh + \":\" + mmm + \" hrs\"}); \nmsg_time_date =\"The last update was on \" + dd + \"/\" + mm + \"/\" + yyyy + \" at \" + hh + \":\" + mmm + \" hrs\";\n\n\nreturn [ [{payload:msg_condition, color:msg_color}], [{payload:msg_action, color:msg_color}], [{payload:msg_time_date, color:msg_color}] ];\n","outputs":3,"noerr":0,"x":960,"y":220,"wires":[["c8f93c80.81c9"],["85112efe.5a2d18"],["317b5bc2.412ec4"]]},{"id":"74457573.905834","type":"ui_template","z":"b65b2107.5eee2","group":"7ff60025.11e29","name":"Basil photo","order":1,"width":"3","height":"3","format":"