How to add Power Usage + Solar production

Hello,

I am a beginner at grafana but I already got realy close by my own to that what I imaged as my final result.

But I have one problem, that I can’t solve by myself. I hope you can help me.

So I have one line (red) which shows me my power usage at my house. I get the data directly from my electric meter at my basement.

But I have two solar production panels at my house. One at the roof and another at my garden cabin.

I already managed to get the data from each and add the data from both of these to one “solar production entire”.

My problem is, that the electric meter shows negativ values If the solar production is bigger than the electric usage at my house. Or to make it clear: The electric meter already substracts the solar production from the power usage. I can’t change this, because the electric meter shows these values directly. So I have to add them back at grafana.

So my thought was, that I can add the “solar production total” to the “power usage” to get what I want. But this doesn’t work.

See the screenshot please to understand what I mean.

Red line = Power Usage of the whole house (electric meter)
Yellow line = Solar production (Cabin Garden)
Green line = Solar production (Roof)
Blue line = Solar production total (Cabin Garden + Roof)

When the red line goes below zero, it means my solar production is bigger than usage. But I think it is not right because If you look at 9:00am for example the peak is at 2kw, so you might think my house is using 2kw - but thats wrong because in fact it’s ~2,5kw (you have to add the solar production, because it’s already subtracted from the red line.

How can I add it again? I tried to do it the same way like the “solar production” addition, but it doesn’t work. (2nd screenshot)

Maybe you can help me.

welcome to the :grafana: forum, @sucografana

these sorts questions (how to accurately visualize energy usage) come up quite frequently

I would do a search through this forum for older posts. There is a lot of good content out there. Especially for solar panel monitoring :+1:

Are you using influx?

Thank you for your reply.
I tried to search, but can’t find the solution for exact my problem. Maybe I am searching the wrong way?!

Yes, I am using influxdb with home assistant.

I tried to play with the values since yesterday and I think my problem are the different “time stamps”. So solar production says at 4:40am 400 watts, but power usage says at 4:41am 1.000 watts. At 4:40am power usage has now value and solar production has at 4:41 no value.
So I have to bring these to values together with different time stamps.