Battery storage

Talks about metering
polvere79
Posts: 20
Joined: Mon Sep 28, 2020 9:56 am

Re: Battery storage

Post by polvere79 » Mon Apr 12, 2021 4:11 pm

No problem, just wondering :)

I'm trying something myself, I just added an additional meter using eflow, basically just by adding the following part to the code:

Code: Select all

if ($argv[1] == 'whbatt') { // battery
                    $val = $prevarray[$whbattmet] + $housep - $housec; 
					
					if ($val > $WhBattery) //if battery is full, battery capacity is shown
					{
						$val = $WhBattery;
					}
					elseif  ($val < 0) //if battery is empty, 0 is shown
					{
						$val = 0;
					}
and in the CSV I have the correct Wh stored in the "virtual" battery, but the graph is wrong.
As far as I understood, the graph shows the difference between 2 consecutive values in the CSV, right?

What I would need it to show the actual Wh stored in the battery, but I guess this is against the general ideas of graphs in metern..

jeanmarc
Posts: 2143
Joined: Thu Aug 29, 2013 7:16 am

Re: Battery storage

Post by jeanmarc » Mon Apr 12, 2021 5:08 pm

Yes the graph makes the difference between 2 samples.
You can still make a meter type for a battery but the counter shall always increase. I believe you need two meters 'battery charge' & 'battery discharge'

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests