This paper deals with one of the most challenging problems in nearly zero energy buildings (nZEBs) of several multifaced and sometimes contradictory objectives that is the energy management. Specifically, aim of the paper is to propose an integrated control strategy (ICS) based on genetic algorithms that can provide an optimal balance between the objectives of energy saving, comfort of the building residents and maximum exploitation of the generated electric energy by the renewable energy sources through the proper utilization of a battery storage system (BSS). The above can be attained by optimizing a comprehensive cost function that considers the most important factors that may affect the performance of an nZEB, i.e., real-time electricity price, generated/consumed electric energy by each device, user preferences,
state-of-charge, and energy price of the BSS, weather forecast and the nZEB’s construction characteristics. The outcome of the ICS is the proper task scheduling and control of the electric loads as well as the regulation of the BSS operation so as the nZEB’s performance is improved. The feasibility and effectiveness of the proposed ICS are verified in a hardware-in-the-loop system and selective experimental results are presented to demonstrate the operational improvements.