Cerbo GX to show SolarEdge info via Sunspec

In this application note we learn that Cerbo GX can collect the SolarEdge information via Sunspec. I have tested and it works.

Now, my SolarEdge has a battery and I collect data about it via MODBUS over TCP/IP. When I move the SolarEdge device ID from 1 to 126 I can’t get data about the battery anymore.

Question: Is it possible to allow Cerbo GX to collect data from SolarEdge if it is using the device ID 1?

1 Like

Hé,

I have the same problem. In my case it is because I’m also trying to connect homey to my solar edge inverter. This app needs device ID.1.

Do you already now if it is possible tot connect solar edge to our Cerbo GX true device ID.1?

So far I did not get a single response on this.
You are the first one to show interest on it.

I think Arjan’s problem is the single connection limit in solaredge.
I seem to get intermittent data from SE10K in my Cerbo GX. I suspect it gets a time-out of 2 minutes and drops the modbus connection. Any way besides wireshark to confirm this?

Recently SolarEdge has sent a firmware update for the batteries. I will try to reconfigure the system again to see if the addressing problem of LG MODBUS is solved.

Only then I can see if Venus OS (on Cerbo) can collect and show all the information from the 2 SolarEdge I have.

Hello, would you please let us know if the problem was resolved? I have the same problem.

No! I gave up on both, collecting the SolarEdge info from Victron and asking questions in this forum. This is something you will not be able to solve without development support and it is more like they are too busy doing other things.

For those that are still willing to solve this problem, I got it working by implementing a modbus proxy that will translate the request from 126 to 1. The proxy is a stable Python module so called modbus-proxy. This allows you to connect to this proxy asking for any unity ID a having it to convert to any other unity ID. So you program your Victron to talk to you proxy over ID 126 and then tells the proxy to convert 126 to the SolarEdge ID.

This not only solves the problem for those who have a SolarEdge with a LG battery but also allows for more than one device to talk to the SolarEdge inverter via modbus as they only allow for a single modubus TCP connection.

I hope it helps you!

Hi, that is a great news. Would you please let me know if it could be work on Raspberry PI (HA)? Have you used this GitHub - tiagocoutinho/modbus-proxy: Connect multiple clients to modbus devices ?

Thanks in advance.

Yes, I am using the proxy you mention above. However, I have no idea if you can use HA for this. I am running it as a service on a VM that I have for several other things. I have installed it on a Python VENV and created a systemd service calling the proxy pointing to the place of my yaml configuration file. Mine is:

cat /opt/modbus-proxy/modbus-proxy.yaml 
devices:
  - modbus:
      url: "TCP://172.16.7.181:1502"
    listen:
      bind: "0.0.0.0:502"
    unit_id_remapping:
      126: 1

The systemd service is this:

cat /etc/systemd/system/modbus-proxy.service
[Unit]
Description=Modbus Proxy (SolarEdge UnitID remap 126->1)
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=modbus_proxy
Group=modbus_proxy
Restart=always
RestartSec=2

# Allow binding to privileged ports (<1024) while still running as modbus_proxy
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
NoNewPrivileges=true

ExecStart=/opt/modbus-proxy/venv/bin/python -m modbus_proxy -c /opt/modbus-proxy/modbus-proxy.yaml

# Hardening
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true

# Allow reading venv + config under /opt
ReadOnlyPaths=/opt/modbus-proxy

[Install]
WantedBy=multi-user.target

Thanks a lot!