Switch second charger when mp charging from grid

System: MP II, DESS, batteries (32 Ah, 48 volt), pv coupled to ac-out of mp.
A second charger connected to the same batteries used to DC charge when running on generator.
Question: is it possible to program the ac out of the MP using the standard tools to switch on when the MP is charging from the grid?
Reason: this way I could charge the batteries faster by having the second charger charge in paralel. (This works fine with the genny). But it should not switch on when the MP is charging only from PV or discharging batteries while also using (a little) grid power.
Or should I just build it myself by looking at the P1 meter (connected to the grid meter). For example: if grid use minus boiler and/or washing machine and/or dryer (all are metered) is greater then ~500 watts (or so) for a certain amount of time, then switch on second charger.
I wand to do this because the MP takes too long to fill the batteries on low price.
Any info would be apriciated.

You could run the charger from ACout2 configured to power up when the grid is on (default).

That would allways charge the batteries when there is grid. Completely defeating DESS.

I need it only on when the mp is charging from the grid. In practice this means only when prices are low.

remote control by GX relay and node red flow.