Warn: Inverter 0 set charge rate 3600 via REST failed got 2560 error
Describe the bug For the last week I am getting this error, I think the plan is still working okay but I cant work out how to fix the error. I've checked the Givenergy inverter settings and it wont let me change the 'Battery Charge Power' or 'Battery Discharge Power' from 2560 to 3600 -
| 42061 | 2025-11-09 11:20:27.515286: Warn: record_status Warn: Inverter 0 REST failed to setChargeRate |
|---|---|
| 42060 | 2025-11-09 11:20:27.499060: Warn: Inverter 0 set charge rate 3600 via REST failed got 2560 |
Expected behaviour A clear and concise description of what you expected to happen.
Predbat version
8.27.8
Environment details
- GiveEnergy Inverter and three Batteries
apps.yaml.txt predbat_plan.html predbat_debug.yaml.txt predbat.log
Screenshots If applicable, add screenshots to help explain your problem. The most useful ones can be your battery chart, the Predbat HTML plan and your current settings in HA.
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
Predbat debug yaml file This is important for any plan related issues.
Once you have captured the issue go to the Web UI, in the Dash tab click on predbat_debug.yaml and wait 30 seconds for it to download. Select 'keep' if your Web Browser thinks the file is dangerous.
Rename the download file to predbat_debug.yaml.txt and upload it to Github. This will allow your plan to be reproduced and also stores all your settings for review.
What version of givtcp are you running and what's in the givtcp logs?
It sounds like a givtcp problem.
Assume your inverter can accept 3600 charge rate ?
This sounds like the GivTCP error I had before. Because you have your Predbat set to use the charge rate, it sends a watt amount to GivTCP. GivTCP then does a calculation to work out the charge percentage, but because occasionally the inverter sends back no value for max charge rate the calculation fails. If you check the GivTCP logs it will say ZeroDivisionError. You can fix this by putting the charge rate percent entity in the Predbat apps.yaml file instead.
Also, your apps.yaml file has your givenergy API key in. I suggest you regenerate a new key immediately on the givenergy portal, and delete the old key. You're not actually using the givenergy API, so you don't need that in the file.
Also, your Solcast API key is there too. Regenerate that and reenter that into the apps.yaml
You can fix this by putting the charge rate percent entity in the Predbat apps.yaml file instead.
@al090187 Can you expand on what the advice is for setting in apps.yaml to circumvent this issue is please? I assume it's an issue for some of the newer inverters (AIO and 3phase) that introduce separate watt and percentage entities?
Also, your apps.yaml file has your givenergy API key in. I suggest you regenerate a new key immediately on the givenergy portal, and delete the old key. You're not actually using the givenergy API, so you don't need that in the file.
Don't disagree about keeping the givenergy API key secure, but BTW, by setting a key in apps.yaml then predbat will use this for your history in preference to HA entities. You need to remove or comment out the ge key to stop this
In the apps.yaml, instead of using
charge_rate: - number.givtcp_{geserial}_battery_charge_rate
You use charge_rate_percent: - number.givtcp_{geserial}_battery_charge_rate_ac
The same for discharge. GivTCP has these values already if the inverter sends them.