Control charging of second Victron System.
Find a file
2026-04-14 13:15:46 +02:00
.gitignore First working version. 2026-04-13 13:39:43 +02:00
energyFlow.py Update README. Fix missing symlink to python3. 2026-04-14 13:15:46 +02:00
LICENSE Add README.md and LICENSE 2026-04-13 14:03:36 +02:00
README.md Update README. Fix missing symlink to python3. 2026-04-14 13:15:46 +02:00

EnergyFlow

There might be cases where you got two Victron Gerbo GX with different batteries. They cannot communicate together and you have to run one Gerbo GX on ESS-Mode3 External control.
With EnergyFlow you're running one battery as Master (ESS Mode 2). The second battery (ESS Mode 3) will be controlled by setting AcPowerSetpoint.

Install python3 an paho-mqtt

Debian:
apt update && apt install python3 python3-paho-mqtt

Alpinelinux:
apk update && apk add python3 py3-paho-mqtt

Usage

Might work without bridging MQTT messages from victron to own MQTT-Broker (with some modifikations). Preferred way is to set up your own mosquitto-broker.
Variables need to be adjusted to own setup. Have a look around all MQTT-Messages from Victron: Settings/Debug & Develop/Values.
Enable MQTT Access: Settings/Integrations/MQTT Access
Unique Victron ID can be found here: Settings/VRM/VRM Portal ID

Running as service

On systemd machines: nano /etc/systemd/system/energyFlow.service

Add following:

[Unit]
Description=EnergyFlow

[Service]
ExecStart=/opt/energyFlow/energyFlow.py
Restart=on-failure
WorkingDirectory=/opt/energyFlow
User=myuser

[Install]
WantedBy=multi-user.target

Start service:

systemctl daemon-reload
systemctl enable energyFlow.service
systemctl start energyFlow.service

See if it's running:
systemctl status energyFlow.service

View logs:
journalctl -u energyFlow.service

To be continued...