# Output value "total" as well to FluxDB

**URL:** https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428
**Category:** General
**Created:** [17 October 2025 13:36 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428 "2025-10-17T13:36:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![nkellner](https://avatars.discourse-cdn.com/v4/letter/n/b4bc9f/32.png) [@nkellner](https://discourse.nodered.org/u/nkellner)
#### Post date: [17 October 2025 13:36 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/1 "2025-10-17T13:36:10Z")

</div>

I get this output in NodeRed  
``  
shellyplugs-KuehlschrankKueche/status/switch:0 : msg.payload : Object  
object  
id: 0  
source: "init"  
output: true  
apower: 0.6  
voltage: 229.1  
current: 0.042  
aenergy: object  
total: 441.981  
by\_minute: array[3]  
minute\_ts: 1760705820  
temperature: object  
tC: 32.7  
tF: 90.9

```auto

The String is:

```

{"id":0,"source":"init","output":true,"apower":0.6,"voltage":229.1,"current":0.042,"aenergy":{"total":441.981,"by\_minute":[10.878,11.784,11.331],"minute\_ts":1760705820},"temperature":{"tC":32.7,"tF":90.9}}

```auto
The Workflow is: MQTT-Input - FluxDB-Output

In FulxDB only the values are shown:
id: 0
source: "init"
output: true
apower: 0.6
voltage: 229.1
current: 0.042

I aspect to get the value "total:123" as well.

What can I do to get this value as well?

Thanks for any idee
```

---

<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: [17 October 2025 14:26 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/2 "2025-10-17T14:26:09Z")

</div>

Welcome to the forum @nkellner

What node have you installed to write to the db? Look in Manage Palette in the dropdown menu to see the nodes you have installed.

Have you checked in the node's help text to see whether nested objects are allowed? The property `total` is nested inside the `aenergy` property.

---

<div class="post-metadata">

### Author: ![nkellner](https://avatars.discourse-cdn.com/v4/letter/n/b4bc9f/32.png) [@nkellner](https://discourse.nodered.org/u/nkellner)
#### Post date: [19 October 2025 13:33 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/3 "2025-10-19T13:33:13Z")

</div>

Hi,  
the use NODE to wirt Data to DB is "influxdb out".  
I checked the help but I don´t understand it right for me.  
My idea was to set the nested value "total" to the "mainstream" Payload. Hopefully we can do that?  
I get in InfluxDB only the valus of "msg.payload"

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

Sorry for the bad stupid question and thanks for supporting me.

---

<div class="post-metadata">

### Author: ![nkellner](https://avatars.discourse-cdn.com/v4/letter/n/b4bc9f/32.png) [@nkellner](https://discourse.nodered.org/u/nkellner)
#### Post date: [19 October 2025 13:53 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/4 "2025-10-19T13:53:10Z")

</div>

If I test with the DebugNode I can set the Output to "msg.payload.aenergy". Here I get the value "total". But it´s only a debug message?  
May be there is a posibilty to convert "total" from "msg.payload.aenergy" to "msg.payload"?

---

<div class="post-metadata">

### Author: ![nkellner](https://avatars.discourse-cdn.com/v4/letter/n/b4bc9f/32.png) [@nkellner](https://discourse.nodered.org/u/nkellner)
#### Post date: [19 October 2025 13:54 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/5 "2025-10-19T13:54:53Z")

</div>

> Blockquote  
> {"total":1091.908,"by\_minute":[296.415,292.789,293.696],"minute\_ts":1760881920}

---

<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: [19 October 2025 14:34 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/6 "2025-10-19T14:34:20Z")

</div>

Influxdb does not allow nested properties, so you need to move `total` out of the `aenergy` property to the top level. I suggest that you then also remove the properties `aenergy` and `temperature` so it is clear what you want. I am surprised that the database does not throw an error the way you have it at the moment.

You should be able to do what you want using a Change node configured like this

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

Feed that into a debug node and make sure that the payload contains only the properties that you want. When it looks good, connect it to the db node.

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item, which is what you need when moving properties about.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

### Author: ![nkellner](https://avatars.discourse-cdn.com/v4/letter/n/b4bc9f/32.png) [@nkellner](https://discourse.nodered.org/u/nkellner)
#### Post date: [19 October 2025 15:11 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/7 "2025-10-19T15:11:40Z")

</div>

cool, thanks - it works fine.  
I´ll check out the page - thanks for the tip an help

---

<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: [19 October 2025 15:51 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/8 "2025-10-19T15:51:02Z")

</div>

Can you mark the post with the solution as the fix please (the checkbox at the bottom) then others will know that it is sorted. Thanks.

---

<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: [2 November 2025 15:51 UTC](https://discourse.nodered.org/t/output-value-total-as-well-to-fluxdb/99428/9 "2025-11-02T15:51:07Z")

</div>

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