pulquero / BatteryAggregator

MIT License
32 stars 8 forks source link

CCL = 0 and DCL =0 #40

Closed Rubens974 closed 4 months ago

Rubens974 commented 4 months ago

Hi, Can you help please? I have 2 batteries in parallel I've just upgraded from version 3.0.17 to 3.0.43 but the CCL and DCL remain at 0. image image

Great work thank you Richard

pulquero commented 4 months ago

Hi, I've added more detailed logging for CCL/DCL in v3.0.44. Set /LogLevel to DEBUG, attach contents of /var/log/BatteryAggregator/current. Thanks.

Rubens974 commented 4 months ago

Thank you so much. Here is the logfile current.txt

pulquero commented 4 months ago

Fixed the error in the log.

Rubens974 commented 4 months ago

TypeError: 'Logger' object is not callable How do I solve this error?

Rubens974 commented 4 months ago

v3.0.45 No more eror in the current log file (mode DEBUG). Thank you current.txt

But didn't solve my issue

Rubens974 commented 4 months ago

CRITICAL ZeroDivisionError: float division by zero. current.TXT

pulquero commented 4 months ago

Fixed

Rubens974 commented 4 months ago

Morning, Here is my log file: no more error at this time. Thank you current0.txt current1.txt

Unfortunately I still have the DCL and CCL issue. it's impossible to use the batteries (charging or discharging).

Thanks

Rubens974 commented 4 months ago

At this time I've downgraded to version 3.0.17 and it works like a charm. image

pulquero commented 4 months ago

Hmm, it might be an initialisation ordering problem. The old version updates the CCL more frequently, so I'm guessing if it wasnt available at startup, it would quickly get picked up afterwards. When you next get a chance, if you can add "logLevel": "DEBUG" to the config file and we'll be able to see what happens during startup.

Rubens974 commented 4 months ago

In the current0.txt file above, you have a startup log from the line "@4000000066176516022cb594 INFO:main:Starting..."

pulquero commented 4 months ago

Unfortunately, that doesn't include full debug info since startup. Debug was turned on some time later.

Rubens974 commented 4 months ago

"logLevel": "DEBUG" is configured in dbus-spy after batteryaggregator is started. How can I proceed differently?

Rubens974 commented 4 months ago

Here are some logs after a restart

@40000000661808f02dd94ff4.s.txt @400000006618092a2e02d4dc.s.txt @400000006618095e2e26ef0c.s.txt current.txt

Rubens974 commented 4 months ago

logs of v3.0.47

@4000000066181afd2e106584.s.txt @4000000066181b2f2dc4e94c.s.txt @4000000066181b632f228164.s.txt @4000000066181b972e3ae854.s.txt @4000000066181bc52df1e4ec.s.txt @4000000066181bfb2e3b74f4.s.txt @4000000066181c312e14ce6c.s.txt @4000000066181c712df2c77c.s.txt @4000000066181ca92df334dc.s.txt @4000000066181cd02f350794.s.txt @4000000066181d062e15eb94.s.txt @4000000066181d5a2f3afeec.s.txt

pulquero commented 4 months ago

"logLevel": "DEBUG" is configured in dbus-spy after batteryaggregator is started. How can I proceed differently?

You need to config it in the config file, changing it in dbus-spy is too late.


{"logLevel": "DEBUG"}
Rubens974 commented 4 months ago

Okay thank you.

@400000006618ac992e3d8c1c.txt @400000006618acca394ce83c.txt @400000006618acf63a480564.txt current.txt

pulquero commented 4 months ago

Looks like the issue is that the absence of /Io/AllowToCharge is interpreted as not allowed to charge. I need to distinguish between 0 and nothing. This was related to a recent change to enable proper support for AllowToCharge.

@400000006618ac99272f2a84 DEBUG:com.victronenergy.battery.aggregator:Aggregator for /Io/AllowToCharge updated with {com.victronenergy.battery.socketcan_can9: None} now has values {'com.victronenergy.battery.socketcan_can8': None, 'com.victronenergy.battery.socketcan_can9': None} with result None

Fixed.

Rubens974 commented 4 months ago

Great You are the best So none is not 0! This has solved the problem, topic can be closed now

Thank you so much.

pulquero commented 4 months ago

Pleasure.