[ { "id": "ca252809.7c8428", "type": "inject", "z": "e1c8471d.f8349", "name": "", "topic": "", "payload": "0", "payloadType": "num", "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "x": 270, "y": 380, "wires": [ [ "d52b7fb.ca6468" ] ] }, { "id": "d52b7fb.ca6468", "type": "function", "z": "e1c8471d.f8349", "name": "Init", "func": "flow.set(\"FIRST_TIME\",1);\nflow.set(\"DIFF\",0.0);\nreturn msg;", "outputs": 1, "noerr": 0, "x": 450, "y": 360, "wires": [ [] ] }, { "id": "4ed28371.4f26a4", "type": "function", "z": "e1c8471d.f8349", "name": "Manage Diff", "func": "var bFirstTime = flow.get(\"FIRST_TIME\");\n\nif(bFirstTime){\n flow.set(\"FIRST_TIME\",0);\n flow.set(\"DIFF\",parseFloat(msg.payload));\n}\n\nvar fDiff = parseFloat(flow.get(\"DIFF\"));\nvar fAltitud = parseFloat(parseInt(10.0*(parseFloat(msg.payload) - fDiff))/10);\nmsg.payload = fAltitud;\n\nif(fAltitud > -3.0 && fAltitud < 3.0)\n return msg;", "outputs": 1, "noerr": 0, "x": 690, "y": 540, "wires": [ [ "59e9b8aa.d83c1", "5d400a0a.ae14cc" ] ] }, { "id": "5d400a0a.ae14cc", "type": "ui_gauge", "z": "e1c8471d.f8349", "name": "", "group": "d180b947.e22e8", "order": 0, "width": 0, "height": 0, "gtype": "gage", "title": "Altura", "label": "units", "format": "{{value}}", "min": "-1", "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 830, "y": 560, "wires": [] }, { "id": "59e9b8aa.d83c1", "type": "ui_chart", "z": "e1c8471d.f8349", "name": "", "group": "d180b947.e22e8", "order": 0, "width": 0, "height": 0, "label": "Altitud", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "x": 830, "y": 520, "wires": [ [], [] ] }, { "id": "f9d10dd9.0a8d08", "type": "ui_button", "z": "e1c8471d.f8349", "name": "", "group": "d180b947.e22e8", "order": 0, "width": 0, "height": 0, "passthru": false, "label": "Reset", "color": "", "bgcolor": "", "icon": "", "payload": "0", "payloadType": "num", "topic": "", "x": 270, "y": 340, "wires": [ [ "d52b7fb.ca6468" ] ] }, { "id": "fdc178f7.c12fc", "type": "ui_chart", "z": "e1c8471d.f8349", "name": "", "group": "509aa3a9.9f046c", "order": 0, "width": 0, "height": 0, "label": "Presión (hPa)", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "x": 800, "y": 480, "wires": [ [], [] ] }, { "id": "f9454156.5d7578", "type": "inject", "z": "e1c8471d.f8349", "name": "", "topic": "", "payload": "", "payloadType": "date", "repeat": "2", "crontab": "", "once": false, "onceDelay": 0.1, "x": 290, "y": 420, "wires": [ [ "ccbbf2f6.42f4e8" ] ] }, { "id": "ccbbf2f6.42f4e8", "type": "mqtt out", "z": "e1c8471d.f8349", "name": "", "topic": "/246F28AA380C/jsonReq", "qos": "", "retain": "", "broker": "2640d603.56aa6a", "x": 650, "y": 420, "wires": [] }, { "id": "37bb25a0.cc778a", "type": "mqtt in", "z": "e1c8471d.f8349", "name": "", "topic": "/246F28AA380C/json", "qos": "2", "broker": "2640d603.56aa6a", "x": 300, "y": 460, "wires": [ [ "dbc55b1b.779c5" ] ] }, { "id": "dbc55b1b.779c5", "type": "json", "z": "e1c8471d.f8349", "name": "", "property": "payload", "action": "", "pretty": false, "x": 310, "y": 540, "wires": [ [ "8ea9091e.776488" ] ] }, { "id": "8ea9091e.776488", "type": "function", "z": "e1c8471d.f8349", "name": "[fT,fRH,fP,fA,nL]", "func": "var fT = {payload: msg.payload.T};\nvar fRH = {payload: msg.payload.RH};\nvar fP = {payload: msg.payload.P};\nvar fA = {payload: msg.payload.A};\nvar nL = {payload: msg.payload.L};\n\nreturn [fT,fRH,fP,fA,nL];", "outputs": 5, "noerr": 0, "x": 480, "y": 540, "wires": [ [], [], [ "fdc178f7.c12fc" ], [ "4ed28371.4f26a4" ], [ "c37a6d65.ac3bc8" ] ] }, { "id": "c37a6d65.ac3bc8", "type": "ui_chart", "z": "e1c8471d.f8349", "name": "", "group": "509aa3a9.9f046c", "order": 0, "width": 0, "height": 0, "label": "LDR", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "0", "ymax": "4095", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "x": 830, "y": 600, "wires": [ [], [] ] }, { "id": "d180b947.e22e8", "type": "ui_group", "z": "", "name": "Altura", "tab": "27d79bf0.61f664", "order": 1, "disp": true, "width": "6", "collapse": false }, { "id": "509aa3a9.9f046c", "type": "ui_group", "z": "", "name": "Presión", "tab": "27d79bf0.61f664", "order": 2, "disp": true, "width": "6", "collapse": false }, { "id": "2640d603.56aa6a", "type": "mqtt-broker", "z": "", "name": "", "broker": "iot.siarq.net", "port": "8883", "tls": "", "clientid": "", "usetls": true, "compatmode": true, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }, { "id": "27d79bf0.61f664", "type": "ui_tab", "z": "", "name": "Elercicio Altitud", "icon": "dashboard", "order": 1 } ]