Combining photovoltaic energy with electric vehicles, smart charging and vehicle-to-grid