The best solution here is to choose a solar inverter specially designed for this purpose. The model given in the link below has connections for PV modules, batteries and devices to be operated. solar inverter