Microgrid and building retrofit for NZEB target recognition: from convent to historical residence