UPDATED! SolarEdge Modbus full setup guide with Energy Dashboard integration for Installations with Battery connected

What entities does that give you? Which is for grid power, and which is for panel power?

You get a lot of entities with this integration, not only grid and panel, but also battery etc. To answer your question:

sensor.solaredge_m1_ac_power is the sensor measuring the power coming from or going to the grid
sensor.solaredge_ac_power is the sensor giving you the output of your inverter. So it is not panel power directly if you have a battery attached. That is why I use a lot of template sensors in my configuration to get the actual panel power sensor.

principally you are use the following sensors:
-sensor.solaredge_ac_power
-sensor.solaredge_dc_power
-sensor.solaredge_battery1_power
-sensor.solaredge_m1_ac_power

and now I have all this sensorsā€¦

Thanks, guys. I have multiple inverters so have slightly different names, hence my question. I think you missed one more sensor, though: sensor.solaredge_m1_imported_kwh

It seems mostly working, though surprisingly my house is generating power? Either a mistake on my part, or roundoff error. Or because I do not have a battery attached yet. Will keep debugging, but many thanks for sharing this setup @Remko !

image
Sorry but I donā€™t know if it is correct.

Solar energy 20,1 kwh,
Solar energy to home =20,1-11.1 (to the battery) = 9kwh
Total energy to home = 9kwh + 5,3kwh (battery) + 0,6 (from the grid) = 14.9kwh

image
So the highlighted value is the energy feed to the home, it isnā€™t included the energy to the batteryā€¦

is it correct?

I know this thread is long, but I have explained that effect a few times with quite a lot of detail.

Also the purpose of this entire setup describes what differences there are between Solaredge and my way of reporting.

The highlighed value is basically the value which goes into your home coming from your panels OR coming from your battery. You will see this value keeps increasing, even when the sun went down. This is because it calculates discharging of the battery as production. This is exactly the thing I do not like this way and the reason why I made my configuration.

How do you guys get the surplus value to work with?

Hmm. I have triple-checked everything and made it as simple as possible, but I just donā€™t trust the numbers coming from the solaredge modbus integration. The generation from solar looks reasonable. But the estimates for house consumption are just fluctuations around zero. This happens when using both the energy panel in HA, or the tesla power card like here: Using Templated Sensors to Calculate Power Flow and Energy Ā· binsentsu/home-assistant-solaredge-modbus Wiki Ā· GitHub
(I donā€™t have a battery yet).

These numbers come from the meter import and export entities. The import numbers are zero during the day when the panels are generating lots of electrical power, which is reasonable. But at night with zero generation, it shows only about 5W of import, which is ridiculously small, and could be just the energy to run the inverter and/or meter. When the panels start generating, the Energy Panel, shows only an increase of about 5W flow to the house. It shows zero self-consumed solar energy in the gauge, but the other graph says it is about half solar energy. During sunshine, the tesla power flow card shows no flow from the grid to the house, which is good. But the flow from the panels to the house just fluctuates around zero.

Have you removed all references to batteries in the config? Thatā€™s what I did while I waited for my solar install.

Yeah, I removed batteries. Things didnā€™t look right, so I went even simpler and just followed the wiki in the solaredge modbus integration. The power imported at the meter (M1 Imported power) is only about 5W when there is no sun. That is probably the power necessary to run the inverter, and certainly not the.power to the house. The numbers for power to the house when there is sun, based on energy conservation, is close to zero, plus random-seeming fluctuations.

So far the imported m1 energy is about 3kWh, which seems to be since it was switched on, would be 3000Wh/5W=600h, or about 25 days. That is about how long the inverter has been on. I donā€™t think that m1 import measures energy to the house. I think that it measures only energy to the inverter from the meter.

That is not what the documents suggest should be happening. Is there something wrong with my inverter? my installation? my meter? Or is this what everyone else has?

Solar edge M1 imported A kWh is total imported in lifetime. So yeah seems that maybe your consumption monitoring was installed incorrectly.

What does the solaredge website say? Same or looks correct?

It seems very strange to me. I am almost wondering if the installation is correct. I am interested what the SolarEdge website reports as well, that could be an indicator.

My meter is installed directly at the meter installed by the grid provider and is mounted with 3 clamps around the cables to do the measurement. Then it is connected with a LAN cable to my inverter. It directly reads the values going into the grid or coming out of the grid when there is no sun.

So, in your case, if the sensor.solaredge_m1_ac_power never gets above 5W I would assume there is something wrong with the installation, or it is just a completely different setup where the meter is installed only at the inverter (which I would find strange).

Again, first thing would be to compare to the website, secondly I would analyze the mentioned sensor in different load conditions. In my case, if the value is positive (currently about 5500 W, it is sunny) I am exporting power to the grid and the website reports the same value.

Thanks for your responses. Yeah, I think then that something is wrong with the installation.

Iā€™m looking to set up my SolarEdge without batteries. What install options did you choose when installing the package?

From memory you just need to enable the meter (#1 in my case) and set the frequency of polling. I went with 3 seconds but i could probably get away with 10 if i bothered to reconfigure.

Then as far as this package goes it was a matter of reading the file and getting an understanding of what was what, then editing/deleting all the battery references. The only thing you need to watch for is any calculations that use the battery, just ensure when deleting the battery element the formula still achieves what it is meant to (based on itā€™s name). most were straight forward.

Thanks. Thought I had to add a battery and it kept failing.

Hi,
when using the integration i am getting errors in the log.
need some help on this, thanks.
regards,
Dirk

e "/config/custom_components/solaredge_modbus/__init__.py", line 194, in async_refresh_modbus_data
    update_callback()
  File "/config/custom_components/solaredge_modbus/sensor.py", line 157, in _modbus_data_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 646, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1099, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.solaredge_m1_import_varh_q3. State max length is 255 characters.
2022-08-01 21:37:51 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2022-08-01 21:38:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/solaredge_modbus/__init__.py", line 194, in async_refresh_modbus_data
    update_callback()
  File "/config/custom_components/solaredge_modbus/sensor.py", line 157, in _modbus_data_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 646, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1099, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.solaredge_m1_import_varh_q3. State max length is 255 characters.
2022-08-01 21:38:44 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/solaredge_modbus/__init__.py", line 194, in async_refresh_modbus_data
    update_callback()
  File "/config/custom_components/solaredge_modbus/sensor.py", line 157, in _modbus_data_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 646, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1099, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.solaredge_m1_import_varh_q3. State max length is 255 characters.
2022-08-01 21:39:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/solaredge_modbus/__init__.py", line 194, in async_refresh_modbus_data
    update_callback()
  File "/config/custom_components/solaredge_modbus/sensor.py", line 157, in _modbus_data_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 646, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1099, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.solaredge_m1_import_varh_q3. State max length is 255 characters.

That seems like a question for the modbus integration threadā€¦ I cannot really help with that.

ā€¦just to clarify (Iā€™m trying to get up to speed on this thread as I have a quote from an installer to provide SolarEdge products - Inverter and optional battery) for ModBus over TCP, itā€™s ethernet directly in to the inverter, then this integration to HA?

Thanks (sorry, still reading up on SE as much as possible)

Yes, make sure your installation includes an ethernet connection from the inverter to wherever your home network gear is.

Youā€™ll also want to include the consumption monitoring addon/package if not already part of the inverter.