This paper presents a case study on power control and energy management for a 60 apartments’ residential building with solar generation and energy storage tied to the grid in Santiago, Chile. A new energy management algorithm based on energy homeostasis is designed for a small electro thermal generation system (nanogrid), with smart metering. The test bed employs supervisory control with energy management that regulates the temperature inside a large room by the action of an HVAC (Heating/Ventilating/Air Conditioning) unit. The main objective of supervisory control is to allow temperature comfort for residents while evaluating the decrease in energy cost. The study considers a room with rooftop grid-tie nanogrid with a photovoltaic and wind turbine generation plant, working in parallel. It also has an external weather station that allows predictive analysis and control of the temperature inside the abode. The electrical system can be disconnected from the local network, working independently (islanding) and with voltage regulation executed by the photovoltaic generation system. Additionally, the system has a battery bank that allows the energy management by means of the supervisory control system. Under this scenario, a set of coordination and supervisory control strategies, adapted for the needs defined in the energy management program and considering the infrastructure conditions of the network and the abode, are applied with the aim of efficiently managing the supply and consumption of energy, considering Electricity Distribution Net Billing Laws 20.571 and 21.118 in Chile (https://www.bcn.cl/historiadelaley/historia-de-la-ley/vista-expandida/7596/), the electricity tariffs established by the distribution company and the option of incorporating an energy storage system and temperature control inside the room. The results show the advantage of the proposed tariffs and the overall energy homeostasis management strategy for the integration of distributed power generation and distribution within the smart grid transformation agenda in Chile