DVCC activated (v3.70), noESS: Limit Grid charging (trough Multiplus2) in a flexible way - how?

Hello.

For a system (Boat/RV) with no grid code (feeding the grid no allowed), and with that no ESS, I want too realize a (virtual) switch to activate/deactivate the charging trough the Multiplus2. It seems to be impossible.

In node-red I can write my desired setting (e.g. “0” for off and “9999” for max) trough Custom control, but my settings are overwritten fast (most likely DVCC).
I can not/do not want to limit charge trough DVCC as this would negatively affect MPPT/PV charge. What am I missing, was hoping to find a way to simply deactivate/activate the MP2 internal chargers, but this does not seem to be possible either?

In the flow attached you see that I set “0”, but the setting already overwritten with “21”

I did try the “AC Charger Control” node (as can also be seen in the above picture) - it sounds so fitting, but the MP2 is not shown in it’s settings, so I assume this node can only handle dedicated chargers?

What am I missing. Can’t be too complicated to limit/disable grid charge, but still fully utilize MPPT/PV while grid is present?

If you have lithium batteries installed with communications, it is not recommended to ignore the BMS charging limit set by DVCC.
This will prioritise PV charging in any case.
Enable / Disable Ac charging, you can either switch the AC power to the inverter, or you can set ignore AC in on the virtual switch - if you are not using any assistants.

Maybe I was not clear enough. I meant that I have DVCC active, and I will let it do it’s thing (in regards to limits, or whatever the BMS dictates).

I just want a way to limit/deactivate the chargers within the Multiplus, and I want to do this in an elegant/flexible way.

Virtual Switch (ignore AC) trough VeConfig not an option, too unflexible. Want to be able to change how long (down to which SOC) AC is ignored and change such thresholds within the Venus gui (like a slider “maintain min soc" before grid power, value 20-70). I might be able to to that by switching the Multiplus mode from “on” to “inverter only” (manually or with some node-red logic and virtual switches).

Fine, but then, if SOC becomes low (down to a level where I want to maintain a desired minimum SOC), then I switch from “inverter-mode” to “on” (do not ignore Grid anymore) All fine, and this is exactly the time where most of the time I want to limit battery charging from the MP2 chargers (from the grid) down to zero. I will use the grid for my loads as long as it takes PV/MPPT to bring up the batteries to a level where I switch back to inverter (ignore AC) mode. And while connected to the grid, I do wish to prevent (most of the time) the use of grid power to charge the batteries, no need to waste power to transform AC in the chargers to DC and push it in the batteries if there is no rush and the MPPT/PC can do it, while I use the grid for my loads in the meantime.

iirc DC charging will have priority for the charge limit. So if you dynamically adjust that value based on available DC PV then it should throttle the AC-based charging.

I try to follow your suggestion, but so far I can not see how this can work: My thoughts so far (if I understand you correctly):

The DC charging from the MPPT is very flexible in the way of what it delivers (sun, clouds, sun-angle, RAIN, etc) - it basically changes every second, so I never can know what the MPPTs could deliver to dynamically limit my charging rate to that… Is this understanding correct?

Wonder why Victron has (as far as I currently see it) no flexible option to just disable/enable the AC charger in the MP2. I get that setting charge amps manually can potentially cause issues with DVCC (depending on how the software logic is in the background), and therefor DVCC overwrites it as it needs it. But why not just a general on/off possibility (trough node-red or whatever)? I hope I am missing something here, so far it seems so unnecessary complicated.

Most likely best overall solution - if Victron would chime in:
Have an option in DVCC to allow/disallow charging from the MP2 ACDC-chargers - could easily be toggled with some node-red logic, no?

I have the same needs and I ended up patching a file (use it as your own risks !) :

--- dvcc.py.orig
+++ /opt/victronenergy/dbus-systemcalc-py/delegates/dvcc.py
@@ -1280,10 +1280,10 @@
                                self._multi.bol.maxchargecurrent = mcc
                                # Also set the maxchargecurrent, to ensure this is not stuck
                                # at some lower value that overrides the intent here.
-                               try:
-                                       self._multi.maxchargecurrent = max(self._multi.maxchargecurrent, mcc)
-                               except TypeError:
-                                       pass
+#                              try:
+#                                      self._multi.maxchargecurrent = max(self._multi.maxchargecurrent, mcc)
+#                              except TypeError:
+#                                      pass


I have this patch since v3.51 without any side-effects and if I get the meaning of the commentary right, I WANT a lower value overriding the multiplus max charge current.

Since 3.70 I use this flow :

[
    {
        "id": "063b59405b5c5008",
        "type": "tab",
        "label": "Flux 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1ffef8c4f9d53a88",
        "type": "victron-input-custom",
        "z": "063b59405b5c5008",
        "service": "com.victronenergy.vebus/276",
        "path": "/Dc/0/MaxChargeCurrent",
        "serviceObj": {
            "service": "com.victronenergy.vebus/276",
            "name": "MultiPlus-II (276)"
        },
        "pathObj": {
            "path": "/Dc/0/MaxChargeCurrent",
            "name": "/Dc/0/MaxChargeCurrent",
            "type": "number"
        },
        "name": "",
        "onlyChanges": true,
        "outputs": 1,
        "x": 170,
        "y": 100,
        "wires": [
            [
                "01ad04cb0fc0efb7"
            ]
        ]
    },
    {
        "id": "01ad04cb0fc0efb7",
        "type": "ui_slider",
        "z": "063b59405b5c5008",
        "name": "",
        "label": "Max charge",
        "tooltip": "",
        "group": "f0d944440512ba91",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "outs": "end",
        "topic": "topic",
        "topicType": "msg",
        "min": 0,
        "max": "120",
        "step": 1,
        "className": "",
        "x": 450,
        "y": 100,
        "wires": [
            [
                "42f097359ba3165d"
            ]
        ]
    },
    {
        "id": "42f097359ba3165d",
        "type": "function",
        "z": "063b59405b5c5008",
        "name": "State to JSON",
        "func": "msg.payload = { \"/SwitchableOutput/output_1/Dimming\": msg.payload };\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 100,
        "wires": [
            [
                "d566d5122357fde6"
            ]
        ]
    },
    {
        "id": "d566d5122357fde6",
        "type": "victron-virtual-switch",
        "z": "063b59405b5c5008",
        "name": "",
        "outputs": 2,
        "switch_1_type": 7,
        "switch_1_min": "0",
        "switch_1_max": "120",
        "switch_1_initial": 0,
        "switch_1_label": "",
        "switch_1_unit": "A",
        "switch_1_step": 1,
        "switch_1_customname": "Max charge",
        "switch_1_group": "AC",
        "switch_1_include_measurement": false,
        "switch_1_rgb_color_wheel": false,
        "switch_1_cct_wheel": false,
        "switch_1_rgb_white_dimmer": false,
        "x": 360,
        "y": 200,
        "wires": [
            [],
            [
                "59d1edc24d242f0b"
            ]
        ]
    },
    {
        "id": "59d1edc24d242f0b",
        "type": "victron-output-custom",
        "z": "063b59405b5c5008",
        "service": "com.victronenergy.vebus/276",
        "path": "/Dc/0/MaxChargeCurrent",
        "serviceObj": {
            "service": "com.victronenergy.vebus/276",
            "name": "MultiPlus-II (276)"
        },
        "pathObj": {
            "path": "/Dc/0/MaxChargeCurrent",
            "name": "/Dc/0/MaxChargeCurrent",
            "type": "number"
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "x": 650,
        "y": 200,
        "wires": []
    },
    {
        "id": "f0d944440512ba91",
        "type": "ui_group",
        "name": "Default",
        "tab": "79e08d895c0a1d45",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "79e08d895c0a1d45",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    },
    {
        "id": "a6af03fd96927a89",
        "type": "global-config",
        "env": [],
        "modules": {
            "@victronenergy/node-red-contrib-victron": "1.6.61",
            "node-red-dashboard": "3.6.2"
        }
    }
]

My use case was a little different then OP. I have an RV system recently installed which is a single MP2 12v 2x120v-120, 2 100/50 MPPTs and 600AH of 12v Lifepo4. So no ESS and really didn’t want to mess with the Charge Current assistant as I wasn’t sure how that would effect the DVCC functions that I already have a couple node-red flows running on.

What I was looking to do was have the ability to reduce (down to zero) and/or completely disable the MP2 battery charger while leaving the AC passing through instead of inverter. I would also want to allow my two MPPT controllers to charge at max to top off/keep up with the Battery charging.

The reason is the scenerio that I am at an RV park with shore power. My 12v loads running continuously are not enough to tax the battery bank for several days, but I don’t really want to listen to the fan cycles or even add heat cycles to the electronics for unneeded reasons, especially if its hot outside. I’d rather just let all the solar catch up the next day. The side benefit is that if I am plugged in, I don’t have to fidget with settings to be nicer to the battery bank when I don’t need to charge at Max 120a. I am waiting until tomorrow when there is sun to verify the DVCC max current and this setting can be used independently like I am targeting so that I can control solar vs AC charging.

That said, Thank you Nicolas - this was a key part of solving my issue that I’ve been looking and experimenting with for a few days. There was one caveat - the ‘patch’ did not work for me as written. I also had to comment out the else in the nested if statement at around line 1248 through 1250 or else every 2 or 3 seconds the value would return to the max of 120a on my unit:

I also had to restart the dbus-systemcalc-py service to get the changes to take effect - svc -t /service/dbus-systemcalc-py

Perhaps this wasn’t needed and I misunderstood something, but if not I would leave this here for someone else.

I don’t use ESS nor do I have a Generator but I use a Generator assistant to activate charging from grid either manually in VRM OR automatically by SOC.

For example: Start Gen. (grid) <20% and stop >40, it will do this automatically.

When I go to VRM top right corner I can manually start and stop the ‘Generator’ (grid).

When DVCC is set at 90A and Solar is 80A, the multi will only take the other 10A and the loads from grid (until set Amps grid limit is reached).

Thanks for the idea with the workaround.

Your approach/idea is appreciated, but it’s not for me.

I really can to expect from the manufacturer (these days) that in best case he provides by himself the option to limit grid Amp charge, while PV is utilized to it’s full potential. In case he can not do provide that, then at least provide the proper nodes (options) to make it possible for the user/professional to program such option…