EMS overriding battery discharge

I have the EMS managing everything, 2 inverters, batteries, but recently it’s stopped allowing the batteries to discharge. I can toggle the inverter to discharge, but the EMS just overrides it with an entry in the log about “charge detected”.
I’ve done some research and checked the settings which look ok, but I can’t stop the EMS from doing this. Any ideas anyone?