A real-time diagnostic tool for evaluating the thermal performance of nearly zero energy buildings