Solaredge Modbus Configuration for Single Inverter and Battery

Hello you all,

my Solaredge inverter was installed yesterday, so I don’t yet have access to the SolarEdge iPhone App yet (my installer said probably tomorrow). However, I asked him to activate the modbus TCP access during installation and I was able to connect to modbus with this great integration.

I don’t have a battery (yet) and my meter is not yet a two-way-meter, so I don’t get any money yet for my exported energy (my energy network operater will probably exchange the meter in the coming weeks, so this will change).

Here are my values and there is one thing I don’t know what to do about:

solaredge_import_export

In the Imported / Exported Values the Value vor Exported C kWh is “Unknown” (Unbekannt = German). This leads to the Value (A+B+C combined) to be unknown as well. Due to this, the Exported energy is missing in the Energy dashboard of Home Assistant.

Did the installer do something wrong? Or what can I do to get this missing value?
Everything else seems to work.

Thank you in advance!

That is a bit weird or …maybe not depending on inverter type and meter. Normally in Germany you would install a 3 phase inverter and also a 3 phase meter, so you would get values on all 3 clamps. The issue may be that there just isn’t enough sun yet and it actually did not export anything on that phase yet. As you see, phase A and B have values of 0,021 and 0,441 kWh, which is not much. Maybe wait a day or so and hope that there is a bit more sun, so you can actually see the values increasing a bit more and this possibly solves it already.

One thing to note on that; by the looks of it, you already get the data through your meter. Depending on the type of meter from your electricity company it may actually count backwards (if it is one of the old analogue ones). This is officially not allowed and you theoretically should not have your system on until the new meter is installed. Just so you know…

1 Like

Thank you for your quick reply. That is actually what I was hoping … that it’s just because I didn’t export anything on phase C yet. I was just wondering why it says “Unbekannt” instead of simply “0”. But as the weather is shitty these days, I never got beyond 450 Wp yet (even though I have 6.8 kWp of modules on my roof). And most of the time my house consumes 380-400 W - so there is not much to export. Then I will just wait for a few days … weather forecast says sunday we will maybe get one hour of sun. :slight_smile:

Thank you as well for your note because of my meter:
I do have a digital meter with a “backstop” (Rücklaufsperre in German). This is why my installer already turned the system on, because no harm is done (I simply don’t get money for exporting energy). So I should be okay.

I will let you know when the value changes…

Hello everyone,

I have a problem. In my SolarEdge system, I have 3 SolarEdge StorEdge batteries, but with the configuration, I can only see 2 batteries.

What can I do to get also the third one into account?

Thanks a lot for your help here!

The modbus interface only defines two batteries per inverter, so it’s impossible to see a third unless the protocol is extended by SolarEdge to support more than 2 batteries per inverter.

Since the update to Home Assistant core to version 2023.2.0 (Operating System 9.5) I got this error:

Logger: homeassistant.setup
Source: setup.py:213
First occurred: 2:54:03 PM (1 occurrences)
Last logged: 2:54:03 PM

Setup failed for custom integration solaredge_modbus: Unable to import component: Exception importing custom_components.solaredge_modbus
Logger: homeassistant.setup
Source: setup.py:213
First occurred: 7:55:14 PM (1 occurrences)
Last logged: 7:55:14 PM

Setup failed for custom integration solaredge_modbus: Unable to import component: No module named 'pymodbus.client.sync'

Add on by binsentsu

Hi Remko

I am wondering if there is a latest of your updated flow calculations please?
I see a strange issue when I export from battery it goes via house to panel then out. This shows in tesla card. I have seen someone fixing this for the tesla card with solaredge dc battery instead but they didn’t share the code.

Besides that im currently using this but it shows nothing.

- name: "Solar Battery To Grid W"
      unique_id: solar_battery_to_grid_w
      unit_of_measurement: "W"
      icon: mdi:solar-power
      state: >
        {% set exported_power_w = states('sensor.solar_exported_power_w') | float(0) %}
        {% set panel_to_grid_w = states('sensor.solar_panel_to_grid_w') | float(0) %}
        
        {% if (exported_power_w > panel_to_grid_w) %}
          {{ exported_power_w - panel_to_grid_w }}
        {% else %}
          0
        {% endif %}

I am also using your Solar_Exported_W but that is basically all export.
I would like to have one for panel export and another for battery export.

Is that even doable?

Thanks in advance.

I am not using the binsentsu integration, but the one from @WillCodeForCats …cannot help with this.

I am not even sure I have the “discharge battery to grid” in my calculations at all. That is not a use case I have considered, therefore I am not surprised it is incorrect. The entire calculation of battery to and from grid is a bit complicated and I have not solved that yet (actually also did not invest much time in it, since I do not have that use case personally).

I will need to look into it further, but I cannot make any promises on when …

@Remko no worries I was just pointing out the fact that battery to grid somehow isn’t popular. It is good when the prices are high in the morning then you just fill up during the day and the rest is just gravy.

Anyway if you maybe look into it I found some interesting things in your current config. For example if you do export from battery then production counts towards the house. This is because it is included in battery_out which it assumes it is all going to house consumption. That kind of messes up the overall figures for house consumption kwh. As you mentioned couple of times already you do like to count production on day straight from solar to battery and house. However the export basically doubles the solar to battery production (solar to battery > battery out). Maybe not doubles but it counts as house consumption which is wrong as I don’t consume it. It counts as export that is already counted for in export. Hope I’m making sense.
This would require separating battery out to battery to house and battery to grid. Same way separating export to panel to grid and battery to grid and all having recorders. I’m sure there is more to it but thinking out loud.

For me it would have to be a clean start anyway as the current consumption figures are way out.

I will try to look into it at some point but if there is anyone who has this working it would be beneficial for all.

Yes SolarEdge inverter supports 3 SolarEdge batteries.
Is there a way to read all of them?

(I have 3 batteries SolarEdge working perfectly in parallel with the SolarEdge inverter).

Thanks :pray:t2:

Modbus only defines 2 batteries, not 3. So the answer is probably no unless SolarEdge updates to add support for more two over modbus.

However, I can test blind reading based on the existing pattern. Try manually installing this and see what happens: https://github.com/WillCodeForCats/solaredge-modbus-multi/archive/refs/tags/b3-test-1.zip

If that doesn’t work there’s a “mirror of battery 1” definition we can also try and see what is reports when three batteries are attached.

Read error: Battery read error: Exception Response(131, 3, IllegalAddress)

I get this message after activating auto-read batteries.

Try this one which uses the b1 mirror address: https://github.com/WillCodeForCats/solaredge-modbus-multi/archive/refs/tags/b3-test-2.zip

Nope… like it was before… I have I1, M1, B1 and B2… but no Battery 3 :frowning:

I didn’t think it would work, but I was curious if there were hidden registers.

SolarEdge will need to extend their modbus support to include more than 2 batteries.

I’ve updated the Known Issues page in the wiki to note that modbus doesn’t support more than 2 batteries. This is a SolarEdge limitation, not the integration.

Thanks for your support!

Hi. Simple question. Solaredge remote updated my firmware and as a result the inverter ip address changed.
The integration configuration card doesn’t have the ip address field.
Is there an easy way to update it without removing the integration and reinstalling?

Very new to HA and very grateful for your work building this.

I think you need to delete and reinstall the integration. Shouldn’t be much of a hassle though. After reinstalling your entity Nantes should all be the same and everything should work again.

Perhaps you could request your installer to change your inverter site-com to a fixed IP-address? Then SolarEdge firmware updates will have no effect on the IP-address and you don’t need to hassle with you HA integration afterwards.