# Meter Reading with Barchart Data in Dashboard 2.0

**URL:** <https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550>\
**Category:** Dashboard\
**Created:** [13 April 2025 20:10 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550 "2025-04-13T20:10:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [13 April 2025 20:10 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/1 "2025-04-13T20:10:59Z")

</div>

Hey guys,

i got a working dashboard in V1 with the Meter reading from my power meter. Everyday i got a bar witch shows the consumtion, so you can have a look with was a bad and witch a good day.

With dashboard 2.0 im not possible to do this. HOw should the node know when the days is over and so on ...

Anyone here could help me a little bit to get this working ? The imput value i only the power meter reading ...

Regards,  
Snot

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [13 April 2025 20:14 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/2 "2025-04-13T20:14:13Z")

</div>

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c86470bf0e38f6733d7707a0a4b17dd5c07fd5ee.png)

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 06:55 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/3 "2025-04-14T06:55:35Z")

</div>

This is what a got until now ...

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b93b524cebe49d6458ad8801156f9bd31814e078.png)

But the counter should start by 0 and i used to see the last 7 days ... dont know how to do it

---

<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:** [14 April 2025 07:58 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/4 "2025-04-14T07:58:34Z")

</div>

> [@Snotmann](#):
>
> With dashboard 2.0 im not possible to do this. HOw should the node know when the days is over and so on ...

How did you do that in D1?

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 08:13 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/5 "2025-04-14T08:13:41Z")

</div>

What do you mean @Colin

---

<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:** [14 April 2025 08:49 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/6 "2025-04-14T08:49:29Z")

</div>

> [@Snotmann](#):
>
> What do you mean

You said

> [@Snotmann](#):
>
> i got a working dashboard in V1 with the Meter reading from my power meter. Everyday i got a bar witch shows the consumtion, so you can have a look with was a bad and witch a good day.
> 
> With dashboard 2.0 im not possible to do this.

So what is it that was possible using the original dashboard that you cannot do using the new dashboard?

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 09:31 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/7 "2025-04-14T09:31:48Z")

</div>

@Colin ah ok.

In Dashboard V1 i build this with the bar-chart.

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

so i get 5 meter values, and they count from 0. All values went from the bar-chart-data node to the chart.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/b/8bc2f46815d0d45175cfed4ea84ef4f8b2727119.png)

This bar-chart node is incompatible to dashboard 2.0 i thing, but i dont know how i get this working with the new dashboard 😕  
Hope someone could help ...

Regards,  
Snot

---

<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:** [14 April 2025 10:59 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/8 "2025-04-14T10:59:39Z")

</div>

I believe that at the moment you cannot use timestamp directly as the x axis for bar charts. See [Support "Linear" & "Timescale" x-axis on a bar chart · Issue #1045 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1045)

This will need someone more experienced with using the bar chart to help you I think.

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 11:16 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/9 "2025-04-14T11:16:19Z")

</div>

Seems so ... this dashboard 2.0 makes me crazy.  
Thanks a lot @Colin to have a look at my issue.

I Will uninstall dashboard 2.0 and use V1 further

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [14 April 2025 17:11 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/10 "2025-04-14T17:11:28Z")

</div>

The node you're using there "bar-chart-data" is not one I've seen before, but was a community contribution to help with time series data on a bar chart for Dashboard 1.0

We currently don't have an equivalent in Dashboard 2.0, however, it it still possible given the data you want to show.

Could you share a sample piece of data that you receive please? Then I'll be able to better advise to a specific answer

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 17:44 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/11 "2025-04-14T17:44:39Z")

</div>

@joepavitt sure no problem.

This are the 5 values i want to get shown. Each is a meter reading.

14.4.2025, 19:41:27node: debug 3Erzeugung\_600 : msg.payload : number  
2041  
14.4.2025, 19:41:28node: debug 3Erzeugung\_720 : msg.payload : number  
1298  
14.4.2025, 19:41:28node: debug 3Einspeisung : msg.payload : number  
633.71767143  
14.4.2025, 19:41:29node: debug 3Erzeugung\_Gesamt : msg.payload : number  
141.98  
14.4.2025, 19:41:29node: debug 3Stromverbrauch : msg.payload : number  
12969.4450976

Regards,  
Snot

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [14 April 2025 18:30 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/12 "2025-04-14T18:30:18Z")

</div>

> [@Snotmann](#):
>
> 3Stromverbrauch

Is this the `msg.topic` for each of your messages?

> 14.4.2025, 19:41:28

Then for this, are you just relying on the message _received_ time to know which day the data is for? How do you get data from previous days?

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [14 April 2025 18:37 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/13 "2025-04-14T18:37:19Z")

</div>

NO there are 5 different topics

Erzeugung\_600  
Erzeugung\_720  
Einspeisung  
Erzeugung\_Gesamt  
Stromverbrauch

The old data from the days before are gone if i restart the server, the node saves only the meter values from restart of nodered or deploying a new version. As i told they are smartmeter values ... so after a time Stromverbrauch gettig 0.1 ...after a time 0.2 and so on with the other values to.

So i can compare the says how many power i take from grid, how many engery i produced and so on.

Hope you get what i mean.

Regards,  
Snot

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [15 April 2025 19:02 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/14 "2025-04-15T19:02:01Z")

</div>

No one an idea here ? In dashboard 1 it was so easy :-/

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [15 April 2025 19:22 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/15 "2025-04-15T19:22:36Z")

</div>

> [@Snotmann](#):
>
> No one an idea here ? In dashboard 1 it was so easy :-/

When you said "I Will uninstall dashboard 2.0 and use V1 further" I assumed you had lost interest in using DB2.  
If you do want to persevere with DB2 I am sure that we can help you.

> [@Snotmann](#):
>
> the counter should start by 0 and i used to see the last 7 days

I don't know what this means, except I understand 7 days.

> [@Snotmann](#):
>
> In Dashboard V1 i build this with the bar-chart.
> 
> ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e32d603e3175aaa688c98fcba8aa31cf6d99d89d.png)
> 
> so i get 5 meter values, and they count from 0.

And here there are 5 values, not 7

I think you need to explain where the data comes from, how it gets into Node-red.  
Show us an example of the DB1 chart showing 7 days of data.  
Export your DB1 flow so we can see how it works in DB1

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [15 April 2025 19:43 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/16 "2025-04-15T19:43:17Z")

</div>

Hey @jbudd thanks for your reply.

i want to take DB2 but until now it seems it cant represent the data i need.

There are 5 meter values, on 7 days from now on.  
The Data came from 2 inverter, and my smartmeter. I take the absolute value from 00:00 on until 23:59 clock.

Here you can see what im doin:

```auto
[
    {
        "id": "72cfdaa6aebf9f83",
        "type": "function",
        "z": "a6c69280.aefa",
        "name": "to kW",
        "func": "msg.payload = Number(msg.payload);\nmsg.payload = (msg.payload);\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 890,
        "y": 240,
        "wires": [
            [
                "7ffda706e6dbea44",
                "c98f1903d5953265",
                "af3e38670e208f92"
            ]
        ]
    },
    {
        "id": "0de79a72377e6a4e",
        "type": "link in",
        "z": "a6c69280.aefa",
        "name": "Stromverbrauch",
        "links": [
            "ccd51eb342950375"
        ],
        "x": 1015,
        "y": 300,
        "wires": [
            [
                "c98f1903d5953265",
                "af3e38670e208f92"
            ]
        ]
    },
    {
        "id": "5d9032f3e9f18949",
        "type": "link in",
        "z": "a6c69280.aefa",
        "name": "Einspeisung",
        "links": [
            "d7b57d0bd0c062c7"
        ],
        "x": 955,
        "y": 280,
        "wires": [
            [
                "c98f1903d5953265",
                "af3e38670e208f92"
            ]
        ]
    },
    {
        "id": "d1d750de307d88cd",
        "type": "ui_chart",
        "z": "a6c69280.aefa",
        "name": "",
        "group": "21e21de62ae423cf",
        "order": 8,
        "width": "6",
        "height": "6",
        "label": "Stromerzeugung ",
        "chartType": "bar",
        "legend": "false",
        "xformat": "HH:mm",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "",
        "ymax": "",
        "removeOlder": "24",
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#ff0000",
            "#ffff00",
            "#00ff00",
            "#0080ff",
            "#0080ff",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 1980,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "c98f1903d5953265",
        "type": "bar-chart-data",
        "z": "a6c69280.aefa",
        "name": "Stromerzeugung",
        "x_interval": "days",
        "x_size": "7",
        "unit": "KWh",
        "precision": "1",
        "is_meter_reading": "True",
        "agg_by": "sum",
        "prevent_negative": true,
        "x": 1780,
        "y": 280,
        "wires": [
            [
                "d1d750de307d88cd"
            ]
        ]
    },
    {
        "id": "d9f453f8cba1647a",
        "type": "link in",
        "z": "a6c69280.aefa",
        "name": "",
        "links": [
            "1dfc60da4c44c31c"
        ],
        "x": 1155,
        "y": 320,
        "wires": [
            [
                "c98f1903d5953265",
                "af3e38670e208f92"
            ]
        ]
    },
    {
        "id": "c2c114cb7f37aedd",
        "type": "link in",
        "z": "a6c69280.aefa",
        "name": "Erzeugung gesamt",
        "links": [
            "f0c4f7efed051d5b"
        ],
        "x": 1335,
        "y": 320,
        "wires": [
            [
                "c98f1903d5953265",
                "af3e38670e208f92"
            ]
        ]
    },
    {
        "id": "af3e38670e208f92",
        "type": "debug",
        "z": "a6c69280.aefa",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1800,
        "y": 200,
        "wires": []
    },
    {
        "id": "21e21de62ae423cf",
        "type": "ui_group",
        "name": "Stromnetz",
        "tab": "65932f903b8c920f",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "65932f903b8c920f",
        "type": "ui_tab",
        "name": "Strom",
        "icon": "power",
        "order": 5,
        "disabled": false,
        "hidden": false
    }
]

```

Hope you understand ... the inputs are the 5 values inverter 1, inverter 2, power consumtion, power give to the grid, and abolute power created by solar from a smartplug.

Regards,  
Snot

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [15 April 2025 19:55 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/17 "2025-04-15T19:55:48Z")

</div>

> [@Snotmann](#):
>
> Here you can see what im doing

Sorry, but no I can't.

1. What is this node bar-chart-data?
2. What links to the function node?
3. What are the 4 link-in nodes?
4. What does "I take the absolute value from 00:00 on until 23:59 clock." mean?

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

1. Where is the example of the DB1 chart showing 7 days (or at least 2 days) data?

---

<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:** [15 April 2025 20:06 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/18 "2025-04-15T20:06:09Z")

</div>

I think the guy wants a set of bars for each day over the last 7 days.  
@Snotmann it might help if you could show us what it looks like in D1 with more than one day of data.

---

<div class="post-metadata">

**Author:** ![Snotmann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snotmann/32/100137_2.png) [@Snotmann](https://discourse.nodered.org/u/Snotmann)\
**Post date:** [16 April 2025 05:11 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/19 "2025-04-16T05:11:16Z")

</div>

I only got data from three days until now but i think you can see what im trying:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a2542e73901fe49165856964a1e15e3f0e29c5b.png)

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [16 April 2025 08:48 UTC](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550/20 "2025-04-16T08:48:05Z")

</div>

It's using this package: [node-red-contrib-dashboard-bar-chart-data (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-dashboard-bar-chart-data) which wasn't part of Dashboard 1.0's core collection.

[Next page](https://discourse.nodered.org/t/meter-reading-with-barchart-data-in-dashboard-2-0/96550.md?page=2)
