The way in which energy can be produced, stored, distributed and consumed as economically as possible, without making waste, is a problem that has started to be taken seriously by more and more countries in recent years, taking into consideration global warming, the accelerated population growth, industrialization as well as the geopolitical situation. This paper focuses on the production, storage and consumption of energy in an independent manner, without the involvement of the grid, by using the solar energy. Accordingly are presented from the main global policies in the fight for the energy efficiency of buildings, the concept of occupant thermal comfort, up to the integration of BEMS and IoT on buildings. It has been shown through a case study that had as its subject an existing residential building located in an area where the continuity of the electricity supply from the grid is constantly affected, that energy independence can be achieved and even the remaining can be delivered to the grid, thus becoming prosumer, by implementing a solar system with storage units.