Automate Fronius Soft Limit

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.

yours seems to just be the export limit setting

Correct… but seeing as that’s all I need, that’s all I cared about :stuck_out_tongue:

I’m by no means against the idea of people adding additional functionality to this project as they require it though.

Anyone wanting to do this (enable/disable export limits) in script form: enjoy:

#!/bin/bash

# Input parameters
USERNAME="service"
PASSWORD="***"
URL="http://***/config/exportlimit/?method=save"
DATA_ON=' {"powerLimits":{"exportLimits":{"activePower":{"hardLimit":{"enabled":false,"powerLimit":0},"mode":"entireSystem","softLimit":{"enabled":true, "powerLimit":0}},"failSafeModeEnabled":false},"visualization":{"exportLimits":{"activePower":{"displayModeHardLimit":"absolute","displayModeSoftLimit":"absolute"}},"wattPeakReferenceValue":0}}}'
DATA_OFF='{"powerLimits":{"exportLimits":{"activePower":{"hardLimit":{"enabled":false,"powerLimit":0},"mode":"off",         "softLimit":{"enabled":false,"powerLimit":0}},"failSafeModeEnabled":false},"visualization":{"exportLimits":{"activePower":{"displayModeHardLimit":"absolute","displayModeSoftLimit":"absolute"}},"wattPeakReferenceValue":0}}}'
METHOD="POST"

# Convert argument to uppercase to match variable names
ACTION=$(echo "$1" | tr '[:lower:]' '[:upper:]')

# Use indirect variable referencing to get the DATA
DATA_VAR="DATA_$ACTION"
DATA="${!DATA_VAR}"

# Check if argument is provided
if [ -z "$1" ]; then
  echo "Usage: $0 [ON|OFF]"
  exit 1
fi

# Step 1: Get the authentication challenge (x-www-authenticate header)
AUTH_CHALLENGE=$(curl -s -D - "$URL" -o /dev/null | grep -i 'x-www-authenticate:' | sed 's/x-www-authenticate: //I' | tr -d '\r')

# Check if AUTH_CHALLENGE is empty
if [ -z "$AUTH_CHALLENGE" ]; then
    echo "Failed to get authentication challenge from server."
    exit 1
fi

# Step 2: Parse the challenge parameters
realm=$(echo "$AUTH_CHALLENGE" | sed -n 's/.*realm="\([^"]*\)".*/\1/p')
nonce=$(echo "$AUTH_CHALLENGE" | sed -n 's/.*nonce="\([^"]*\)".*/\1/p')
qop=$(echo "$AUTH_CHALLENGE" | sed -n 's/.*qop="\([^"]*\)".*/\1/p')

# If qop is empty, default to 'auth'
if [ -z "$qop" ]; then
    qop="auth"
fi

# Other parameters
uri="/config/exportlimit/?method=save"
nc="00000001"
cnonce="abcdef0123456789"

# Step 3: Compute HA1, HA2, and Response using OpenSSL
# HA1 = MD5(username:realm:password)
ha1=$(printf "%s:%s:%s" "$USERNAME" "$realm" "$PASSWORD" | openssl md5 | awk '{print $2}')

# HA2 = MD5(method:uri)
ha2=$(printf "%s:%s" "$METHOD" "$uri" | openssl md5 | awk '{print $2}')

# Response = MD5(HA1:nonce:nc:cnonce:qop:HA2)
response=$(printf "%s:%s:%s:%s:%s:%s" "$ha1" "$nonce" "$nc" "$cnonce" "$qop" "$ha2" | openssl md5 | awk '{print $2}')

# Build the Authorization header
AUTH_HEADER="Digest username=\"$USERNAME\", realm=\"$realm\", nonce=\"$nonce\", uri=\"$uri\", algorithm=MD5, response=\"$response\", qop=$qop, nc=$nc, cnonce=\"$cnonce\""

# Step 4: Make the authenticated request
curl -X "$METHOD" "$URL" \
  -H "Content-Type: application/json;charset=utf-8" \
  -H "Authorization: $AUTH_HEADER" \
  -d "$DATA"
1 Like