question

vt1py avatar image
vt1py asked

Set DVCC maximum charge current by MQTT

Hi all!

I am wondering if I can set the DVCC -> "maximum charge current" by MQTT?
Didn't find any matching post so far.

So I can limit the batteries maximum SOC depending on the weather. In summer a maximum SOC of 60% is ok.

The DVCC -> "maximum charge current" can be set in the remote console.

I tried to set the AC input current instead by sending:
'W/--ID--/vebus/276/Ac/ActiveIn/CurrentLimit'
But that doesn't work. The remote option for setting the input current is "true".

Any ideas?

Thanks all in advance! :-)

MQTT
10 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

derrick thomas avatar image derrick thomas commented ·

You can do it easily with node red. If you need mqtt try running dbus-spy in console to find the registers you need.

0 Likes 0 ·
vt1py avatar image vt1py commented ·
Thank you, Thomas.

I published the message with node red but without success as nothing happened (the charge limits were not set). Does dbus-spy need to run on the Victron device (i.e. Cerbo GX) or can it be used on any other Linux system? The usage does not look straight forward to me right now..

0 Likes 0 ·
derrick thomas avatar image derrick thomas vt1py commented ·

Dbus-spy needs to be run in terminal. I usually login thru ssh on a mobile device or my Chromebook. Yes you should be able to do it with a Linux machine, but you need something connected to the cerbo.

Another alternative that just became available...the last beta version of Venus os v3.10~32 has added 2 additional nodes to the victron pallet that essentially do the same thing as mqtt. These nodes send/receive data to/from the dbus. Just open the node, select the device and path from the drop down list, and save. Check out the documentation on the beta thread in modifications.

DVCC however can be adjusted using the standard dvcc nodes.

1 Like 1 ·
vt1py avatar image vt1py derrick thomas commented ·

Hi Thomas, hi all,

I just installed node-red-contrib-victron on my external RaspPi. It seems, for communication DBUS over TCP needs to be activated.

I run FW v2.91 on my Cerbo GX. I read about bricked systems after setting DBUS over TCP in a wrong manner. To avoid this nightmare ;-) my question is:

Can I activate DBUS over TCP by setting "dbus -y com.victronenergy.settings /Settings/Services/InsecureDbusOverTcp SetValue 1" with FW 2.91?

And should I have access to all nodes of node-red-contrib-victron with this system setup?

Thanks again! :-)

0 Likes 0 ·
Show more comments
6 Answers
markus-001 avatar image
markus-001 answered ·

@vt1py

Use the Victron input node, Settings Control then use the following

  • Venus settings
  • DVCC system max charge current (A DC)

Link that to an MQTT input node

I use this to limit a Fronius Symo 15kw to reduce the charge current when battery SOC goes higher than 85% or what ever I decide as a percentage limit on the Node red dashboard. Make sure to write the setting to file and read the value from file to safe guard the value after a reboot or restart.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

vt1py avatar image
vt1py answered ·

Hi, thank you for your help. :-)
Node Red doesn't run on the Cerbo but on another RaspPi in my configuration.
Afaik I will need to use DBUS over TCP for the Victron input node. Can you confirm or do you use it in another way?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

olivier-hecht avatar image
olivier-hecht answered ·

I'm also trying to get this to work, but no luck so far. I'm not familiar with Node Red at all, but I've been successfully using MQTT through Home Assistant via my Cerbo GX to control a lot of settings. I've even been able to publish a new value to the address below and can see the change in MQTT Explorer, but it doesn't ever actually pass through to the solar charger. It almost seems like this field/address is locked or read-only somehow between what I can see and change via MQTT and the actual Victron hardware. I'm willing to try to figure out Node Red for this if it's the only way, but I'm also trying to understand why this particular setting won't update to the solar charger even when I seem to be able to modify it via MQTT. Thanks in advance.

victron/N/############/solarcharger/279/Settings/ChargeCurrentLimit

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

markus-001 avatar image
markus-001 answered ·

@Olivier Hecht check to make sure the payload passed into the Victron node is a valid number and not text that displays a number. Text looking like a real number has tripped me up a few times. Format the payload with a function node

return {payload:Number(msg.payload)};

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

oooliver avatar image
oooliver answered ·

@Olivier Hecht Use the right mode to update value:

victron/W/############/solarcharger/279/Settings/ChargeCurrentLimit
       ^^^

N: Notify => subscribe topic => receive values
W: Write => write value => send value to device
R: Read => read value => trigger value to be sent, all subscribers will receive a fresh value

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

vt1py avatar image
vt1py answered ·

Hi all,

it might still be helpful for someone:

- I finally changed to v 3.30 on my Cerbo GX (normal image, not large as Node Red is running on a separate 'server')

- with version >= 3.x (don't know the exact version) you can set /Settings/Services/InsecureDbusOverTcp using dbus-spy (in console, i.e. using Putty (..) and SSH log in to your Cerbo). As derrick thomas mentioned above dbus-spy does show all the settings and channels

- no problems with the Github Fronius Smartmeter integration using firmware v 3.30

- setting of DVCC Charge Current Limit does work (using Node Red and Homeassistant)

- the topic in my case is as follows:

W/##VRM-ID##/settings/0/Settings/SystemSetup/MaxChargeCurrent

- there might be a problem with strings instead of numbers/integers - again as already mentioned by markus-001

- this can easily be checked by listening to your own W/##VRM-ID##/settings/0/Settings/SystemSetup/MaxChargeCurrent message in Node Red


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources