Automate Fronius Soft Limit

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.

Hi,
does anybody knows, if a dynamic power reduction native algo with maximum feed-in value is posible to activate/deactivate via modbusTCP holding register please ?
Full question

I thing, that dynamic algo is not possible via modbus register controll. I would like to speak with some Fronius inverter programmer. Native algo can dynamically follows consumtion, so feed-in value can be automatiocally hold on minimum. But I can’t reach over phone, email Fronius support. Our czech support isn’t able to answer.

It doesn’t appear to be - which is why tricks like the post just above your last one need to exist.

What do you mean “address each inverter directly”? I have only one inverter with a LAN connection, the other one is connected by DATCOM. Do you know, how to address the second inverter over DATCOM?

I know that I could probably buy a second communication interface to solve this problem…

So you know in the automation you have
unit: 1
hub: mb_fronius
address: 40236
value: “0”

well you just copy the same automation and write
unit: 2
hub: mb_fronius
address: 40236
value: “0”

There’s no extra IP address, you the follower is designated as “unit 2”

my “reset to 100%” automation is below for my setup with a Primo and Symo in Leader/follower setup

alias: Energy - Fronius - reset 100%
description: Enable Fronius 100% if feed in price is positive
trigger:

  • platform: state
    entity_id:
    • sensor.amber_feedin_price_negative
      to: “False”
      condition:
      action:
  • data:
    unit: 1
    hub: mb_fronius
    address: 40236
    value: “0”
    action: modbus.write_register
  • data:
    unit: 1
    hub: mb_fronius
    address: 40232
    value: “10000”
    action: modbus.write_register
  • data:
    unit: 1
    hub: mb_fronius
    address: 40234
    value: “0”
    action: modbus.write_register
  • data:
    unit: 1
    hub: mb_fronius
    address: 40236
    value: “1”
    action: modbus.write_register
  • data:
    unit: 2
    hub: mb_fronius
    address: 40236
    value: “0”
    action: modbus.write_register
  • data:
    unit: 2
    hub: mb_fronius
    address: 40232
    value: “10000”
    action: modbus.write_register
  • data:
    unit: 2
    hub: mb_fronius
    address: 40234
    value: “0”
    action: modbus.write_register
  • data:
    unit: 2
    hub: mb_fronius
    address: 40236
    value: “1”
    action: modbus.write_register
    mode: single

pkuhn have you got this dual inverter configuration setup working effectively?

I have two Primo GEN24’s, one with two strings, and one with one string and connected to a battery. The inverters are running independently given there is no way to connect these models in any type of master/slave connection. I know other models of Fronius do support that but these Primo GEN24’s do not. If anyone knows to the contrary and how please let me know.

So trying to implement the soft limit in this scenario seems impossible. From my trial and error observations activating the soft limit in the manner described on this thread (Export Limiting Power Switched on with FeedIn set to zero, then activated via Modbus) on both inverters results in instability in both inverters ramping up and down in conflict with each other. It seems to particular favour agressive ramp down and very slow ramp up (several minutes).
I thought to try and run the limit only on the one inverter (the one not connected to the battery) but again the very slow ramp up means that the inverter with the battery never “sees” the excess power available to increase battery charging and the system stays very highly throttled and never ramps up.

A few other thoughts and questions.
The Export Limitation menu mentions the Mode as “Limit Entire System”. If the inverters do not talk to each other there is no mechanism where the “entire system” can be limited. Is this just a hangover from previous models where it was possible?
Does the setting “Total DC power of the Entire System” have any impact at all. I think it only is important if you use a percentage for the maximum feedin power.

A thanks to all on this thread, I’ve got to a point where I can set controls on everything but stuck now on this dual inverter setup.

If the inverters are linked by DATCOM - then you only need the IP address of the lead inverter and you configure it as per drjmz’s post

I have the original Primos which are linked via DATCOM in a master / slave arrangement. Do

As for independent inverters - that sound’s trickier if they can’t see each other or if there isn’t a Fronius consumption meter reading both outputs.

Are both inverters the same size or different. This article from Fronius may help? [Fronius Symo GEN24 6 - 10 kW / 6 - 10 kW Plus Operating Instructions]
Dynamic power regulation with several inverters (Fronius Symo GEN24 6 - 10 kW / 6 - 10 kW Plus Operating Instructions)

Thanks for link Phil, interesting.

In Example 1 I’m guessing you could only throttle the GEN24 down to zero leaving you with a min. feedin limited by the maximum of the SnapIN

In Example 2a I have actually managed to connect my Power Meter to both of my inverters by connecting the Modbus connection in parallel (not sure why you would need a second one to provide the same data). Both inverters see the power readings effectively. I had the settings pretty much identical to this setup today and it just wouldn’t ramp up.
I’ve found this though in the System, Information menu under Ramp Rates :

Which goes to @pete.AUS previous posts to slow ramp up rates. I’m not sure if fixing this will provide a solution for me but I’ll get it fixed first. Does anyone have a hack to get into the Access Code Country Setup on the GEN24 so I can fix this?? I don’t know how hard or long it is going to take to get my installer back to get this changed.

OK I’ve just seen this on another forum. Hopefully this is the answer.

I thought I’d quickly post my experience of testing this today. Bottom line it is not working well for me in more ways than one.

Firstly looking at the video it is self evident that the Master is controlling the slave via Modbus TCP. Critically, while monitoring the “Immediate Control” registers you can see it dynamically adjusting WMaxLimPct as the throttle mechanism on both Master and Slave Inverters. This is interesting as any previous throttle mechanism for export limit was not visible in this register. Unfortunately though it appears as a result you are locked out of making any changes yourself to those registers meaning I doubt there is an easy way to effectively switch on and off the export limit unless you can work with some sort of http based control on the web interface. Secondly it seems every 5 or so minutes stats go missing, I suspect there is some contention issue on the Modbus control.
Lastly throttling balance to battery charge didn’t seem to be prioritised at all, meaning the panel power was throttled back to the export limit with no prioritisation to bring the power back up and send it to the battery, one of the key aspects I thought this feature would bring (this could still be the ramp up issue, I haven’t got that changed yet).
I still want to play around with some settings a bit more but first experience not so good.

Thank you @juande and @tux43. I was completely stuck on the idea that I need to turn on dynamic power reduction.

But instead it’s turning off production limit of 100%, which falls back to next in priority which is dynamic power reduction :smiley: Just genius

Also, Fronius, what the hell - Modbus, Solar API and still nothing for making use of your smart meter.

Sorry just seen this

For the Snap Primo inverters is the same, for the Gen24 its device spacific that only the installer can change.

Its due to the country code in use for some reason Fronius set stupid ramp rates for Australia.

Man, sorry for the…well annual reply cycle…

I got mine working initially just using modbus from in home assistant but like 5 days ago I got the installer to let me set a new service password.

I sent them my intentions (cos they were understandably reluctant) and a screenshot I have form a draft energex proposal that is implementing a reverse demand for solar where they do the same process for demand but charge you for exports between certain times.

The inverter is much more efficient at managing it but I’m still tweaking tolerances cos sometimes the battery (ac coupled) just sits there not charging because the fronuis steps down (basically have to tell it to always allow 100 watts export minimum)

I also have tried contacting about another matter, but without any response too. However, it still seems to be working for me …? (Fronius Primo firmware 3.31.1-5)

That is good of you, the only thing is that the fronius-auth-proxy allows you to modify many of the areas in the web UI (whereas yours seems to just be the export limit setting?). I am using fronius-auth-proxy mainly to control load management settings.