Correction air pressure value

master
Joachim Hummel 3 years ago
parent 486f48d2d5
commit 36ec8e6584
  1. BIN
      Screenshot.png
  2. 2
      flow.json

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 189 KiB

@ -1 +1 @@
[{"id":"d4edf1e8.f7b4","type":"tab","label":"APRS Bake","disabled":false,"info":""},{"id":"9980bb7a.0cc4e8","type":"mqtt in","z":"d4edf1e8.f7b4","name":"Joachim","topic":"/aprs/joachim/bake","qos":"2","datatype":"json","broker":"6f75b16.845ebd","x":166,"y":281,"wires":[["944c4462.a1aa38"]]},{"id":"944c4462.a1aa38","type":"function","z":"d4edf1e8.f7b4","name":"Bake","func":"var temp = msg.payload.sensordatavalues[2].value;\nvar hum = msg.payload.sensordatavalues[3].value;\nvar press = msg.payload.sensordatavalues[4].value;\n\n// Convert Celsius to Fahrenheit / APRS Protocol\nvar tempF = ((temp*1.8)+32); \nvar press2 = (press/100);\nvar hum2 = (hum*1);\n// Erase decimal points\nvar tempP = parseFloat(tempF.toFixed(0)); \nvar pressP = parseFloat(press2.toFixed(0));\nvar humP = parseFloat(hum2.toFixed(0));\n\nvar msg1 = { payload: \"user CALL pass XXXX\" };\nvar msg2 = { payload: \"CALL-1>APRS,TCPIP*:!4808.30N/01125.75E_000/000g000t0\"+tempP+\"r000p000P000h\"+humP+\"b0\"+pressP+\"0wRSW\" }; \nvar msg3 = { payload: \"CALL-1>APRS,TCPIP*:>Maker Themen, LoraWAN, Arduino, Raspberry, SmartHome und AFU\" }; \nvar msg4 = { payload: \"File löschen\" }; \nreturn [ [ msg1, msg2, msg3 ], msg4 ]\n\n\n","outputs":4,"noerr":0,"x":349,"y":282,"wires":[["3a4bcfa0.cee858","54d45ce4.3e7be4","2169afad.7cb8"],["ea334a98.e6402"],[],[]]},{"id":"3a4bcfa0.cee858","type":"delay","z":"d4edf1e8.f7b4","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":575,"y":233,"wires":[["a3b90d5f.b33db"]]},{"id":"a3b90d5f.b33db","type":"exec","z":"d4edf1e8.f7b4","command":"/bin/nc -w 10 195.190.142.207 14580 < /var/tmp/bake.txt","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"APRS Bake","x":784,"y":234,"wires":[[],[],[]]},{"id":"54d45ce4.3e7be4","type":"file","z":"d4edf1e8.f7b4","name":"Bake File","filename":"/var/tmp/bake.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"utf8","x":560,"y":283,"wires":[[]]},{"id":"ea334a98.e6402","type":"delay","z":"d4edf1e8.f7b4","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":569,"y":338,"wires":[["252039d8.146c3e"]]},{"id":"252039d8.146c3e","type":"file","z":"d4edf1e8.f7b4","name":"Bake File löschen","filename":"/var/tmp/bake.txt","appendNewline":true,"createDir":false,"overwriteFile":"delete","encoding":"utf8","x":792,"y":339,"wires":[[]]},{"id":"ee0e37dc.7ecd4","type":"http request","z":"d4edf1e8.f7b4","name":"","method":"GET","ret":"obj","url":"http://192.168.10.27/data.json","tls":"","x":411,"y":444,"wires":[["c2160986.0f2698"]]},{"id":"a73f8fa6.6c6cc8","type":"inject","z":"d4edf1e8.f7b4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"*/15 0-22 * * *","once":false,"onceDelay":0.1,"x":196,"y":443,"wires":[["ee0e37dc.7ecd4"]]},{"id":"2169afad.7cb8","type":"debug","z":"d4edf1e8.f7b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":544,"y":182,"wires":[]},{"id":"c2160986.0f2698","type":"mqtt out","z":"d4edf1e8.f7b4","name":"Joachim","topic":"/aprs/joachim/bake","qos":"","retain":"","broker":"6f75b16.845ebd","x":609,"y":444,"wires":[]},{"id":"3f2828ed.127e48","type":"comment","z":"d4edf1e8.f7b4","name":"Info zu dem Programm : APRS Bake","info":"Dieses Programm liest folgende Wetterdaten \n\n * Temperatur\n * Luftdruck\n * Luftfeuchtigkeit \n\n \nIn dem Funktionsblock \"Bake\" müssen die Werte für\n\n * eigene Rufzeichen und \n * Passwort \n * Koordinaten \nangepasst werden.\n\nDer Syntax für APRS ist nicht fehlertolerant \nund liefert keine Fehlermeldungen zurück.\nAußerdem können die Wetterdaten nur alle 15 Minuten\ngesendet werden, damit diese aktualisiert werden.\nEin kürzerer Intervall bringt nichts und wird schlichtweg\nignoriert. \n\nAls MQTT-Broker nehmen ich meinen eigenen unter mqtt.unixweb.de.\nDie Topics und Broker können natürlich für die eigene Umgebung angepasst werden.\nDie Anbindung an anderen Sensoren die ebenfalls an einen MQTT-Broker Daten \nversenden, können individuell angepasst werden. \n\nViel Spaß und Erfolg wünscht , Joachim Hummel\nWeitere Infos sind zu finden unter: https://blog.unixweb.de\n","x":272,"y":113,"wires":[]},{"id":"6f75b16.845ebd","type":"mqtt-broker","z":"","name":"unixweb.de","broker":"mqtt.unixweb.de","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
[{"id":"f9919657.169ae","type":"tab","label":"APRS Bake","disabled":false,"info":""},{"id":"a3419ec8.bf571","type":"mqtt in","z":"f9919657.169ae","name":"Joachim","topic":"/aprs/joachim/bake","qos":"2","datatype":"json","broker":"d1df93ca.89d618","x":166,"y":281,"wires":[["b4d9d242.bd10c8"]]},{"id":"b4d9d242.bd10c8","type":"function","z":"f9919657.169ae","name":"Bake","func":"var temp = msg.payload.sensordatavalues[2].value;\nvar hum = msg.payload.sensordatavalues[3].value;\nvar press = msg.payload.sensordatavalues[4].value;\n\n// Convert Celsius to Fahrenheit / APRS Protocol\nvar tempF = ((temp*1.8)+32); \nvar press2 = ((press/100)+64);\nvar hum2 = (hum*1);\n// Erase decimal points\nvar tempP = parseFloat(tempF.toFixed(0)); \nvar pressP = parseFloat(press2.toFixed(0));\nvar humP = parseFloat(hum2.toFixed(0));\n\nvar msg1 = { payload: \"user CALL pass XXXX\" };\nvar msg2 = { payload: \"CALL-1>APRS,TCPIP*:!4808.30N/01125.75E_000/000g000t0\"+tempP+\"r000p000P000h\"+humP+\"b\"+pressP+\"0wRSW\" }; \nvar msg3 = { payload: \"CALL-1>APRS,TCPIP*:>Maker Themen, LoraWAN, Arduino, Raspberry, SmartHome und AFU\" }; \nvar msg4 = { payload: \"File löschen\" }; \nreturn [ [ msg1, msg2, msg3 ], msg4 ]\n\n\n","outputs":4,"noerr":0,"x":349,"y":282,"wires":[["937bf49f.2885a8","e0d66fd9.02b048","7887a95a.059ed"],["99f92534.dd0ec8"],[],[]]},{"id":"937bf49f.2885a8","type":"delay","z":"f9919657.169ae","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":575,"y":233,"wires":[["a2bc24cb.c65c1"]]},{"id":"a2bc24cb.c65c1","type":"exec","z":"f9919657.169ae","command":"/bin/nc -w 10 195.190.142.207 14580 < /var/tmp/bake.txt","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"APRS Bake","x":784,"y":234,"wires":[[],[],[]]},{"id":"e0d66fd9.02b048","type":"file","z":"f9919657.169ae","name":"Bake File","filename":"/var/tmp/bake.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"utf8","x":560,"y":283,"wires":[[]]},{"id":"99f92534.dd0ec8","type":"delay","z":"f9919657.169ae","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":569,"y":338,"wires":[["1f30e907.eafd6f"]]},{"id":"1f30e907.eafd6f","type":"file","z":"f9919657.169ae","name":"Bake File löschen","filename":"/var/tmp/bake.txt","appendNewline":true,"createDir":false,"overwriteFile":"delete","encoding":"utf8","x":792,"y":339,"wires":[[]]},{"id":"3398a9cb.72ebc6","type":"http request","z":"f9919657.169ae","name":"","method":"GET","ret":"obj","url":"http://192.168.10.27/data.json","tls":"","x":411,"y":444,"wires":[["f831289a.11eb8"]]},{"id":"8faddbfc.0dc82","type":"inject","z":"f9919657.169ae","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":186,"y":443,"wires":[["3398a9cb.72ebc6"]]},{"id":"7887a95a.059ed","type":"debug","z":"f9919657.169ae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":544,"y":182,"wires":[]},{"id":"f831289a.11eb8","type":"mqtt out","z":"f9919657.169ae","name":"Joachim","topic":"/aprs/joachim/bake","qos":"","retain":"","broker":"d1df93ca.89d618","x":609,"y":444,"wires":[]},{"id":"e1d0fa76.6b87c","type":"comment","z":"f9919657.169ae","name":"Info zu dem Programm : APRS Bake","info":"Dieses Programm liest folgende Wetterdaten \n\n * Temperatur\n * Luftdruck\n * Luftfeuchtigkeit \n\n \nIn dem Funktionsblock \"Bake\" müssen die Werte für\n\n * eigene Rufzeichen und \n * Passwort \n * Koordinaten \nangepasst werden.\n\nDer Syntax für APRS ist nicht fehlertolerant \nund liefert keine Fehlermeldungen zurück.\nAußerdem können die Wetterdaten nur alle 15 Minuten\ngesendet werden, damit diese aktualisiert werden.\nEin kürzerer Intervall bringt nichts und wird schlichtweg\nignoriert. \n\nAls MQTT-Broker nehmen ich meinen eigenen unter mqtt.unixweb.de.\nDie Topics und Broker können natürlich für die eigene Umgebung angepasst werden.\nDie Anbindung an anderen Sensoren die ebenfalls an einen MQTT-Broker Daten \nversenden, können individuell angepasst werden. \n\nViel Spaß und Erfolg wünscht , Joachim Hummel\nWeitere Infos sind zu finden unter: https://blog.unixweb.de\n","x":272,"y":113,"wires":[]},{"id":"d1df93ca.89d618","type":"mqtt-broker","z":"","name":"unixweb.de","broker":"mqtt.unixweb.de","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Loading…
Cancel
Save