Page 1 of 1

Domoticz container for battery

Posted: Thursday 12 November 2020 12:19
by edgarhildering
Hi all,
one of the elements of my photovoltaic installation is a battery. The inverter starts to load the battery before pushing the excess energy to the grid. And of course the inverter will use the energy in the battery before pulling it from the grid. So the battery is a device with inflow and outflow (both power Wh) and a scalar for the current contained energy (kWh).

I get reports from the system every 5 mins about the power flow: a positive number means charging, negative number means discharging. I used a general counter (mode computed) to keep track of the changes, but:
  1. the meter is reset at midnight, but the battery contains still 10% of its max energy :roll:
  2. if for an hour the battery is discharging, the calculated amount of contained energy becomes less (oke! :lol: ) but the graph is not showing the discharge :cry: .
my question(s):
  1. is there a meter that can be used for this purpose, i.e. a meter with positive/negative power use that can compute and record both energy usage and return in one scalar?
  2. anyone out there with the same 'problem'? if so, how did you solve it?
see graph below: at 1600hrs there is just under 2kWh in the battery, I would expect the energy bars to become smaller up to 2100hrs when the battery stops delivering energy (installation parameter of the inverter to stop taking energy from the battery at 10% chargelevel)
usage-last-7-days.jpeg
usage-last-7-days.jpeg (47.63 KiB) Viewed 446 times
kind regards, --Edgar

Re: Domoticz container for battery

Posted: Thursday 12 November 2020 23:39
by psubiaco
Hi Edgar,
I had the same problem counting the energy from grid: when solar photovoltaic produce more energy than what the building consumes, power goes negative but energy is not computed correctly by Domoticz.
I've just submitted yeasterday a patch to solve this problem.
Be patient, I hope domoticz developers will pull the patch soon and solve this trouble.
Regards.
Paolo

Re: Domoticz container for battery

Posted: Friday 13 November 2020 9:02
by jake
For 2 years now i have a 'software battery', a script that simulates a real battery. This to test what capacity would suit my needs. To monitor the storage level, I use a 'custom sensor' and have it the axis label 'kWh'. I have shared the standard Lua version before, but have now a dzvents version in test with a friend of mine.

This custom sensor counts up and down without a problem.