How to set Maximum Charge Voltage 'from externally'?

hi!

How can the ‘Maximum Charge Voltage’ (DVCC setting in Venus, I think settings/MaxChargeVoltage on MQTT) get controlled by another application, e.g. my Python script?

grafik

Background: I like to control charging, e.g. limit to 80% SOC, but up to this cause as much charge current as possible.

I think with ESS this is built in (Battery Life…) but I do not have MultiPlus or like that, only SmartSolar Chargers an SmartShunt, so I can not activate ESS.

If there is another way to set up charging up to a certain SOC, please tell me also!

I tried to write the MQTT topic, but it seems not to get applied.

Worst case I could write the requested charge voltage of the BMS (charge control by BMS activated), but I think there should be a more ‘direct’ way…

thank you very much for help!
greetings!
Phil

You can set the d-bus path corresponding with the above presented “Maximum charge voltage” option.
The path is: com.victronenergy.settings/Settings/SystemSetup/MaxChargeVoltage
That path contains a value of 0.0
As soon as you put there a different than zero value, the “Limit managed battery charge voltage” option gets activated automatically and in the “Maximum charge voltage” appears your just set-up value.

hi Alex, thank you very much!
I think d-bus control via Python isn’t ‘too easy’ is it? Is this really the only way? Not possible to do by MQTT?

Never used MQTT, but, who know, maybe there is a topic to use there too, that maps to that value.
As for using d-bus via Python, just use as an example the dbus-systemcalc-py project on GitHub.
It’s the engine that powers the DVCC on Venus OS.
You can see there a lot of interaction with dbus through VeDbusService class.

thanks! I will have a look at it.

there is an according MQTT topic MaxChargeVoltage

grafik

but I never managed to change it by writing…

@alexpescaru could you please kindly give me an example line how to change the value of com.victronenergy.settings/Settings/SystemSetup/MaxChargeVoltage?!

is it something like

dbus -y com.victronenergy.settings/Settings/SystemSetup/MaxChargeVoltage SetValue 54.0

?

At the command prompt level, yes.
But put a space between the node key and the path.
Like this:
dbus -y com.victronenergy.settings /Settings/SystemSetup/MaxChargeVoltage SetValue 54.0

thank you! at least this works :blush:

but with dbus_systemcalc_py I don’t find the hook to set a value…

man, man, man, it seems to be really hard to access the dbus from a remote system! why does Victron make it that complicated to limit the charge voltage in an automated way? …

ha!! I think I got it (the MQTT way…) :star_struck: The ‘N’ needs to get replaced by a ‘W’.

mosquitto_pub -h ‘192.168.1.106’ -t ‘W/b1234567890d/settings/0/Settings/SystemSetup/MaxChargeVoltage’ -m ‘{“value”: 54.10}’

see GitHub - victronenergy/dbus-flashmq: Plugin for FlashMQ that interfaces between DBUS and MQTT.

1 Like

Thanks for sharing!

in fact Victron did a very good job - I understood when reading the dbus-flashmq article. yesterday I got frustrated sitting there half the night trying dbus access ‘from externally’ and failing… But the way Victron solved it is a really good thing - sorry Victron! :wink:

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