In this work thermoeconomics is applied to a central thermal system covering three buildings that consists of a cogeneration engine, an aerothermal heat pump and a natural gas condensing boiler. Cogeneration systems integrated with renewable energy technologies are very attractive solutions in the building sector. Nevertheless, the use of cogeneration systems together with active envelope solutions, such as the one encountered in this work, are scarce and the efforts to enhance the synergies between both systems are even scarcer. A heat pump is connected to a so-called solar wall to provide hot air and a renewable photovoltaic system supplies the electricity consumed by the heat pump. Thermoeconomics is applied to evaluate the cost of flows based on its energy-quality. Hence, this innovative and complex system can be analysed and diagnosed by this methodology. As a result, thermoeconomics is presented as an effective tool for the detailed study of the energy cost distribution and the key to enhancing energy efficiency.