springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
115 stars 40 forks source link

Dual AIO Issues: REST & AC Rate Setting #1361

Open thephoton opened 1 month ago

thephoton commented 1 month ago

Describe the bug In a Dual AIO setup, the Gateway REST information is significantly different compared to the individual inverters.

Specifically, the "Power" section is missing, causing the initial update_status cycle in Predbat to error on line 764 when it tries to calculate SOC kWh / Capacity: startup error.txt

This issue seems to be related to differences in REST data between Gateway and individual inverters:

If you add in both AIOs to GivTCP, you can still call the REST API on different ports ie :6345 :6346 :6347/readData to get the original info.

I've commented the REST section out in apps.yaml for now, which leads to the second issue:

Setting Battery (Dis)charge Rate no longer works on the Gateway. Dual AIO setups need to adjust the AC version of the property (which is a %) instead of the watts version, otherwise this crashes givtcp (or the inverter dongle).

In MQTT it looks like this:

command_topic: GivEnergy/control/GW2330G088/setDischargeRateAC
min: 0
name: Battery Discharge Rate AC
state_topic: GivEnergy/GW2330G088/Control/Battery_Discharge_Rate_AC
max: 100
unit_of_measurement: '%'

There doesn't seem to be a REST version (yet?)

Expected behaviour The system should retrieve and process REST data in a Dual AIO setup and use AC version of rate control

Predbat version 8.3.2

Environment details

Log file (In post)

springfall2008 commented 3 weeks ago

If you add in both AIOs to GivTCP, you can still call the REST API on different ports ie :6345 :6346 :6347/readData to get the original info.

Did you try that and what results did you get?

I can certain add an option to change the Charge/discharge rate in % rather than watts