Deye inverter for grid and off-grid