Page 1 of 1

Charging home battery

Posted: Monday 26 April 2021 14:18
by hclardij
Hi guru's,
I am noob to Domoticz and programming and want to achieve the following:
- I have solar panels that supply a surplus of power during the day; I can read power values from the inverter as well as from the powermeter.
- I have build a 48v 2kWh battery, I have several chargers, but for this example lets assume it has 250 Watt capacity
- I have a couple of Tasmota plugs that I can switch on and of from Domoticz
- Since I am completely new to programming I thought II use blockly; I already managed to switch on the plugs in the evening and so on.

My idea was to take the reading from the power meter and use: if power < -250 , then switch on the charger.
By the looks the negative value is not accepted.

Any clues are highly appreciated.

TIA

Re: Charging home battery

Posted: Monday 26 April 2021 16:40
by jake
I have no solution for your blockly, you better place s screenshot of your existing one.

I have created a script that simulates such a battery, you could try that one too see what the real battery is supposed to do in your situation

https://github.com/jakenl/domoticz_solarbattery

Re: Charging home battery

Posted: Monday 26 April 2021 20:51
by hclardij
Hmm,...I do have some questions that I will put in your post.
Screenshot of my current blockly is attached
Screen Shot 2021-04-26 at 20.50.16.png
Screen Shot 2021-04-26 at 20.50.16.png (66.23 KiB) Viewed 737 times

Re: Charging home battery

Posted: Tuesday 27 April 2021 22:43
by jake
Do you use a p1 meter for the electricity? Can you see somewhere what the actual power is, when you deliver power to the grid? I'd say it should work with negative values.

Re: Charging home battery

Posted: Wednesday 28 April 2021 11:22
by hclardij
Yes I do have a meter with P1 and I can see the actual value; If it is a negative number I am delivering to the grid.

Re: Charging home battery

Posted: Wednesday 28 April 2021 14:26
by hclardij
So I did some testing and found out that the value has to be greater than 0. 0 is failing, but 0.001 is working.
My guess is that blockly is to limited in its capabilities.