A smart electrical panel that integrates distributed energy, and enables grid integration with home energy systems.