Thanks! It looks awesome! Hate to be that person , but I did flag an issue on GitHub. Seems like I can’t add the inverter . Think you could work your magic on that?
Hi !
Just out of curiosity:
My Symo Snap-in Inverter also has a Modbus interface. According to the documentation, this is “SunSpec” compatible SunSpec Modbus Specifications - SunSpec Alliance .
Would you happen to know if all Fronius inverters / Dataloggers support Modbus - and have compatible registers?
Further, are those SunSpec specifications defining exact registers so those are fully compatible with your integration?
If so, could a generic “SunSpec Modbus” integration do the same as yours - or are there vendor / Fronius specific details that have to be considered?
If you need someone to test this on non-Gen24 Symo inverters, I’d be happy to help.
Also, as the maintainer of the current Fronius Core Integration, I’d be happy to help if you are interested in bringing this to HA Core.
Btw.
current Core Integration doesn’t use cloud, but local json API
This looks like a great and useful integration! Unfortunately, I’m having trouble using the “Grid Charge Power” function – nothing happens when I change that parameter. The charging is stuck on 500 W.
I have set “Storage Control Actions” to “Charge from Grid” and then tried to limit how many watts it should charge with. However, there is no effect when I adjust the slider.
Could this be related to the “Max Charging Power” sensor? For some reason, it shows -24,576 W for me.
Just pushed out a new version with reworked Storage Control Mode behavior. The relevant inputs can be changed when the mode is active. See the documentation which controls are used and which are ignored in the various modes. Hopefully this makes it more intuitive to use the controls.
Unfortunately I didn’t have enough time and enough sun light to test all scenarios.
So far I know more Fronius inverters support Modbus and they should be mostly compatible.
The integration uses SunSpec format for Inverter and Meter data, but for actually controlling the registers it seems Fronius specific. At least the SunSpec integration cannot control it.
It would be great to integrate this into current Fronius Core integration, but it will be good to get storage controls solid first.
What inverter do you exactly have? I can add it to list of supported inverters so you can test if it works.
I have two non-Hybrid SnapIn Inverters on two different grid interconnection points: a Symo 5 and a Symo 20. Both connected to a Fronius SmartMeter. No battery, no Ohmpilot.
This is just great, I was getting crazy remembering each evening to start the charging from grid manually… I’ll definitely test this.
May I ask you some screenshot a for comparing the integration and the fronius local interface?
I usually define only the minimum change rate to like 1000 W for 4-5 h during the night so I charge into the battery the 5kWh I’ll Need during a cloudy day. Is the logic the same?
Installed my Gen24 in 2022 and wanted to automate but manually creating all the ModBus sensors was just a bit too much. Occasionally searched if anything new had came up, and this time your integration did!
It was easy to install via HACS, just added https://github.com/redpomodoro/fronius_modbus/ as a custom repo in HACS (instructions does not mention this) and then it could be installed.
If I may suggest a minor improvement; that the integration would either provide a static entity prefix or allow a custom prefix at installation, so the entities it provides can easily be identified in a HA instance. For example, the entity name sensor.temperature is very general in it’s naming, if all the entities would have a prefix like sensor.frmb_temperature they would be much easier to search for, to include in dynamic lists and dynamic configuration entries.
Oh, this is GREAT, thanks! I’m definitively going to use it from right now since I’m always short of energy during winter (neighbours trees ) and the existing inverter web is not very user friendly to wisely set a charging strategy. I must admit it took me some time to wrap my head around the different tables you put in the docs, but after I did some tries on my system, everything is clear… and I realised how powerful this is!
I’ll be actively using it, so let me know if you want me to test something in particular. I have never coded anything for HA and the following months are going to be a bit hectic here, but I’ll try to go through your code and help if I can.
Some comments (with the sole aim to help ) “PV Charge Limit”
It is not the first in the list of controls while it is referred to as the first one everywhere in the documentation and -old- screenshots. Not a big deal.
Using % or W/kW
It would be great to have the charge/discharge limits in W or kW rather than a % of the total power. Not sure if this can be done automatically at the time of setting up the device once the maximum capacity has been read, or if it would require the user to provide it beforehand in order to set the limits to the sliders…
“Minimum Reserve”
It is independent of the “SoC Minimum” in the “Battery Management” screen of the inverter site. Is this the expected behaviour? If so, it is good because the original one in the web can be left as a fallback in case something goes wrong in HA.
Possible clash
What would happen if I have a charging schedule set through the inverter web and this integration commands something different? I haven’t tried
I noticed the settings selected by the user are changed when different Modes are selected… I understand some of these settings are ignored depending on the settings (as per the table provided), but changing the values selected by the user in HA seems a bit confusing. I see it is done through change_settings every time the Mode is changed (set_auto_mode, set_charge_mode, etc).
In my opinion, it would be better to decouple the user choices from the actual values in the inverter, and only internally use the relevant values and ignore/overwrite those not needed in a specific Mode. Otherwise, selecting one Mode and then to another one could lead to unexpected results.
I also noticed a weird behaviour:
I set “Grid Charge Power” to 10%
I change “Mode” to “Charge from Grid”
Unexpectedly, the “Grid Charge Power” changes to 100% and the inverter charges at full throttle.
I believe the logic to check if the setting is below 0 fails:
def set_grid_charge_mode(self):
grid_charge_power = self.data.get('grid_charge_power')
if grid_charge_power is None:
_LOGGER.error(f'Grid Charge Power not set')
return
if grid_charge_power == 0:
grid_charge_power = 100
discharge_rate = grid_charge_power * -1
self.change_settings(mode=2, charge_limit=100, discharge_limit=discharge_rate, grid_charge_power=grid_charge_power)
# self.set_minimum_reserve(99)
_LOGGER.info(f"Forced charging at {grid_charge_power}")
Not familiar with the internals of HA, but could it be the value from charge_rate = self.data.get('charge_limit') is not the expected one??
Changing to other Modes also seem to scramble the limits (sorry, no time to look at it now).