# Multiple Values to InfluxDB

**URL:** <https://discourse.nodered.org/t/multiple-values-to-influxdb/40439>\
**Category:** General\
**Created:** [5 February 2021 13:39 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439 "2021-02-05T13:39:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [5 February 2021 13:39 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/1 "2021-02-05T13:39:31Z")

</div>

Hi, I am trying to send multiple values from a modbus device to InfluxDB.  
I can see the Ambient Temperature within Grafana, but i cant pick up the Battery SOC

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c768345f831656a3c7a3628c43f4576de467ab8.png)

---

<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:** [5 February 2021 13:55 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/2 "2021-02-05T13:55:34Z")

</div>

Have you looked at, and understood, the sidebar help for influx node? It tells you there what you need to put in the message you are sending to it.

**[Edt]** I have just realise you are using two influx nodes for some reason. Show us how you have configured them.

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [5 February 2021 14:04 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/3 "2021-02-05T14:04:55Z")

</div>

I have them both configured to the same influx Server as Grafana.  
I used 2 as I have just sort of fell upon this using youtube guides, but now I am stuck with sending multiple values  
Thanks

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/d/8d50b01531379bfe7bc6696872f454e0e03ee53f.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/97e1695348487d01915c256366256a95111ab27e.png)

---

<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:** [5 February 2021 14:08 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/4 "2021-02-05T14:08:14Z")

</div>

What do you see if you run the influx command line client and say

```auto
use home
show measurements

```

To avoid using multiple nodes you can set `msg.measurement` in the message. See the help text in the editor. Get it working as it is first though.

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [5 February 2021 14:12 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/5 "2021-02-05T14:12:18Z")

</div>

Yep I see the field names, but I get what you mean now about the side bar. I will try the msg.measurement and report back. Thank you  
InfluxDB shell version: 1.8.3

> use home  
> Using database home  
> show measurements  
> name: measurements  
> name

* * *

AmbiantTemperature  
Kwh  
Temp  
msg.payload

>

---

<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:** [5 February 2021 14:16 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/6 "2021-02-05T14:16:55Z")

</div>

What you have should work perfectly well. I can't see any reason why BatterySOC is not getting written to.  
Assuming that you are not accidentally setting `msg.measurement` already. It is odd that you have a measurement of `msg.payload`.

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [5 February 2021 14:18 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/7 "2021-02-05T14:18:03Z")

</div>

Thanks Colin. I have made a few changes, so I will put them back to before hand, and make a new table in the DB and try again  
Cheers

---

<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:** [5 February 2021 14:19 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/8 "2021-02-05T14:19:12Z")

</div>

Change the debug nodes to show Complete Message, and give them names. That will make it easier to check the data.

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [5 February 2021 14:50 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/9 "2021-02-05T14:50:59Z")

</div>

Got it working like this for now..

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

I had to // in the function as it was sending the Kwh to everything going into the switch  
Cheers Colin.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1f5272f6c41e7153a2c2b902ce0ccad7eddd97a7.png)

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [6 February 2021 10:01 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/10 "2021-02-06T10:01:26Z")

</div>

@Colin  
Working good now after a few hours of logging, Thanks for the help

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/737cb826211e3e9c03c2bdf125a3e3b4b33c0cbd.png)

---

<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:** [20 February 2021 10:01 UTC](https://discourse.nodered.org/t/multiple-values-to-influxdb/40439/11 "2021-02-20T10:01:56Z")

</div>

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