Fronius Symo Gen 24 plus Batteries

The inverter will enter a standby phase when there is no solar power and no battery power available, and go into MPPT mode when there’s solar. Why do you need to keep it “on”?

This is now at 11pm.

I just thought it needed to be “running” since it didn’t seem I could read Modbus values otherwise. But I was very tired yesterday (2AM) so I might have been wrong.

Don’t need to restart the inverter. Just disable Modbus in Settings and re-enable. This also resets all values to default.

1 Like

@Klangen82

Your work is lovely!
In theory it should work exactly the same on any SunSpec compliant inverter setup

It worked almost without any modifications (different sizes on battery, inverter and IP).
For some reason it sets Soc to 40% and I’m currently struggling to figure out why, I cant see that you change it anywhere in the flow?

Thanks! Do you mean that the battery only get’s charged to 40% and not 100%? It this is the case then you need to alter the msg.outwrte and msg.inwrte so it fit’s your battery size. I don’t remember top on my mind right now as this has been working for me for a while now. But I needed to test different values as it was not super clear to me how it worked so please experiment a bit. As you can see the values are opposite eachother for charge/discharge.

That’s really nice, I just copied your Node-Red to my instance, updated the IP address of my inverter, and it works :smile:

The next step is to control the inverter dependent on the energy tariffs. Did you make this too, in Node red?

I have done a node-red flow where I use https://powersaver.no/ to charge when the price is low and then sell if the price is higher. So I have a sensor checking the buy price compared to the sell price and it it makes sense then I sell.

It’s not the optimal flow so I’m thinking of changing it as I would like to have the full 48h and not only 24h as the power saver node gives me. Also I would like to take into the calculation what my house is consuming depending on whether condition for the upcoming 48h. But I have not done this yet as it’s not that easy so if someone have done this I would be happy to lend it :slight_smile:

ps.
The flow is not just something I can share in it’s current sate, need to clean it up. I have some checking if my EV is charging in the flow etc. But when I find the time I will share if you like to, if you don’t figure out how to use power saver.

@enoch85 see if this will help you automate your car charging

I’m using this now, just got finished actually:

So the buy price is set as an (automatic) variable, then I calculate different price leveles where I think it’s a good idea to sell, which in turn then automatically sell on different levels. Also the car charging is done by an integration automatically. In other words, I think I just made my own “powersaver.no”. :slight_smile:

I’m feeling pretty pleased with everything now.

3 Likes

Hi all,

I have a Gen24 10.0 with a BYD 11 battery. I’m using HASS in the lastest version with the Fronius integration. The config looks very interesting for me. Your config is part of the configuration.yaml right?
How can i call the services to send the values to the adress of the Gen24?
Where i can get the adresses? I had downloaded the modbus guide from fronius and i had downloaded the excelfiles with the register map. But this seems that is not the right path. The numbers doesn’t match.
Kind regards and thanks in advance!
Michael

I’ve got a Symo GEN 24 Plus with BYD 22.9kWh battery. it’s running the latest code - 1.28.7-1 and I’ve got ModBusTCP working - I can read/write to it.

BUT - the ramp down time for the panels is very long. Even when I tweak WMaxLimPct_RmpTms and WMaxLimPct_WinTms it seems to take about 5minutes to go from max output (close to 10kw) down to close to zero. It seems to ignore the values written to these registers.

I sent a support request to Fronius but haven’t had a reply.

Anyone seen this or have a solution?

Hey there, the services are at most times part of a script or an automation. The services get called in said script or automation by typing modbus…
Wth the excel you are on the right track but you need to look if its the right config (float or int+SF) and also subtract 1 of the numbers from the excel.

Hi,

great work. I tried the NodeRed flow from @Klangen82 but my inverter resets StorCtl_Mod value after a few seconds to zero if I try to disable discharging. I suspected the wallbox to do that but even after switching it of the register is being reset. Any ideas?

Cheers
Nils

Hi alle.
trying to use Home assistant to charge the battery, when power price is low.

I can, dis- and enable battery use …
Is there some one, there can help me, to get the battery pack to charge and discharge from the grid.
I have tried ChatGPT, and there is not a answer.

Modbus

  • type: tcp

    Put your Gen24 IP address here

    host: 192.168.107.11
    port: 502
    name: gen24

scripts

disable_battery_usage:
alias: disable battery usage BYD
sequence:

  • service: modbus.write_register
    metadata: {}
    data:
    hub: gen24
    address: 40348
    slave: 1
    value: 2
  • service: modbus.write_register
    metadata: {}
    data:
    hub: gen24
    address: 40355
    slave: 1
    value: 0
    mode: single
    icon: mdi:battery-off
    enable_battery_usage:
    alias: enable battery usage BYD
    sequence:
  • service: modbus.write_register
    metadata: {}
    data:
    hub: gen24
    address: 40355
    slave: 1
    value: 8000
  • service: modbus.write_register
    metadata: {}
    data:
    hub: gen24
    address: 40348
    slave: 1
    value: 0
    mode: single
    icon: mdi:battery-check

I charge the battery from grid by setting the “% WChaMax” to an percentage to which I want the battery to charge. When you are using Int&SF that would be address 40351 in the excel table.
To control the power it should be “InWRte”/40357 but that doesn’t work for me. It always charges with ~500W.

Beware this hurt my head, but I’ve managed to force charge and discharge on command. The key is using negative numbers to set the minimum charge and discharge rates. Like setting the minimum rate in the solar start battery management:

This concept is explained really well here, picturing it really helped https://loxwiki.atlassian.net/wiki/spaces/LOXEN/pages/1316061809/Fronius+Hybrid+with+Modbus+TCP?focusedCommentId=1698594976#b.-Battery-Charging%2FDischarging-Options

Force charging:
You have to set the outWRte rate to negative, but I got errors passing a negative int to modbus. So, I have a template that sets the rate to 100%, multiplies by 100 for scale factor 2, and makes it negative using some form of twos compliment for decimals, I dunno, it works:
{% set outWRte = 100 | int %}
{{ 65536 - outWRte * 100 }}
Then I have an automation to set the outWRte rate and set mode to charge:
action:

  • service: modbus.write_register
    metadata: {}
    data:
    hub: fronius
    slave: 1
    address: 40366
    value: “{{ states(‘sensor.battery_outwrte’) }}”
  • service: modbus.write_register
    metadata: {}
    data:
    hub: fronius
    address: 40358
    slave: 1
    value: 2
    mode: single

Force discharge:
You have to set the inWRte rate to negative and set the mode to discharge. I have a template to set the charge rate based on the available max and min charge level, then divides by 3 hours available to discharge:
{% set SoC = states(‘sensor.battery_soc’) | int %}
{% set MinSoC = 25 | int %}
{% if (SoC > MinSoC) %}
{{ 65536 - ((SoC - MinSoC) / 3) * 100 }}
{% else %}
{{ 0 }}
{% endif %}

And an automation to set the inWRte rate and the mode to discharge:
action:

  • service: modbus.write_register
    metadata: {}
    data:
    hub: fronius
    slave: 1
    address: 40366
    value: “{{ states(‘sensor.battery_inwrte’) }}”
  • service: modbus.write_register
    metadata: {}
    data:
    hub: fronius
    address: 40358
    slave: 1
    value: 1
    mode: single

You can stop the forced charge/discharge at any time by setting the mode back to normal with 0:
action:

  • service: modbus.write_register
    metadata: {}
    data:
    hub: fronius
    address: 40358
    slave: 1
    value: 0
    mode: single

Note you’ll need to change all the address values if you’re using the Int&SF register map.

Also note the forced rates achievable are restricted by the limits of the inverter and battery and the load demand.

Hi huffy - I am very much a HA newbie and have got a Fronius inverter and BYD batteries. I have the Modbus link set up and working and am now looking to control things a bit more smartly.
I have a couple of queries on your solution - what is the metadata line for in your modbus service call? And I’m assuming that the template sensor you refer to that calculates the outWRTe is the sensor.battery_outwrte? I’m going to have a go at setting this up, just need a bit more explanation!

Thanks for your help,
Steve.

Hi @SteveM1 , happy to help. There’s nothing in the metadata, not even sure why it’s there, probably copied from somewhere else. Yes, that’s the template entity I’d, which you can find in the list of helpers.

1 Like

Thanks @huffy72 - the metadata line doesn’t seem to make any difference - I now have a number of scripts writing to modbus which don’t use it. Thanks for the reply!

Hi all,

i am getting the GEN24 Plus with BYD Batteries too. Looks like i can use this with modbus to control discharge rate.

Any tips or suggestions for my install before it happens (related to ha integration) ?

thank you very much