hi
I am improving my big terrarium. In the past I have always had just one DHT11 sensor that manages everything with humidity and temperature. but now I have installed one more dht11 sensors now i have one on each side of my terrarium. Both sensors working and I can read from both perfectly with debug node.
How can I get these two dht11 sensors to combine temperature and humidity from two sensors to an average of temperature and humidity ??
i will post my code here . i just need to combine these two dht11 readings to one humidity and one temp an average reading of them:)
[{"id":"a7b0a831.841918","type":"rpi-dht22","z":"4251d470.1c915c","name":"","topic":"","dht":"11","pintype":"0","pin":"18","x":100,"y":180,"wires":[["44272692.13bb08","5d669d73.d1caa4"]]},{"id":"44272692.13bb08","type":"function","z":"4251d470.1c915c","name":"temp","func":"msg.payload = parseFloat(msg.payload);\nmsg.topic = \"setCurrent\";\nreturn msg;","outputs":"1","noerr":0,"x":430,"y":240,"wires":[["f5bb641.1885498","97280427.1e4f98"]]},{"id":"5d669d73.d1caa4","type":"function","z":"4251d470.1c915c","name":"humidity","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":417,"y":443,"wires":[["5abcc52c.fa196c"]]},{"id":"bac5eb36.3f9708","type":"inject","z":"4251d470.1c915c","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"x":110,"y":420,"wires":[["ce2ea1b.95b446"]]},{"id":"5d7abef9.f5c39","type":"ui_gauge","z":"4251d470.1c915c","name":"himidity right","group":"65a5d52b.64a33c","order":2,"width":"6","height":"6","gtype":"gage","title":"luftfuktighet ","label":"%","format":"{{value}}","min":0,"max":"80","colors":["#0000ff","#00ff00","#ff0000"],"seg1":"54","seg2":"72","x":750,"y":520,"wires":[]},{"id":"e07766b6.bb5338","type":"ui_chart","z":"4251d470.1c915c","name":"luft temprature graf","group":"bd624b81.654bd8","order":1,"width":"4","height":"5","label":"luft temperatur ","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"50","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#008000","#aec7e8","#ff7f0e","#ff0000","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":810,"y":140,"wires":[[],[]]},{"id":"f5bb641.1885498","type":"ramp-thermostat","z":"4251d470.1c915c","name":"","profile":"1611a792.9e3828","hysteresisplus":"0","hysteresisminus":"0","x":600,"y":140,"wires":[["48da2f34.1a431"],["e07766b6.bb5338"],["e07766b6.bb5338"]]},{"id":"48da2f34.1a431","type":"change","z":"4251d470.1c915c","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":100,"wires":[["53b81b33.989104","1b75c102.44973f","d3ac52d8.3d93d"]]},{"id":"ce2ea1b.95b446","type":"rpi-dht22","z":"4251d470.1c915c","name":"","topic":"","dht":"11","pintype":"0","pin":"27","x":120,"y":580,"wires":[[]]},{"id":"d982108e.b5cee","type":"function","z":"4251d470.1c915c","name":"temp","func":"msg.payload = parseFloat(msg.payload);\nmsg.topic = \"setCurrent\";\nreturn msg;","outputs":"1","noerr":0,"x":790,"y":340,"wires":[["3fbf1af7.a6f4d6","1af90d58.835b53","c3b2a8de.811308"]]},{"id":"3fbf1af7.a6f4d6","type":"ramp-thermostat","z":"4251d470.1c915c","name":"","profile":"2b8f252f.c13d4a","hysteresisplus":"0","hysteresisminus":"0","x":940,"y":520,"wires":[["b88930f.8685ed"],["abfe512c.2f95c"],["abfe512c.2f95c"]]},{"id":"1af90d58.835b53","type":"ramp-thermostat","z":"4251d470.1c915c","name":"","profile":"930ab0cd.06875","hysteresisplus":"0","hysteresisminus":"0","x":940,"y":400,"wires":[["8fc716b7.d7d9a8"],[],[]]},{"id":"97280427.1e4f98","type":"ui_gauge","z":"4251d470.1c915c","name":"air temp right","group":"65a5d52b.64a33c","order":1,"width":"6","height":"6","gtype":"gage","title":"luft temperatur","label":"°C","format":"{{value}}","min":0,"max":"40","colors":["#0000ff","#00ff00","#ff0000"],"seg1":"23","seg2":"26","x":610,"y":220,"wires":[]},{"id":"c3b2a8de.811308","type":"ramp-thermostat","z":"4251d470.1c915c","name":"","profile":"753c6a4c.80e8f4","hysteresisplus":"0","hysteresisminus":"0","x":940,"y":280,"wires":[["d00b6bcc.b65be8"],["e6b2a492.d61268"],["e6b2a492.d61268"]]},{"id":"c185ef70.42e62","type":"inject","z":"4251d470.1c915c","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"x":110,"y":380,"wires":[["a7b0a831.841918"]]},{"id":"5abcc52c.fa196c","type":"change","z":"4251d470.1c915c","name":"","rules":[{"t":"set","p":"humidity","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":613,"y":442,"wires":[["d982108e.b5cee","5d7abef9.f5c39"]]},{"id":"776b0937.0d8cd8","type":"comment","z":"4251d470.1c915c","name":"steg 1 fläkt 5v","info":"","x":930,"y":232,"wires":[]},{"id":"8958cbc7.313ae8","type":"comment","z":"4251d470.1c915c","name":"luftfuktare","info":"","x":920,"y":360,"wires":[]},{"id":"d323b8d9.a10808","type":"comment","z":"4251d470.1c915c","name":"steg 2 fläkt 12v","info":"","x":940,"y":480,"wires":[]},{"id":"44523e81.d8aa2","type":"debug","z":"4251d470.1c915c","name":"","active":false,"console":"false","complete":"true","x":631,"y":383,"wires":[]},{"id":"65a5d52b.64a33c","type":"ui_group","z":"","name":"mätare luftfuktighet","tab":"91e4af9a.f1a05","order":2,"disp":true,"width":"6"},{"id":"bd624b81.654bd8","type":"ui_group","z":"","name":"status luft tempratur/markvärme","tab":"ea8432c0.64854","order":3,"disp":true,"width":"6"},{"id":"1611a792.9e3828","type":"profile","z":"","name":"temp luft","time1":"00:00","temp1":"23.5","time2":"08:00","temp2":"23.5","time3":"08:01","temp3":"26","time4":"20:00","temp4":"26","time5":"20:01","temp5":"23.5","time6":"23:59","temp6":"23.5","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"2b8f252f.c13d4a","type":"profile","z":"","name":"fukt 12v","time1":"00:00","temp1":"74","time2":"08:00","temp2":"74","time3":"08:01","temp3":"70","time4":"20:00","temp4":"70","time5":"20:01","temp5":"74","time6":"23:59","temp6":"74","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"930ab0cd.06875","type":"profile","z":"","name":"luftfuktare","time1":"00:00","temp1":"70","time2":"08:00","temp2":"70","time3":"08:01","temp3":"63.8","time4":"20:00","temp4":"63.8","time5":"20:01","temp5":"70","time6":"23:59","temp6":"70","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"753c6a4c.80e8f4","type":"profile","z":"","name":"fukt 5v fläkt","time1":"00:00","temp1":"71","time2":"08:00","temp2":"71","time3":"08:01","temp3":"64.5","time4":"20:00","temp4":"64.5","time5":"20:01","temp5":"71","time6":"23:59","temp6":"71","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"91e4af9a.f1a05","type":"ui_tab","z":"","name":"terrarium","icon":"dashboard","order":1},{"id":"ea8432c0.64854","type":"ui_tab","z":"","name":"grafer över 2 dagar","icon":"dashboard","order":3}]