Grab them here https://www.smartmotion.life/wp-content/uploads/2023/09/Fronius_Inverter_Register_Map_with_IntegerSF_Inverter_Model.xlsx
Here is another Fronius video that provides a solution for dynamic power reduction with ywo inverters. https://m.youtube.com/watch?v=pWThly26bos&pp=2AEAkAIB[https://m.youtube.com/watch?v=pWThly26bos&pp=2AEAkAIB](https://m.youtube.com/watch?v=pWThly26bos&pp=2AEAkAIB)
Thanks @grahamam107. I took a quick look but some of the key issues I encountered with it when I first tried it are still there.
I ended up rolling my own using HA automations addressing the the modbus registers which works pretty effectively.
Hi,
I found this thread really useful, to understand the mechanics - thanks a lot!
I needed a solution for the new german law âSolarspitzengesetzâ, that requires a limited feed into the grid by max. 60% of the installed kWp. It calculates the current site consumption and adds this to the inverter max power limit.
The second automation is to turn back to 100% once the inverter goes below 10W. Just if anybody would be interested as well.
Happy to hear any feedback for improvements as well.
My configuration.yaml:
template:
- sensor:
- name: "fronius_symo_pwr_limit"
# Solarspitzengesetz: maximum grid feed is 60% of kWp installed
# i.e. 5220 * 60% = 3120 W
# inverter max power is 5000 W
# value to control inverter power is in percent scaled by 100, i.e. 10000 = 100%
state: >
{% set max_power = 5000 %}
{% set scaling = 10000 %}
{% set installed_Wp = 5220 %}
{% set max_grid_feed = (installed_Wp * 0.60) %}
{{ (( [ ((states("sensor.shellypro3_total_active_power") | float(0) )
+ (states("sensor.fronius_symo_5_0_leistung_ac") | float(0) )
+ max_grid_feed), max_power] | min)
/ max_power * scaling) | int
}}
and my autiomation.yaml:
- id: '1743520805814'
alias: Froinuis Symo limit output power
description: ''
triggers:
- trigger: state
entity_id:
- sensor.shellypro3_total_active_power
conditions:
- condition: numeric_state
entity_id: sensor.fronius_symo_5_0_leistung_ac
above: 3100
- condition: numeric_state
entity_id: sensor.fronius_symo_pwr_limit
below: 10000
actions:
- action: modbus.write_register
data:
hub: mb_symo
address: 40242
value:
- '{{ states("sensor.fronius_symo_pwr_limit") }}'
- 0
- 0
- 0
- 1
mode: single
- id: '1743613179878'
alias: Fronius Reset max Power
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.fronius_symo_5_0_leistung_ac
below: 3000
conditions: []
actions:
- action: modbus.write_register
data:
hub: mb_symo
address: 40242
value:
- 10000
- 0
- 0
- 0
- 1
mode: single
EDIT: improved the conditions in the first automation and increased the trigger value in the second compared to my original post.
Thank you good man, I was wondering why it doesnât work ![]()
For my Symo this toggle to â0â and back to â1â is actually not needed (s. automation above).
What I experience however, is a quite slow regulation of 10-20sec. I assume that the modbus isnât accessed more frequently? Havenât investigated if this can be tuned from defaults.
Have read through a lot of this, and my brain keeps breaking :(.
Iâm simply wanting to create an entity for my snap Primo 3.0. So as I can set the soft limit from HA with automations.
I have primo setup in MG50, have set primo tcp and Sunspec int +SF.
Been using Muskâs Grok to create the code but failing badlyâŚ
I have added the fronius integration, which works.
Any one feel like helping my out ?
I have this in my Config*.yaml
modbus:
-
type: tcp
name: fronius_inverter
host: 192.168.1.180 # Replace with the IP address of your Fronius inverter
port: 502
sensors:- name: Fronius Soft Limit Enabled
address: 40236
input_type: holding
data_type: uint16
scan_interval: 30 - name: Fronius Soft Limit Percentage
address: 40232
input_type: holding
data_type: uint16
scale: 0.01
scan_interval: 30
switches: - name: Fronius Soft Limit Enable
address: 40236
write_type: holding
command_on: 1
command_off: 0 - name: Fronius Soft Limit Set Percentage
address: 40232
write_type: holding
and this in my Automations.yaml
- name: Fronius Soft Limit Enabled
-
id: â1746485405925â
alias: Set Fronius Soft Limit2
description: ââ
triggers:- trigger: numeric_state
entity_id:- sensor.primo_3_0_1_1_ac_power
above: 695
for:
hours: 0
minutes: 0
seconds: 1
conditions:
actions:
- sensor.primo_3_0_1_1_ac_power
- data:
hub: fronius_inverter
address: 40236
value: 0
action: modbus.write_register - data:
hub: fronius_inverter
address: 40232
value: â2000â
action: modbus.write_register - data:
hub: fronius_inverter
address: 40236
value: 1
action: modbus.write_register
mode: single
- trigger: numeric_state
But cannot make the primo reduce output ![]()
I have modbus at highest priority in primoâs settings.
At this point, I thinking Iâm going to need to setup a bunch of relays I can control via HA, and have them trigger IO pins on the Primo. Seems like a lot of waste, since it SEEMS like yaâll doing it with modbusâŚ
My installation consist of a Fronius Gen24 6kW + Smart meter + BYD battery.
Iâm trying to find a dynamic way to limit the feed-in to the grid during negative feed-in prices, just like the function available in the user interface under Export Limitations, âMaximum Grid feed-in powerâ, which works great, but requires me to manually turn on/off hour by hour.
I have tried to follow the examples in this thread but without succes.
Maybe someone would take a look on my configuration:
The Modbus interface is working - I can read values and using a Modbus tester I can se the values are correctly send from the automation. But I get no reduction/change in the feed-in effect to the grid or the produced effect from the Inverter.
Actually the only reaction I have seen is that a Battery Management Rule with max charging power of 0W is being ignored and the battery is getting charged.
I must have missed something?
With the advent of vibe coding in gemini, my basic âon/offâ when exporting automation has been massively upgraded. It now live monitors house load (usage), whether you are exporting, battery state of charge, and solar power being generated, and calculates a percentage curtailment that allows the batteries to continue charging, the house load to be covered and stops exporting in negative feed in.
#This automation dynamically throttles solar inverters (e.g., Fronius)
# based on battery State of Charge (SoC) and house load. The goal is to
# prevent exporting power to the grid during negative price periods, which
# can incur costs.
#
# Created for the Home Assistant Community.
#
# How it works:
# The automation activates when your battery is nearly full, you are exporting
# power, AND the grid feed-in price is negative. It then calculates a new
# power limit for your inverter(s) based on your battery's SoC and your
# current house load, ensuring you only produce what you can consume or store.
# When conditions return to normal, it removes the power limit.
#
#
# --- SETUP INSTRUCTIONS ---
#
# 1. Replace placeholder entities with your own sensor/entity IDs.
# - sensor.your_grid_export_sensor: A sensor that shows power flow to/from the grid.
# *Negative values should indicate export to the grid.*
# - sensor.your_battery_soc: Your battery's state of charge percentage.
# - sensor.your_grid_feed_in_price: The current price you get for exporting power.
# - sensor.your_house_load: Your home's current total power consumption in kW.
# - hub: your_modbus_hub_name: The name of your Modbus hub in Home Assistant.
#
# 2. Create a Helper Toggle (Input Boolean).
# - Go to Settings -> Devices & Services -> Helpers.
# - Create a "Toggle" helper. Name it "Solar Curtailment Active" which will create
# `input_boolean.solar_curtailment_active`. This is used to track the state.
#
# 3. Adjust the `modbus_power_limit` variable template.
# - The `soc_map` dictionary determines the power limit (in Watts) at different SoC levels.
# Adjust the Watt values to match your inverter's maximum power output.
# The example is based on a 15,000W system.
#
# 4. Configure the Modbus `repeat` loop.
# - The `for_each` list contains the Modbus unit IDs of your inverters. This
# example is for two inverters with IDs 1 and 2. Add or remove as needed.
# - The Modbus register addresses (40232, 40236) are for Fronius inverters using the
# SunSpec protocol. Check your inverter's documentation for the correct registers.
#
alias: Energy - Dynamic Solar Curtailment
description: >-
Dynamically throttles solar inverters based on battery SoC and house load to
prevent grid export during negative price periods.
# This automation will trigger whenever any of the key sensors change state.
trigger:
- platform: state
entity_id:
- sensor.your_battery_soc
- sensor.your_grid_feed_in_price
- sensor.your_house_load
- sensor.your_grid_export_sensor
action:
- choose:
# --- CURTAILMENT ACTIVATION CONDITIONS ---
# These are the conditions that must ALL be true to activate curtailment.
- conditions:
# Condition 1: You are exporting power to the grid (value is negative).
- condition: numeric_state
entity_id: sensor.your_grid_export_sensor
below: -1
# Condition 2: Your battery is almost full (e.g., above 95%).
- condition: numeric_state
entity_id: sensor.your_battery_soc
above: 95
# Condition 3: The grid feed-in price is negative (you are being charged to export).
- condition: numeric_state
entity_id: sensor.your_grid_feed_in_price
below: 0
sequence:
# --- ACTIONS TO CURTAIL POWER ---
- variables:
# This template calculates the maximum power the inverter should produce.
# It takes the HIGHER value between the house load or a limit based on SoC.
modbus_power_limit: >-
{% set soc = states('sensor.your_battery_soc') | int(0) %}
{# Convert house load from kW (expected from sensor) to Watts #}
{% set house_load = (states('sensor.your_house_load') | float(0) * 1000) | int(0) %}
{# This dictionary maps SoC levels to a specific power limit in Watts. #}
{# Adjust these Watt values based on your inverter's max power. #}
{# Example for a 15000W system: 25% steps down from 98% SoC. #}
{% set soc_map = {100: 0, 99: 0, 98: 3750, 97: 7500, 96: 11250} %}
{# Get the limit from the map. If SoC is below 96, default to a high value (e.g., 15000W) to not limit. #}
{% set soc_limit = soc_map.get(soc, 15000) %}
{# The final power limit is the greater of the house load or the SoC-based limit. #}
{# This ensures you always generate enough to cover your own usage. #}
{{ [soc_limit, house_load] | max }}
# Turn on the helper toggle to indicate that curtailment is active.
- service: input_boolean.turn_on
target:
entity_id: input_boolean.solar_curtailment_active
# This loop sends Modbus commands to each of your inverters.
# Edit the `for_each` list to match your inverter Modbus IDs.
- repeat:
for_each:
- 1
- 2
sequence:
# The following sequence is specific to Fronius SunSpec.
# It enables the power limit control, sets the new limit, and then commits the change.
# Consult your inverter documentation for the correct procedure.
- service: modbus.write_register
data:
hub: your_modbus_hub_name
unit: "{{ repeat.item }}"
address: 40236 # SunSpec: WMaxLim_Ena
value: 0
- delay:
milliseconds: 100
- service: modbus.write_register
data:
hub: your_modbus_hub_name
unit: "{{ repeat.item }}"
address: 40232 # SunSpec: WMaxLimPct
value: "{{ modbus_power_limit | int }}"
- delay:
milliseconds: 100
- service: modbus.write_register
data:
hub: your_modbus_hub_name
unit: "{{ repeat.item }}"
address: 40236 # SunSpec: WMaxLim_Ena
value: 1
# --- DEFAULT ACTION ---
# This runs if the activation conditions are NOT met.
default:
# We only need to do something if curtailment is currently active.
- condition: state
entity_id: input_boolean.solar_curtailment_active
state: "on"
# --- ACTIONS TO REMOVE CURTAILMENT ---
# Turn off the helper toggle.
- service: input_boolean.turn_off
target:
entity_id: input_boolean.solar_curtailment_active
# Loop through inverters and reset the power limit to its maximum.
# Adjust the `value` to your inverter's maximum rated power in Watts.
- repeat:
for_each:
- 1
- 2
sequence:
- service: modbus.write_register
data:
hub: your_modbus_hub_name
unit: "{{ repeat.item }}"
address: 40232 # SunSpec: WMaxLimPct
value: 15000 # Set this to your inverter's max power in Watts.
# The 'restart' mode ensures that if the conditions change while the actions
# are running, the automation will stop and re-evaluate from the beginning.
mode: restart
Hi, i have followed this topic and have a very basic quey - defintely a newb.
I have a Fronius Symo 10.0-3-M (1) which is one of the older snap Invertors. Its currently AC coupled with my Sigenergy Invertor. Because of this there is no Fronius smart meter attached. My question is will this MODBUS approach work without a smart meter installed ? (I suspect not as I can push to the registers required but have never been able to make DPR work) Any comments would be appreciated ⌠as I say I am defintely a newbie and absolutely not an engineer
Thanks very much.
hey Jmz, or anyone else who may know the answer. I note a few users (such as yourself here) have mentioned that during negative FIT you donât perform a 100% curtailment - rather itâs dynamic so that you are also charging your battery and powering your home. I take it that disabling WMaxLim_Ena actually stops all energy passing through the inverter - even if for local consumption (correct me if I am wrong as I am still doing research).
If thatâs the case, I have 2 questions to that if you donât mind answering:
- If there is a negative FIT, does that imply we will paid by taking from the grid, and thus it would be better to stop all local generation/use?
- Naturally there are spikes in energy consumption. Since this is a polling solution, what happens in situations where you switch your kettle on and you are now requiring more energy than you have allowed through your curtailment? I guess you just take from the grid during these times until the next poll occurs, but would like confirmation.
Appreciate your time mate!
Ive managed to create an Automation based on this Thread. I have a Fronius Primo 8.2-1 and im with Amber Electric. My system is an AC coupled which feeds an Alphaess battery. As i couldnât curtail export on the Alpha system i thought id do it with the fronius. Ive been running my Automation for about 3 weeks now and it appears to be doing what i intended. I had a few minor tweaks here and there. Thought i share the automation which ive now created a Blueprint from. GitHub - gjh1967/fronius-amber-curtailment: Dynamically limit solar generation during negative pricing periods to avoid export charges. Let me know how it goes. Cheers




