batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Manual API Control +inverter_limit_charge=nnnn sets and then resets a few seconds later

Open DrJohnM61 opened this issue 8 months ago • 1 comments

Describe the bug I am using the Manual API Control to set the charge rate of the battery to maximise free electricity sessions. This has worked fine in the past. From home assistant, I first call the select.predbat_manual_api with the option "off" followed by the same select.predbat_manual_api with the option "inverter_limit_charge=12000". Predbat runs and I see that the number.givtcpgw_gw2347g062_battery_charge_rate is set correctly to 12000. This is the expected behaviour, however, after a few seconds, the value reverts back to the value set in the apps yaml (in my case, 5000). You can see this happening in the second screenshot.

Looking at the predbat selectors, the Manual API Control is set as +inverter_control_charge=12000 even after the givtcp battery charge rate has reset to the apps yaml value.

Expected behaviour The vale is set as requested and remain set until changed to a different value or removed.

Predbat version v8.24.2

Environment details

  • Givenergy all-in-one v1 (dual batteries and single gateway)
  • Standard HAOS installer or Docker: Standard HAOS install
  • Anything else?

Screenshots

Image Image

Log file Can you capture a log file from the time of the issue, debug mode is not normally required.

You can download the logfile from the WebUI on the Dash tab select predbat_debug.log

There is no predbat_debug.log option but here is the log file:

predbat.log

Also, this log file where you can see the inverter being set again to 12000 from the apps yaml value of 5040 (5000 but givenergy system does some strange rounding). So it looks like the value keeps being set (at each run) to the api override value and then reset to the apps yaml value a few seconds later.

predbat (1).log

Predbat debug yaml file

predbat_debug.yaml.txt

DrJohnM61 avatar Sep 01 '25 09:09 DrJohnM61

I further changed the apps yaml file to have a different value (8000), but still the value kept on resetting to 5000. I suspected that it was something else that was setting the value, not predbat.

After some searching, it seems that there is a additional value that needs to be set in GIVTCP givtcpgw_gwnnnnnn_battery_charge_rate_ac (note the additional _ac). This is the battery charge rate % and appears to override the value given to givtcpgw_gwnnnnnn_battery_charge_rate. I cannot find a change log in GIVTCP regarding this value, so it may have been a change on the GivGateway software. From memory, this was a number in the gateway but now seems to be a percent "Inverter Charge Power Percentage".

Further, I read that the battery charge rate can be set as a value but the inverter is set as a percent. As we have a dual battery AIO, there are no controls for the batteries and it's all set at the inverter.

Clearly the inverter_limit_charge and inverter_limit_discharge arguments are set in watts but that is no longer having an effect on a GivEnergy gateway inverter.

DrJohnM61 avatar Sep 07 '25 08:09 DrJohnM61