Thanks Colin,, I may well employ the retain capacity of the mqtt broker/service, i will need to read up on it. Though i seem to have cracked the global declaration and setting..
It was a long weekend at the codeface..
[{"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":170,"y":420,"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":220,"y":600,"wires":[["7fcb1e11.1610c"]]},{"id":"7fcb1e11.1610c","type":"function","z":"bfb29f2b.4dfdb","name":"Update Plant1 Minimum Moisture Level","func":"var P1MML = global.get('P1MML')||30;\nglobal.set('P1MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":200,"y":500,"wires":[["d18edff1.488c6","ae64b87a.d20a18"]]},{"id":"1c127556.33317b","type":"ui_group","z":"","name":"Overview","tab":"6152efc3.75cfe","order":2,"disp":false,"width":"12","collapse":false},{"id":"6152efc3.75cfe","type":"ui_tab","z":"","name":"Patio Plant Monitor","icon":"dashboard","order":1}]
Tho the flow bothers me it screams recursion and not the cuddly self terminating type.. but its not..
The goal is a dashboard interface displaying graphs of 4 x sensor sets from a number of plant pot sensors along side with an input control for each plant or perhaps global which can then be referenced after data collection as the level to trigger a conditional execution of a watering period.
for that particular plant/area. ie when moisture as a % drops below 30 water that plant area if its covered by a watering system raise an alert otherwise.
looks like i need to shift my conditional testing into a function node to access the globals..
.