Ich habe mir gedacht das ich da mal ein neues Topic öffne.
Das meiste dazu steht unter Mosfetboard - Licht per Taster steuern
Anders wie in der Beschreibung node-red-contrib-bme280 steht, gibt der Sensor keinen Taupunkt heraus.
Taupunkt bzw. Taupunkdifferenz aber zum Steuern eines Lüfter (Bad) wichtig wäre.
Deshalb habe ich mal ein paar Formeln zusammen gesucht um das zu berechnen.
Und für die Thermikflieger unter uns gibt es dann auch noch die theoretische Wolkenbasis.(dazu muss der Sensor natürlich Aussen montiert werden).
Natürlich könnte man für den Taupunkt auch “Temperatur/100*Feuchte” rechnen, aber das könnte zu ungenau werden.
[{"id":"0e694dfcbb29785b","type":"inject","z":"e361b386bb2b9c95","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"20","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":1470,"y":320,"wires":[["c7ee44f44d8543ae"]]},{"id":"8c82135dd7e2331e","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":1,"width":6,"height":6,"gtype":"gage","title":"Temperatur BME280","label":"°C","format":"{{payload.temperature_C}}°C","min":0,"max":"50","colors":["#0080c0","#00ff00","#ca3838"],"seg1":"19","seg2":"23","className":"","x":1920,"y":280,"wires":[]},{"id":"25dd3a2da431729b","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":3,"width":6,"height":6,"gtype":"gage","title":"Luftdruck BME280","label":"hPa","format":"{{payload.pressure_hPa | number: 2}} hPa","min":"900","max":"1060","colors":["#ff0000","#00ff00","#00ff00"],"seg1":"980","seg2":"1100","className":"","x":1910,"y":320,"wires":[]},{"id":"c7ee44f44d8543ae","type":"Bme280","z":"e361b386bb2b9c95","name":"BME 280","bus":"1","address":"0x76","topic":"bme280","extra":false,"x":1640,"y":320,"wires":[["8c82135dd7e2331e","25dd3a2da431729b","daa531a85d78001a","06354fa52f6e9a52","ffe3f92edaa64cfd","b14b15fa7643382a","08a4ab2a23526bbd","912f17c43aab9c18"]],"icon":"node-red/trigger.svg"},{"id":"daa531a85d78001a","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":11,"width":0,"height":0,"name":"","label":"Temperatur BME280","format":"{{payload.temperature_C}}°C","layout":"row-spread","className":"","x":2140,"y":280,"wires":[]},{"id":"06354fa52f6e9a52","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":12,"width":0,"height":0,"name":"","label":"Luftdruck BME280","format":"{{payload.pressure_hPa | number: 2}}.hPa","layout":"row-spread","className":"","x":2130,"y":320,"wires":[]},{"id":"f4cae36195083531","type":"ui_chart","z":"e361b386bb2b9c95","name":"Luftdruck","group":"3b6ad61d87ca07d7","order":8,"width":7,"height":4,"label":"{{topic}}: {{msg.payload}} hPa","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"cubic","nodata":"waiting for readings","dot":false,"ymin":"900","ymax":"1060","removeOlder":"3","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":2160,"y":360,"wires":[[]]},{"id":"b14b15fa7643382a","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":4,"width":6,"height":6,"gtype":"gage","title":"Feuchte BME280","label":"hPa","format":"{{payload.humidity| number: 2}} %","min":"0","max":"100","colors":["#ff0000","#00ff00","#00ff00"],"seg1":"980","seg2":"1100","className":"","x":1930,"y":400,"wires":[]},{"id":"ffe3f92edaa64cfd","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":13,"width":0,"height":0,"name":"","label":"Feuchte BME280","format":"{{payload.humidity | number: 2}}.%","layout":"row-spread","className":"","x":2150,"y":400,"wires":[]},{"id":"08a4ab2a23526bbd","type":"function","z":"e361b386bb2b9c95","name":"","func":"\nmsg.payload = msg.payload.pressure_hPa | 2;\nvar name = \"BME280\";\nmsg.topic = name; \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1960,"y":360,"wires":[["f4cae36195083531"]]},{"id":"4aea3b225fe45265","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":2,"width":6,"height":6,"gtype":"gage","title":"Taupunkt BME280","label":"°C","format":"{{payload.Taupunkt}}°C","min":0,"max":"50","colors":["#0080c0","#00ff00","#ca3838"],"seg1":"19","seg2":"23","className":"","x":1910,"y":240,"wires":[]},{"id":"cc56cb43f336a3f6","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":11,"width":0,"height":0,"name":"","label":"Taupunkt BME280","format":"{{payload.Taupunkt}}°C","layout":"row-spread","className":"","x":2130,"y":240,"wires":[]},{"id":"912f17c43aab9c18","type":"function","z":"e361b386bb2b9c95","name":"function 2","func":"var r = msg.payload.humidity ;\nvar t = msg.payload.temperature_C;\nvar tp = 0.000;\n// Konstante\nvar mw = 18.016; //Molekulargewicht des Wasserdampfes (kg/kmol)\nvar gk = 8314.3; // universelle Gaskonstante (J/(kmol*K))\nvar t0 = 273.15; // Absolute Temperatur von 0 °C (Kelvin)\nvar tk = t + t0; // Temperatur in Kelvin\n\nvar a ;\nvar b ;\nif (t >= 0) {\n a = 7.5;\n b = 237.3;\n} else if (t < 0) {\n a = 7.6;\n b = 240.7;\n}\n\n\n// Sättigungsdampfdruck (hPa)\nvar sdd = 6.1078 * Math.pow(10, (a * t) / (b + t));\n\n// Dampfdruck (hPa)\nvar dd = sdd * (r / 100);\n\n// Wasserdampfdichte bzw. absolute Feuchte (g/m3)\nvar af = Math.pow(10, 5) * mw / gk * dd / tk;\n\n// v-Parameter\nvar v = Math.log10(dd / 6.1078);\n\n// Taupunkttemperatur (°C)\ntp = Math.round(((b * v) / (a - v)) * 100) / 100 |2;\n\n//Taupunktdifferenz (°C)\nvar Spread = t - tp | 2;\n\n//Trockenadiabate Abkühlung 0, 98°C / 100m\nvar TA = 0.89;\n\n//Hebungskondesationsniveau(Wolkenbasis)\nvar HKN = Spread / TA * 100 |2;\n\n\nmsg.payload = {}\nmsg.payload.Temperatur = t\nmsg.payload.Luftfeuchtigkeit = r\nmsg.payload.Taupunkt =tp\nmsg.payload.Taupunktdifferenz = Spread\nmsg.payload.Wolkenbasis = HKN\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1640,"y":280,"wires":[["cc56cb43f336a3f6","4aea3b225fe45265","67b9c462d1af5a02","9e5ad0b58e86d65e","ef27d861415ceac6","da1113f3a3850f1e","954859888e97b439"]]},{"id":"67b9c462d1af5a02","type":"debug","z":"e361b386bb2b9c95","name":"debug 62","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1640,"y":240,"wires":[]},{"id":"9e5ad0b58e86d65e","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":5,"width":6,"height":6,"gtype":"gage","title":"Wolkenbasis BME280","label":"°C","format":"{{payload.Wolkenbasis}}m","min":0,"max":"3000","colors":["#0080c0","#00ff00","#ca3838"],"seg1":"1000","seg2":"2000","className":"","x":1940,"y":200,"wires":[]},{"id":"ef27d861415ceac6","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":11,"width":0,"height":0,"name":"","label":"Wolkenbasis BME280","format":"{{payload.Wolkenbasis}}m","layout":"row-spread","className":"","x":2160,"y":200,"wires":[]},{"id":"da1113f3a3850f1e","type":"ui_gauge","z":"e361b386bb2b9c95","name":"","group":"3b6ad61d87ca07d7","order":6,"width":6,"height":6,"gtype":"gage","title":"Taupunktdiff BME280","label":"°C","format":"{{payload.Taupunktdifferenz}}°C","min":0,"max":"50","colors":["#0080c0","#00ff00","#ca3838"],"seg1":"19","seg2":"23","className":"","x":1940,"y":160,"wires":[]},{"id":"954859888e97b439","type":"ui_text","z":"e361b386bb2b9c95","group":"b8db3199.f0dbe","order":11,"width":0,"height":0,"name":"","label":"Taupunktdiff BME280","format":"{{payload.Taupunktdifferenz}}°C","layout":"row-spread","className":"","x":2160,"y":160,"wires":[]},{"id":"3b6ad61d87ca07d7","type":"ui_group","name":"Test","tab":"c90a4b846a216fa4","order":2,"disp":true,"width":12,"collapse":false,"className":""},{"id":"b8db3199.f0dbe","type":"ui_group","name":"Temperature","tab":"deee53a800de461d","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c90a4b846a216fa4","type":"ui_tab","name":"Test","icon":"build","order":22,"disabled":false,"hidden":false},{"id":"deee53a800de461d","type":"ui_tab","name":"Info","icon":"mi-info","order":1,"disabled":false,"hidden":false}]
LG Arno