[{"id":"5273aba.1064054","type":"ui_chart","z":"bfb29f2b.4dfdb","name":"Moisture","group":"1c127556.33317b","order":3,"width":"6","height":"8","label":"Moisture","chartType":"line","legend":"true","xformat":"auto","interpolate":"linear","nodata":"waiting","dot":true,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":880,"y":100,"wires":[["feed02cb.155b1"],[]],"outputLabels":["persistant store",""]},{"id":"feed02cb.155b1","type":"persist in","z":"bfb29f2b.4dfdb","name":"PlantMoisture","storageNode":"742e2b82.7baaf4","x":1110,"y":80,"wires":[]},{"id":"eba5ad37.e8c54","type":"persist out","z":"bfb29f2b.4dfdb","name":"PlantMoisture","storageNode":"742e2b82.7baaf4","x":530,"y":100,"wires":[["5273aba.1064054"]]},{"id":"a1883743.366ff8","type":"ui_chart","z":"bfb29f2b.4dfdb","name":"","group":"1c127556.33317b","order":2,"width":"6","height":"8","label":"Batery Level %","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"0","ymax":"106","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":900,"y":200,"wires":[["272921df.3e0fde"],[]],"outputLabels":["persistant store",""]},{"id":"272921df.3e0fde","type":"persist in","z":"bfb29f2b.4dfdb","name":"BatteryLevel","storageNode":"cf36a9a7.43f468","x":1110,"y":200,"wires":[]},{"id":"4e08b7cd.602c88","type":"persist out","z":"bfb29f2b.4dfdb","name":"BatteryLevel","storageNode":"cf36a9a7.43f468","x":530,"y":200,"wires":[["a1883743.366ff8"]]},{"id":"ac0f4422.925ad8","type":"ui_chart","z":"bfb29f2b.4dfdb","name":"","group":"1c127556.33317b","order":4,"width":"6","height":"8","label":"Temperature","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"5","ymax":"55","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":890,"y":420,"wires":[["ce6ac2f3.9972"],[]],"outputLabels":["persistant store",""]},{"id":"ce6ac2f3.9972","type":"persist in","z":"bfb29f2b.4dfdb","name":"PlantTemperature","storageNode":"1af6d261.bce04e","x":1130,"y":400,"wires":[]},{"id":"b06f9ce9.4cb4a","type":"persist out","z":"bfb29f2b.4dfdb","name":"PlantTemperature","storageNode":"1af6d261.bce04e","x":570,"y":420,"wires":[["ac0f4422.925ad8"]]},{"id":"9e61d6d2.1393c8","type":"ui_chart","z":"bfb29f2b.4dfdb","name":"","group":"1c127556.33317b","order":12,"width":"6","height":"8","label":"EC","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"0","ymax":"5555","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":850,"y":520,"wires":[["fd023fba.c9aff"],[]],"outputLabels":["persistant store",""]},{"id":"fd023fba.c9aff","type":"persist in","z":"bfb29f2b.4dfdb","name":"Plant EC","storageNode":"79b04df0.19e724","x":1100,"y":500,"wires":[]},{"id":"5f1d4002.6a16a","type":"persist out","z":"bfb29f2b.4dfdb","name":"PlantEC","storageNode":"79b04df0.19e724","x":540,"y":520,"wires":[["9e61d6d2.1393c8"]]},{"id":"26091172.178f5e","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant3 Minimum moisture Level","label":"Plant3 Minimum moisture Level","group":"1c127556.33317b","order":9,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant3M","min":"20","max":"40","step":1,"x":160,"y":320,"wires":[["70b5be97.cb7fb"]]},{"id":"46500131.c4f9c","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P3MML","group":"1c127556.33317b","order":10,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant3M","format":"{{value}}%","min":"20","max":"40","step":1,"x":150,"y":400,"wires":[["70b5be97.cb7fb"]]},{"id":"910b8ade.039318","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant4 Minimum moisture Level","label":"Plant4 Minimum moisture Level","group":"1c127556.33317b","order":11,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant4M","min":"20","max":"40","step":1,"x":160,"y":440,"wires":[["f1a18e69.217e4"]]},{"id":"d30baf73.5abd4","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P4MML","group":"1c127556.33317b","order":13,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant4M","format":"{{value}}%","min":"20","max":"40","step":1,"x":170,"y":520,"wires":[["f1a18e69.217e4"]]},{"id":"b9e74a71.a995f8","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant7 Minimum moisture Level","label":"Plant7 Minimum moisture Level","group":"1c127556.33317b","order":18,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant7M","min":"20","max":"40","step":1,"x":180,"y":800,"wires":[["b3c9c5ec.6c4a18"]],"inputLabels":["global.get('P7MML')"]},{"id":"63597afe.3ed714","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P7MML","group":"1c127556.33317b","order":19,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant7M","format":"{{value}}%","min":"20","max":"40","step":1,"x":170,"y":880,"wires":[["b3c9c5ec.6c4a18"]]},{"id":"f371b872.9806d8","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant2 Minimum moisture Level","label":"Plant2 Minimum moisture Level","group":"1c127556.33317b","order":7,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant2M","min":"20","max":"40","step":1,"x":180,"y":200,"wires":[["22acbc7a.4bc224"]]},{"id":"e5460d9a.0f381","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P2MML","group":"1c127556.33317b","order":8,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant2M","format":"{{value}}%","min":"20","max":"40","step":1,"x":170,"y":280,"wires":[["22acbc7a.4bc224"]]},{"id":"ae64b87a.d20a18","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant1 Minimum moisture Level","label":"Plant1 Minimum moisture Level","group":"1c127556.33317b","order":5,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant1M","min":"20","max":"40","step":1,"x":200,"y":60,"wires":[["7fcb1e11.1610c"]]},{"id":"d18edff1.488c6","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P1MML","group":"1c127556.33317b","order":6,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant1M","format":"{{value}}%","min":"20","max":"40","step":1,"x":190,"y":140,"wires":[["7fcb1e11.1610c"]]},{"id":"4b391909.01cad8","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant6 Minimum moisture Level","label":"Plant6 Minimum moisture Level","group":"1c127556.33317b","order":16,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant6M","min":"20","max":"40","step":1,"x":160,"y":680,"wires":[["9b054b89.15cae8"]]},{"id":"472af8f5.767a08","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P6MML","group":"1c127556.33317b","order":17,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant6M","format":"{{value}}%","min":"20","max":"40","step":1,"x":150,"y":760,"wires":[["9b054b89.15cae8"]]},{"id":"366692b0.0f1ebe","type":"ui_slider","z":"bfb29f2b.4dfdb","name":"Plant5 Minimum moisture Level","label":"Plant5 Minimum moisture Level","group":"1c127556.33317b","order":14,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant5M","min":"20","max":"40","step":1,"x":160,"y":560,"wires":[["3abe2867.e66318"]]},{"id":"8b1e2b28.1b09e8","type":"ui_numeric","z":"bfb29f2b.4dfdb","name":"","label":"P5MML","group":"1c127556.33317b","order":15,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant5M","format":"{{value}}%","min":"20","max":"40","step":1,"x":170,"y":640,"wires":[["3abe2867.e66318"]]},{"id":"7fcb1e11.1610c","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant1 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 1\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P1MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P1MML = global.get('P1MML')||30;\nglobal.set('P1MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":190,"y":100,"wires":[["d18edff1.488c6","ae64b87a.d20a18"]]},{"id":"22acbc7a.4bc224","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant2 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 2\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P2MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P2MML = global.get('P2MML')||30;\nglobal.set('P2MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":180,"y":240,"wires":[["f371b872.9806d8","e5460d9a.0f381"]]},{"id":"70b5be97.cb7fb","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant3 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 3\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P3MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P3MML = global.get('P3MML')||30;\nglobal.set('P3MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":170,"y":360,"wires":[["26091172.178f5e","46500131.c4f9c"]]},{"id":"3abe2867.e66318","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant5 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 5\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P5MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P5MML = global.get('P5MML')||30;\nglobal.set('P5MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":170,"y":600,"wires":[["8b1e2b28.1b09e8","366692b0.0f1ebe"]]},{"id":"f1a18e69.217e4","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant4 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 4\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P4MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P4MML = global.get('P4MML')||30;\nglobal.set('P4MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":170,"y":480,"wires":[["910b8ade.039318","d30baf73.5abd4"]]},{"id":"9b054b89.15cae8","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant6 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 6\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P6MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P6MML = global.get('P6MML')||30;\nglobal.set('P6MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":170,"y":720,"wires":[["4b391909.01cad8","472af8f5.767a08"]]},{"id":"b3c9c5ec.6c4a18","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant7 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 7\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P7MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P7MML = global.get('P7MML')||30;\nglobal.set('P7MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":170,"y":840,"wires":[["63597afe.3ed714","b9e74a71.a995f8"]],"inputLabels":["P7MML"]},{"id":"c178677e.a544f8","type":"ui_text","z":"bfb29f2b.4dfdb","group":"1c127556.33317b","order":1,"width":"6","height":"2","name":"","label":"Plant Status Display","format":"{{msg.payload}}","layout":"col-center","x":710,"y":40,"wires":[]},{"id":"4c2d9bba.a69504","type":"mqtt in","z":"bfb29f2b.4dfdb","name":"Plant Notifications","topic":"Notify/Plant/#","qos":"2","broker":"6b77dcc0.90e0c4","x":440,"y":300,"wires":[["349c69fc.b05046"]]},{"id":"349c69fc.b05046","type":"function","z":"bfb29f2b.4dfdb","name":"order plant metrics","func":"//Requires:\n// message with a numeric payload and topic in the \n// format Notify/Plant/X/Y where X ia a numeric id of \n// a sensor/plant area, and Y is a code indicating the\n// metric the payload represents\n//Returns:\n// a message in the format\n// PlantX\\payload sent to the graph as indicated\n// by the metric code the payload containing the data\n//Results:\n// no expected side effects beyond\n// the gelevant graphs should get updated with \n// the new data.\nvar plant = msg.topic.split(\"/\")[2];\nvar Metric = msg.topic.split(\"/\")[3];\nmsg.topic = msg.topic.split(\"/\")[1]+ plant;\n// 4 x outputs 1 moisture metric = M\n// Battery level metric = B\n// Temperature metric = T\n// EC Metric = EC\n// return[msg1,msg2,msg3,msg4]\nswitch(Metric) {\n case 'M': // moisture\n return [msg,null,null,null]\n break;\n case 'B': //attery level\n return [null,msg,null,null]\n break;\n case 'T': // Temperature\n return [null,null,msg,null]\n break;\n case 'EC': // EC\n return [null,null,null,msg];\n break;\n default:\n return msg;\n}","outputs":4,"noerr":0,"x":630,"y":300,"wires":[["5273aba.1064054"],["a1883743.366ff8"],["ac0f4422.925ad8"],["9e61d6d2.1393c8"]],"outputLabels":["Mosture","Battery Level","Temperature","EC"]},{"id":"1c127556.33317b","type":"ui_group","z":"","name":"Overview","tab":"6152efc3.75cfe","order":2,"disp":false,"width":"12","collapse":false},{"id":"742e2b82.7baaf4","type":"persist-store","z":"","filename":"plantmoisture1.json","interval":"3600"},{"id":"cf36a9a7.43f468","type":"persist-store","z":"","filename":"Batterylevel.json","interval":"3600"},{"id":"1af6d261.bce04e","type":"persist-store","z":"","filename":"PlantTemp1.json","interval":"3600"},{"id":"79b04df0.19e724","type":"persist-store","z":"","filename":"PlantEC1.json","interval":"3600"},{"id":"6b77dcc0.90e0c4","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"6152efc3.75cfe","type":"ui_tab","z":"","name":"Patio Plant Monitor","icon":"dashboard","order":1}]