APRS-Bake/flow.json

1 line
4.7 KiB
JSON
Raw Normal View History

2019-06-16 16:31:20 +00:00
[{"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