question

asko58 avatar image
asko58 asked

Connecting Multiplus II to meter (Solaredge) avoiding ModbusTCP

Dear community,

first of all: Hello to everybody! This is my first post and I am quite new to the topic of ESS though I do have experience regarding electrical installations in general.

Right now I am considering installing a ~10kWh ESS into my home that adds energy storage capabilities to the already existing installation of 13kWp solar power on the roof. Right now energy metering is done via a Solaredge Modbus Energy meter (SE-MTR-3Y-400V-A) that is connected to the Solaredge inverter via modbus over RS485.

Now, if I were to install a Multiplus, I would like to re-use the data from the meter (there is no space for an additional Victron meter). As I understand there is a way of doing so using modbus over TCP and have the Multiplus get the data from the inverter (correct me if wrong). Sadly that seems do disconnect any other appliance (i.e. my home automation server) from the modbus TCP connection because there is ony one connection allowed. Of course I could only connect the Multiplus and read the data from the it via MQTT then, but what data does it publish? Only the meter readings or also the energy production values from the inverter?

Generally speaking, I would prefer using direct hard-wired RS485 or similar to using LAN, since it is independent from the availability of my home's network. So: Is there any other way to get the Multiplus to receive data from the meter? Can it connect to the Solaredge meter via the USB->RS485 dongle and be added to the RS485 bus between meter and inverter? If not, are there any other ways of connecting the existing meter and the Multiplus?

I hope somebody can shed a bit of light on this, otherwise I will have to think about a completely different setup.

Thanks in advance!

Multiplus-IIEnergy Metersolaredge
2 |3000

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

4 Answers
matt1309 avatar image
matt1309 answered ·

Hi @asko58


Easiest option is what you suggested using MQTT data of victron system to read the data in home automation system. In terms of finding out what info is published on MQTT i tend to look at DBUS addresses here:


Just check this has the data you need if it does then you should be good:

dbus · victronenergy/venus Wiki · GitHub

I'm not sure what device the solaredge is setup as but my guess is PVInverter.


Otherwise i think you could probably get data via RS485. I'm not sure if it's officially supported by victron but if not a lot of folk in the community have written custom drivers (tend to be in python) to add support for meters they have. You may be able to tweak someone elses code or find the exact one if someone has done similar. I'll have a search and see if i can find anything on github, but i think the MQTT option is easiest.


EDIT:

I couldnt find a perfect example of github. But you could probably tweak the shelly power monitor code to get the data from this:

GitHub - nmakel/solaredge_modbus: SolarEdge Modbus data collection library


Rather than the http endpoint in the shelly power monitor code:

dbus-shelly-3em-smartmeter/dbus-shelly-3em-smartmeter.py at main · fabian-lauer/

(Row 132 in code).


2 |3000

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

asko58 avatar image
asko58 answered ·

Hi @matt1309

thank you for your answer! From what you are saying about the easiest way being MQTT to get the values for home automation I deduct that a ModbusTCP connection beween the Solaredge inverter and the Multi is possible without additional drivers, right?

Thank you for pointing out the alternatives. I rougly get what the code is doint where, but I have to admit that my understanding of the inner workings of Venus OS and my Python skills are rather limited. Even if I managed, the RS485 bus might not work with two masters (GX + inverter) being on the bus.

Am I correct that a connection to an EM24 or similar via RS485 works with built in drivers? It would be interesting to know what other meters are supported this way, maybe I could find a work-around.


2 |3000

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

matt1309 avatar image
matt1309 answered ·

Hi @asko58

I believe to enable inverter monitoring via Victron GX device you connect via modbus TCP.

The bit you might need custom drivers for is if you want to read the SE energy meter data directly via modbus RTU/RS485.

I would suggest you use this link to get solar edge data into victron system.

Integrating with SolarEdge [Victron Energy]

Then read the data from victron either via victron's modbusTCP server or MQTT to get the information into your homeautomation. I prefer MQTT but I know many others with home assistant use victrons modbusTCP to read the data.


I have an ET112 and i know that uses rs485 but not sure if its strictly modbus protocol or not. If it is then you're right could (probably easily) tweak the drivers in venus os to get it working. I wasn't 100% sure on that hence why i defaulted to using the python modbus github link in combination with the shelly energy meter to get the answer. But a good shout definitely worth looking into ET112/EM24 to see if they use modbus via RS485. Would just need to tweak the id's of the data from SE energy meter then



EDIT:

I think you're right. I've just checked. I believe the driver is stored in:

/opt/victronenergy/carlo_gavazzi.py

So may be worth trying to change the registers to whatever registers the SE one uses.

May be worth copying the file and then adding it to dbus-modbus-client.py to follow the same layout as the ABB and carlo meters have been added.


If you go this route you'll get way more help in modifications section.


2 |3000

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

asko58 avatar image
asko58 answered ·

Hi @matt1309

thank you for looking into this in detail! I'll try and give it a shot changing the original dbus-modbus-client interface. And I will also try and have a look if it is possible to even just integrate a modbus sniffer driver. That way the connection between the inverter and the meter would even remain untouched.

Like this one here

https://github.com/snhobbs/ModbusSniffer

2 |3000

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