Integration of microgeneration and related technologies in building