In 2003, Intertek [4] published an elaborated definition for a smart home: \"A smart home is a residence incorporating a communications network between electric household appliances and services\". Intertek's definition emphasizes on remote access (to control or monitor) of the smart homes [1]. In 2006, [PERSON] [5] provided a more intelligence-emphasized view of smart homes. According to [PERSON], \"a home which is smart enough to assist the inhabitants to live independently and comfortably with the help of technology is termed as smart home. In a smart home, all the mechanical and digital devices are interconnected to form a network, which can communicate with each other and with the user to create an interactive space\". In this regard, the definitions of smart or intelligent also needs to be considered. According to [PERSON] and [PERSON] [6], a system needs to have the four following abilities to be called smart or intelligent in the smart home concept:  
1. The ability to process the collected information from sensors to recognize the environmental situation. 2. The ability to figure out its state by considering multiple factors at once. 3. The ability to predict the user intent by analyzing the current situation. 4. The ability to preemptively act based on the intent assumption. A smart or intelligent environment can be considered as an agent that has the ability to assess the residents' position, state, and physical surroundings by processing the sensory data, and then make the required changes in the environment by using actuators to improve the energy efficiency within the home while keeping residents' comfort at an acceptable level [7; 8]. According to [PERSON] [9] two kinds of definitions could be given for a smart home: Home- and user-focused definition and building- and system-focused definition. The former definition emphasizes comfort and convenience of buildings occupants while the latter definition concentrates on improving building energy performance. In both definitions the smart home required several communication links between devices, sensors, and actuators to be able to provide services. Energy consumption has increased due to the rising population and expanding economy. The energy consumption will continue to increase with improved quality of life and the increment rates are expected to continue. More energy usage will lead to more greenhouse gas (GHG) emissions; this will have a serious impact on the global environment. In 2004, the building energy usage in the EU was 37% of the final energy, higher than other sectors such as the industry (28%) and transport (32%). Unlike the other sectors, there are great and attractive opportunities for reducing buildings' energy consumption to have lower costs and higher returns. In 2017, the international energy agency (IEA) reported that employing digital technologies could reduce the energy consumption by 10% by exploiting real-time data to improve operational efficiency. In addition, smart demand-side responses could provide 185 gigawatts (GW) of system flexibility and avoid costly upgrades to electricity grids. In 2007, energy consumption in the residential sector represented 21% of the total US demand. After the initial increase from 17% in 1950 to 20% in 1960, the amount has remained between 19% and 22% till today [10]. A great amount of home energy is consumed in an inefficient manner. Reports show that 40% of the global power consumption takes place within residential buildings [11]. The poor technology of energy management systems is the reason of this waste in homes. Technological systems can be improved using IT systems and their abilities for data management and processing. IT based monitoring and controlling technologies can play a significant role in energy management within homes; they have successfully eliminated the waste of energy in other sectors. While simple programmable thermostats were used by 28% of US homes in 2005, only 16% of these homes utilized the programmable function of their device [12].