Harness solar energy by enabling smarter integration of solar into the power grid