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
- 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
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 !!! (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 ”
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:
- sensor.amber_feedin_price_negative
- 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