-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode-RED Flow.json
1 lines (1 loc) · 3.6 KB
/
Node-RED Flow.json
1
[{"id":"20c2458b.2ba30a","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"8bd42fd1.1eae","type":"mqtt-broker","name":"Broker MMAPUDENAR","broker":"157.245.249.152","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"30f62044.2cafa","type":"mqtt-broker","name":"EMQX Broker","broker":"broker.emqx.io","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"552ace3e.ff3c1","type":"influxdb","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"database","name":"MMAP Digital Ocean","usetls":false,"tls":"","influxdbVersion":"2.0","url":"https://influxdb.mmapudenar.me/","rejectUnauthorized":true},{"id":"d50d0c9f.31e858","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false},{"id":"62741bba.e463f4","type":"mqtt in","z":"20c2458b.2ba30a","name":"Broker MQTT","topic":"MMAP/tuquerres","qos":"0","datatype":"auto","broker":"8bd42fd1.1eae","x":340,"y":420,"wires":[["239ba052.774f7"]]},{"id":"1b91a69b.f8b2b9","type":"influxdb out","z":"20c2458b.2ba30a","influxdb":"552ace3e.ff3c1","name":"Influx DB","measurement":"EMA_Tuquerres","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"s","retentionPolicyV18Flux":"","org":"udenar","bucket":"MMAPdb","x":915,"y":420,"wires":[]},{"id":"239ba052.774f7","type":"json","z":"20c2458b.2ba30a","name":"","property":"payload","action":"","pretty":false,"x":525,"y":420,"wires":[["f0789e64.aacc5"]]},{"id":"f0789e64.aacc5","type":"function","z":"20c2458b.2ba30a","name":"Influx Processing","func":"msg.payload = [\n [// TEMPERATURA\n { // fieldName : fieldValue\n valor: parseFloat(msg.payload.temp.valor)\n },\n { // tagName : tagValue\n variable : msg.payload.temp.variable,\n },\n { // tagName : tagValue\n sensor : msg.payload.temp.sensor,\n } \n ],\n [// HUMEDAD RELATIVA\n {\n valor: parseFloat(msg.payload.hum.valor)\n },\n {\n variable : msg.payload.hum.variable,\n },\n {\n sensor : msg.payload.hum.sensor,\n } \n ],\n [// DIRECCIÓN DEL VIENTO\n {\n valor: parseFloat(msg.payload.dv.valor)\n },\n {\n variable : msg.payload.dv.variable,\n },\n {\n sensor : msg.payload.dv.sensor,\n } \n ], \n [// VELOCIDAD DEL VIENTO\n {\n valor: parseFloat(msg.payload.vv.valor)\n },\n {\n variable : msg.payload.vv.variable,\n },\n {\n sensor : msg.payload.vv.sensor,\n } \n ],\n [// RADIACIÓN SOLAR\n {\n valor: parseFloat(msg.payload.rad.valor)\n },\n {\n variable : msg.payload.rad.variable,\n },\n {\n sensor : msg.payload.rad.sensor,\n } \n ]\n]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":705,"y":420,"wires":[["e78ed76a.848348","1b91a69b.f8b2b9"]]},{"id":"e78ed76a.848348","type":"debug","z":"20c2458b.2ba30a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":300,"wires":[]}]