I have been battling this all week. I Got all the hardware setup but cannot control anything the system does. I’ll give system info and I let chatgpt write a script that shows the settings are what they should be (If I am right) and the things we tried to get this multiplus2 gx to obey my script. Nothing seems to work.
It will be used as an ess. Without the meter running I couldn’t even get the ess assistant to run at all.
I want the grid to be used as less as possible and later I want to go dynamic price contract and set the price difference for where we start using the battery. or the bitcoin miner that should be switched by relais on acout2
So in the end I want total control.
If you look at the script and the settings / output you will see that is has an ess assistant and it has the meter etc. just take a look. There is a lot of info.
Update:
While running a loop that writes to:
/Hub4/L1/AcPowerSetpoint
every 5 seconds (each write returns retval = 0), the ESS consistently changes its behaviour and starts charging the battery.
Changing the requested setpoint (-1000, -33, 0, +33, +1000) does not appear to change the observed behaviour.
Stopping the loop causes the ESS to eventually return to its normal idle behaviour after some time.
This suggests that repeated writes to /Hub4/L1/AcPowerSetpoint are affecting the ESS controller in some way, but not as a direct inverter power command. The command is accepted (retval = 0), yet the requested setpoint is neither reflected by GetValue nor followed by the inverter.
Is /Hub4/L1/AcPowerSetpoint intended to be a command/event interface rather than a persistent property? If so, what is the expected behaviour and semantics of this API when ESS is running in Mode 3 (External Control)?
kut.py is the test script
loop-3.py is a small file, my first time i have been successful at influencing the multiplus2. It is not doing what i want but it responds in some way …
So if you look at the output file you’ll see exactly how it is setup what frmware etc. and my first goal is for it to respond to anything as expected.
Ultimately it should just obey. If i say keep the meter at zero it just should. in between bms limits offcourse ..
srry u kinda asked for this, in the pdf it is ordered nicely . .
root@nanopi:/data/scripts/energy_manager# root@nanopi:/data/scripts/energy_manager# root@nanopi:/data/scripts/energy_manager# python3 kut.py ================================================================================ SYSTEM ================================================================================ Venus OS v3.75 Victron Energy 20260624163305 Services org.freedesktop.DBus com.victronenergy.grid.p1 com.victronenergy.hub4 com.victronenergy.settings com.victronenergy.vecan.can0 com.victronenergy.system org.bluez com.victronenergy.fronius com.victronenergy.vebus.ttyS3 com.victronenergy.platform net.connman com.victronenergy.modbusclient.tcp org.freedesktop.Avahi debug.victronenergy.gui fi.w1.wpa_supplicant1 com.victronenergy.shelly com.victronenergy.logger com.victronenergy.adc com.victronenergy.modbustcp ================================================================================ VERIFY CONFIGURATION ================================================================================ --------------------------------------------------------------------------- ESS Mode (Hub4Mode) Service : com.victronenergy.settings Path : /Settings/CGwacs/Hub4Mode Value : 3 Expected : EXPECTED = 3 (External Control) --------------------------------------------------------------------------- BatteryLife State Service : com.victronenergy.settings Path : /Settings/CGwacs/BatteryLife/State Value : 10 Expected : Expected: not Keep Charged --------------------------------------------------------------------------- VE.Bus Mode Service : com.victronenergy.vebus.ttyS3 Path : /Mode Value : value = 3 Expected : Expected: 3 (On) --------------------------------------------------------------------------- VE.Bus State Service : com.victronenergy.vebus.ttyS3 Path : /State Value : value = 8 Expected : Expected: running --------------------------------------------------------------------------- VE.Bus MainState Service : com.victronenergy.vebus.ttyS3 Path : /VebusMainState Value : value = 8 Expected : Expected: running --------------------------------------------------------------------------- Hub4 DisableCharge Service : com.victronenergy.vebus.ttyS3 Path : /Hub4/DisableCharge Value : value = 0 Expected : Expected: 0 --------------------------------------------------------------------------- Hub4 DisableFeedIn Service : com.victronenergy.vebus.ttyS3 Path : /Hub4/DisableFeedIn Value : value = 0 Expected : Expected: 0 --------------------------------------------------------------------------- Hub4 Sustain Service : com.victronenergy.vebus.ttyS3 Path : /Hub4/Sustain Value : value = 0 Expected : Expected: 0 --------------------------------------------------------------------------- Grid meter power Service : com.victronenergy.grid.p1 Path : /Ac/Power Value : -64 Expected : Should be a valid value --------------------------------------------------------------------------- Battery power Service : com.victronenergy.system Path : /Dc/Battery/Power Value : 0.0 Expected : Current battery power --------------------------------------------------------------------------- Battery SOC Service : com.victronenergy.system Path : /Dc/Battery/Soc Value : 82.5 Expected : Current battery SOC =========================================================================== Configuration check completed. If ESS Mode = 3 and the VE.Bus state is running, the command tests below should be accepted by the ESS controller. =========================================================================== ================================================================================ TEST 1 : Hub4 AcPowerSetpoint -33W ================================================================================ Before value = 0 Write retval = 0 After value = 0 Actual Battery Power 309.95200222778294 Actual Grid Power -68 Battery SOC 82.5 ================================================================================ TEST 2 : Hub4 AcPowerSetpoint +33W ================================================================================ Before value = 0 Write retval = 0 After value = 0 Actual Battery Power 347.61999702453613 Actual Grid Power 252 Battery SOC 82.5 ================================================================================ TEST 3 : VebusSetChargeState = 1 ================================================================================ Before value = 0 Write retval = 0 After value = 0 Actual Battery Power 0.0 Actual Grid Power 261 Battery SOC 82.5 ================================================================================ TEST 4 : Override Setpoint -33 ================================================================================ Before value = [] Write retval = 0 After value = [] Actual Battery Power 0.0 Actual Grid Power 208 Battery SOC 82.5 ================================================================================ TEST 5 : ForceCharge = 1 ================================================================================ Before value = 0 Write retval = 1 After value = 0 Actual Battery Power 0.0 Actual Grid Power -84 Battery SOC 82.5 ================================================================================ TEST 6 : MaxDischargePower = 33 ================================================================================ Before value = [] Write retval = 1 After value = [] Actual Battery Power 0.0 Actual Grid Power -83 Battery SOC 82.5 ================================================================================ END ================================================================================ Final Battery Power 0.0 Final Grid Power -122 Final SOC 82.5 ================================================================================ SUMMARY ================================================================================ The following control interfaces were tested: 1. /Hub4/L1/AcPowerSetpoint 2. /VebusSetChargeState 3. /Overrides/Setpoint 4. /Overrides/ForceCharge 5. /Overrides/MaxDischargePower For every test the script records: - value before write - SetValue() return value - value after write - actual battery power - actual grid power - battery SOC Expected behaviour: Writing a discharge command of approximately 33 W should result in measurable battery discharge. Observed behaviour: Commands are accepted (or return retval), but battery power and grid power do not change. root@nanopi:/data/scripts/energy_manager#
my question wasn’t about the meter and ess. I have no clue on node red. I can do some python. lawmakers force me basically to go with an dynamic energy price contract and use external parameters to decide what to do when. and victron ess has no clue about my energy prices or needs or anything. Also prices may go negative here, so then or on very low prices bitcoin will be mined. so i should be able to just say i want acout2 on or of. what settings, what code will make this happen ??
so I have the assistant running now, in external control but i had it in other modes and it doesn’t keep the grid total at zero at all. for me victron ess could be a safe mode, but i need full control for my needs. any hints that could lead to an obeying multiplus2 would be greatly appreciated
By default the ACout2 is active whenever the ACin is active, meaning when grid is available. But you can change that behavior by using relay assistants. But to be honest, if you dont intend to use a parameter that is already available on the MP itself, then i personally wouldnt bother with it, and instead use one of the Cerbo relays, or some other source, to switch your miner on/off.
Are you feeding the victron system the total grid power, and how frequent? Ideally faster than 500ms
Dbus path for the external control setting should still be com.victronenergy.vebus.ttyS4/Hub4/L1/AcPowerSetpoint so im not sure why it would not work for you. But to be honest its been two years now since ive last used that in a system, recently im using nodered. But maybe someone else knows if that path is still current and how it should behave
are those on existing on my multiplus 2 ?? i don’t have a cerbo .. And no, the parameters that i am gonna come u[ with are not on the mp, think about btc network hasrate, btc price, energy price, pv production and soc … i am reading my p1 meter every second.
Then that could be the, or part of the, issue behind the ESS not being able to regulate to zero. Victrons own VM3 and a few CarloGavazzi works on a 100ms intervall. Id say the ET112 is the slowest of the bunch that get used often, at 750ms.
Well then thats not an option. The MP2 only has the ACout2 relay and one or two Aux relays that can be configured. But you can only really use them with parameters that are on the MP itself like GC voltage, AC power and so on. I guess you would have to use something else to switch the Miner
so if 3 hours long 1000 watt plus into the grid, while soc is 84% and no charging, then later 3000 watt into the grid for hours, soc 84 % and no discharging . . is because my meter is slow ?? I think victron ess is more of ups thing then actually keeping the grid meter at zero till you need back up from the grid. But i still want full control, so my only question, please look at the work i have put in. Why is it not responding predictably to my commands. How to get full control over what it does when.
So main uestion remains, on a MultiPlus-II GX in ESS External Control mode, writing to /Hub4/L1/AcPowerSetpoint changes behavior but both +500 and -500 result in a brief charge (~150 W). What additional state or D-Bus property is required for VE.Bus to interpret this as an actual inverter power setpoint?"
Additional observation
After another evening of testing I think we’ve narrowed the problem down considerably.
The behaviour appears to be consistent, not random.
com.victronenergy.vebus.ttyS3/Hub4/L1/AcPowerSetpoint does influence the MultiPlus in some way.
Repeated writes to this path consistently change the ESS behaviour (charging starts, stopping the loop eventually returns the system to idle).
However, the requested value itself appears to be ignored:
GetValue always reports 0
GetText always reports 0W
changing the requested value from -1000 to +1000 does not result in proportional inverter power.
In addition, inspecting the Venus OS source shows that DynamicESS itself does not write directly to /Hub4/L1/AcPowerSetpoint.
Instead it writes to the com.victronenergy.hub4 override interface (/Overrides/Setpoint, /Overrides/MaxDischargePower, etc.).
On my system those override paths either return or reject writes (retval = 1), so I cannot reproduce the behaviour of DynamicESS from an external application.
So my question has become much more specific:
For a VE.Bus-based ESS in External Control mode, what is the supported public API for commanding inverter power?
Is /Hub4/L1/AcPowerSetpoint intended to be used directly by third-party applications, or is there another interface that external software is expected to use?
You can use a GX and then manipulate commands that would normally be controlled by the GX and settings there.
Settings such as grid set points and feedback switching on and off.
The ESS Mode 3 documentation shows /Hub4/Lx/AcPowerSetpoint as the correct D-Bus interface for VE.Bus external control.
Is there an additional setting equivalent to Modbus register 71 (“Power Setpoints acts as limit”) or another required mode bit that changes how /Hub4/L1/AcPowerSetpoint is interpreted? On Venus OS 3.75
D-Bus accepts the write.
The ESS reacts somehow.
The requested value is ignored.
The register reads back as zero.
Under what condition does mk2-dbus print “Power setpoint write skipped (phaseFlags=%d)”?
Id start by learning from well documented material on
Learn the basics and then ask specific questions
I use ess grid tied (mp2gx + ct clamp on main grid incomer + 4x mppt’s on ve direct ,smartshunt on ve dierect + 2x jkbms on rs485-usb + arduino with 8way relay board on usb, various node red scripts controling arduino, relay assistants used as failsafe control)and it regulates fairly good to what ever grid set point i set !!!