Control of Victron Battery Discharge and Grid Power Management via MODBUS

I want to control Victron so that I can decide when Victron is allowed to discharge the batteries at night or instead draw energy from the grid.

As I found out, I can achieve this via MODBUS registers 2704 and 2705.

As soon as I set register 2704 to 0, the system starts drawing from the grid. Additionally, I need to set register 2705 to 0 so that the battery is not charged from the grid.

This works quite well. Unfortunately, the “return” to the original state doesn’t work as smoothly. For that, I would first reset register 2704 to “-1”, and then set register 2705 to “-1”.

In practice, however, this doesn’t work. Register 2705 can be set to -1 via the value 65535 without any issues, but not register 2704. It seems I can only set 2704 to 0, but not to -1.

What am I doing wrong, or which register do I need to address to disable “limit inverter power”?

Please don’t get me wrong, I want to program this cleanly, so no “tricks” like setting register 2704 to 10,000 watts or something like that.

Hi,

Did you ever get a solution to setting register 2704 to -1 and how that is done? I’m trying the same with firmware 3.55 and with a couple of beta version of 3.60.xx and it still doesnt seem to work.

I’m getting

Blockquote dbus -y com.victronenergy.settings /Settings/CGwacs/MaxDischargePower SetValue -1
Usage: dbus [options]
Blockquote dbus: error: no such option: -1

When I’m trying directly in the CLI.

/Kaj

Ping to @mpvader - Has the following setting ever worked?

dbus -y com.victronenergy.settings /Settings/CGwacs/MaxDischargePower SetValue -1

Is it supposed to switch off the switch visually when writing -1 to the register or should something else be written to ‘switch off’ the inverter limiting its output?

Currently on 3.60~66 beta.

/Kaj