Custom Component: SolarEdge Modbus TCP

Did you ever work this out ?

I have a SE8k (3phase) and do not get data from the meter
In my case I think its as its identified as 201 instead of 203 when querying modbus
I’m still talking to my installer about trying to get this sorted as well

"meters": {
    "Meter1": {
        "c_manufacturer": "WattNode",
        "c_model": "WND-3Y-400-MB",
        "c_option": "Export+Import",
        "c_version": "31",
        "c_serialnumber": "xyz",
        "c_deviceaddress": 1,
        "c_sunspec_did": 201,

But there are p1/2/3 registers?

        "p1_current": -32768,
        "p2_current": -32768,
        "p3_current": -32768,

You should be able to add them yes.

I had this working fine until I had an LG Chem battery installed, then SolarEdge reporting was only intermittently uploading.

Once I disabled this integration it immediately was able to upload. Since then I have been unable to get Modbus reporting over TCP again, I tried the trick listed above but still nothing.

Anyone have any ideas?

Edit: Definitely getting a connection refused error or a timeout. I have tried various combinations of reboots and turning on and off TCP MODBUS.

Replying to myself incase it helps anyone else

Solaredge have remotely reconfigured by setup (via my installer)
Now getting meter data

"meters": {
    "Meter1": {
        "c_manufacturer": "WattNode",
        "c_model": "N/A",
        "c_option": "Export+Import",
        "c_version": "0",
        "c_serialnumber": "0",
        "c_deviceaddress": 1,
        "c_sunspec_did": 203,

How do people find the reliability of the modbus connection?

Can I setup the beefy dashboard to fall back to the online API if the local one is not available?

The reliability will also depend on your internal network I think. But over here I have had zero problems in a couple of months.
You can have modbus and the ‘official’ integration running the same time.

1 Like

@Uskompuf I second what @breinonline said, and I recommend using cable, not wifi. I’ve been running it myself for over a year with no problems caused by modbus tcp / inverter itself

@erikarenhill Brilliant component !
I have a problem with meter1 (from the inverter attached smart meter) values for AC Current (#40190 - #40194) not capturing sign (+ vs -). Hence I can’t distinguish 4 Amp export from 4 Amp import.
According to SunSpec they are signed int16 (unlike the inverter’s uint16) which makes sense.
I can also see the code reading them as int16. Still I seem to get the abs() value of the current.

The equivalent Power value (#40206) does report negative values correctly

(I want to implement load balancing per phase for EV charging)
Have anyone seen this problem?

Hi Joakim, have you tried changing the data type locally in the component for your inatallation to see if it works better?

Hi Erik!
Hmm - no I’m not really sure what to test. INT16 seems as the correct choice since the current to the house should be signed (be able to take both positive and negative values). My thinking is that either:

  1. The value is getting abs() applied to it some where in the processes or
  2. The Meter is actually providing an abs() value on the modbus port
    Have opened a case towards SolarEdge as well
    /Joakim

Hello I had a power failure but now I can no longer connect to HA on SolarEdge modbus

Logger: pymodbus.client.sync
Source: /usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py:201
First occurred: 09:41:38 (32 occurrences)
Last logged: 09:57:08

Connection to (192.xxx.xxx.xxx, 1502) failed: [Errno 111] Connection refused

Has anyone ever had this and how do I fix it?

and your Inverter is on Power?
When exactly was your Power failure?

“Connection refused” sounds a bit as the inverter does not allow the system to be connected to the modbus interface.
I had this, when I tried to reconfigure the Modbus configuration on the Inverter… Maybe, the config got lost due to the unexpected shutdown?

Do you know how to connect to the inverter with SetApp?

yes i know and have done that
everything looks oke
the power failure was only on de HA the inverter was not powerless and my home network was power failure too
the power failure was on sunday and it doesn’t work since then

I haven’t done anything but the problem is solved by itself.

Mmm it worked for 1,5 hrs and then it stopped working. I haven’t change anything.Does anyone know what it can be and how I can fix it?

I tried to install it but my configuration is not valid. It gives me two errors:

Setup failed for solaredge_modbus: Requirements for solaredge_modbus not found: [‘pymodbus==1.5.2’].

and

Unable to install package pymodbus==1.5.2: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f80d203d0>: Failed to establish a new connection: [Errno -2] Name does not resolve’)’: /simple/pymodbus/ WARNING: Retrying

It seems that it is unable to install pymodbus.
How can I fix that?

edit:
Got that fixed by adding another dns server 8.8.4.4

New problem. added the lines to my configuration.yaml and it now shows the following errors:

homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Invalid config for [solaredge_modbus]: expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘host’]. Got ‘192.168.2.131’
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘name’]. Got ‘SolarEdge Modbus’
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘port’]. Got 1502
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘read_meter1’]. Got False
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘scan_interval’]. Got 5. (See /config/configuration.yaml, line 20).

please copy that part of your configuration as a formatted code here so we can help you

Try to give HA a restart before you add it to your configuration.

Hello all. I have the component working correctly since last year. I have Hassio version core-2021.5.5 and checking Check Home Assistant configuration for version 2021.10.6 gives me this error:

Failed config
General Errors:
- Integration error: solaredge_modbus - Integration ‘solaredge_modbus’ not found.

Any ideas? Thank you