Meter Reading with Barchart Data in Dashboard 2.0

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

This is what a got until now ...

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

How did you do that in D1?

What do you mean @Colin

You said

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

1 Like

@Colin ah ok.

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

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

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 :confused:
Hope someone could help ...

Regards,
Snot

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

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

1 Like

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

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

1 Like

@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

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?

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

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.

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

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

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:

[
    {
        "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

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?

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

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.

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

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

1 Like