Control of solar energy systems