In this system, the electricity generated by the photovoltaic power station is given priority to use at home, and the excess electricity is directly and automatically integrated into the power grid, so as to avoid waste and make money. Electricity can be generated by solar panels, wind turbines, diesel generators or mains alone or in any combination.