[{"id":"3132a3bf41b5720f","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"5b52ddbd9e57fa84","type":"mqtt in","z":"3132a3bf41b5720f","name":"","topic":"esp/dht/temperature","qos":"1","datatype":"auto","broker":"8db3fac0.99dd48","nl":false,"rap":false,"x":270,"y":180,"wires":[["ea4a205ba4456db4"]]},{"id":"ea4a205ba4456db4","type":"function","z":"3132a3bf41b5720f","name":"","func":"m = parseFloat(msg.payload)\n\nmin = flow.get(\"min\") || 6 // minimum value \nmax = flow.get(\"max\") || 7 // maximum value \n\nif(m<min && m <=max){\n flow.set(\"min\",m)\n min = flow.get(\"min\")\n}\nif(m>max){\n \n flow.set(\"max\",m)\n max = flow.get(\"max\")\n \n}\n\n\nreturn {payload:{min:min,max:max}};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":100,"wires":[["9d354bfc05ee4a33"]]},{"id":"8e58ee268c33b682","type":"function","z":"3132a3bf41b5720f","name":"","func":"mh = parseFloat(msg.payload)\nminh = flow.get(\"minh\") || 20 // minimum value \nmaxh = flow.get(\"maxh\") || 7 // maximum value \n\nif(mh<minh && mh <=maxh){\n flow.set(\"minh\",mh)\n minh = flow.get(\"minh\")\n}\nif(mh>maxh){\n \n flow.set(\"maxh\",mh)\n maxh = flow.get(\"maxh\")\n \n}\n\n\nreturn {payload:{minh:minh,maxh:maxh}};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":320,"wires":[["9d354bfc05ee4a33"]]},{"id":"3d121c8b56e12614","type":"mqtt in","z":"3132a3bf41b5720f","name":"","topic":"esp/dht/humidity","qos":"1","datatype":"auto","broker":"8db3fac0.99dd48","x":260,"y":400,"wires":[["8e58ee268c33b682"]]},{"id":"9d354bfc05ee4a33","type":"function","z":"3132a3bf41b5720f","name":"function ","func":"\n titel=\"a brief report of this mission:\";\n string1=\"-the minimum tempurature it was:\"\n tempurature_min= msg.payload.min;\n string2=\",the maximum tempurature it was:\"\n tempurature_max=msg.payload.max;\n string3=\",the minimum humidity it was:\"\n humidity_min=msg.payload.minh;\n string4=\",the maximum humidity it was:\"\n humidity_max=msg.payload.maxh;\nmsg.payload=titel+string1+tempurature_min+string2+tempurature_max+string3+humidity_min+string4+humidity_max;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":860,"wires":[["14b7fd13ebdd8a5c"]]},{"id":"14b7fd13ebdd8a5c","type":"debug","z":"3132a3bf41b5720f","name":"do_Something","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1000,"y":960,"wires":[]},{"id":"8db3fac0.99dd48","type":"mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]