question

Bernhard Matschinger avatar image
Bernhard Matschinger asked

Create ModbusTCP BMS that CCGX can fetch data from

Hy there.

I am reading the forum up and down and looking into all kind of docus on the victron pages but I can't find the answers to my plan.


I do have an ESS System, with a 48 V Battery System. Grid Connected and up and running :)

I am using an Active BMS System from Autarctech.de . Sadly, they do not support Victron directly so I have to write my own logic for that.

So this is, how I will do that.

I do have a small controller (Raspberry PI) connected to the Serial Interface of the BMS Systems and fetiching all datas.

Today I actively write SOC and other things (GridSetPoint) to the CCGX using ModbusTCP....

I want to implement a ready to use ModbusTCP Server, using the right Registers, that the CCGX accepts it as BMS an polls data from it.. (like the SUNSPEC protocols for my SolarEdge Inverts, who are working fine).


So my question here is:

  • is there a Registerlist, that the CCGX needs? (where do I have to publish what values)
  • what settings do I have to make in the ESS configuration on my MultiPlus II

Please give me some Hint's, Docus, Information...


In future I am going to build more of these Systems, therefore I am very grateful for your help.


many thanks

Bernhard

BMSCCGX Color ControlVenus GX - VGXModbus TCP
1 comment
2 |3000

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

johandeklerk avatar image johandeklerk commented ·
Hi Bernhard

Have you had any success with you BMS writing modbus data to the GX device. I would like to do the same this as I have 5 battery banks each with a BMS.

Regards


Johan de Klerk

0 Likes 0 ·
4 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi all,

this is not possible without modifications to Venus OS. What you "could" do (but you'll have to try to see how well it works) is create a dummy BMS service, you can use one of our dummy dbus python scripts as a starting point. Make sure it matches all D-Bus paths that a normal BMS also publishes. Make all paths writable. Then change the attributes.csv file in the modbus service, making these paths writeable as well. And.. presto. hopefully.


Above might be a bit cryptic, and its all I can help - sorry.


Note that I personally wouldn't go through this route - it doesn't feel really solid to have the data pushed in by a BMS like that - but that might be debatable.

1 comment
2 |3000

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

Bernhard Matschinger avatar image Bernhard Matschinger commented ·

Coming up late with this answer..

I made an direct aporach; The Suppliere implementen CAN Bus Functionality to the BMS so it works directly via CAN perfekt for now.

So no need any more to quirks around and do unnice things ;)

0 Likes 0 ·
wkirby avatar image
wkirby answered ·

There is a ModbusTCP register list here: https://www.victronenergy.com/support-and-downloads/whitepapers
There is an Excel spreadsheet to download on that page which has all the current Unit IDs and registers.

I'm curious how you are currently writing values to CCGX if you did not have the register list before?

Have you used NodeRED before?

2 |3000

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

Bernhard Matschinger avatar image
Bernhard Matschinger answered ·

I know the register list, and I am using it (ID 100 - 2700 (AcPowerSetpoint), ID246 - 30 (SOC)) and so on (written my own .Net Application, setting those values to not overcharge my battery) (but this is not that what I want for future)

but there are no writeable registers to tell the System the correct Battery Voltage and Amps...


what I want is to create a device, Victron is able to read from, and fetch data from (a typical BMS, like Victron does with Sunspec fetching data from solaredge inverters).

So your answer is not pointing to my question. :(

I am asking .. is there a documentation for creating a ModbusTCP Server, that delivers data the CCGX is able to read from an sees that device as an external BMS System and reacts on that parameters...


thanks.


PS: no, i have not used NodeRED




1 comment
2 |3000

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

floyd avatar image floyd commented ·

Did you find the answer to this? I'm also wanting to create a device for my lithium BMS and to see if CCGX can read data from my BMS in the same way as the supported BMS's.

0 Likes 0 ·
fantail avatar image
fantail answered ·

get the dbus bridging examples here:

https://github.com/victronenergy/velib_python/find/master

create a python task to open a socket port

send data to your task

decode and use victron python lib functions to place values on dbus.


if you use the pre installed dbus battery settings then just full in the values.


note: you can add additional dbus registers if you want - but then you may have to start changing the web interfaces.

Victron python lib functions are heavy on CPU resources but should be OK for your needs


regards Fantail



2 |3000

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