Code: Select all
[{"id":"6e4792e2.d1413c","type":"debug","z":"394fcece.136712","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":420,"wires":[]},{"id":"9948d897.00ab78","type":"catch","z":"394fcece.136712","name":"","scope":null,"uncaught":false,"x":740,"y":420,"wires":[["6e4792e2.d1413c"]]},{"id":"336a5d64.79aa02","type":"ui_gauge","z":"394fcece.136712","name":"","group":"54991333.36cc3c","order":3,"width":3,"height":3,"gtype":"gage","title":"Temp","label":"C","format":"{{value}}","min":"20","max":"30","colors":["#ffff6e","#00b500","#ffff6e"],"seg1":"25","seg2":"27","x":730,"y":100,"wires":[]},{"id":"8d5a4f65.5ecd4","type":"ui_gauge","z":"394fcece.136712","name":"","group":"54991333.36cc3c","order":1,"width":3,"height":3,"gtype":"gage","title":"Humid","label":"","format":"{{value}}","min":"20","max":"60","colors":["#ffff6e","#00b500","#ffff6e"],"seg1":"31","seg2":"52","x":730,"y":220,"wires":[]},{"id":"b5770088.dc9d3","type":"ui_gauge","z":"394fcece.136712","name":"","group":"df17b484.5087f8","order":1,"width":3,"height":3,"gtype":"gage","title":"CO2 PPM","label":"ppm","format":"{{value}}","min":"400","max":"2000","colors":["#e6e600","#00b500","#e60000"],"seg1":"900","seg2":"1700","x":740,"y":340,"wires":[]},{"id":"7a68b6ba.b07c68","type":"smooth","z":"394fcece.136712","name":"Calc Min","property":"payload","action":"min","count":"360","round":"2","mult":"single","reduce":false,"x":740,"y":60,"wires":[["fa5ce8a2.520e98"]]},{"id":"fa5ce8a2.520e98","type":"change","z":"394fcece.136712","name":"Min","rules":[{"t":"change","p":"topic","pt":"msg","from":"Temp","fromt":"str","to":"Min","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":60,"wires":[["b570ad02.c65f4"]]},{"id":"101b9d27.13f603","type":"smooth","z":"394fcece.136712","name":"Calc Min","property":"payload","action":"min","count":"360","round":"2","mult":"single","reduce":false,"x":740,"y":180,"wires":[["40c8e56d.30d48c"]]},{"id":"40c8e56d.30d48c","type":"change","z":"394fcece.136712","name":"Min","rules":[{"t":"change","p":"topic","pt":"msg","from":"RelHum","fromt":"str","to":"Min","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":180,"wires":[["582e9472.71b22c"]]},{"id":"ee67fbe.e613308","type":"smooth","z":"394fcece.136712","name":"Calc Max","property":"payload","action":"max","count":"360","round":"2","mult":"single","reduce":false,"x":740,"y":20,"wires":[["7b15ae1f.411f5"]]},{"id":"7b15ae1f.411f5","type":"change","z":"394fcece.136712","name":"Max","rules":[{"t":"change","p":"topic","pt":"msg","from":"Temp","fromt":"str","to":"Max","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":20,"wires":[["b570ad02.c65f4"]]},{"id":"96d969c6.be2b98","type":"smooth","z":"394fcece.136712","name":"Calc Max","property":"payload","action":"max","count":"360","round":"2","mult":"single","reduce":false,"x":740,"y":140,"wires":[["b0771170.d405c"]]},{"id":"b0771170.d405c","type":"change","z":"394fcece.136712","name":"Max","rules":[{"t":"change","p":"topic","pt":"msg","from":"RelHum","fromt":"str","to":"Max","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":140,"wires":[["582e9472.71b22c"]]},{"id":"be0dce00.c5e13","type":"smooth","z":"394fcece.136712","name":"Calc Max","property":"payload","action":"max","count":"360","round":"","mult":"single","reduce":false,"x":740,"y":260,"wires":[["bf763bc4.c0bc18"]]},{"id":"e166f98e.7d66f8","type":"smooth","z":"394fcece.136712","name":"Calc Min","property":"payload","action":"min","count":"360","round":"","mult":"single","reduce":false,"x":740,"y":300,"wires":[["2042f190.5d2bce"]]},{"id":"bf763bc4.c0bc18","type":"change","z":"394fcece.136712","name":"Max","rules":[{"t":"change","p":"topic","pt":"msg","from":"CO2","fromt":"str","to":"Max","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":260,"wires":[["d234387f.02bb28"]]},{"id":"2042f190.5d2bce","type":"change","z":"394fcece.136712","name":"Min","rules":[{"t":"change","p":"topic","pt":"msg","from":"CO2","fromt":"str","to":"Min","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":300,"wires":[["d234387f.02bb28"]]},{"id":"24b8446a.9a74ac","type":"delay","z":"394fcece.136712","name":"5 sec","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":590,"y":300,"wires":[["be0dce00.c5e13","e166f98e.7d66f8","d234387f.02bb28"]]},{"id":"d6f0e66d.b954d8","type":"delay","z":"394fcece.136712","name":"5 sec","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":590,"y":60,"wires":[["ee67fbe.e613308","7a68b6ba.b07c68","b570ad02.c65f4"]]},{"id":"51fc4b4e.8edf44","type":"delay","z":"394fcece.136712","name":"5 sec","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":590,"y":180,"wires":[["96d969c6.be2b98","101b9d27.13f603","582e9472.71b22c"]]},{"id":"b2a8bc76.aacca","type":"daemon","z":"394fcece.136712","name":"SGP30 BME280","command":"/usr/bin/python3","args":"/home/pi/Documents/SGP30_BME280_test.py","autorun":true,"cr":false,"redo":false,"op":"string","closer":"SIGKILL","x":140,"y":80,"wires":[["671787f5.117a08"],["1db214d.bcbedeb"],[]]},{"id":"671787f5.117a08","type":"python3-function","z":"394fcece.136712","name":"2 msg","func":"# Released under Beer License\n# Clear any leading or trailing whitespace\nOrigStr = msg['payload']\n# get rid of carriage returnsand leading whitespace\nOrigStr = OrigStr.lstrip()\nOrigStr = OrigStr.replace('\\r','')\nif len(OrigStr) >6:\n # Save only the first line\n TmpStr = OrigStr.partition(\"\\n\")[0]\n TmpStr = TmpStr.replace('\\n','')\n # Turn it into an array\n TmpArray = TmpStr.split(\"|\")\n try:\n # Form the msg object\n msg = {\n \"topic\": TmpArray[0],\n \"payload\": round(float(TmpArray[1]),2)\n }\n # return the msg\n return [msg,None]\n except:\n # Form the msg object\n msg = {\n \"topic\": \"Debug\",\n \"payload\": OrigStr\n }\n # return the msg\n return [None,msg]\nelse:\n # return the msg\n return [None,None]","outputs":2,"x":270,"y":200,"wires":[["af7974d1.62fb98"],["1db214d.bcbedeb"]]},{"id":"1db214d.bcbedeb","type":"debug","z":"394fcece.136712","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":380,"wires":[]},{"id":"af7974d1.62fb98","type":"switch","z":"394fcece.136712","name":"Split msg","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"Temp","vt":"str"},{"t":"eq","v":"RelHum","vt":"str"},{"t":"eq","v":"eCO2","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":420,"y":180,"wires":[["d6f0e66d.b954d8","336a5d64.79aa02"],["51fc4b4e.8edf44","8d5a4f65.5ecd4"],["24b8446a.9a74ac","b5770088.dc9d3"]]},{"id":"b570ad02.c65f4","type":"ui_chart","z":"394fcece.136712","name":"Temp","group":"54991333.36cc3c","order":4,"width":9,"height":3,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"30","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1010,"y":40,"wires":[[]]},{"id":"582e9472.71b22c","type":"ui_chart","z":"394fcece.136712","name":"Humid","group":"54991333.36cc3c","order":2,"width":9,"height":3,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"60","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1010,"y":160,"wires":[[]]},{"id":"d234387f.02bb28","type":"ui_chart","z":"394fcece.136712","name":"CO2","group":"df17b484.5087f8","order":2,"width":9,"height":3,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"400","ymax":"2000","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1010,"y":280,"wires":[[]]},{"id":"54991333.36cc3c","type":"ui_group","name":"Environment (BME280)","tab":"fc7ad6e.40b8028","order":5,"disp":true,"width":12,"collapse":true},{"id":"df17b484.5087f8","type":"ui_group","name":"Gasses (SGP30)","tab":"fc7ad6e.40b8028","order":6,"disp":true,"width":12,"collapse":true},{"id":"fc7ad6e.40b8028","type":"ui_tab","name":"Grow Tent","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
Next weekend, I'll tackle the Stemma soil sensors, hopefully it removes some of the errors and issues I have seen. IMHO, it will.