Solaredge Modbus Configuration for Single Inverter and Battery

Actually, there is another way to do it that doesn’t require changing any storage modes or messing about with timeouts. I don’t know why I didn’t think of it before, because it’s something I use.

The storage discharge limit. You can set this to any number up to the ac rating of the inverter the battery is connected to. It’s something I use in a couple of scenarios:

  1. If I want to charge the EV battery overnight but don’t want to drain the battery, I set the storage_discharge_limit to 100W. This stops the battery from outputting more than 100W regardless of the storage mode.

  2. If I simply want to preserve charge in the battery because grid prices are super cheap, or even negative, I do the same. Set the storage_discharge_limit to 100W.

I know some people who set it to just cover overnight base load, eg 250W etc, but it is perhaps an easier, and less stresfull on your system, way of achieving what you want.

So rather than having your automation switch between storage modes, have it set the storage_discharge_limit to a low number when the battery is under 40% and consumption is greater than production, then set it back to the inverter ac rating (in my case 5kW) when production is greater than consumption.

Leave the timeout at default (3600) and the storage_command_mode at MSC as they don’t need to be changed to change the storage_discharge_limit

Here’s an example from last night. I set the storage_discharge_limit to 100W from 0030 to 6am to preserve charge in the battery and gave the battery a half hour top up at 5am. Top line is the storage_discharge_limit bottom line is the battery_state_of_charge

1 Like

Hi All,

Im trying to resume control and use my system to charge and dicharge my batteries, but im not 100% sure as to why my system would stop the remote command staying on and keep resetting to max self consumption.

I took a screenshot ot the setting change to remote and it sets back constantly and i cant get the system to work under my command.

I also cant see if an outside source is asking it to be maximum self consumption, unless there is a log im unsure of?


Are you with Amber Electric or another VPP provider who provide Grid Services signalling to your system?

A few of us on Amber have had this issue of resetting when we try and control SolarEdge via the local ModBusTCP interface as the remote VPP commands would override.

The fix was to get the SolarEdge inverter unenrolled which then allows local control.

Are you able to see what the settings are in the SE monitoring portal? Not the app, in the actual website itself?

Although, having said that, this is mine set to MSC while my local access stays firmly on Remote Control :man_shrugging:

I am on Amber, but ive removed internet access to the inverter,

I can see it works as the solaredge portal and amber say disconnected, still reverts back.

I may need to test the unenroll

1 Like

Yes ive turned this off, doesnt seem to make a difference,

I think amber still has some control over it,

Im assuming that the vpp style thing has a call service to resume control.

Thank you!

The funny thing is, that yesterday I thought of the same thing, before I even read your comment. I use the same option when charging my EVs in these times, when the solar production isn’t enough anymore to charge them properly.

However, setting the discharge to 100 W when under 40% won’t solve my issue, because I only have a 4 kWh battery and even with 100 W discharge the battery would be empty in the morning. I would have to set it to 0 W discharge. That could actually work.

One question: doesn’t the timeout also affect the discharge? When the timeout is set to 3600 the discharge is being reset to the standard level after 1h. So I would have to confirm the discharge level every hour OR increase the timeout. Right?

Another question: Do you really think this makes a difference compared to my current solution? Because it actually works. It’s running now for three days and it does exactly what it should. Battery is at 38-39% during the night. Today it’s not charging at all, because I only get around 250-300 watts from the roof which is less than my current consumption.

I was also thinking about the inverter not going to Standby … do you think one of the two solutions would be better in this case (so that it DOES go to Standby during the night)?

Great minds then :grinning: :+1:

I’ve never set mine to 0W, but the documentation is clear “any value up to the inverter ac rating”.

I thought not, but you’ve got me thinking now. This is what the documentation says about the Command Timeout:

"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. "

This table is also a bit confusing:

my trace from last night:

I set the battery to charge twice from grid overnight, for half an hour each time. My script sets the timeout to 3 hours and also sets the storage discharge limit to 100W for the duration of the charge period. This trace would seem to support your thought that the timeout also changes the storage discharge limit back to default, but it could also have been my script setting it back to 5kW after the time period I set :man_shrugging:

Perhaps the only way to be sure is to experiment by manually setting the discharge limit to a low value, leave the timeout at 1 hour and see if the discharge limit reverts to 5kW after 1 hour.

Probably not. Like I said previously, if it works then just leave it. However, you did also ask if there was another way of doing it, and we both discovered there was a different, albeit perhaps a just as complex way, of doing it.

That, I’m afraid, I don’t have an answer for. Is there any reason you’d want it to go to Standby?

That, I’m afraid, I don’t have an answer for. Is there any reason you’d want it to go to Standby?

If it’s not in Standby, it uses - I think - 60 W of power.

I’ll try the different approach these days …

Ah, so power saving then. That makes sense. 60W consumption every night for a year is a significant addition to overall energy consumption.

I conducted my experiment to see if the timeout affects the storage_discharge_limit last night. The trace below shows it doesn’t. I charged the battery over 3 x half hour slots overnight. In between those charging slots, I limited battery output to 100W. I set the timeout to 3 hours at 2230 for the first charge slot, then at 2300 the storage_command_mode changed back to MSC and the storage_discharge_limit changed to 100W. Four and a half hours later (a full 90 minutes after the timeout has run down) the storage_discharge_limit is still 100W.

The other two areas I’ve circled are 1 minute gaps in trace due to the modbus connection failing to connect. It used to do this once every day like clockwork. Now it does it twice and, so far, no-one can tell me why. Luckily it normally happens outside of any periods where I’ve changed settings, because once it reconnects, after 1 minute, the inverter settings return to default. So if I’m grid charging, it stops and if the battery output is limited, it stops that too. I’m currently monitoring every instance of failure to connect and so far its happens at roughly 8pm and again at just before 6am :man_shrugging:

1 Like

Thank you. You’re right … the storage_discharge doesn’t get reset by the timer. But it does get reset SOMETIME … because if I set it to - like 500 W and don’t do anything, a few hours or at least a day later - it gets reset to 5000 W. Do you know when that happens?

And second question: Do you know which controls are actually affected by the timer? Is it only the Storage Command Modes?

By the way - I completely changed everything to the “storage discharge”-Solution, if you’re interested, I can post the new automations.

No, because mine ususally gets reset by the failure and reconnection of modbus that I mentioned above. Is there anything in your HA logs that might indicate what resets it? Have a close look at the history trace and see if there is a fractional interruption in the line at the point it resets. Also have a look in the logs for what, if anything, happens at the same time as it resets to 5kW.

As far as I can tell, it is only the storage_command_mode that is affected by the timeout.

Yes, post away. I’m always interested in seeing how others structure their automations :+1:

Let’s start with the changed dashboard:

And here are the automations:

Number 1:

alias: "Wintermodus Batterie ein - SoC über 39% - Entladelimit sofort auf 500W "
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.wintermodus_batterie
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 2
condition:
  - condition: numeric_state
    entity_id: sensor.solaredge_b1_state_of_energy
    above: 39
  - condition: state
    entity_id: select.solaredge_i1_storage_control_mode
    state: Remote Control
action:
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.entladelimit
  - service: input_number.set_value
    data:
      value: 500
    target:
      entity_id: input_number.entladelimit
mode: single

Number 2:

alias: Wintermodus Batterie ein - SoC unter 40% - Entladelimit sofort auf 0W
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.wintermodus_batterie
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 2
condition:
  - condition: numeric_state
    entity_id: sensor.solaredge_b1_state_of_energy
    below: 40
  - condition: state
    entity_id: select.solaredge_i1_storage_control_mode
    state: Remote Control
action:
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.entladelimit
  - service: input_number.set_value
    data:
      value: 0
    target:
      entity_id: input_number.entladelimit
mode: single

Number 3:

alias: Wintermodus Batterie - Entladelimit abhängig vom SoC anpassen
description: ""
trigger:
  - platform: time_pattern
    minutes: /1
condition:
  - condition: state
    entity_id: input_boolean.wintermodus_batterie
    state: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 0
  - condition: state
    state: Remote Control
    entity_id: select.solaredge_i1_storage_control_mode
  - condition: state
    entity_id: input_boolean.entladelimit
    state: "on"
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.solaredge_b1_state_of_energy
        above: 40
      - condition: numeric_state
        entity_id: input_number.entladelimit
        below: 500
    then:
      - service: input_number.set_value
        data:
          value: 500
        target:
          entity_id: input_number.entladelimit
  - if:
      - condition: numeric_state
        entity_id: sensor.solaredge_b1_state_of_energy
        below: 40
      - condition: numeric_state
        entity_id: input_number.entladelimit
        above: 0
    then:
      - service: input_number.set_value
        data:
          value: 0
        target:
          entity_id: input_number.entladelimit
mode: single

Number 4:

alias: Wintermodus Batterie - Entladeleistung auf 500W halten
description: ""
trigger:
  - platform: numeric_state
    entity_id: input_number.entladelimit
    above: 500
  - platform: numeric_state
    entity_id: input_number.entladelimit
    below: 500
condition:
  - condition: state
    entity_id: input_boolean.wintermodus_batterie
    state: "on"
  - condition: numeric_state
    entity_id: sensor.solaredge_b1_state_of_energy
    above: 40
action:
  - service: input_number.set_value
    data:
      value: 500
    target:
      entity_id: input_number.entladelimit
mode: single

Number 5:

alias: Wintermodus Batterie - Entladeleistung auf 0W halten
description: ""
trigger:
  - platform: numeric_state
    entity_id: input_number.entladelimit
    above: 0
condition:
  - condition: state
    entity_id: input_boolean.wintermodus_batterie
    state: "on"
  - condition: numeric_state
    entity_id: sensor.solaredge_b1_state_of_energy
    below: 40
action:
  - service: input_number.set_value
    data:
      value: 0
    target:
      entity_id: input_number.entladelimit
mode: single

Number 6:

alias: Wintermodus Batterie - Entladelimit auf An halten
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.entladelimit
    from: "on"
    to: "off"
condition:
  - condition: state
    entity_id: input_boolean.wintermodus_batterie
    state: "on"
action:
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.entladelimit
mode: single

Number 4, 5 and 6 are just for the Dashboard, to “fixate” the settings, so you can’t change them (because they immediately change back).

I hope you can follow what I did.
It seems to work pretty well. By simple setting the discharge_level to 0 you have the major advantage, that the battery can still be charged, if there is Solar Power. It simply can’t get discharged, before the battery surpasses a SoC of 40%.

1 Like

Oh and there are two more Automations that keep the input_number_entladelimit and the actual setting from the SolarEdge integration in sync.

Looks like I have lost the ability to set site limit with the last update.

2.4.7-pre is bad

2.4.6 is good:

Issue raise, looks like a Type Error:

What does the Site limit do?

When I have a negative feed in price, I set Export Control mode and site limit to 0W, which prevents my system from exporting power to the grid, but it varies solar production to cover my household load.

When I have a negative general price, I set Production Control mode and site limit to 0W, which switches off all solar production and my house load runs 100% from the grid.

1 Like

Hi all

Im trying to write something to set a variable value from node red to the discharge limit value.

Im using amber and it does give out staged values but was hoping to have the variable number from EMHASS display here.

You should be able to set the storage discharge entity (is it a number entity?) to the suggested battery power from EMHASS sensor.p_batt_forecast.

I do something similar with my battery SOC:

So your using the automation in home assistant for this?

So as the emhass says 2.5kw your system will discharge that amount?