# Node red to influxdb help

**URL:** https://discourse.nodered.org/t/node-red-to-influxdb-help/45038
**Category:** General
**Created:** [1 May 2021 22:55 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038 "2021-05-01T22:55:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![biros](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@biros](https://discourse.nodered.org/u/biros)
#### Post date: [1 May 2021 22:55 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/1 "2021-05-01T22:55:46Z")

</div>

Hello,  
I installed influxdb and can communicate with it from node-red and cli.  
If i use insert from cli the values are inserted in column with a single title and the values below it. (this is the way i'd prefer).  
If i use insert from node-red, the influxdb out node and connect a simple string like Temperature=1 it inserts it to a value column with the "Temperature" appended to it on each line.  
I have 3 values from 3 sensors, i'd like to have a table to plot it later. Having the name of the value in front would eat up space on the long run.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/9537c0333b42e50d3b13cd560638efeef12a5d27.png)

insert from cli: first 2 rows (good)  
insert from node: the rest (bad)

I've read the documentation and left out the optional tag\_set as is unnecessary.  
Thank you.

---

<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: [2 May 2021 08:21 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/2 "2021-05-02T08:21:32Z")

</div>

The reason it has stored the string "Temperature=12.9" in the database is because you have passed it a string "Temperature=12.9".

The first question is, what does the data that you are getting into node red look like before you star manipulting it? Feed the values into a debug node and show us a screenshot so we can see.

---

<div class="post-metadata">

### Author: ![biros](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@biros](https://discourse.nodered.org/u/biros)
#### Post date: [2 May 2021 08:36 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/3 "2021-05-02T08:36:34Z")

</div>

Thanks Colin for answering,

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e58d5965efe977aa8d3b5185c979cb4e8a92d84.png)

debug\_1 is indeed a string and just after you posted i've seen it in the "help" that string gets written to the value as a single entry.

" If msg.payload is an object containing multiple properties, the fields will be written to the measurement." - this means if i make this modification;

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d433c245bafff88a2a3b33cbbc8bb58f334a399.png)  
(this is the content of debug\_2)

It will be like the first two rows of my first screenshot?

---

<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: [2 May 2021 08:47 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/4 "2021-05-02T08:47:18Z")

</div>

Yes you need the payload to be the javascript object  
`{Temperture: 22.3, Humidity: 57.8, DewPoint: 13.6}`

You can do that with a Change node configured to Move `msg.payload.StatusSNS.SI7021` To `msg.payload`

---

<div class="post-metadata">

### Author: ![biros](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@biros](https://discourse.nodered.org/u/biros)
#### Post date: [2 May 2021 08:48 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/5 "2021-05-02T08:48:49Z")

</div>

yes, thank you, done and working

---

<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: [16 May 2021 08:48 UTC](https://discourse.nodered.org/t/node-red-to-influxdb-help/45038/6 "2021-05-16T08:48:54Z")

</div>

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