PurposeThe changes brought by Industry 4.0 go beyond transformations in the industrial environment. The increasingly frequent digitization and robotization of activities is not only restricted to the industrial environment, but also to people's daily routine. People spend a large part of their time inside buildings, and maintaining adequate Indoor Environmental Quality (IEQ) is an essential factor for a healthy and productive environment. In this sense, the purpose of this study is to verify how the Internet of Things (IoT) is being used to improve the indoor environment, through sensors that instantly measure the conditions of the environment.Design/methodology/approachThe aim of this paper is to verify, through a literature review, how IoT is being used for building control (for energy saving purposes) and to monitor IEQ conditions inside buildings, in order to provide a better environment for occupants, in terms of health and comfort. By combining keywords in databases, PRISMA method was used to select the articles for analysis, and 91 articles were analyzed.FindingsThe main findings in this research are: (1) the main purpose for applying IoT inside buildings is to reduce energy consumption; (2) there is an interest in developing low-cost sensoring devices with a learning approach; (3) Machine Learning methods are mainly used for energy saving purposes and to learn about occupants' behavior inside buildings, focusing on thermal comfort; (4) sensors in the IoT era are a requirement to help improve people's comfort and well-being.Originality/valueStudies directly correlating IoT and IEQ are limited. This paper emphasises the link between them, through the presentation of recent methods to control the built environment.