Homes could use and store energy much more efficiently than they do, and a major tool to help make this happen will be the Home Energy Management System (HEMS). The following entities might be connected to a home:
An open-source software package implementing user-selected strategies for optimizing the interactions between all these actors would facilitate the emergence of smart neighborhoods. Neighborhood interconnection might justify individuals in buying larger geothermal / windmills / solar panels if the benefit could be recouped through revenues from other nearby households.
Such a system might be implemented on open-source hardware and software, e.g. a Raspberry Pi running Linux and connected to an assemblage of off-the-shelf power management and sensing hardware.
Peak net fossil energy may already have come and gone, and as humanity's energy needs are increasing, renewables will have to fill the gap. Fortunately Solar PV appears to be cheapening exponentially.
As fossil energy sources become more expensive, they will be replaced by renewables at an accelerating rate. The rate of renewable installation will continue to increase once most fossil fuels have been replaced, multiplying humanity's total energy usage many times over.