A Review on Smart Home based on Ambient Intelligence, Contextual Awareness and Internet of Things (IoT) in Constructing Thermally Comfortable and Energy Aware House

: This survey intends to identify the techniques surrounding a construction of a house that is thermally comfortable and energy aware and IoT enabled. The automated home has renewed interest in recent years largely due to ubiquitous communication and lower cost in computational unit. The Internet of Things (IoT), context awareness and ambient intelligence are the key technologies elements under research for realization of the modern smart home. However, these elements are often implemented individually. This study provides a comprehensive review of the above mentioned methods for constructing of a smart home. In this review, the context-aware application for smart home is discussed extensively in term of thermal comfort and energy optimization base on occupancy. The discussion is centered on intelligence technique which can provide an ambient intelligence home with inclusion of IoT sensor network. This review therein provides a functional mapping on solving the relevant problem surrounding thermal comfort and energy awareness in construction of a smart house.


INTRODUCTION
The idea of an automated home has been around since the 1960s, where homes are wired in order to automate certain tasks. In 1966, Jim Sutherland from Westinghouse Corporation had handcrafted a home automation system from combining various electronic parts (Spicer, 2000). Sutherland design includes appliances control, temperature regulation, shopping list computation, family inventory tracking and even weather prediction. A year later, Honeywell created a minicomputer cost 10,600 USD named the "kitchen computer" for storing recipes but none is sold. It is clear that back then, the implementation of home automation is costly and simply impractical from the average consumer point of view. Hence, the idea did not catch on. However in recently with the introduction of Internet of Things (IoT) coupling with falling cost of electronics, has rekindled the interest on smart home. Smart home has the capability to unlock numerous functions and applications that is previously unavailable. Furthermore, it is also one of the key components of smart grid which is the focus of many utility companies in the world.
The application of a smart home include but not limited to, elderly assistance, automation, healthcare and improved home comfort. A smart home usually consist of appliances, devices and sensors that could communicate and exchange data with one another. It could perform various tasks automatically and remote controllable with the core purpose of providing comfort to the inhabitants of a house (Ham et al., 2013;Kastner et al., 2010). With the advancement of the Internet of Things (IOT), more smart applications such as Ehealth, web remote monitoring and web energy monitoring can be integrated into a household (Vermesan et al., 2011).
Devices and services in the smart house environment can achieve a high level of interaction among each other. Furthermore, these devices and services can automatize various functional control with changes in environment. Response of these system(s) can react according to user behavior and need. For Example, the system can switch on the light or airconditioner by contextually aware of the user location and temperature level around the house (Khan et al., 2012). Thence, system and devices can interact with the environment, user, even among themselves intelligently and contextually aware of the surrounding (Perera et al., 2014). However, with recent rise of energy cost and energy awareness, smart home system needs to accommodate the following criterion into the design consideration: • Home Environment Planning and Control (Ramparany et al., 2009;Asare-Bediako et al., 2013;Tiberkak and Belkhir, 2010). Such as temperature control/thermal regulation around the house and the capability of switching on the light (luminance regulation) when a user enter the room that has low light intensity (contextually aware of user activity). • Energy Consumption Aware (Tiberkak and Belkhir, 2010;Ramparany et al., 2009;Morganti et al., 2009). The devices and appliances around the house would know their own energy consumption and carbon footprint. • Appliances Automation and Control (Zamora-Izquierdo et al., 2010). Such as switching on or off the devices/appliances based on desired or specified objectives.
This comprehensive review discusses the role of context awareness, IoT, artificial intelligence and sensor network as elements of implementation in the smart home. As the result of the review, the techniques involve in context-aware and intelligence is further explored in providing thermal comfort and energy optimization of a house.
By definition, IoT is defined as devices or "things" that are connected to the IP network (IERC, 2009). Device(s) in smart home is mainly responsible for, information exchange among different devices, monitoring environmental parameters and controlling actuator to achieve the desired results. With the advent of IoT, things operating within a smart house could be remotely accessible through an internet cloud.
With ubiquitous interconnectivity and high performance computer with decreased cost at our disposal, application and intelligence which requires higher level of computing performance and computing capability can be constructed into any device such as a power switch.
Context which is defined by Dey and Abowd as "information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and applications themselves" .
Within a smart home surrounding, temperature, energy consumption, user activity, home status and user preference can all or partly be classified as context as long as it is relevant to the intended application. With relevant services render to the user, this application would be context-aware .
According to Poole and Mackworth (2010) artificial intelligence is the study of computational agents that acts intelligently in a given circumstances and goal, which learns from experience and has the flexibility to a changing environment and changing goals (Poole and Mackworth, 2010).
In a smart home environment, the environment and goals changes from time to time. The reason can occur for various reasons such as, time, user preference, random and pseudorandom activities. Intelligence can solve planning and automation related task surrounded within a house. With intelligent and distributed system operating throughout the entire house, an ambient intelligence environment is created within it.
Method: intelligence in thermal comfort and energy management for smart home: With more and more transistors capable to be packed in a microchip, the future of smart home system is going to be pervasive as it is intelligent. It would monitor and control the way a house would operate and provide various services to the household inhabitants.
A smart home which utilize pervasive or ubiquitous computing is a home equipped with various sensors and capable of communication (Isoda et al., 2004). Within it, ambient intelligence is created with utilization of intelligence methodology in a ubiquitous computing environment (Zamora-Izquierdo et al., 2010).
User activity recognition, location tracking, time, thermal control, are some of the contexts used in creating a context aware and ambient intelligent smart home Lu and Fu, 2009;Isoda et al., 2004). Bal et al. (2011) has done an extensive review on smart home technologies for senior independent living. Based on their work, a smart home centered on inhabitant comfort and quality of living for senior citizens are classified into, I) safety enhancing system, II) health and wellness monitoring, III) Social interactions system for seniors. Alam et al. (2012) has done a smart home review highlighting some of the past and present methods, equipment, communication media and services (Alam et al., 2012). In their work, the utilities and services are categorized under comfort, remote access, home automation, data storage, energy optimization and healthcare.
The consideration in constructing a smart home depends on the application and the context included. The classification of system behavior characteristic within a smart house can broadly be divided into 4 categories (Nishiyama and Sawaragi, 2011;Ramparany et al., 2009;Iksan et al., 2013;Amirioun and Kazemi, 2013;Aswani et al., 2012;Reinisch et al., 2010;Kelly et al., 2013;Yamazaki, 2005): • User or inhabitants applications related • Automation and actuation • Home surroundings or ambient • Energy consumed and generated An adaptive house in University of Colorado utilize neural networks reinforcement learning and prediction technique for occupancy prediction. The prediction is done in order to compute the time to start heating/cooling process to the house (Mozer, 1999). The work done consist of environment monitoring (i.e., temperature, ambient light levels and sound, motion, door and windows openings) and inhabitant activity from tracking occupants action around the house (i.e., user controlling thermostat; user switching on the light at particular area around the house) (Mozer, 2014). The objective of the work centralize on occupants comfort with optimization on energy usage based on learned and predicted user activity (Mozer, 2004).
MavHome is a research project at the University of Texas. It is a smart home project that focuses on creation of environment that acts as intelligent agent (Das et al., 2002;Cook et al., 2003;Youngblood et al., 2005). In this study, the authors utilize three types of algorithms for the purpose of user location prediction, next action prediction and historical action analysis (Youngblood and Cook, 2007). The algorithms are: Lezi-update algorithm (LZ78) for location prediction problem (Gopalratnam and Cook, 2007), SHIP (Smart Home Inhabitant Prediction) for user sequence matching from history and ED (Episode Discovery) for inhabitant history analysis by time interval (Novak et al., 2012).
AlarmNet is a wireless sensor network based on the assisted living and monitoring for healthcare application developed by University of Virginia (Wood et al., 2008). This project focuses on the patients/users healthcare analysis that relates the medical history of the patient with their recent conditions by continuous monitoring physical activities (Wood et al., 2006). Sensors are placed around the house as well as worn by the patients.
University of Bologna with the Casattenta project has created an example of ambient intelligence smart home (Farella et al., 2009). The project is developed to monitor elderly people by recognizing events that occur such as falling and immobility. The work utilized wireless sensor networks laid out around the house and sensors wear by the occupants. Further extension of the work can be found in Madhusudhanan et al. (2014) and Farella (2010), project codename like SOFIA, TANGeRINE and IT4CAD that explore controlling household devices with physical gestures. These projects are an extension of the original work.
Gator Tech is the smart home project by research groups in University of Florida. The smart house consists of various smart devices and sensors for comfort and safety application which fit the needs of ageing people . The project also mentions a context management base on "intentional effect" mechanism which associates user activity on actuators and the effect on the environment or physical state of a house (Helal et al., 2005). Other than that, a collaboration model for smart spaces development, management method  and selfintegration framework (Abdulrazak and Helal, 2006) are presented separately base on the work done from the project.
Georgia Tech Aware Home research initiative has developed smart home devices for aging to help older adults that stay alone to maintain independence through the use of technologies in their daily lives (Abowd et al., 2002;Kidd et al., 1999;Kientz et al., 2008). One of the useful device mentioned is the gesture pendant worn around the neck. This pendant is a wireless device that lets the residents give commands through hand gesture (Mynatt et al., 2004). The pendant contains a camera and motion sensor and let its user control various appliances within a house (i.e., switching on a light, open or close the door) by analyzing the hand gestures of the elderly user. At the same time, the device track hand tremors with the objective for early detection of Parkinson's disease (Mynatt et al., 2004).
Assisted living for elderly are the main reason behind the construction for Aware Home Initaitives, AlarmNET, Casattenta and Gator Tech smart home research projects. Whereas, Adaptive house and MavHome work on inhabitant comfort and automation.Energy usage optimization is briefly discussed in the adaptive house project. Table 1 is a summary of the aforementioned projects.
Method: intelligence in thermal comfort and energy management for smart home: Thermal comfort and energy conservation has been some of the revolving topic for smart home in recent years. Micro renewable energy harvesting couple with energy consumption awareness has led to demand in energy aware solution. In a house, one of the many appliances that consume energy heavily is the air-conditioner. In this section, the techniques that revolve around thermal comfort and energy planning of air-conditioning is needed for gaining an insight look on energy usage optimization and providing inhabitant thermal comfort.
In the work by Walek et al. (2014), a fuzzy control and expert system was utilized in managing home thermal comfort by controlling the air conditioning unit. The authors utilize fuzzy logic to abstract the input values and utilize a knowledge base expert system to make decision on optimal switching time in providing thermal comfort. The predefined time-based user occupancy level is treated as input data for the expert system. In their work, the considered environmental parameters are: In Li et al. (2013) modeled thermal comfort based on user feedback in term of a set of comfort level desriptive terms. The author utilizes fuzzy sets to model various thermal comfort level terminology from users. These terms represent user feeling on thermal comfort at the time. After recording the temperature and the user description, the authors utilize type-2 fuzzy sets to translate the wording into measurable values. The parameters involved in this study consist of: • Room temperature • User lingustic variables (very cold, very hot, cold and etc.) A prototype system proposed by Kastner et al. (2010) discussed about an intelligent heating system that computes the time offsets to start/stop the heating/cooling process. The authors utilized competitive ANN (Artificial Neural Network) to create a control strategy for heating the room prior to occupancy and optimum start or stop operation. The main parameters involved in this study consist of: • Room occupancy based on constant user activity • Temperature of the room A research by Aoki et al. (2007) introduced bayesian networks as a modeling method for modeling • Managing home energy consumption based on user defined constrain and generated energy. Karmakar and Kabra (2013) • Linear scheduling • Thermal comfort • Energy usage • Managing thermal comfort within peak power constraint thermal sensation of different body parts and the overall sensation of users (Aoki et al., 2007). The researchers gather thermal comfort based on experimentation on participants by gathering data on participants feedback on thermal sensations. Afterward, the data is modeled by utilizing bayesian networks. The main parameters involved in this research consist of: • User feedback • Temperature surrouding the user A model of adaptive learning system termed OLA (Observed, Learned and Adapt), (Qela and Mouftah, 2012) is utilized to create an energy management and conservation in smart homes. The authors utilize a combination of unsupervised learning algorithm and expert system for programmable communicative thermostat in order to regulate energy consumption and thermal comfort. The authors utilize wireless sensors to learn about the occupancy patterns. Based on occupancy patterns, thermal properties of the house and projected rate of utility power cost, a time-of-used tabulation of appliances that match the inhabitant's occupancy patterns are created. The main parameters involved in this research consist of: • User occupancy • House thermal parameters (etc. coefficient of thermal transfer for wall) • Projected rate of utility power cost De Angelis et al. (2013) has proposed a linear programming method to optimize home energy management with consideration on both thermal and electrical constraints. The authors utilize mixed integer linear programming to schedule user defined task and energy consumption task. The algorithm would compute and define tasked to be schedulable, notschedulable and critical task based on the parameters involved. The parameters involved in this study consist of: • Amount of generated renewable energy • Electricity price • Electrical Energy Storage level • Temperature • User defined Thermal Constraints In Karmakar and Kabra (2013), the authors attempt to maintained thermal comfort band within a house with peak power constraints that are set by power utility company. The authors proposed a thermal comfort band maintenance scheduling algorithm, this algorithm is based on maximum number of devices that can be switched on at a time for a zone/area. The previously mentioned control is needed to maintain the thermal comfort band within the peak power demand limit. The periodic scheduling operates in such way that it would switch off if it has reach the upper limit of the thermal comfort band and switch on when it reaches the lower limit of the thermal comfort band. The main parameters involved in this study are: • Thermal comfort band in temperature • Peak power demand constraint Table 2 summarize intelligent reasoning model for thermal comfort and energy usage.
Method: context awareness with internet of things (IoT), a relation to smart home: Context-awareness and IoT has been some of the more recent attention in bringing smart home to reality with renewed interest by allowing smart home to be connected into a seamless web experience. The Internet of Things with the vision to connect anything, at anytime, from anywhere with any connection has applications that spans across various industries and domains (i.e., healthcare, education, management software, personal electronics and etc.) (Vermesan et al., 2011;Khan et al., 2012).
One of the essential component of IoT is the sensor network (Xinhua and Hong, 2012;Gadallah et al., 2014). Sensor networks provides access and control of sensors and actuators (Tervonen et al., 2014;Partynski and Koo, 2013). Mutliple sensor networks can be connected through different technologies and protocols and one such approach is through the Internet with a gateway (Zhu et al., 2010;Schrickte et al., 2013;Bian et al., 2011). Sensors networks are originally design to tackle specific problem such as monitoring user control input in a house (Mozer, 2014;Gluhak and Schott, 2007).
However, with IoT, sensor networks applications can be expanded with internet connectivity (Khalil et al., 2014;Tozlu et al., 2012). The sensors that were deployed can be reused as an connecting node to other sensor networks (Firner et al., 2011). For example, sensors networks connected in farming for soil chemical composition observation can be merge with an insect monitoring sensor network by interconnecting them through an IP-network, allowing greater ubiquity in communications when cloud is needed to be connected (Ma et al., 2011). The integrated network will provide a better picture of the farming condition. Furthermore, sensors networks that is originally design for specific purposes can now be connected to an even wider array of other application specific networks and leverage on the cloud (Mercaldi et al., 2013;Tozlu et al., 2012).
Although IoT application would require sensor network to coexist, sensor networks would not necessary needs IoT with its existing networking capability. Therefore, IoT would actually serve as an incremental enhancement for sensors network and allowing greater amount of purpose and usage (Khalil et al., 2014;. From the smart home perspective, sensor network is essential for monitoring as well as actuation of appliances and instruments within a house as much as being connected as the web of things Bian et al., 2011). Perera et al. (2014) has done a survey on context aware computing for the Internet of Things (IoT). The authors have discussed various back-end and front-end of context-aware application design and requirement. The discussion also includes suitability to extend the context-aware application to the IoT. IoT has allow the communication between the in-home sensor network with the cloud services, context awareness application therefore needs to consider the inherited properties while being designed.
There are three approaches in developing context aware application traditionally. The first approach has the least dependencies of other application component and the third approach having the most (Hu et al., 2008). These approches are: • No application-level context approach. Each and Every applications is responsible for handling sensors communication, raw data processing and to display result to user without any intermediary layer of software. This is a direct development approach with back end and front end of the application design from scratch. • Implicit context approach. Application are developed using reusable components such as libraries, frameworks and toolkits for processing context information and sensors value. These approach allows some developers to utilize some back-end tools readily available to complete the intended application. • Explicit context approach. This is a middleware approach with various context processes and sensors processing available at run-time. This allows the developers to focus more on front end design with the back-end mostly handled by a layer of software.
By summarizing (Pascoe, 1998;Schilit et al., 1994) context-aware application would have three fundamental and distinctive features: Presentation: Relevant context information would be presented to the user as well as other devices within the network.
Execution: Execution of services based on context information available to the system and done autonomously.
Tagging: Tagging of various sensor data collected with the relevant context collected for further processing and annotation.
Based on van Bunningen et al. (2005), context categorising schemes are broadly consist of two categories: operational and conceptual. Conceptual categorization schemes are discussed by Schilit et al. (1994), whereas, Hericksen discuss operational categorization technique in his thesis (Henricksen, 2003): • Operational categorization mainly categorized context information based on how it is acquired, modeled and treated. • Conceptual categorization perceives concept and meaning of context as a categorization method.
To manage contextual data, lifecycle is a crucial point that define movment of context throughout the entire system. There are various data and information management lifecycle implemented by various work (i.e., Ferscha et al., 2001) Lifecycle (Ferscha et al., 2001), WCXMS Lifecycle (Hynes et al., 2009), MOSQUITO (Wrona and Gomez, 2006;Baldauf et al., 2007), Intelligence Cycle (Shulsky and Schmitt, 2002),  (Osinga, 2007) and others). In summary, context management system lifecycle can be classified into 4 stages and which is context acquisition, context modelling, context reasoning and context dissemination as shown in Fig. 1.
Context acquistion consist of methods that are involve in acquiring data or context information. There are myriad of techniques for context acquisition. These techniques are categorized based on responsibilty (Pietschmann et al., 2008), frequency, context source (Chen et al., 2004), sensor type (Indulska and Sutton, 2003;Schmidt and Van Laerhoven, 2001) and types of acquisition process.
Context modelling is widely referred to as context representation. From the IoT perspective, context information has six different states which is similar to the process state of an operating system (Chang et al., 2007). These states are: Ready, Running, Resumed, Suspended, Expired and Terminated. Context information is modelled from the data acquired by a context model. A context model can be static or dynamic, the requirements when consideration for the right model is explained in Bettini et al. (2010). There are various context modelling techniques avaialble, some of the popular techniques are discussed in Baldauf et al. (2007) and Balavalad et al. (2009). From a broader perspective, these techniques are categorized into six varieties (Strang and Linnhoff-Popien, 2004;Chen and Kotz, 2000). These techniques are: key-value based, markup schemes (Kiss, 2007;Knappmeyer et al., 2010;Yanwei et al., 2011), graphical modelling (IBM, 2015) (Henricksen, 2003), object based,logic based and ontology based modelling (Uschold and Gruninger, 1996;. Context reasoning also known as context inferencing is refering to the process and method of reintroducing new knowledge and context based on existing contexts (Bikakis et al., 2008;Guan et al., 2007). The needs for reintroducing new knowledge is due to imperfection or imprecision of lower level context. A general 3-steps approach for the reasoning process are (Petteri Nurmi, 2004): pre-processing, data fusion (Hall and Llinas, 1997) and context inference (Castelli et al., 2009). There are many decision models for context reasoning, these decision models are discussed within the artificial intelligence domain. Example of these decision models are: supervised and unsupervised learning, bayes model, fuzzy logic, markov decision models, neural networks, rule based model, expert system and etc. These decision models are widely used across various fields of computing and engineering. The previous section has discussed various decision models apply in thermal comfort and energy usage for in-home application.
Context disemination consist of methods to deliver context to other services/application. The methods involved are query and publish. From a communication perspective, query is to acquire or receive, whereas, publish is to distribute or transmit. Thence, the disemination of ones context is acquisition for the other. On top of that, storage and retrieval is crucial for disemination-acquisition process, the storage and retrieval could be done either temporarily (Shared memory, short-term storage)or permanently (Long term storage) (Liu et al., 2011).
Context lifecycle, categorizing schemes and application design approach are identifiedas the core of context aware application.
Method: context-aware in creating ambient intelligence: In this section, the focus of discussion will be on smart home system that utilize intelligent methodto providecontext-awareness. Li et al. (2012) has done a rule based contextaware lighting control system for a meeting room. The author utilize sensors and control module that communicate in a wireless network for lighting control and monitoring. Various context described in language terms is mapped with a predetermined set of brightness requirement and activities. Finally, a rule based method is utilized to determine the necessary lighting required in numerous subareas of the meeting room. Stavropoulos et al. (2014) has proposed a middleware consist of web services that focused on defeasible rule based logic for energy saving buildings and ambient intelligence environment. The author utilize defeasible logics to resolve conflict arise from differencesof rules that is created by environment monitoring and computation. In this system, two agents known as reactive agent and a defeasible logic agent are presented. The reactive agent will operate on known facts and rules computed from the environment, whereas the defeasible reasonic agent will performed on those generated rules based on defeasible reasoning. These two agents are created for managing energy saving schemes. Case based reasoning is a method that generate knowledge by recording memory that is specific to the case or scenario (Van Nguyen et al., 2009). In this study, the author utilize chaining case based reasoning, which make conclusions based on relating multiple cases together.The work done converts raw data to high-level context by activity retrieval rule. Than the context is matched to produce cases. Thesecasesare train with user feedback for finding the best match cases.
In Weng et al. (2012), the author model user related context (uer activity) with power consumption on electrical appliances. The context obtained are labeled/marked as energy-prone context and further classified to be explicit or implicit power consumption. Explicit power consumption is highly related to user activity as opposite to implicit power which has little to no correspondence. Based on this context, the system will decide on the appliances switching decision.
Tinghuai et al. utilized CBR (case based reasoning) as a method to know interdependencies and information about key processes within a home (Ma et al., 2005). The work done by these authors attempt to represent various context entities within a home based on time, environment and user profile. The gathered data is further processd by calculating the similarities of various cases by utilizing nearest-neighbour approach.
Jonghwa et al. propose a automatic home service based on a user preference. In this study, user context is derived by parameters such as, body temperature, pulse and facial expression, room temperature, time and the location when interacting with home appliances (Choi et al., 2005). These data are gathered and than normalized. Data which is out-of-bound are filtered. Filtered data is than inserted into the back-propagation neural network for user preference learning. The author utilize the trained result from the neural network as the user preference. The completion of learning process is determined by detecting the error signal value is less than predetermined threshold value. Table 3 provides a summary to each of the work discussed in this section.

DISCUSSION
Thus far, the survey has touched on existing work on smart home. In the context of a smart home system, various intelligent modeling technique and methodology can be constructed to process data acquired from the environment to act on a specific functional application needed in smart home.
The intelligence modeling methods can be applied to solve myriad of problems, be it for control or parameters mapping for thermal comfort and energy consumption. Energy consumption and thermal comfort resulted from the intelligent reasoning models can be used to form context for the system, in short, a systemic model for generating context. Reasoning model involve can be recreated as a context aware application and the output data obtained from the model can be seen as context and this context information will go through a cycle of acquisition, modeling, reasoning and dissemination.
Based on the summary in Table 1, smart home project in various Universities focus on intelligent automation for inhabitant's lifestyle and elderly assistive healthcare. In these research works, energy and thermal comfort is not given any due attention. Thermal regulation within a house is one of the main contributing factors on usage or wastage of energy. From the previous section, thermal comfort on body parts is also considered; however, the significance is lesser as the overall thermal comfort of the body is dominant focus on work related to ambient intelligence. The Adaptive House project has provided an introduction of in home energy optimization, but further exploration is required. Therefore, a discussion on intelligent reasoning models and methods that are applied to thermal comfort and energy usage is summarized in Table 2.
In thermal comfort regulation, researchers utilize occupancy as the basis of determining switching time for air-conditioning system. When energy is involved with combination of thermal comfort, the factors that need to be included are: energy constraint (i.e., projected energy cost, maximum consumption, generated energy and etc.), user constraint (i.e., user preference, user directive and etc.) and house parameters. The balance of providing a thermally comfortable home and energy relies heavily on considering the balance of energy consumption, energy generation and cost of utilization and user preference/demand. On the side of efficient energy utilization, it can be done by defining a static environment and user demand. Yet, in most of the actual cases, user would have dynamic requirement base on various variable and context. Adaptation will be one of the most challenging aspects of the system which in fact, can leverage on context-awareness and intelligence model for making ambient intelligent smart home.
User activity detection and analysis has been one of the important research function needed in smart home system. Be it in application of healthcare or comfortable lifestyle, automation in home relies heavily on it.
Context awareness with IoT are one of the novel ways for modern implementation of smart home system.
Context aware application features, categorizing schemes, developmental approach and lifecycles were discussed at the previous sections.
In Table 2, the intelligent modeling applied is used to solve a specific problem, whereas, in Table 3, intelligent modeling is applied to create context for a set of processes. The difference between the implementation of intelligent reasoning model between Table 3 and Table II is that, the result in Table 3 is utilize as context, whereas, in Table 2, the result is simply a set of output data. All of the result can be used to solve their intended problem. But, data computed in Table 2 is meaningless to other machines. Other systems may not understand contextually what this system solve or computed. However, if these data are transforming contextually to a universal or standard dataset, they can be reused by any system interconnected with the web.
The work cited in Table 3 is designed from top to bottom to be context aware application. However, to carry in depth study, all work cited is fitted into Table 4 by their similar attribute to context aware application. The context aware application attributes that is included in the analysis are:  Table 4 described the list of cited works that are based on their synonymous context aware attributes.
Based on Table 4, a unique set of context aware attributes from each works is identified. The attributes in this application is unique from case to case. The implementation of context aware application largely depends on the factors identified, which also determines the attributes that the application contains. In other words, the context aware application would contain attributes and perform task based on life-cycle.
The techniques involve in intelligence system is cross-applicable to context-aware modelling and reasoning, as seen in Table 2 and 3. However, when building intelligence system, the system is tune towards very specific problem and therefore, the intelligence is applied to a very specific process to tackle a specific problem. However, in a context-aware system, there are numerous intelligent process running concurrently or sequentially to tackle numerous problem within the application of smart home. The process in Table 2, which apply various intelligent techniques can be utilized as a subsequent process to a hierarchical or lateral system. These processes would be scheduled to run at the appropriate moment. However, note that the more processes that is running, the heavier loading a computing unit will need to handle, which necessitate various tradeoff.
Context aware solution for smart home requires context provision from the environment prior to any action or actuation. Based on Table 2 and 3, context modelling relies heavily on rule-based, case-based and expert-based system to provide the first level context. As for context reasoning, there are wider range of   Modelling and reasoning of context are part of an important process for smart home application. The four contexts highlighted by Abowd et al. (1999) which are who, where, when and what serves as the basis for deriving other context. The contextual dataderivedhas to support informational reasoning model forsolving applicational problem.
From Table 3, rule-based system were utilized extensively in context-modelling for smart home system. User activities, thermal comfort and energy optimizationin a smart home environment requires both modelling and reasoning of context. From Table 1 to 3, various parameters and context shown would be further discussed how it can fit into the context aware cycle.
Thermal comfort and energy parameters are generally utilized from its rawest form in process control, as depicted in Table 5 and 6, however by deriving contexts from these parameters, more information can be generated by parameters association. For user activities, there are various work done on modelling context from low level sensors as depicted in Table 7. For example, the parameters directly observable from thermal and power sensors can be associated with user activitiesparameters as well for inferring new context. Table 8 show an example of directly taggable parameters for generating first tier context. The first tier (tier1) context is usually directly achievable through tagging or sensor fusion. In Table 9, multiplefirst tier context is further associated with each otherto produce second tier context. The association is done with reasoning models such asspatial, role-based, or hybrid of both model. Furthermore, theentity withn the models can incorporate various intelligence reasoning model (i.e., bayes network, fuzzy sets, ANN and etc.) for context reasoning. Depending on the system objective, the cycle of modelling and reasoning will keep repeating as it sees fit. The relevant contextual information processed from these models can assist in applicational function andoperation as shown in Table 10.
CML (Context Modelling Language), is a model for describing contextual information model. CML which is an extension of ORM (Object-Role Modelling) is developed for conceptual modelling of databases. Figure 3 illustrate a hybrid of hierarchical spatial model and CML model. In Fig. 3, a tier one context from hierarchical spatial model is connected to the rest of the CML context entity to form a hybrid model. Both of the models retrieve and store the relevant data from the databases located within the system.   Hierarchical spatial model is designed to address the physical location in the world. The coordinates of the space can be both geometric and symbolic. In the figure shown, the motion sensors are inferred with the 2-tier spatial model. The spatial queries for context information require position, range and nearest neighbor. The processing of spatial context depends on how well the information is updated by sensors or human prior to further use in context selection.
Predicate logic which can be described by CML is a way to describe logical model for a given world state or scenario that can provide intelligent reasoning to the model state. Based on the model shown in Fig. 3, the high level of context abstractions can be expressed using a form of predicate logic that balances expressiveness and evaluation. The logical expression of the form {I # , … , I {: , where ˮ is the name of the high-level context abstraction, I # to I are the variables and is a logical expressions using the logical connectives and and not, as well as other form of the universal and existential quantifiers. Higher context abstractions can be combined to form more complex logical expressions.
Local presence entity queried the tier-one motion context from spatial model for detecting presence at a specific place. Subsequently, the fact is coupled with derived location to infer user presence at a specific location in a house.
With the presence of hierarchical spatial model, the sensors have been elevated into tier 1 context. Thereafter, the sensors readings are processed by the relevant entity to detect energy consumption, presence and thermal comfort.
The model in Fig. 3 provide an example of context aware model for the discussed scenario in smart home. The context reasoning of this model would further navigate to dive deeper into solution searching based on the function shown in Table 10.
The IoT is envisioned for things and people to be connected anytime, anyplace, with anything and anyone, ideally using any path/network and any service. To realize this, the issues that need addressing are: Convergence of any "thing/device", Computing application, Content delivery, Collections of huge data, Communication and Connectivity (IERC, 2009). Therefore, the needs arise for three ways integration, known as: data integration, semantic integration and things integration. Reasoning models and intelligence are areas that are being evaluated actively. With an ocean of things connected; things, data and semantic integration for a connected smart home is a continuous challenge.
For the smart home domain, interconnection of sensors allows the creation of ambient intelligent environment. Automation and intelligence that combines with communication will form the ubiquitous sensor networks that make accurate readings of environment and subsequently used to trigger appropriate services from devices within the house.

CONCLUSION
In this review, thermal comfort and energy saving is illustrated as a contextual model. Intelligence reasoning model with contextual model provide alternatives in tackling these problems. On top of that, IoT sensor network attributes are discussed as a means for providing data integration.
Context aware is a challenge identified within the IoT research roadmap in CERP-IoTA by the European IoT research group (IERC, 2009) across various domain and application in IoT. Smart home has been one of the domain that has renewed interest based on the possibilities of inter-connectable system through the cloud as well as increase popularity of smart grid.
The inception of sensor network within a home has created various possibilities that can benefit its inhabitants. With context aware computing and IoT, billions of sensors will be accessible and incorporated and become ocean of things operating behind with or without human intervention yet react to human wants and needs. The future of making things and home smart relies on having the system that does so.
These paper attempt to give an insight on contextaware in smart home and clarify various aspect of application that a smart home could benefit from. Application be it in energy, healthcare or activity requires more than just data, but contextually aware what to do with them to make it meaningful. There is no one solution for all as individual problem are unique. Therefore, intelligence reasoning and computation can alleviate some of the existing pitfall of various linear systems.
In the near future, smart home is capable of providing services to the inhabitants with hyperconnectivity and high intelligence performance. With multiple homes, a smart neighborhood is created, subsequently, smart neighborhoods form smart cities. A smart home is a great start to a smart community.