The article describes the application of an object, called Smart lamp, for the control of the thermal comfort in real working conditions, implemented following the Do IT Yourself (DIY) approach, using a microcontroller, low cost sensors and a 3D printer. The idea beyond the Smart lamp is the concept of smart environments in which sensors and actuators interact each other with the aim of improving the human well-being. The device that upgrades in a "smart" way a commercial desk lamp usually available in offices, allows to optimize the indoor thermal comfort and the energy consumption, by interacting directly with the heat pump. In order to evaluate in a 4 -person office the thermal comfort and the energy consumption improvements due to the better management of the cooling system a Smart lamp was tested. The results showed how the application of this device effectively has optimized the thermal comfort and the energy consumption. (C) 2016 The Authors. Published by Elsevier Ltd.