Solaredge Modbus Configuration for Single Inverter and Battery

In my case there is house consumption, this is a given as i’ll never have 0.
There is then sources:
Panel->house
Battery->house
Grid->house.

If i’m exporting then Grid->house MUST be 0.
So the question then becomes where am i exporting from…
Well we can track our panel production.
So panel prod - house consumption = panel export.
if panel export is 0 or neg then 100% export is battery else battery export is total export - panel export

I was wary of using house_consumption_w in the panel_to_house section because panel_to_house is part of the calculation for house_consumption_w so wanted to avoid creating a circular argument.

Not necessarily. When the battery is charging, then not all excess panel production is export, so would need to also factor in the polarity and value of b1_dc_power.

This little section of code works for panel_to_house when exporting from the battery. I figured using the inverter storage mode was an easy way to determine if the battery was discharging:

{% if i_total_dc_power + b1_dc_power < 0 %} 
{% elif b1_dc_power < 0 and storage_mode == "Discharge to Maximize Export" %} 
  {{ ((i_total_ac_power ) - exported_power_w)}} £
{% else %}
  {{ (i_total_ac_power + b1_dc_power * inverter_effectiveness) }} %
{% endif %}    

I’m just trying to figure out how to incorporate it into the relevant part of the panel_to_house section. Thought I had it, but when panel_production_w dropped to zero last night my amended panel_to_house started increasing negatively ie flowing in the wrong direction :roll_eyes:, so I need to read up a bit more on nested if/elif/else statements to figure out the logical path to zero when there is no panel production.

Do the opposite. Start with 0 as the default output and then use if to override it.

1 Like

Blockquote
DAVSDavid Shaw

21d

Really nice configuration which works really well with SE modbus. However, I have the same issue mentioned a few times above, which I can’t see a response to. I’m using the latest repo on GH…

Dashboard will remain blank unless ‘edit dashboard’ - ‘raw configuration editor’ are selected and the editor is closed. Any suggestions as to why this occurs?

Blockquote

Bump, to see if this can be solved…

Many thanks for the great integration

I have two SE inverters - SE5000H and SE5000 plus a StorEdge with an LG battery connected to the 5000.

I want to be able to charge from grid. I can change the setting in HA for the SE5000 but keeps on immediately resetting itself to Maximise Self Consumption. Have tried changing which unit is Master /Slave, disconnecting from monitoring, plus pretty much every other setting I can think of but still stubbornly does same thing.

Everything else working ok and can see on panel the battery starting to charge so seems to be something at the inverter.

Any ideas as to how I can fix ?

Many thanks in advance for any ideas / suggestions.

Have you set the Storage Control Mode to Remote Control? These are my storage settings, ignore the Storage Command Mode as I’m currently discharging to the grid. That would usually be MSC.

After reading your post, I also switched to Remote Control for the first time and played with the options it provides. REALLY cool!

However - since yesterday (when I first activated it), my SolarEdge App doesn’t show any “self consumption” anymore in the statistical data. Is this normal? I probably can’t get this back, right?

Thank you in advance!

I see the same thing since 2 days. I did already change the option earlier though, so I think it is actually something wrong on solar edge side…

1 Like

Thank you … anybody else having this?

Interesting fact…I turned remote control off for a day and all the data was available in the app again. Even from a few days ago (when it stopped displaying). Turned remote control back on, still all fine now.

Here the data from the last two days also came back - however today‘s data is still behind around 15hours. Right now, 7:30pm, it shows the data from 4:30am.

Same thing here. Last data shown is from 05:45, current local time is 20:45.

Strange behavior - I didn’t implement the Solaredge integration. Will start working on it in the next few days.

So, probably something going on at solar edge. Integration is working fine and still providing all correct data. Just the solar edge app shows some quircks… Will be fine in a few days or so.

1 Like

Before I went completely over to Home Assistant controlling things, I was using the SE web platform to set TOU profiles to charge the battery. I would get pretty basic production/consumption charts in the MySE app. When I switched completely over to HA, I set the storage default mode to maximise self consumption and the storage control mode to remote control. I then started getting the more detailed consumption/self-consumption/production breakdown, but it would still take a day or two to change from the basic chart. The MySE app was recenty updated and now gives a much better chart straight away. These are my charts for today:

Blockquote
DAVSDavid Shaw

21d

– ISSUE —

Dashboard will remain blank unless ‘edit dashboard’ - ‘raw configuration editor’ are selected and the editor is closed. Any suggestions as to why this occurs?

Blockquote

Bump, to see if this can be solved…

Another bump, as this keeps getting missed…

Have you solved the issue of commands being reset?

Every time I switch the battery off to avoid discharge when doing an overnight EV charge, after exactly 1hr the battery is set back to Maximise Self Consumption.

I figured it was related to the command timeout, so set that to 10800 seconds, which it does set to but, alas, after 1hr it reverts back to Maximize Self Consumption.

Not managed to find a method yet to change ‘select.solaredge_i1_storage_command_mode’ to anything and have it stay until I change it :thinking:

Hello fellows
I have newly installed Solar panels, and a SolarEdge inverter (I think it’s called inverter… ?).

I’m trying to understand the needed steps to configure Modbus, and then activate Modbus on the device.

I have figured out how-to enable Modbus over the wifi AP http://172.16.0.1 :white_check_mark:

I added the “SolarEdge Modbus” integration through HACS, and configured it. But all entities show “Unavailable”.

The log show that the IP address of the inverter gives “no response”.

Q; :question:

  1. Does the settings for Modbus affect other settings on the inverter?

  2. What specific settings do I need for seeing the relevant data from my inverter? My priority is solar effect produced right now.

Thanks for all help!

If you scroll back up to my post on Storage settings you’ll see that the storage command timeout is set to 6300s, or 1hr 45mins. You need to understand how the storage timeout works and what it does.

From the Solaredge Power Control Open Protocol document:

Remote Control Command Timeout sets the operating timeframe for the charge/discharge command sets in Remote Control Command Mode register. When expired, it reverts to the default mode defined in Storage Charge/Discharge default Mode register.

The default is 3600s, or 1hr, and as far as possible, the value should be left at that. If you change the Storage Command Mode to anything other than the Storage Default Mode, which in my case is Maximize Self Consumption, the timeout timer will start running and automatically return the Storage Command Mode to Maximize Self Consumption once timer has run down.

So it’s all about the settings. The Storage Control Mode has to be set to Remote Control and the Storage Default Mode should be set to whichever mode you use most often. Then, if you set the Command Timeout to a value higher then 3600s and change the Storage Command Mode to anything other than the Storage Default Mode (in that order) it’ll stay there until the timeout timer runs down then revert back to default. Once the timeout timer runs down it resets to 3600s, which is why it should be left there as much as possible. Trying to keep it at any other value for extended periods beyond what you need if for will lead to issues when it eventually runs down.

I had all sorts of seemingly random issues with this until I finally understood how it works and what it does. I hope this helps you.

G’ah! Schoolboy error highlighted. :unamused: Thanks Dave :innocent:

Even though I’d formulated what you’d written in my mind when I put the Automation together, I’d still managed to set Storage Command Mode prior to setting Command Timeout, so the default timeout would have registered as 3600s at the time of the command, instead of 10800s.

Fixed, so should run the full length of the cheap rate window without issue :slight_smile:

Just to fix my blank Solar Dashboard next :+1:

1 Like

Here’s a variation on @Remko and other’s hard work of taming all those modbus sensors. Thank you so much for all the calculations in the back end of this.

This solar system is a 6 inverter 3phase setup W/O batteries in a commercial environment. The display is basic, and not really meant for all the detail that is available. It’s meant for the general public just walking in the door.

The display lives on a 55" 4k screen in the front lobby of the business.

2 Likes