Custom Component: SolarEdge Modbus TCP

Hi, solaredge sometime use port 502. Try that! Otherwise earlier in this thread you can find instructions how to enable it yourself using the wifi hotspot. There you can see and change the port yourself too.

Thanks, Iā€™ll try that. In the meantime I changed the port to 502, strangely the error message now in HA is: ā€œComponent error: solaredge_modbus - Integration ā€˜solaredge_modbusā€™ not foundā€. I installed it following the instructions, putting the solaredge_modbus directory under the custom_components. Is there something else Iā€™m missing, maybe?

Ik have the same issue. Using the example file nd changing only the IP address. I am still on 105.5.

Thanks @erikarenhill for this custom component.

I have moved to a new place with SolarEdge SE3000H inverter and have decided to experiment it on a new hass.io install before re-configuring my previous HA instance.

I have come across this error from a clean install:

Component error: solaredge_modbus - Requirements for solaredge_modbus not found: ['pyModbusTCP >= 0.1.8'].

I am able to get SE3000H onto my IoT wifi network. Can Modbus TCP be only accessible through ethernet / LAN?

Is there an easy way to see if I can use this? (like a tcpdump or other quick check). I was using SolarEdge Local but as of yesterday it stopped working. Reset inverter and didnā€™t get it back. Messages are going to the cloud and I can ping the Inverter IP.

Itā€™s a newer HD Wave no-screen Inverter.

Thanks.

What hassio version are you in?

It should work over wifi too what I know!

Veresion 0.107.7
HassOS 3.12

The error details are as follows:

Error loading custom_components.solaredge_modbus. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 391, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/solaredge_modbus/__init__.py", line 5, in <module>
    from pyModbusTCP.client import ModbusClient
ModuleNotFoundError: No module named 'pyModbusTCP'

@arc2v is your inverter using SetApp for configuration?

Does it have a wifi hotspot so you can connect to it with the latest mySolarEdge app?

You could scan for port 502 or 1502 which is modbus (1502 is default but solaredge sometime default to 502)

Yes, it is SetApp capable but networking is done through hard-wired Ethernet. I have the SetApp and SolarEdge app, but I do not have the mySolarEdge app. Iā€™ll take a look at that.

Thanks.

I had some more luck after restarting hass.io a few times. Not sure if it was my firewall automatically blocking traffic that disallowed hass.io from fetching the python modules.

So I am now able to run the integration, but I am also getting ā€œerror 4ā€ in the log.

I have installed and run Poll Modbus Free that you have mentioned. Starting the app with port 502 configured returns ā€œConnected > Reconnectingā€ cycles and ā€œTransaction failed (1 time)ā€.

If the app is able to connect and fail, does that mean I do in fact have the modbus TCP installed?

@timolol have you enabled modbus in your inverter? No error 4 is of I recall correctly connection failed as well.

See this post for how to connect to the inverter (step 1-2) and then enable modbus tcp instead of rs485 as the post mention (as we discuss smart meters there)
Custom Component: SolarEdge Modbus TCP

1 Like

Iā€™m also getting the dependency error. You said restarting a few times fixed it? Iā€™ve tried three times, but no luck.

What versions are you all running?

Nevermind, I saw it in the error log. Iā€™ll upgrade and see if that helps get the dependency.

1 Like

Okay, on the update of HASS it got all the dependencies. Now I have error 2 in the logs, but at least thatā€™s a new error :slight_smile:

Hi, I have had the same problem as you when updating to version 107.7, error 2 and 4. I have created a container with version 107.5 again and it is completely solved. not a problem of the tcp port on the solaredge device, It is related with version 107.7. Iā€™m sorry I canā€™t help with dependencies, but I do know it is related with homeassistant version

1 Like

Thanks @erikarenhill. I have SE3000H, which is one with the LCD screen. I can access the configuration screen and change communication option directly from the LCD.

I have manually entered IP addresse / netmask / gateway in LAN section which is the only place I can modify the port of the Modbus TCP. I changed both RS485-1 and RS485-2 to Non-SE Logger and SunSpec protocol. And placed server to LAN mode, although Wi-fi is still connected. I left at those settings and went to bed.

This afternoon probably by noon, the power in my house suddenly got disconnected - both the grid and inverter circuit breaker were tripped and turned off. My inverter power is gone and I canā€™t seem to turn it back putting the circuit breakers to on.

Could my settings have done something to trip the power? Looks like I may have to call the solar tech to come and fix this problemā€¦ :cold_sweat:

Sorry I know this is getting out of the context of this post, but I assume changing Communication settings on the inverter will not cause any serious harm? :confused:

Thanks. Iā€™m not sure how to downgrade my install, but I can start looking at what might have changed between .5 and .7.

@erikarenhill Any idea what Error 2 is? I poked through the code, but Iā€™m not a Python programmer. More of a Matlab and Perl/bash script guy. Thanks.

I found what went wrong: I had copied the whole directory in my custom components instead of copying only solaredge_modbus. Now everything works fine. Too bad that we still cannot read the meterā€™s consumption values, as others mentioned, which is the most important for making automations, imho. Still, excellent work, really!

1 Like

@kostasyrtariotis great that you fixed it! If you install the separate modbus meter (extra hardware) this component can provide those numbers as well.