Force Charge / Discharge and Grid Interaction

Post Reply
jlass6688
Posts: 2
Joined: Tue Aug 13, 2024 5:43 pm

Hello! Im looking into control over my battery through the FoxESS API.

I can see we have the option to enable work modes, including a Force Discharge and Force Charge. The API docs themselves dont explain much about these modes so I had a few questions.

If I enable Force Charge for a time period, will the battery be charged from both Solar and Grid? Is there a way to switch between only charging from Solar and charging from both Solar and Grid?

Similarly, if I enable Force Discharge, will it discharge to cover both the local load and grid? Is there a way to only enable the discharging to cover the local load?

Thanks in advance for your help!
Dave Foster
Posts: 1279
Joined: Thu Oct 13, 2022 7:21 pm

I assume you are referring to the OpenAPI and the scheduler, the Fox apps also modify that when you want to set schedules (Force Charge/Discharge) so the functionality is the same here as you get in the apps.

If I take your last point first, if the inverter is in Self Use, the batteries are above the minSoC and the PV isn't enough to cover the house loads the battery will always be used anyway - you don't have to set any modes for that.

If you set Force Discharge, you have to set a discharge power level - so if you set it to 5000 (watts) the inverter will output 5000 watts AC which will be used to cover the house load and the rest will be exported to grid. If there is PV generation of 2000 watts, the battery will supply the remaining 3000 watts (plus a bit for conversion losses). so if the house load is 300 watts then the export to grid would be 4700 watts.

If you set Force Charge there is no charge power setting to consider, it will charge at the maximum rate the batteries will allow (based on temp and SoC) - if we assume they can charge at 4000 watts, and there is PV generation of 2000 watts the grid will import the rest to make up the difference.

Using the scheduler you can't set whether the power will be taken from solar or the grid, for both 'Force' modes if PV is available it will be always be used first.
jlass6688
Posts: 2
Joined: Tue Aug 13, 2024 5:43 pm

Thanks Dave! Very helpful. For the time being, we're restricted to using the API and not through the Fox ESS apps.

Would you happen to know what the use case for the minSocOnGrid field on the Set Time Segment endpoint is used for? The description isnt super clear to me
Screenshot 2024-08-14 at 13.50.05.png


EDIT: Found an answer (From Dave actually)
minSoC is the minimum allowable safe state of charge for the battery

minSoC on grid is the minimum you want the battery to fall to whilst running on grid power.

The reason for the difference is that some people use the EPS (backup) power option and to do this effectively you need to leave a surplus to run off just in case the grid power is to fail.
Dave Foster
Posts: 1279
Joined: Thu Oct 13, 2022 7:21 pm

Yep that’s correct :)

Be careful when setting it, it’s normally set at 10% (unless you have EPS fitted where you might want to keep a bit more reserve) - when setting it in a schedule it will stay set as you set it after the schedule ends, unless you set it back later. So ot’s best to leave it at the default.

For completeness ‘FDSoC’ is used when force discharging to set the minimum you want the batteries to discharge to so it doesn’t burn through all your battery energy and leaves some for the house.
Post Reply