# Can't transfer data from Node-Red to InfluxDB

**URL:** <https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085>\
**Category:** General\
**Tags:** database\
**Created:** [9 August 2024 20:53 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085 "2024-08-09T20:53:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpatton75](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mrpatton75](https://discourse.nodered.org/u/mrpatton75)\
**Post date:** [9 August 2024 20:53 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085/1 "2024-08-09T20:53:12Z")

</div>

I am building out a project in Node-Red using ModbusTCP to gather information from my PLC and then send that data to an InfluxDB bucket that I will then using Grafana to create a nice dashboard to display that data. My issue is that I am unable to see the data in my InfluxDB bucket.

---

<div class="post-metadata">

**Author:** ![mrpatton75](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mrpatton75](https://discourse.nodered.org/u/mrpatton75)\
**Post date:** [9 August 2024 20:53 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085/2 "2024-08-09T20:53:53Z")

</div>

```auto
[
    {
        "id": "0ec9b9473e7e75e0",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "2241b9b1f805880c",
        "type": "inject",
        "z": "0ec9b9473e7e75e0",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "2",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 150,
        "y": 100,
        "wires": [
            [
                "2d0bfb3dc46198ee"
            ]
        ]
    },
    {
        "id": "2d0bfb3dc46198ee",
        "type": "function",
        "z": "0ec9b9473e7e75e0",
        "name": "function 6",
        "func": "var fc=3;\nvar sa=0x91;\nvar addresses=4;\nvar temperature = msg.payload[0]\n\nmsg.payload={\n'Temperature': temperature,\n'fc': fc,\n'unitid': 1,\n'address': sa,\n'quantity': addresses\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 100,
        "wires": [
            [
                "0fa09589a952acbc"
            ]
        ]
    },
    {
        "id": "0fa09589a952acbc",
        "type": "modbus-flex-getter",
        "z": "0ec9b9473e7e75e0",
        "name": "BushlandRR2000",
        "showStatusActivities": false,
        "showErrors": false,
        "showWarnings": true,
        "logIOActivities": false,
        "server": "6df4cd0a1feea884",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "delayOnStart": false,
        "startDelayTime": "",
        "x": 510,
        "y": 100,
        "wires": [
            [],
            [
                "a3a3c575ac9dded7"
            ]
        ]
    },
    {
        "id": "eb5304c21f6d389d",
        "type": "modbus-response",
        "z": "0ec9b9473e7e75e0",
        "name": "",
        "registerShowMax": 20,
        "x": 930,
        "y": 100,
        "wires": []
    },
    {
        "id": "8156915acbe9035d",
        "type": "debug",
        "z": "0ec9b9473e7e75e0",
        "name": "debug 6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 980,
        "y": 40,
        "wires": []
    },
    {
        "id": "a3a3c575ac9dded7",
        "type": "function",
        "z": "0ec9b9473e7e75e0",
        "name": "function 7",
        "func": "const buf= Buffer.from(msg.payload.buffer)\nconst value = buf.readUInt32BE();\nmsg.value = value;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 720,
        "y": 100,
        "wires": [
            [
                "8156915acbe9035d",
                "eb5304c21f6d389d",
                "41cc22872bfba7e7"
            ]
        ]
    },
    {
        "id": "41cc22872bfba7e7",
        "type": "influxdb out",
        "z": "0ec9b9473e7e75e0",
        "influxdb": "75a6d209ec346ce5",
        "name": "Database",
        "measurement": "Temp",
        "precision": "",
        "retentionPolicy": "",
        "database": "database",
        "precisionV18FluxV20": "ms",
        "retentionPolicyV18Flux": "",
        "org": "RR Machine Works",
        "bucket": "PLC",
        "x": 1180,
        "y": 180,
        "wires": []
    },
    {
        "id": "6df4cd0a1feea884",
        "type": "modbus-client",
        "name": "BushlandRR2000",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "10.10.0.8",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": 1,
        "commandDelay": 1,
        "clientTimeout": 1000,
        "reconnectOnTimeout": true,
        "reconnectTimeout": 2000,
        "parallelUnitIdsAllowed": true,
        "showErrors": false,
        "showWarnings": true,
        "showLogs": true
    },
    {
        "id": "75a6d209ec346ce5",
        "type": "influxdb",
        "hostname": "127.0.0.1",
        "port": "8086",
        "protocol": "http",
        "database": "database",
        "name": "Database",
        "usetls": false,
        "tls": "",
        "influxdbVersion": "2.0",
        "url": "http://localhost:8086",
        "timeout": "10",
        "rejectUnauthorized": true
    }
]

```

---

<div class="post-metadata">

**Author:** ![mrpatton75](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mrpatton75](https://discourse.nodered.org/u/mrpatton75)\
**Post date:** [9 August 2024 20:55 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085/3 "2024-08-09T20:55:00Z")

</div>

Here is the code for this project as it sits right now. We are trying to get everything working first then will finish adding nodes to collect additional data. What are we missing in regards to the InfluxDB?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 August 2024 06:56 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085/4 "2024-08-10T06:56:34Z")

</div>

Welcome to the forum @mrpatton75

Show us what you are sending to the influx node.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 November 2024 06:57 UTC](https://discourse.nodered.org/t/cant-transfer-data-from-node-red-to-influxdb/90085/5 "2024-11-08T06:57:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
