Over six billion people are expected to live in cities and surrounding regions by 2050. Consequently, in the near future, the autonomic and smart operation of cities may be a critical requirement to improve the economic, social, and environmental well‐being of citizens. Smart urban technologies represent an important contribution to the sustainable development of cities, making smart cities a reality. In this sense, the energy sustainability of cities has become a global concern, bringing with it a wide range of research and technological challenges that affect many aspects of people's lives. Because most of the human lifetime is spent indoors, buildings, which make up a city subsystem, require special attention. Indeed, buildings are the cornerstone in terms of power consumption and CO2 emissions on a global scale. In this paper, we analyze the role that buildings play in terms of their energy performance at city level and present an energy‐efficient management system integrated in a building automation platform based on an Internet of Things approach. Occupants play a crucial role in the system's operation to achieve energy efficient building performance, and any impact on self‐sustainable smart cities will be a consequence of efficient user‐centric smart building designs. Our proposal represents a user‐centric smart solution as a contribution to the energy sustainability of modern cities. The building management platform has been deployed in a real (smart) building, in which a set of tests were carried out to assess different concerns involved in the building's infrastructure management. The first stages of this experiment have already resulted in an energy saving in heating of about 20% at building level, which could translate into a reduction of 8% in the energy consumption of buildings at a European city level. Copyright © 2013 John Wiley & Sons, Ltd.