Advice on overcoming Predbat/Foxess-Modbus limitations with KH7 inverter?

I am running predbat with FoxESS-Modbus and my new KH7 inverter. I’ve noticed that FoxESS-Modbus can only put the inverter into one of three work modes:

  • Self Use
  • Back Up (when Back-Up or Force Charge is selected in FoxESS-Modbus)
  • Feed-In Priority (when Feed-in First or Force Discharge is selected in FoxESS-Modbus)

The problem is that, due to the above limitations:

  • If Force Charge (Back Up) mode is invoked when excess solar is being generated the excess solar is discarded - it is neither exported nor used to charge the battery
  • If Force Discharge (Feed-In Priority) is selected it will not export charge from the battery to take advantage of good export rates unless feed-in limits have been exceeded. It will only export excess solar to the grid.

This means that I lose two major benefits of predbat:

  • taking advantage of cheap/free/negative import rates to charge the battery during the day without discarding excess solar energy that is being generated at the time
  • taking advantage of high export rates by exporting charge from the battery.

Does anyone have any advice for how/whether I can actually achieve either of the above benefits of predbat, either with or without FoxESS-Modbus?

I think I may have found a workable solution. It seems that the FoxESS-Control integration is able to access more work modes on the KH7 inverter if I configure it to use cloud access rather than modbus (e.g. feed-in, force charge and force discharge).
I’ve configured predbat to use the foxess_control services instead of the select.foxess_modbus entity, and it so far it seems to be doing the job.