Hello,
thx
Jens
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
Hi and thx but I use feed in on-grid.
so I need help with the script pls.
Hi Paul, Maybe it would be better sharing your broader setup and what you are trying to achieve. There maybe a better solution that writing and maintaining a script. While people can point you in the right direction, you need a fair amount of programming knowledge to actually create and maintain it.
At a high level you will need to access the dbus, to read SOC from the battery, make a decision and then write a predetermined value back to dbus to switch the device on and off.
The dbus path and value you will need to switch the multiples on and off is the /Mode parameter of the com.victronenergy.vebus service.
Some good reading on dbus and VenusOS would be these two links
https://github.com/victronenergy/venus/wiki/dbus-api
https://github.com/victronenergy/venus/wiki/dbus#vebus-systems-multis-quattros-inverters
you may also find some information in here useful as you are sort of writing a driver..
https://github.com/victronenergy/venus/wiki/howto-add-a-driver-to-Venus
You will likely want to make use of the python velib library as it will help with a lot of the dbus interfacing, https://github.com/victronenergy/velib_python. There are two example services included, but nots are how useful they will be.
Maybe look at VenusOS Large and Node Red. This might be an easier way of reading the SOC, making a decision and switching the inverter on and off. Especially if your development skills are lacking.
I think you are better off writing your own script.
The script you are using is an example HOW to use Victon ModBusTCP.
Its not intended for the purpose you are trying to achieve.
A big part of what you posted of the script is for a users visual indications and nothing to do with control. :-)
Victron Venus OS Open Source intro page
Venus OS GitHub (please do not post to this)
Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.
45 People are following this question.