This paper presents a comprehensive approach about energy resources management in buildings connected to the electricity grid and equipped with energy production and storage systems. The aim of the work is to find interesting configurations that favour energy self-consumption while minimizing the impact of the local production on the grid. Energy and economic criteria are proposed to evaluate the proposed strategy. A parametric study allowed the local systems to be optimally designed. So, we used first the TRNSYS software to model the thermal behaviour of a single-storey house, inhabited by four persons and equipped with photovoltaic solar panels, a vertical-axis windmill and batteries for electricity storage. The results we obtained in simulation prove that one can design in an optimal way the just-mentioned systems and find configurations that offer a very good compromise between energy self-consumption and renewable energy coverage rate while limiting the negative impact of the local production on the electricity grid.