A system that learns each user’s generation and consumption patterns and decides when to store, use or export solar energy to the grid.