Hello everyone,
I’m working on a virtual battery aggregator for my Victron Cerbo GX setup and running into some unusual issues that I hope someone here might help me understand better.
What I’m Building:
- I have multiple batteries connected via serial to the Cerbo GX.
- Each battery has its own D-Bus service (e.g.,
/com.victronenergy.battery/ttyUSB0_*
). - I’m aggregating their values (Voltage, Current, SoC, etc.) based on their configuration (e.g., 4 in series, 4 in parallel).
- These aggregated values are pushed to a custom virtual battery D-Bus service, which I then set as the Battery Monitor in
Settings > System setup > Battery monitor
.
The Issue:
When I select the virtual battery as the battery monitor and connect a solar charger, the virtual battery page in the GUI:
- Freezes for a long time
- Then updates all values rapidly
- Then freezes again, and repeats this cycle
This only seems to happen when:
- The solar charger is connected, and
- My virtual battery is selected as the system’s battery monitor
My Setup:
- I’m using
dbusmonitor
to read all serial battery values and perform aggregation. - The virtual battery works and shows correct values eventually, but it lags badly in real-time.
Possible Causes I Suspect:
- Feedback Loop – When the virtual battery is used as the system battery monitor, Victron components like solar chargers may use its values for decisions, and this may cause a conflict or loop.
- dbusmonitor Lag – The tool may be falling behind in reading all the D-Bus path updates in real-time, causing values to freeze and then catch up in bursts.
What I’m Looking For:
- Has anyone seen this kind of freezing and burst update behavior?
- Is this known to happen when using virtual battery setups?
- Are there better alternatives to
dbusmonitor
for listening to D-Bus values and doing real-time aggregation? - Any general advice or tools I could explore to make this smoother?
This is a bit complex, and hard to fully explain in a single post, but any insights, examples, or leads would really help me a lot.
Thanks in advance!