Issue "Dc\0\MaxChargeCurrent"

Good morning everyone,
I have a system with two MPII in parallel and two MPPT RS 450/100 and 30kW of battery, I would need to use node-red to modify only the current in AC-IN that goes to charge the battery.
I had identified this Param “/Dc/0/MaxChargeCurrent” but after having modified it it returns to the original value set in VeConfig.
I would like the Victron technicians to kindly fix this problem, they would make me happy.
Thanks Manuele

Are you trying to separate the charge current of the multi’s from the charge current of the MPPT chargers ?
Basically try to let the MPPT chargers charge with unlimited A but you want to limit the Multi’s charging A ?

There was a good discussion about this in the old community, see below.

To summarise, if you are running lead acid batteries without DVCC then using /Dc/0/MaxChargeCurrent works and remains fixed. However, there appear to be 2 registers, one for the VE config setting which is not affected by /Dc/0/MaxChargeCurrent and a working one that is altered by /Dc/0/MaxChargeCurrent.

If you are running managed batteries, full DVCC or perhaps ESS then the system updates the working register overriding any setting from /Dc/0/MaxChargeCurrent.

It appears this changed around V3.20 or V3.30.

https://communityarchive.victronenergy.com/questions/271884/set-maxchargecurrent-to-0-within-node-red-works-bu.html

Not sure it’s helpful for this particular use-case but I use a flow to dynamically set DVCC during summer.
It allows me to limit the charge capacity of the Multi’s whilst still allowing full MPPT charge power. As feed-in is allowed, the MPPTs should always operate at max powerpoint unless other thresholds are triggered.

The flow reads the MPPT /Dc/0/Current and adds that number to a static variable for the multi’s. Has been working well for me. Not sure of any downsides. Would be good to get some input :slight_smile:

The change resetting the /Dc/0/MaxChargeCurrent is in dbus-systemcalc-py/delegates/dvcc.py around line 1280. I’ve made the following change in v3.51 :

--- 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

                        # Copy the rest unmodified
                        self._multi.bol.maxdischargecurrent = bms_service.maxdischargecurrent

It’s working for me, my configuration via node-red is not overrided any more, but I’m not sure what other consequences it could have.

I would like to point out that I have enabled the DVCC option.
This Param would have been useful to me to regulate how much charge to give to the batteries at night, that is, when energy is at a lower cost, at least here in Italy.
It is certainly not the same thing as acting on the “Maximum charge current” parameter in the DVCC section.
I thank @Ormira Nicolas for the suggestion, but I would not like to modify the code without knowing it thoroughly.
I would just like it to be considered a bug fix by Victron.

Well done Victron! Finally the use of this parameter “/Dc/0/MaxChargeCurrent” has been restored, this starting from the v3.60 release. Thanks a lot!

…Sorry but after testing even better, I see that the situation has not changed, the error persists.

1 Like

Well spotted.

Will Victron restore this “/Dc/0/MaxChargeCurrent” service to what it was? It’s very unfortunate that you can no longer limit/change the inverter charger current via Node-Red.

Best Regards,
Patrick.

Ciao Patrick,

I finally managed to change the value of “/Dc/0/MaxChargeCurrent”… try testing the attached NodeRed script. It finally works properly…great!

I’m very happy, Victron, always one step ahead.

Best Regards

Manuele

[
    {
        "id": "f2f15242c3315d5c",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 2A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "2.0",
        "payloadType": "num",
        "x": 170,
        "y": 320,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "a1c3d610fb964a59",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 8A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "8.0",
        "payloadType": "num",
        "x": 170,
        "y": 440,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "df39b7e453b01110",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 12A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "12.0",
        "payloadType": "num",
        "x": 170,
        "y": 480,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "f32750751d8cdeda",
        "type": "comment",
        "z": "b8a9732feb14767c",
        "name": "MaxChargeCurrent Readme",
        "info": "// ATTENZIONE per poter scrivere usare  \"W\" di Write:\n// MQTT Topic = W/c06.../vebus/275/Dc/0/MaxChargeCurrent\n\nImpostare con VeConfigure il valore \"Charge Current\" al valore massimo desiderato ( x / numero di MPII).\nIl valore modificabile da Node-Red potra' essere solo <= al valore impostato in VEConfigure.\nAd ogni reset della macchina questo valore si porra' uguale a quello di default in VeConfigure.\n\n!!! IMPORTANTE !!!\nSarebbe molto meglio usare questo valore per regolare la corrente entrante in batteria e non il valore in DVCC poiche' altrimenti se fosse giorno e dovesse uscire il sole limiterebbe gli A in batteria provenienti dal sole, modificando il valore del DVCC.\nNon potrei neppure regolare \"AC/ActiveIn/CurrentLimit\", ovvero gli Ampere in entrata dalla Rete, poiche' limitando questi, andrebbe a limitarmi anche una corretta gestione del carico di casa.\n\n",
        "x": 540,
        "y": 300,
        "wires": []
    },
    {
        "id": "ad27ee641875911d",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 0A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0.0",
        "payloadType": "num",
        "x": 170,
        "y": 280,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "fe4369769765a135",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 4A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "4.0",
        "payloadType": "num",
        "x": 170,
        "y": 360,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "f43e90dc3ed43971",
        "type": "inject",
        "z": "b8a9732feb14767c",
        "name": "Load DC \"Charge Current\" : 6A",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "6.0",
        "payloadType": "num",
        "x": 170,
        "y": 400,
        "wires": [
            [
                "4aae43bf2ba9f164"
            ]
        ]
    },
    {
        "id": "f7cd7ce719d432c5",
        "type": "mqtt in",
        "z": "b8a9732feb14767c",
        "name": "Battery MaxChargeCurrent",
        "topic": "N/c06.../vebus/275/Dc/0/MaxChargeCurrent",
        "qos": "0",
        "datatype": "auto-detect",
        "broker": "431cb9c14d871bd7",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 490,
        "y": 420,
        "wires": [
            [
                "d0b9eb1c4373209a"
            ]
        ]
    },
    {
        "id": "d0b9eb1c4373209a",
        "type": "debug",
        "z": "b8a9732feb14767c",
        "name": "MaxCharge",
        "active": true,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 710,
        "y": 420,
        "wires": []
    },
    {
        "id": "85b80334d233097a",
        "type": "mqtt out",
        "z": "b8a9732feb14767c",
        "name": "Battery MaxChargeCurrent",
        "topic": "",
        "qos": "",
        "retain": "true",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "431cb9c14d871bd7",
        "x": 660,
        "y": 360,
        "wires": []
    },
    {
        "id": "4aae43bf2ba9f164",
        "type": "function",
        "z": "b8a9732feb14767c",
        "name": "Sw Max",
        "func": "\n// ATTENZIONE per scrivere usare la W di Write\n// W/c06.../vebus/275/Dc/0/MaxChargeCurrent\n\nvar msg_ret    = { payload : msg.payload, topic : msg.topic  };\n\nmsg_ret.topic = \"W/c06.../vebus/275/Dc/0/MaxChargeCurrent\";\nmsg_ret.payload = '{\"max\": 12, \"value\": ' + msg.payload + '}';\n\nreturn msg_ret;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 440,
        "y": 360,
        "wires": [
            [
                "85b80334d233097a"
            ]
        ]
    },
    {
        "id": "431cb9c14d871bd7",
        "type": "mqtt-broker",
        "name": "mqttxx.victronenergy.com",
        "broker": "192.168.21.159",
        "port": "8883",
        "tls": "",
        "clientid": "",
        "autoConnect": true,
        "usetls": true,
        "protocolVersion": "4",
        "keepalive": "0",
        "cleansession": true,
        "autoUnsubscribe": false,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "true",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]

Hi, Manuele
I tested your script, but unfortunately, after a second, the value resets to what was set in the MultiPlus itself when it was configured. It seems like the charging current can currently only be controlled by DVCC.

Hi AndriiS,

Try enabling ACin first, then adjust the DC Amps charging the battery.

I’d also like to let you know that I have DVCC enabled in my system.

The set threshold value is reached very slowly… it is not an immediate thing.

Best Regards

Manuele

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.