Solaredge Modbus Configuration for Single Inverter and Battery

All the yaml you need for the dashboard is in the GitHub repos linked right at the start of this topic.

Hi Dave,

Yes I would like a more detailed tour of your findings. I have the same setup as you (2 inverters and 1 battery) but can’t seem to get it to work. Which files do I need to change?

What have you done so far to get to where you are now?

I got weird numbers so I decided to start from scratch. Removed everything and all I got is your energy.yaml in my config dir. Which else do I need? Kind of hard to follow the forum thread.

thanks

Can you post an image of your dashboard?

The energy.yaml file is just one part of it. There is the raw energy dashboard config somewhere in this thread too. If we can’t find it I’ll upload my dashboard config to my GitHub repo and you can get it from there. Weird numbers is better than no numbers :grin: we can work with that.

UPDATE

Okay, I’ve uploaded my entire Lovelace config to my GitHub repo. You’ll want up to line 1107 for my energy dashboard. Remember, that a lot of the entities in my dashboard are specific to my system so you’ll need to identify the corresponding entities in your system and substitute them.

Thanks for your help!

Looks like I’m missing one inverter (i2). I need to create a new entity to combine the two?

energy dashboard

That should be covered in the config :thinking:

Just make sure your second inverter entity is called sensor.solaredge_i2_xx_xxxxx. If inverter 1 is called sensor.solaredge_i1_xx_xxxxx then inverter 2 should be named similarly, and as long as it is, the config in my GitHub adds the 2 together when it needs to.

Paste this into the Template editor in Developer Tools:

{% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
{% set i2_dc_power = states('sensor.solaredge_i2_dc_power') | float(0) %}
{% set i_total_dc_power = i1_dc_power + i2_dc_power %}
{{ i_total_dc_power }}

The number displayed should be the same as your generation figure in the MySE app. If you get an error, take a screenshot and post it in here.

this is weird… if I go to the integration tab for solaredge modbus multi and look at the i1 and i2 and sum up the dc power I get the same value as in the template viewer.

I changed the default polling frequency from 300s to 30s and now it looks more accurate.

so all generetation_to_* entities should be the sum of i1, i2 dc power?

That’s actually okay. Your battery is charging, so some of your dc power is going into the battery, which is why your total dc is the same as your consumption, rather than what you’re generating. Just out of interest, which inverter is you battery connected to? Mine is connected to inverter 1 so all the calculations are based on what happens to i1_dc_power when the battery is charging and discharging.

No, not necessarily. Generation to the battery is always dc whereas generation to house and Grid is always ac. So when you have excess dc, you’ll get more into the battery.

Ok, battery is connected to inverter 1.

feels like my config isn’t using your energy.yaml

I think you are probably using the config from Ryan’s or Remko’s config. Theirs is split into the packages you have in your config. Actually, looking at your screenshot, it looks like you have both Ryan’s config, which is package based and a single energy.yaml file. You also have quite a few exclamation marks next to file names. I use VS Code Editor so I’m not familiar with the nomenclature shown here, but exclamation marks generally mean something is wrong and you need to look there.

I wonder if your dashboard is being confused by having 2 configs running concurrently? Can I suggest you either comment out one or delete it altogether (after taking a copy and storing it somewhere so you can go back to it) and then restarting HA. It might even be worth taking a backup of your HA instance before doing this.

`

Thank you soo much for your help!

I now only have your energy.yaml in the config. (Exclamation mark just means it’s not writable)

Now it does not read the entities…none of these has values. Restarted.

from developer tools - statistics

You need to make sure those entities are not excluded from the recorder.

Have you tried selecting “Fix Issue” to see if it fixes it?

Could that be entities from another config? I can only remove
nostate

Possibly, but as long as the modbus multi integration is picking up all the right sensors the template sensors should all work.

Try the i_total_dc_power template in the template editor again and see if that gives the same results as before.

Right, so the main sensors produced by the modbus multi integration seem to be working. That could mean a problem somewhere in the template sensors. So let’s have a look at the one you highlighted.

Copy the entire code for the sensor.solar_battery_to_grid_w template sensor into the template editor in Developer Tools and see what the result is. Do this for each of the template sensors in the power flow card and see what results you get. If they give you the correct readings for each flow, then it’s a sensor availabilty issue and we can deal with that later.