[ { "id": "2f5c53c0.008dbc", "type": "influxdb in", "z": "6dd90c30.f035f4", "influxdb": "10f3d699.6bd469", "name": "", "query": "select * from jb_Temp", "rawOutput": false, "precision": "", "retentionPolicy": "", "org": "", "x": 330, "y": 340, "wires": [ [ "978bbad5.97ab88" ] ] }, { "id": "d7234456.028878", "type": "debug", "z": "6dd90c30.f035f4", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 560, "y": 420, "wires": [] }, { "id": "2a3f1ba5.56a164", "type": "inject", "z": "6dd90c30.f035f4", "name": "", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 210, "y": 240, "wires": [ [ "2f5c53c0.008dbc" ] ] }, { "id": "978bbad5.97ab88", "type": "function", "z": "6dd90c30.f035f4", "name": "--> timestamp, value", "func": "a = msg.payload;\nvar val = \"\";\nvar lastEntryValue;\na.forEach(function(entry) {\n val+=\"timestamp: \"+entry.time+\", value: \"+entry.value + \"\\n\";\n lastEntryValue = entry.value;\n});\nmsg.payload = val;\nvar msg_val = {payload : lastEntryValue} \n\nreturn [msg,msg_val];", "outputs": 2, "noerr": 0, "initialize": "", "finalize": "", "x": 310, "y": 440, "wires": [ [ "d7234456.028878" ], [ "e3d1c0bc.e6aca" ] ] }, { "id": "e3d1c0bc.e6aca", "type": "debug", "z": "6dd90c30.f035f4", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 560, "y": 460, "wires": [] }, { "id": "10f3d699.6bd469", "type": "influxdb", "z": "", "hostname": "formacio.things.cat", "port": "8086", "protocol": "http", "database": "formacioDB", "name": "", "usetls": false, "tls": "", "influxdbVersion": "1.x", "url": "http://localhost:8086", "rejectUnauthorized": true } ]