Idea

Bernhard Matschinger avatar image
Bernhard Matschinger suggested

VenusOS - Writeable ModbusTCP Registers for external Generators

Hello Victron!

Hello @mvader (Victron Energy)

After a few weeks of trying to implement a new driver (https://github.com/victronenergy/venus/wiki/howto-add-a-driver-to-Venus) for Kostal PV Generators (that is using Sunspec Standard but on different settings :) ) and looking into a lot of your code blocks on Github and on the CCGX, I found out that there is a python Service already running (dbus-systemcalc-py), that is fetching and merging all infos together... Just what I need...

So I tried to implement a driver that fetches ModbusTCP data from external devices, where I got stuck, because I am not able to install pip or other software (apt-get) on the gx device :( ...

So I looked a lot how you solve and address these things and stranded in a lot of c++ code..

After a few days of success and misses I was mowing the lawn and thought about the Xlsx Sheet ModbusTcp Register list, where there are a lot of writeable registers (from external).

And there, a new idea popped up.

Is it possible, that victron implements a writeable registerlist for one complete generic Generator with the required information for each position in the ESS System

One AC in / One AC out

then I am able to fetch all available PV, Wind and other Generators connected in the Sytem, parse them together and send the Sum of them to this generic Generator;

The same also for DC Generators as well

(I was listening to Bob Hopman on todays (26.6.2020) Webinar of mppt s, and a customer asked if it is possivle to add Data of 40 BlueSolars to the system... so, this is not possible, but when you fetch this data with different hardware and post it to the VenusOS via ModbusTCP, then you would have all the info there as well.)

So I get all the measurements of each phase and write them once per second to the generic Generator;

The dbus_systemcalc.py could fetch this data as well, and on the other hand, it would be possible to show these readings on the Display as well, and on VRM Portal for logging.

What do you think about?

It would open up the world and reduces your work to implement each different Type of Generator moving along or beside sunspec standards, device Id s and so on..


Wish you all the best

Bernhard Matschinger

https://www.msol.at


Venus OSGeneratorModbus TCP
2 |3000

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

1 Comment

mvader (Victron Energy) avatar image
mvader (Victron Energy) commented

Hi @Bernhard Matschinger, just a note that I’ve read this.

I dont know what to think yet.


i do know you can do this yourself quite easily: run a dummy dbus service, there are python scripts available for that; with the right service name and paths.

And then you might need to modify The modbustxp file attributes.csv (on the rootfs somewhere) to change all related registers to writeable and presto. Couple of hours work; no more; if you know where to look ;o).


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

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Blunt afterthought: Nr of customers that really need 40 mppts that will then want to go through all required trouble to do above and in the end then end up with all sorts of limited functionality such as no visibility on firmware versions, no remote features for those mppts, etc etc is in my opinion zero.

Also from Victron side I dont want such large and then handicapped as well as one off and bug prone systems out there.

0 Likes 0 ·
Bernhard Matschinger avatar image Bernhard Matschinger commented ·

Hi!

I didn't knew that I can change the modbus writeable register list --> I will have a look at it, and will try...
What I have not mentioned was that I was not able to use a Python ModbusTCP --> so I tried to install but had no success..

have a nice weekend for now; I am going code diving ;)

greets

0 Likes 0 ·
seamaster avatar image seamaster Bernhard Matschinger commented ·

@Bernhard Matschinger I have Northen Lights Generator and DC20-MKII installed. The DC20-MKII controller has the ability to communicate via modbus. I spent fair amount of time installing and configuring it and at this stage I can read all registers with the oil pressure, temperature, RPM, etc., and also start and stop the generator via mod bus commands from PC running qmod or other free modbus program.

The ultimate goal is to implement the data reading function and the start/stop with cool-down on the Cerbo-RPI running Venus Os (the DC20-MKII has cool down function, but my Quattro II needs to be able to stop using the generator in order to do the cool-down).
My question is did you get deeper into that and did you write some scripts that i could potentially modify and use?

Thank you for the help!

0 Likes 0 ·
Bernhard Matschinger avatar image Bernhard Matschinger seamaster commented ·
Hey,

thank you for your Info on that old post:

Years gone by, and over time I did a different approach: using Meters ;)

.. today I am developing services, when there is a need for. I stopped the thing with modbusTCP. So yes I did a deeper look, but no, not for this problem any more. Dbus Services are the way to go.

all the best


0 Likes 0 ·

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.