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

Hello together,
i try to get my new Solaredge PV into HA.
i already update the integration but didn´t get a “tead battery 1 information” checkbox.

it looks like this:


What do i wrong, please help me.

sunny greatings form the snowy allgäu

Diver

Good question…:wink:

When you delete the integration first and try to set it up again, it should normally offer that option. I assume you are using the latest Modbus version from HACS? Because that should have that option, I do not know why it would not be there, unless it is a different Modbus integration you are using (there are a few different version out there). I just used the one available in HACS and when setting that up, I could select the battery option.

Another way to see if you have all the data there is to check in the entities which are listed. If there is a “battery_charged” and “battery_discharged” one, you are good.

Don’t really know how to help you with this. Maybe you need to create an issue on the integration itself or try to get help from the author of the integration.

EDIT:

I see there are 2 modbus versions in HACS now, I used the first one from this screenshot.

Hello Remko,
thanks for your help.
i tried it again.
But when i search for solaredge in Hacs i only find this two
image

I didn´t get a SolarEdge Modbus integration.
When i install the solaredge integration it looks like this:
image

after i add the id and the api-key i get this window

image

Thats all, now i have 21 entitys
image


There are no “battery_charged” and “battery_discharged” in my list.

Hmm…maybe the modbus integration got removed from HACS again. You would then need to manually add it. Follow the installation instructions from here:

“Copy contents of custom_components folder to your home-assistant config/custom_components folder or install through HACS. After reboot of Home-Assistant, this integration can be configured through the integration setup UI”

The integration from your screenshots is the official cloud based integration which does not show the battery.

Sorry for the late reply, some comments to your questions:

  1. The daily differences add up and will get worse.
  • If you’re also suffering from deviations, you should see the same effect, right?

Yes, I do see some of the same effects. And honestly…I do not know which one is right. I also see differences between the Monitoring Dashboard and my actual Energy Meter which I report to the energy company. So…guess in the end it is all down to rounding errors from Solar Edge.

  1. Is it possible that I am using that little solar energy directly while at the same time buying lots of energy?
  • At least that’s how I interpret the very small share of orange bars in top left diagram
  • Is this understanding correct, do you see similar behavior or is it only on my side (9,89 kWp)?
  • As far as I have seen, my storage control mode is “maximize self consumption”.

Yes, that is definetly possible: When you are producing energy with the panels, it quickly goes above 1 kW/h, during that time the consumption in your house may be as little as 300 W/h. That means the rest goes either into the battery, or directly into the grid. The small orange bar shows you how much of the production, you consume instantly. If you look at “Eigenverbrauch” you see roughly 70%. The battery is the biggest difference there; because you have a battery, the charging of that is also counted into the “Self Consumption” ratios.
Basically if you would mentally add the green bars to the orange bars, you see how much you actually use from your production and looking at the 70%, I think you are doing pretty well. Only 30% of your produced power got exported, so that is a nice value.

Regarding daily deviations you mentioned rounding errors and/or calculations of the integrations platform as the root cause. What else could cause them? How about the different update intervals (15 min vs. 30 sec)? What update interval are you using by the way?

I think the update intervals do have a big effect. I actually have set mine to 5 seconds (using an external SSD for my Database) so do get pretty accurate and instant values. How SolarEdge manages this I do not know. I do see that the data in the dashboard is not instant, so either they store more data in the background or also using rounding effects. I cannot answer that. My feeling is that the modbus with a small update interval is more accurate, but it may be just a feeling. The only way to really verify this is, is to actually look at your readings which you supply to the energy company, but I have never really done that much further. To me the Energy Dashboard is a nice visual to monitor my consumption and production, but do expect it to not be 100% accurate which I do not mind too much. More important for me is to see trends in production and usage and use that information for my own behaviour in house. I do also have an automation which controls my AC unit, which bases on this data; basically when there is enough surpluss power, it will turn it on to either heat or cool my house and this is working pretty well.

Hope this answers some of your questions…

juhuuuuuu i got it. :slight_smile: :sweat_smile: :sweat_smile: :sweat_smile:
but then the joy already stops again :frowning: :cry: :cry:

here is the result after i tried to config the Energy meter.

It looks like the entities are not there… Have you also created the config in the respective files (templates.yaml, sensors.yaml etc.)?

You would need to check which entities are available in your system now and if they actually get values from your inverter.

Did you check the “read meter 1” and “read battery 1” options during the setup of the integration…? It looks you you selected 3 meters which would be too much (assuming you only have one meter connected to your inverter)

that is my configuration

1 Like

i added this in the Configuration

image

this in the sensor
image

and this in the template:


but i think the problem is, that most of the entities are unknown or just 0


what do I wrong? :sob: :sob: :sob:

It looks like maybe the actual modbus connection does not work. Is our inverter set up properly, I mean, does it actually allow the modbus connection? There are some threads around for that issue or maybe read some of the posts on the github page of the integration on how to verify this and make sure it works properly.

You have exactly the same issues, like I have. I think there are some HA issues with the utility_meters. Sometimes they appear and can be added to the energy dashboard and sometimes they are not. I have some energy sensors, which are all configured the same. Two of them can be added and the other are not visible. For me it is compleetely random.

The same happens with the utility_meters settings from Remko. Most of them are added meanwhile but the “Solar Power Daily” never appeared. It is visibe and working in the developers view, but it’s impossible to add to the energy dashboard.

After deleting the database I now have the option to add “Solar Power Daily” to the energy dashboard. On the other site, some of my own sensors are now missing.

That is interesting. Which DB are you using? I did have some issues in the past with the default setup, so changed it to MariaDB. I also now do not record everything in the DB, only selected sensors and entities. Reason for this (especially with the Modbus integration with 5 second interval) is that the amount of data is a lot. (see the recorder documentation on filtering etc).
I run HASS on a Raspberry on an SD card and this many write actions on an SD can cause issues. So besides converting to MariaDB I also now hooked up an SSD to my Raspberry and have HASS (and the DB) running on that. Since then I do not have any issues anymore.

Currently I use the default database. As far as I know its sqlite3. You’re probably right with SD issues. I have a MariaDB running on a NAS server. Maybe I could switch to that one. Or add an ssd like you did. I’ll think about. Meanwhile I fight to get my missing sensors running in the Energy Dashboard.

There is one additional question which came into my mind: Why are you using yearly battery statistics in the Energy Dashboard? Shouldn’t this also be on a daily base?

It actually doesn’t make a difference if you use yearly or daily stats; the energy dashboard takes care of that. Why I use daily for the one and yearly for the other…? I don’t really remember why, I think that is how I found out it doesn’t make a difference and then just left it like that.

If you already have MariaDB running on a NAS, uur is a 5 minute job to use that. And… Your SD will thank you.

Basically you need to add a user on MariaDB and add one config line to your configuration.yaml and you are done.

When it works you can then start filtering what it actually records, but if it is running on a NAS you probably don’t worry about the DB size that much.

Thank you very much. I just did the steps and home assistant is now connected to MariaDB :smiley:

Today is the first day using the right sensors on the energy dashboard. :grinning:.
I think there might be an issue with the calculations of the charging power of the battery.
Until now I don’t have any power from solar panels, because it’s still dark and there is snow on the panels. But on the other side my battery got charged a bit, because it was discharged to 9% and then recharged to 10%. This happens around once a day. Normaly during night.
The problem is, that this charging does currenty count as solar power, but the power for charging was taken from the grid.

image

Here you can see 0.1 kWh went from solar panels to battery, but as mentioned, there was no sun. This is also visible here:

I think the first graph is right, because I only have imported power. But the bottom one shows solar power which it shouldn’t.
Do you have the same behavior?

Here is my energy dashboard config:

Jeremia

Juhuu!! At least it works now.

I do have the effect that the battery jumps from 9 to 10 % and back every now and then, this can be combined with a 0,1 kW Solar Power, which isn’t actually there. I did look into this earlier and simply see that the ModBus values are representing this. I also see the same 9% in the SolarEdge paltform at that time, but this is very rare.

If you start looking really close at the data you can see there is almost always tiny amounts of power running in all directions, which I think is actually the cause, caused by inductive power through all the copper wiring in the house.

I also guess that the ModBus with HASS actually picks all those up and than roudning effects can cause this. So I am not entirely sure if something can be done about it, maybe so, with taking averages over longer periods, or actually having instant updates instead of every so many seconds…

Overall to me it is just a nice representation and accurate enough to control certain automations, so I’ve learned to ignore those and find that the overall data matches my power meter which the supplier uses to charge me, so I am happy.

This theory is possible, but I’m not entirely sure if this is true. Because I’ve already seen that the charging light of the battery is on, if this happens. The overall consumption of the house then also jumps at least 1 kw/h up. Because of that I think this is really charging power which happens here. Maybe this is just the special situation where charging power is taken from the grid. I’ll also check the calculations if this could be possible.
If it’s just some inductive power from all the wires (I have this to an can measure it on disabled sockets), than it’s of course totally fine.

You could be right the more I think about it. In the entire calculations I may have not included “Grid to Battery”. Hmmm…interesting addition to the calculations. When I find some time I might dive into that again.