RPI 3b+
NPM V 1.4.21
Node-RED version: v0.19.4
Node.js version: v8.11.1
Linux 4.14.98-v7+ arm LE
Dashboard version 2.9.4
I have had a flow controlling my greenhouse for over a year now and the temperature chart was working fine.
I changed sensor's from a DHT11 to a DS18B20 and tried to implement storing the chart data into a DB.
Somehow after this (I put the DB storage on the back burner till I get the chart figured out) I managed to break the chart. I have tried making a new chart as well as several different x axis changes all with the same affect.
Any guidance here would be greatly appreciated!
The temperature chart is the one not working, the humidity chart is lacking a sensor at the moment.
Cheers,
Jon!
Screenshot%20from%202019-04-07%2008-11-51|690x388
[{"id":"993877f1.f3fa68","type":"ui_text","z":"703220a0.a620a","group":"f8030058.e1e44","order":1,"width":0,"height":0,"name":"DateTime","label":"","format":"{{payload | date:\"yyyy-MM-dd HH:mm\"}}","layout":"row-center","x":343.5,"y":37.599998474121094,"wires":[]},{"id":"f7dd3c96.bf098","type":"delay","z":"703220a0.a620a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":473.18750762939453,"y":379.4663791656494,"wires":[["7cc57f79.ec46c"]]},{"id":"e6a66c18.729e2","type":"ui_gauge","z":"703220a0.a620a","name":"Temperature","group":"f8030058.e1e44","order":2,"width":"5","height":"4","gtype":"gage","title":"temp","label":"C","format":"{{value | number: 1}}","min":"-50","max":"60","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":472.2143669128418,"y":140.7142858505249,"wires":[]},{"id":"c7c44d7d.57588","type":"ui_chart","z":"703220a0.a620a","name":"Humidity Chart","group":"f8030058.e1e44","order":5,"width":"5","height":"4","label":"Humidity Chart","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"48","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":629.5000076293945,"y":264.80001640319824,"wires":[[],[]]},{"id":"8d112433.654dd8","type":"ui_chart","z":"703220a0.a620a","name":"Temperature Chart","group":"f8030058.e1e44","order":3,"width":"5","height":"4","label":"Temperature","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"invalid data","dot":false,"ymin":"-18","ymax":"45","removeOlder":"3","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":671.5000076293945,"y":189.7999930381775,"wires":[[],[]]},{"id":"6257b2ab.2ee58c","type":"rpi-gpio out","z":"703220a0.a620a","name":"","pin":"35","set":"","level":"0","freq":"","out":"out","x":819.2143592834473,"y":371.142972946167,"wires":[]},{"id":"829f1798.f7d1c8","type":"function","z":"703220a0.a620a","name":"Temperature","func":"msg.payload.value = msg.payload;\n\n\nreturn msg;","outputs":1,"noerr":0,"x":274.2142791748047,"y":190.71429443359375,"wires":[["9377859c.ac9998","e6a66c18.729e2"]]},{"id":"6001717d.db97f","type":"bigtimer","z":"703220a0.a620a","outtopic":"","outpayload1":"","outpayload2":"","name":"Big Timer","lat":"43.621433","lon":"-80.345693","starttime":"660","endtime":"1080","startoff":0,"endoff":0,"offs":0,"outtext1":"false","outtext2":"true","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":289.00000762939453,"y":459.00001335144043,"wires":[[],[],["972245d9.182218"]]},{"id":"972245d9.182218","type":"delay","z":"703220a0.a620a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":452.0120086669922,"y":461.54085540771484,"wires":[["f3c367c4.74c3b8"]]},{"id":"521a9dbc.1c8b24","type":"function","z":"703220a0.a620a","name":"exhaustFanControl","func":"// see if its hot enough to run the exhaust fan\nvar tmpSetpoint = 30; //what temp to actuate exhaust fan\nvar tmp = msg.payload;\nvar result;\ncontrolExhaustFan();\nfunction controlExhaustFan(){\n // node.warn(tmp);\nif(tmp > tmpSetpoint)\n{\n result = \"auto\";\n msg.payload = result;\n node.send(msg);\n}\nelse{\nresult = \"off\";\nmsg.payload = result;\nnode.send(msg);\n//node.warn(msg.payload);\n}\n}\nreturn null;\n","outputs":1,"noerr":0,"x":112.00001525878906,"y":383.3333349227905,"wires":[["242e1dd3.a25412"]]},{"id":"5243c13f.4174b","type":"inject","z":"703220a0.a620a","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":true,"onceDelay":"1","x":88.5,"y":35.80000305175781,"wires":[["993877f1.f3fa68"]]},{"id":"f3c367c4.74c3b8","type":"ui_switch","z":"703220a0.a620a","name":"Fan","label":"Fan","group":"f8030058.e1e44","order":9,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"str","onicon":"","oncolor":"","offvalue":"true","offvalueType":"str","officon":"","offcolor":"","x":589,"y":457.5715055465698,"wires":[["509455df.50468c"]]},{"id":"c72f2f13.7acd1","type":"function","z":"703220a0.a620a","name":"Humidity","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":253.2142791748047,"y":262.71429443359375,"wires":[["4e73e706.d55318","bba32093.7a1f1"]]},{"id":"bba32093.7a1f1","type":"aggregator","z":"703220a0.a620a","name":"","topic":"","intervalCount":1,"intervalUnits":"h","submitIncompleteInterval":true,"aggregationType":"mean","x":459.0120391845703,"y":263.0023994445801,"wires":[["c7c44d7d.57588"]]},{"id":"1aafe04e.0a669","type":"ui_switch","z":"703220a0.a620a","name":"Drip System","label":"Drip System","group":"f8030058.e1e44","order":7,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"str","onicon":"","oncolor":"","offvalue":"true","offvalueType":"str","officon":"","offcolor":"","x":483,"y":521.5714998245239,"wires":[["e979059a.f52018"]]},{"id":"b1875c23.7eaac","type":"ui_switch","z":"703220a0.a620a","name":"Mist","label":"Mist","group":"f8030058.e1e44","order":8,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"str","onicon":"","oncolor":"","offvalue":"true","offvalueType":"str","officon":"","offcolor":"","x":460.00006103515625,"y":583.5715017318726,"wires":[["f15a8aa8.c1bd68"]]},{"id":"e979059a.f52018","type":"rpi-gpio out","z":"703220a0.a620a","name":"","pin":"37","set":"","level":"0","freq":"","out":"out","x":759.0000190734863,"y":521.5715007781982,"wires":[]},{"id":"509455df.50468c","type":"rpi-gpio out","z":"703220a0.a620a","name":"","pin":"40","set":"","level":"0","freq":"","out":"out","x":760.0000610351562,"y":462.57154655456543,"wires":[]},{"id":"242e1dd3.a25412","type":"bigtimer","z":"703220a0.a620a","outtopic":"","outpayload1":"","outpayload2":"","name":"Big Timer","lat":"43.621433","lon":"-80.345693","starttime":"5000","endtime":"1305","startoff":0,"endoff":0,"offs":0,"outtext1":"false","outtext2":"true","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":299.500057220459,"y":379.50008392333984,"wires":[[],[],["f7dd3c96.bf098"]]},{"id":"61b574e5.57620c","type":"bigtimer","z":"703220a0.a620a","outtopic":"","outpayload1":"","outpayload2":"","name":"Big Timer","lat":"43.621433","lon":"-80.345693","starttime":"570","endtime":"585","startoff":0,"endoff":0,"offs":0,"outtext1":"false","outtext2":"true","timeout":1440,"sun":true,"mon":true,"tue":false,"wed":false,"thu":true,"fri":false,"sat":true,"jan":false,"feb":false,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":285.00000381469727,"y":524.0000152587891,"wires":[[],[],["1aafe04e.0a669"]]},{"id":"4e73e706.d55318","type":"ui_gauge","z":"703220a0.a620a","name":"Humidity","group":"f8030058.e1e44","order":4,"width":"5","height":"4","gtype":"gage","title":"hum","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":469.2142791748047,"y":316.71429443359375,"wires":[]},{"id":"be123910.15e8d8","type":"function","z":"703220a0.a620a","name":"mistControl","func":"//gets the temp and humidity reading from the DHT11\nvar hum = msg.humidity;\nvar tmp = msg.payload;\nvar result;\n//node.warn('timer');\nsetInterval(function(){\n// node.warn('timer');\n var hour = new Date().getHours();\n if (hour >= 8 && hour < 10) {\n controlMister(); \n }\n //else{\n //set the switch default to off\n //msg.payload = \"true\";\n //node.warn(msg.payload);\n //return msg;\n \n // }\n} , 1000*60);\nfunction controlMister(){\nif(hum < 10 && tmp > 40)\n{\n result = \"false\";\n}\n else\n{\n result = \"true\";\n}\n//node.warn(result);\n//return msg;\nmsg.payload = result;\nnode.send(msg);\n//node.warn(msg.payload);\n}\n\n//msg.payload = result;\nreturn null;\n","outputs":1,"noerr":0,"x":124.50000762939453,"y":586.8000659942627,"wires":[["b1875c23.7eaac"]]},{"id":"7cc57f79.ec46c","type":"ui_switch","z":"703220a0.a620a","name":"Exhaust Fan","label":"Exhaust Fan","group":"f8030058.e1e44","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"str","onicon":"","oncolor":"","offvalue":"true","offvalueType":"str","officon":"","offcolor":"","x":642.2143402099609,"y":372.2858009338379,"wires":[["6257b2ab.2ee58c"]]},{"id":"5951ebea.c7eef4","type":"inject","z":"703220a0.a620a","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":104.21427917480469,"y":103.57144165039062,"wires":[["62f5d775.4bf288"]]},{"id":"f15a8aa8.c1bd68","type":"rpi-gpio out","z":"703220a0.a620a","name":"","pin":"38","set":"","level":"0","freq":"","out":"out","x":757.0000114440918,"y":577.5715007781982,"wires":[]},{"id":"9377859c.ac9998","type":"aggregator","z":"703220a0.a620a","name":"","topic":"","intervalCount":1,"intervalUnits":"m","submitIncompleteInterval":true,"aggregationType":"mean","x":461.50240325927734,"y":185.47114753723145,"wires":[["8d112433.654dd8"]]},{"id":"f5c06d02.0df5c","type":"rpi-dht22","z":"703220a0.a620a","name":"","topic":"rpi-dht11","dht":"11","pintype":"0","pin":"17","x":65,"y":192.00000286102295,"wires":[[]]},{"id":"62f5d775.4bf288","type":"rpi-ds18b20","z":"703220a0.a620a","topic":"","array":false,"name":"","x":500.50000762939453,"y":79.00000286102295,"wires":[["521a9dbc.1c8b24","829f1798.f7d1c8"]]},{"id":"13957e9f.b3d471","type":"file","z":"703220a0.a620a","name":"","filename":"/home/pi/Downloads/chart.log","appendNewline":true,"createDir":true,"overwriteFile":"false","x":1331.3999633789062,"y":284,"wires":[[]]},{"id":"775380b.1e3a28","type":"file in","z":"703220a0.a620a","name":"","filename":"/home/pi/Downloads/chart.log","format":"utf8","sendError":true,"x":1119.3999633789062,"y":422.00001335144043,"wires":[["70a3b472.7ef91c"]]},{"id":"90bead2a.fbff9","type":"json","z":"703220a0.a620a","name":"","property":"payload","action":"","pretty":false,"x":1271.3999633789062,"y":124,"wires":[["aef79578.510d78"]]},{"id":"53098fd.b96597","type":"json","z":"703220a0.a620a","name":"","property":"payload","action":"","pretty":false,"x":1480.399917602539,"y":361.0000114440918,"wires":[[]]},{"id":"aef79578.510d78","type":"function","z":"703220a0.a620a","name":"","func":"//if (msg.topic === \"save\") {\n// msg.payload = context.last;\nmsg.payload = msg.payload;\n return msg;\n//}\n//else {\n // context.last = msg.payload;\n//}\n//return null;","outputs":1,"noerr":0,"x":1011.3999633789062,"y":284,"wires":[["13957e9f.b3d471"]]},{"id":"74bcfabd.c9d704","type":"inject","z":"703220a0.a620a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":"0.5","x":902.5000228881836,"y":422.00001335144043,"wires":[["775380b.1e3a28"]]},{"id":"70a3b472.7ef91c","type":"debug","z":"703220a0.a620a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1168.5000305175781,"y":493.0000162124634,"wires":[]},{"id":"f8030058.e1e44","type":"ui_group","z":"","name":"Herons Greenhouse","tab":"2be2b3e4.c80b5c","disp":true,"width":"10","collapse":true},{"id":"2be2b3e4.c80b5c","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]