Automate Fronius Soft Limit

I haven’t, I’m sure it is possible and get a headache thinking about it. Doesn’t the smart meter do this for you now? If not, why are you trying to solve a problem that you currently have just to be a good citizen?

No? At least not to my knowledge… is that a thing newer ones do, or can they OTA the thing?

just to be a good citizen

I had enough of a fight getting them to let me export in the first place due to a paperwork screwup by the electrician… but not just that.

When the battery is filling up, I need to allow a trickle out so the battery can detect the excess and soak it up. I don’t need to do that when the battery is already full… so basically it’s microoptimisations.

This is normally managed either by:

  • the inverter’s output capacity being no more than 5 kW anyway, or
  • if the inverter’s output capacity is greater than the export limit, the Fronius smart meter supplies the data used by the inverter which has the export limit set in its Dynamic Power Reduction options.

The setting is in the DNO editor section of the inverter’s web portal, and requires service level password access:

Assuming you can access that, then scroll down to find Dynamic Power Reduction:

If you were required to apply an export limit less than the inverter’s output capacity, then the smart meter would have been a compulsory part of the installation and the dynamic power reduction limit set.

The DNO setting is indeed present in my inverter, and was set to 5000 (my export limit). But most of the solutions to manage negative tariffs that I’ve found involve setting that limit low or zero to prevent exports to the grid, but simply disabling the limitation when tariffs are positive.

In other words, I have to choose between being able to “disable” exports by setting that low, or obeying my export limitations - there does not seem to be a way to edit this setting via modbus.

In fact, my current “solution” for managing this is a tampermonkey script running in an always-open browser on my server that edits this value. It works - but it’s janky as heck and often fails me.

If I disable the export limitation, the inverter does export more than 5kw into the grid, meaning that DNO setting is the only thing stopping that from occuring (ie, the smart meter isn’t doing anything)

There is a way to edit the export soft limit programmatically. You do need to run something in between HA and the inverter, but I found it works well. Much thanks goes to user @sergiop on here. He has coded an auth proxy for Fronius inverters. I also have been using it to automate the change of Load Management settings. See here:

I have also found that using Modbus to change the export limit is not ideal, because it seems you can only alter overall PV production, not excess. Hence the above utility is super handy.

1 Like

This looks a much more robust solution… I might do that now. Thanks for the link :slight_smile:

You’re welcome. If you can work out how to retrieve existing values (ie. using GET rather than POST), do share, I can’t seem to get it to work. But using it to change values (ie. POST), has worked flawlessly for me.

Hmm. I can’t think of a reason why I’d care. Why do you want to know? If you’re ever unsure what value it’s currently set to, you know after you set them using a method like this.

More just to verify that the POST command worked. The utility is reliable, but since it is still more a “hack” it would be handy to get feedback on the setting change getting completed. No stress though, just thought I’d ask in case.

Verification is a fair call. I’ve set up an automation which will send me a notification (and retry) if exports exceed the specified limit for more than a few minutes.

This is working really well for curtailment modification though, so thanks again. Looks like I’m probably still going to have to use modbus to kill the panels when import prices are negative, but that seems doable.

Glad to hear it’s working for you, the real thanks goes to sergiop. That’s a good idea to measure the export to ensure the export soft limit curtailment setting is made. Do you do the same for when you want to allow export … that would be more difficult I’d imagine as that amount of excess can’t really help measure that. And yes, PV generation curtailment is best (and easy to do) via modbus.

WMaxLimPct in HA

Check these threads:

What is your setup? Fronius Inverter + Powerwall? + any power/smart meter?

When the battery is filling up, I need to allow a trickle out so the battery can detect the excess and soak it up. I don’t need to do that when the battery is already full… so basically it’s microoptimisations.

It seems like a race condition where
Export Price negative set No Exports
Battery needs to detect exports to charge

It sounds similar to my secondary inverter + battery problem.

Negative FIT - No exporting

Secondary inverter is set to 0 exports and because it has no smart meter attached to it - means 0 solar production.

Battery is connected to primary inverter - so no communication between the battery and secondary inverter.

There are situations where the battery is not charging at full capacity because the primary inverter is supplying house loads while the secondary inverter is still at 0 solar production.

I’ve set my secondary inverter to dynamically adjust WMaxLimPct depending on whether I am exporting/importing and whether the battery is charging above or below a certain rate.

Also in situations of positive FIT - I want to discharge my battery at the maximum rate but in doing so reduces the solar panel production as inverter is limited to AC output of 10kW, so I have a formula to dynamically adjust the battery output depending on what the panels are providing.

Give it a crack in NodeRed

Thats for SnapInverter models, will have to ask the installer/Fronius for Gen24 models.

Hi Al, Great thread, I am new and struggling to work my way through it. What I want to do is limit my inverter to 0w output when the grid price goes negative. This is to maximize my draw from the grid to get paid for it. I think I have the Modbus side set just need to work out how to get HA to control the inverter off the grid price. I have no consumption meter just a Primo 3.0 inverter. Any step by step help would be great!
Is this what you have to do?

Have a read of this https://www.smartmotion.life/2023/09/12/amber-electric-curtailment-with-home-assistant/

You will need to include an automation like this :wink:

- alias: 'AMBER: THROTTLE: Disable inverter due to negative power price'
  description: Power prices are now negative therefore turn off the inverter to maximise
    savings through power consumption
  trigger:
  - platform: template
    value_template: '{{ states(''sensor.home_general_price'') | float <= 0 }}'
  condition:
  - condition: state
    entity_id: sun.sun
    state: above_horizon
  action:
  - service: modbus.write_register
    data:
      unit: 1
      hub: mb_fronius
      address: 40236
      value: '0'
  - service: modbus.write_register
    data:
      unit: 1
      hub: mb_fronius
      address: 40232
      value: '0'
  - service: modbus.write_register
    data:
      unit: 1
      hub: mb_fronius
      address: 40236
      value: '1'
  mode: single

1 Like

Hi,

I’m fairly new to HA - I can create entities, write basic automations etc - for example, turn things on and off based on basic power calculations (usage V production etc).

I also am an Amber customer and on variable feed in and out tariffs.

I’m trying to set my system up similar to you - where I can stop exporting power when it’s costing to do so.

My set up is a little complicated - so I’ll give you a basic image of how it all hangs together and then see if you can offer me any help or advice.

Firstly I have 2 fronius invertors (gen 24) one that is connected to phase 1 of my house and the other one connected to phase 2. This second Fronius also is connected to a battery (BYD).

Due to limits on export, neither of these two Fronius are allowed to export to the grid.

Sitting above these two is a Enphase system that is connected to both phases and this one CAN export to the grid. This Enphase is a 8kW system.

I’m in Melbourne and as such, at the moment, the sun is shining - meaning I’m generating on all three invertors.

What tends to happen is that the first Fronius (F1 no battery) runs phase 1 of the house during the day and “self limits” - if the draw from the house on that phase is lower than the capacity of the array, it just produces what that phase needs.

The second Fronius (F2 with Battery) runs phase 2 of the house and fills the battery with any excess that the inverter can supply. I’ve also set up the battery to drag in as much power as possible between 0900 and 1500 as after this time is when the spikes in power can occur and I want the battery to be full at this time.

Whilst the above is happening, the envoy from the Enphase system just bangs out as much as it can produce - meaning if there is no load from the house (as the Fronius 1 and 2 are happily coping or the battery is already full for example and it’s sunny) then it will export 8kW to the grid - regardless of price positive or negative.

I’ve been told by Enphase that their system cannot be dynamically controlled - I can’t dial back the solar production to stop it producing more than the net load on the house.

So the only option I’ve got is to somehow control the Fronius (F1 and F2) solar production to drop them down so the Enphase has to shove the solar it is exporting to the grid into the house - as the sun gets sunnier - back off F1 and F2 more and if the clouds come in ramp them up - the idea being that if price is below zero - don’t export - but equally manage the inverters so I don’t end up importing from the grid to top up the house……

The Fronius 1 inverter sees “Grid power” but this is actually the power that is coming to it from the Envoy - it could be grid power, (at night for example) or it could be solar that the envoy is passing through to support the demand that the phase is calling for.

For example, if phase 1 from the house is drawing 4kW and F1 array is producing 3kW, the app shows F1 as drawing 1kW from the grid. However, if the envoy is producing 4kW then this 1kW that F1 is “importing” is actually coming from solar not the grid - the Fronius cannot differentiate.

But I have all the sensors etc and have set up a dashboard to monitor what is going on - it appears that the F1 and F2 invertors will supply their phases first (F2 will supply battery first) then the envoy will top up either phase with the gap and if there is not enough to cope it draws from the grid and if there is more than enough the envoy exports. I want to see if I can somehow, using the draw from the house and battery, and comparing it with total solar, I can limit each fronius to make sure all the envoy generated power is fed into the house to fill the gap rather than export IF amber price is below zero….

I know that’s probably all very complicated - but you seem to (1) have a good understanding of yaml code (2) have a similar desire to me in terms of not paying to export (3) have a layered system (4) and have said you are happy to help !!! :slight_smile: (or you were when you wrote this last year!!!

Would love to hear any suggestions you have and snippets of code that might help…

Thanks for reading this so far.

Andy

I would be looking into this more. It may be the Enphase can actually do what you need. Indeed I’d have thought it should have this capability since dynamic export/production control is a requirement for grid tied solar PV inverters in Australia.

I am by no means well versed in Enphase but I believe Enlighten Manager has a setting “Power Production Limiting by Gateway

e.g.:
https://support.enphase.com/s/question/0D53m00009YROWYCA5/is-there-a-way-to-limit-the-solar-exports-from-iq7a-microinverters-the-wholesale-electricity-price-is-often-negative-during-the-day-in-australia-0

I have exactly the same setup: 2 x Primo and only the first one can be limited using modbus. Did anybody find a solution to also limit the second inverter?

I did actually.
You need to address each inverter directly
unit:1, unit:2, etc with the same instructions for each.

So, the fronius-auth-proxy stopped working a while ago. I did raise an issue, but have received no response from the developers.

So, I decided to roll my own solution.

This is decidedly heavier than what they were doing as I’m using a headless firefox instance to actually use their site properly. But, I think it’s less likely to spontaneously break, unless fronius fundamentally change their site.

Anyway, it can be found at GitHub - shadow7412/fronius-driver: Syncs the value in a helper entity in home assistant to a fronius inverter's soft limit field.

Basically, I just have a helper in home assistant with the desired value, and an automation that fires on startup or when that value changes which fires a command which runs the docker version of this.