question

Bernhard Matschinger avatar image
Bernhard Matschinger asked

ModbusTCP Sunspec --> Standard or Not?

Hello Everyone!

Looking for a solution to implement a Kostal 3Phase Inverter via ModbusTCP to a Venus GX.

What I came up with:

I already have a different Installation running Sunspec for a Solaredge --> Setting Device ID126 and getting that Inverter Connected to my GX device (running almost a year)

With a new installation I have a Kostal, that has ModbusTCP implemented, but not working on a GX Device..

  • Basically I enabled Modbus TCP on the Inverter
  • I redirected the not changeable Modbusport 1502 to 502 via an external rerouting
  • I Changed the device ID from 71 to 126 (as well to quircks the GX)
  • (I checked all Sunspec Register with an external Software I wrote and get all infos)

But now things are different

On SolarEdge ModbusTCP Registerlist starts at 40070 with all necessary data

on Kostal ist starts on 40071

So the GX Device does not understand what s going on because of that one Address Shift


My question:

Has anybody connected a PV Inverter with different PORT and a different Initial ModbusTCP Register Starting Address?


Or from the other side:

Is it possible to change the Settings in the VE device via SSH, or do I have to Implement an external device or write my own internal Codeblock to get things running.


Answers highly appreciated

Greets

Bernhard Matschinger / Msol GmbH
https://www.msol.at


Venus OSModbus TCPsunspec
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 Answer
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi Bernhard, I cant help technically (there is no setting, and our pvinverter driver code is -partially- closed source.

External device might be possible & internal code block is possible (but I expect it to be quite some work; probably easiest to add into the existing modbus-client driver that you’ll find in v2.60 beta series. Its written in Python. Either really add it in, or make a copy ).


but I am curious: why go through all that trouble instead of using one of the already supported brands and or a few hundred euros energy meter instead? If its for the challenge, I’d understand. But commercially I do not?

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 ·

Ps. Sounds like Kostal is purposefully deviating from the real standard.

0 Likes 0 ·
Bernhard Matschinger avatar image Bernhard Matschinger mvader (Victron Energy) ♦♦ commented ·

Hi Matthijs!

Finished our prototypes (yes there a more already) and now coming to real world existing Setups with different brands of invertes.

Yes of course, it is cheaper to use energy meter; but when dealing with higher amount of installations, this soon gets to a point where it get s cheeper to invest in a "translation" and implement some parts of software.

Just for now, I already rerouted the port different traffic via virtual ethernetAdapters to be accessable from the GX device; as well I am thinking of writing a Python Modbus Translater (to get Device A with different DevId in, and out for DevId 126 on Port 502, starting on the correct ModbusRegister), so that the GX device can deal with to 50 Addresses Modbus Register List..


And as you already know: I am not going the "easy way" because I want to make it good, sustainable and yes.. sometimes a bit of nerdiness as well :)

But thank s for the hint as well, I will have a look at the code

0 Likes 0 ·
Bernhard Matschinger avatar image Bernhard Matschinger mvader (Victron Energy) ♦♦ commented ·

Did a some hours of research on the difference..

currently I am not sure what else is needed. I even copied the SolarEdge Registerlist 40000 to 40069 (not every but the filled ones) and delivered all (40070|39) registers. Nothing happend

Even when directly writing them "hardcoded" as copy to ne new ModbusTCP Server (virtual), the VenusGx does not find it.

As mentioned above.. Device ID 126, Port 502 -- > I virtually made a copy of an existing SolarEdge Inverter - nothing happening.

Unfortunately I have not found the modbus-client driver for 2.60. Is it on github?


Was thinking about making a virtual energy Meter via Modbus (is it easier to implement for now?). --> is there some specification? which standard is used there.

I / We are coming up with a lot of installations where we will face the same problems every one again and I will be prepared.

Thank s a lot.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ Bernhard Matschinger commented ·

Hi,


The code talking modbustcp to the pv inverters is here:

https://github.com/victronenergy/dbus-fronius

The other driver (currently not used for pv inverter readout and control) I mentioned, is not publicly on github. But you will find it on your gx device after installing v2.60.

dbus-modbus-client, it must be there somewhere, since that is what we use for reading out the new ethernet meters.


no, emulating a grid meter doesnt sound line a good idea to me. Then why not make code to read the info from that kostal, and publish it to dbus directly as a pvinverter? Its not that much code afterall.

0 Likes 0 ·

Related Resources

Modbus TCP Basics

Additional resources still need to be added for this topic

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)