Solaredge Modbus Configuration for Single Inverter and Battery

From Release v2.4.0

  • New “refresh” button entity to request an immediate update if you don’t want to wait for the next polling cycle.
1 Like

@P6Dave This pre-release might fix the random struct.error thing which I happened to observe by chance in my dev environment but couldn’t duplicate.

Release v2.4.4-pre.1

1 Like

How do I install a pre-release? I’ve downloaded the zipfile. Do I just replace the relevant folders. It happened again last night and prevented my battery grid charge automation from running.

Perhaps your simulator didn’t get that memo :grin:

:crossed_fingers:

You can install it manually or turn on show beta versions versions in HACS.

I’ve installed the beta version from the HACS. I’ll keep an eye out in case the error returns and let you know.

can anyone help me with this problem? I updated to the latest version but the data always seem to be incorrect

Anyone knows if something has changed on behalf of SolarEdge, eg a firmware update? My Modbus is not responding at all since 2 days and I am abroad and cannot check the inverter. Everything up on SE Monitoring platform.

Edit: started working again without me doing anything…but was not ablebto query modbus for 3 days.

I seem to be missing these sensors for some reason:

Entity not available: sensor.solar_accounting_cost_rate
Entity not available: sensor.solar_accounting_compensation_rate

Entity not available: sensor.solar_imported_power_daily
Entity not available: sensor.solar_house_consumption_daily
Entity not available: sensor.solar_battery_out_daily

Any Ideas anyone?

I’ve added the following wiki page about template sensors in response to issues being opened for template errors (which are not integration issues but things that should be accounted for in the template design):

Template Design Notes · WillCodeForCats/solaredge-modbus-multi Wiki · GitHub

1 Like

Rebooting (or power cycling) the system Home Assistant runs on should be the first step with connection issues. This must be a true reboot of whatever OS is being used to clear any hung network connections, not a core-only restart. Second would be to power cycle the inverter with the modbus/tcp connection in case it is blocking longer than the 2 minute max it’s supposed to have.

If any wireless is involved it’s widely reported that wifi and solaredge modbus has various issues. Anyone is welcome to try and work with wifi of course, but I don’t really want to hear about any wifi troubles myself. My inverters and HA system are all hardwired so I do not have any wifi to test with.

Generally speaking, because I use my own integration, I would never actually make a release that fails to connect to my inverters so it’s more likely connection failures are a local problem not an integration level problem.

Thanks for all the great work you are doing to modbus-multi.

Normally I would totally agree with your comment above regarding networking errors generally being a local issue, however there is an issue with HA 2023.9.1 and pymodbus 3.5.1 which causes networking to hang, when enabling modbus-multi v2.4.5-pre.2

I’ll add my details here: Error after update to 2023.09.01 · Issue #429 · WillCodeForCats/solaredge-modbus-multi · GitHub

mark@odroid:~$ telnet 192.168.86.75 1502
Trying 192.168.86.75...
Connected to 192.168.86.75.
Escape character is '^]'.
^[^]
telnet> quit
Connection closed.

# Enable modbus-multi custom integration
mark@odroid:~$ telnet 192.168.86.75 1502
Trying 192.168.86.75...
telnet: Unable to connect to remote host: Connection refused

home-assistant.log:

2023-09-09 20:04:04.483 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:04:04.493 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:04:04.503 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:06:04.569 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:06:04.580 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:06:04.591 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
2023-09-09 20:06:04.602 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed ('192.168.86.75', 1502)
# Disable modbus-multi
mark@odroid:~$ telnet 192.168.86.75 1502
Trying 192.168.86.75...
telnet: Unable to connect to remote host: Connection refused
# Reboot host system
mark@odroid:~$ telnet 192.168.86.75 1502
Trying 192.168.86.75...
Connected to 192.168.86.75.
Escape character is '^]'.

FYI the latest HA core update 2023.9.1 breaks the SE Modbus, it stops communicating with SE Modbus,
I’ve had to rollback to core_2023.9.0

I updated the core update on both mine and someone else’s at exact same time, both failing to connect.

Don’t update is all I can say!

At the time Home Assistant 2023.9.1 was tagged they had not actually published the release before I went to sleep. I tried to get ahead of it by releasing 2.4.5-pre.2 without actually testing it on 2023.9.1 but I missed the constants change thing in pymodbus.

Release v2.4.5 is a required update for Home Assistant 2023.9.1

3 Likes

So glad I have notifications set for this topic :grimacing:

The other error that pops up every once in a while is this one:

ValueError: Sensor sensor.solar_inverter_efficiency has device class 'None', state class 'None' unit '%' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2023-09-09 06:58:54.284 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up template platform for sensor

This one is more for the energy package authors and from what I’ve read here in other topics, it’s more of a core issue than a package issue.

Meantime, does anyone have a workaround until the devs sort the core, if indeed they feel it is even a problem for them to fix?

I could just ignore it, but I do like a clean set of Logs :grin:

I would try adding availability_template to them.

I have them already:

 availability: >
          {{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_i1_ac_power') | is_number }}

have I got that wrong?

Or should I actually remove the availability line?

"If not configured, the entity will always be available."

The availability template should be there.

I was not able to duplicate the error in my dev environment and I don’t actually use any template sensors as part of my live system, so I don’t really have any other ideas (since I’m not much of a template expert).

The bulk of the template sensors I use come from the configuration written by @Remko .

I’d be interested to know how you monitor your live system if you’re not using any template sensors. Do you just use those generated by your integration?

Anyway, I might see if I can improve the availability templates to make them more flexible and tolerant of sensor unavailabilities.

ps. I’ve not seen v2.4.5 pop up in the HACS for update yet. I’m still on v2.4.4-pre.2

I’m holding off updating to HA 2023.9.1 until I see v2.4.5

2.4.5 is already there and works fine with 2023.9.1 :wink:
Perhaps you must manually check the “beta Release” Button? 2.4.5 should be there.