A Systematic Content Review of Artiﬁcial Intelligence and the Internet of Things Applications in Smart Home

: This article reviewed the state-of-the-art applications of the Internet of things (IoT) technology applied in homes for making them smart, automated, and various applications, systems, or methods and the results of using IoT, artiﬁcial intelligence (AI), and geographic information system (GIS) at homes. Because the and users are IoT boom for smart built smart systems, to identify the gaps, relation between current methods, and provide a coherent instruction of the whole process of designing smart homes. This article reviewed relevant papers within databases, such as Scopus, including journal papers published in between 2010 and 2019. These papers were then analyzed in terms of bibliography and content to identify more related systems, practices, and contributors. A designed systematic review method was used to identify and select the relevant papers, which were then reviewed for their content by means of coding. The presented systematic critical review focuses on systems developed and technologies used for smart homes. The main question is ”What has been learned from a decade trailing smart system developments in di ﬀ erent ﬁelds?”. We found that there is a considerable gap in the integration of AI and IoT and the use of geospatial data in smart home development. It was also found that there is a large gap in the literature in terms of limited integrated systems for energy e ﬃ ciency and aged care system development. This article would enable researchers and professionals to fully understand those gaps in IoT-based environments and suggest ways to ﬁll the gaps while designing smart homes where users have a higher level of thermal comfort while saving energy and greenhouse gas emissions. This article also raised new challenging questions on how IoT and existing developed systems could be improved and be further developed to address other issues of energy saving, which can steer the research direction to full smart systems. This would signiﬁcantly help to design fully automated assistive systems to improve quality of life and decrease energy consumption. computer to the camera onboard the robot. The second tests use images transfers over Transmission Control Protocol for Robot Operating System (TCPROS) on a Wi-Fi connection from the robot to the desktop computer. A resulting plot of the raw and ﬁltered conﬁdence level of a chair detected, while the


Introduction
The use of smart technologies, including sensors, actuators, and artificial intelligence (AI), in a home, building, or environment may affect the quality of human life, well-being, productivity, energy-saving, and safety [1][2][3][4][5]. The word 'smart' is becoming a trend for enhancing the quality of the built environment, including home, building, transportation, construction, and city [5]. Ringel et al. [6] showed how smart home offers a mechanism for achieving energy efficiency goals and how it offers users a lower-cost approach for saving energy. The building automation mechanisms and smart home assistive systems can help users to have better quality of life, and, at the same time, their behavior can be analyzed by AI. The behavioral analysis can help the system to predict user needs and optimize the use of devices and resources, including energy. At a basic level, the smart technology helps the user to turn devices on or off, and scholars in various disciplines, such as healthcare or architects, use a variety of sensors and actuators for many purposes. However, there is a need to learn from different practices and merge them to use the same system, as well as analyze the data collected from their devices for energy management at the same time. Gonçalves, Gomes and Antunes [3] discussed that the management of user side or demand estimation is critical and challenging in terms of renewable energy generation, hence, required to be addressed by smart homes and smart grids solutions. The possible solution will be an integration of algorithms and optimization of sources, which can assist in developing an automated home energy management system (EMS).
Recently, smart technology has been rapidly evolving, and more applications are being examined and offered by scholars and practitioners. The use of Internet of things (IoT) is increasing, which creates a network of objects from sensors and actuators to smartphones or tablets, and reports show that there will be a rapid growth of 25 to 50 billion connected devices by 2020 in terms of wireless telecommunication [7]. Thus, there is an urgent need to revisit previous works and review the state-of-the-art and technological capabilities and evaluate their implementations. The objective of this review article was to better understand what type of sensors and technologies are being used in smart homes and identify future directions. This article aimed to identify the emerging themes in the literature and synthesize different practices under different contexts and map them schematically. Table 1 presents the key terms and concepts used in smart home literature using sensors and AI. It lists all keywords and their definitions to achieve a common understanding of relevant concepts to the subject and increase the clarity of communications without needless repetitions. Table 1. Key terms and concepts of smart home and the relevant literature.

Keyword and Relevant Acronym Definition
Artificial Intelligence (AI) A potential solution to cognitive problems that are regularly related to human intelligence, such as learning, solving problems, and recognizing patterns [8].

Artificial Neural Network (ANN)
This refers to algorithms that mimic biological neural networks. These kinds of systems mostly include a large number of connected computational units/nodes and act by means of learning from the input data with the aim of optimizing the result [9].
Big Data (BD) Dealing with a large amount of data, which is complex and dependent on different sources; characterized by volume, velocity, variety, and veracity [10]. Table 2 shows some evidence that the use of EMSs caused a reduction in energy consumption by about 5-15% [25]. In 2003, a smart home equipped with solar panels and energy-efficient systems in Japan was built, and it was demonstrated that the home could decrease one-third of energy consumption in comparison with a typical home. It was discussed that the annual amount of energy consumption that a zero-utility cost house decreased from 10,750 kWh to 7167 kWh [26]. In 2004, a zero net smart home model was presented in Japan called 'Grand To You', and it offered increases in thermal performances of exterior walls, ceilings, and floors, by 32%, 17%, and 18%, respectively compared to their previous one [26]. In 2015, the results of experimentation on a proposed smart home energy management (SHEM) algorithm in Turkey showed a reduction of 17.5% in peak demand by means of voltage control and a reduction of 38% by means of using both voltage control and shifting in loads of appliances [27]. In 2016, a survey of 156 families in Sweden living in smart homes showed an average of 9.5% reduction in electricity consumption [28]. The case study also proved that smart homes contributed to a reduction of 30% in the amount of heat energy and greenhouse gas emissions [29]. Smart technologies are forecasted to enable energy consumption reduction, especially in commercial and residential buildings, by up to 10% between 2017 and 2040 globally. This would lead to a considerable reduction in energy consumption, which is equivalent to all the energy used in non-OECD countries in 2015 [30].

Challenges and Motivation
It is predicted that globally new power plants will see an investment of USD 270 billion to supply electricity to 1 billion households with interconnected electricity systems by 2040 [30]. Table 2 presents some evidence of the use of smart systems globally and its impact on different aspects of the smart homes in different contexts.

Significance of This Review
This article investigated the smart home literature to identify clusters of papers focusing on smart homes, including applications of sensors for energy management. This review included both a quantitative part, which is a systematic review, and a qualitative part, which is a content analysis, providing a foundation for developing new frameworks and revealing contradictories or any inconsistencies. In line with the significance of the review papers highlighted by Bem [34] and Palmatier et al. [35], this review article also intended to identify fragmentations of the literature on smart home and also synthesize diverse directions or outcomes and offer a snapshot of the state-of-the-art. An example of technical content review, which is a technical framework development, was published by Shirowzhan et al. [36]. As suggested by Palmatier, Houston and Hulland [35], this review provided research insights, identify existing gaps in the smart home literature, and future research directions in line with EMSs, applications of AI, and aged care needs.
The increasing applications of AI and technically sophisticated practice of the IoT for developing smart homes mean that the studies have mainly examined a novel system or its replication in a different context with limitations. Palmatier, Houston and Hulland [35] suggested that the synthetization of these piecemeal outcomes based on the examination of a variety of systems can reconcile possible conflicts of evidence within the literature and provides a bigger picture of solutions or developments of smart homes. These contributions, along with a comprehensive understanding of the technological aspects of a smart home, are indispensable for both academics and practitioners [35,37].
In this article, first, the authors systematically identified papers relevant to smart homes and relevant technologies, as presented in Section 2. Review Method. Second, the article presented the results of bibliography network analysis and the outcome of content analysis. Then, the findings on all selected papers were presented and summarized in tables. The article provided a comprehensive overview of the current literature, a review of smart home systems, including sensors and AI methods, and their implementation in a critical and comprehensive manner. The review method is outlined in the following section, before proceeding to the quantitative bibliographic analysis and the critical review of the smart home literature, the gap analysis, and suggestions as a solid platform for future studies.

Review Method
The systematic content review on the applications of AI and IoT in smart homes (AISH) was designed as a three-step research protocol. This method included the establishment of a review protocol, Appl. Sci. 2020, 10, 3074 5 of 45 search string design, database selection, exclusion and inclusion criteria, bibliographic analysis, content analysis, and statistics of the AISH literature. Figure 1 illustrates the method followed for selecting the relevant articles. Based on an initial review of the current practices reported in the literature, a set of keywords and strings were identified to develop the final search criteria. The search strings were selected, as shown in Table 3, and resulted in 460 records of articles. The review method designed for this research is as follows: outlined in the following section, before proceeding to the quantitative bibliographic analysis and the critical review of the smart home literature, the gap analysis, and suggestions as a solid platform for future studies.

Review Method
The systematic content review on the applications of AI and IoT in smart homes (AISH) was designed as a three-step research protocol. This method included the establishment of a review protocol, search string design, database selection, exclusion and inclusion criteria, bibliographic analysis, content analysis, and statistics of the AISH literature. Figure 1 illustrates the method followed for selecting the relevant articles. Based on an initial review of the current practices reported in the literature, a set of keywords and strings were identified to develop the final search criteria. The search strings were selected, as shown in Table 3, and resulted in 460 records of articles. The review method designed for this research is as follows:  Table 3. Search phrases and the number of documents found to develop the AISH dataset for bibliographic analysis.

Source
Search Phrase 1990-2019 Filters Applied and Limited 2010-2019 * Scopus TITLE-ABS-KEY(((smart OR intelligen * OR automat *) AND (iot OR "Internet of Things") AND ("artificial intelligence" OR "deep learning" OR "machine learning") AND (home OR house))) 460 90 Web of Science TOPIC: (((smart OR intelligen * OR automat *) AND (iot OR "Internet of Things") AND ("artificial intelligence" OR "deep learning" OR "machine learning") AND (home OR house))) 196 70 Figure 1. The flowchart of the search process, the exclusion and inclusion criteria, and the number of records found in each step. Table 3. Search phrases and the number of documents found to develop the AISH dataset for bibliographic analysis.

70
After merging all results and removing duplications 125 * Limited to journal articles published in English. AISH, Applications of AI and IoT in Smart Homes.

Step 1: Database Selection
This step included selecting relevant publications on the topic of current research, which was "IoT in smart homes", and was chosen from two reliable and comprehensive databases Scopus (scopus.com) and Web of Science (webofscience.com). The reason why these databases were selected is that a combination of their results provides high coverage of related articles to the topic of this research, and by considering both, the chance of missing any relevant paper can be reduced.

Step 2: Primary Search
To start searching, several keywords, such as the following were used as the first factors of controlling the search results: 'smart home', 'smart-home', smart house', 'intelligent home', 'intelligent house', 'home automation system', 'house automation system', 'automated home', 'automated house', 'Internet of things', 'IoT', 'artificial intelligence', 'deep learning', and 'machine learning'. In order to ensure all relevant keywords were included, the recent publications in the field were reviewed, and key subtopics and keywords were listed. This is called a pilot review, and over 20 papers were reviewed in this phase. Then, the main keywords for developing the search string were selected, which are shown in Table 3. These keywords were selected such a way that every relevant existing source in the database be included, and nothing be missed. The initial results of this search through Scopus and Web of Science (WoS) databases were 460 and 196, respectively. To remove some irrelevant sources, additional limits mentioned in Figure 1 were applied. In particular, using the LIMIT-TO keyword in Scopus and based on the proposed combination, the results decreased to 90 for Scopus and 70 for Web of Science. The findings were limited to journal articles published in English from 2010 to mid-July 2019.

Step 3: Bibliography and Content Analysis
From all databases, 160 results were checked and filtered manually to exclude duplications, non-English papers, full PDF availability, and less relevant articles that had not been excluded by the previous steps. This resulted 87 articles to be analyzed by means of coding, clustering, and in-depth review, which are fully discussed in Sections 4 and 5. The search results were controlled and filtered from different aspects, and, finally, their contents were analyzed by means of coding and in-depth review. Because (1) there have been already some review articles about this topic up to 2016 (e.g., [38] or [39]), but there is a need to review the current literature from the perspective of energy management, and also (2) the smart home boom, especially in recent years, puts an emphasis on the necessity of providing some newer research in the field of technology, this article reviewed the research published from the beginning of 2010 to 15 July 2019, to fill the gap of uncovered recent years and meet the needs of state-of-the-art research. After the content analysis, 55 documents were selected based on their high relevance to the purpose of this article for a full detailed review. The selected articles were grouped into three main groups, and the word cloud based on the frequency of stemmed words are presented in figures of the later sections. An example of stemmed word of 'using' considered includes the use, use', useful, usefulness, uses, and using. The frequency of selected keywords is also shown in these figures. The results of the content analysis, including a summary of systems, developed in the smart home field. The analysis of selected papers within each clustered group within the AISH database is summarized in Tables 4-6. These tables focus on IoT and user satisfaction, network and power, and, lastly, energy management, AI, and care systems since these focuses are the emerging themes of the content analysis. That is why they were not necessarily predetermined as the search criteria at the beginning of conducting the systematic review. Table 4. Summary of the analysis of selected papers focusing on the energy management theme.

Topic and Objective Technology and Feature Outcome and Future Suggestion
Micro grid-level energy management approach based on wind speed and solar irradiance to predict the energy generated by distributed energy resources (DERs). Green energies, which are generated from the wind and the sun are two dominant resources focused on [40].

Topic and Objective Technology and Feature Outcome and Future Suggestion
PLUG-N-HARVEST architecture is used for controlling near-zero adaptable/dynamic building envelopes (ADBE) with a safe connection between cloud systems and building infrastructure [41].
The architecture part is based on Z-wave technology and is called PLUG-N-HARVEST. An energy management system (EMS) used, including the intelligent management and control system (IMCS) and optimal energy management system (OEMS).
The 'energy consumption' and 'comfort conditions' are upgraded by the use of cloud intelligent management, and this result is based on the prototype implemented in Spain. Have suggested evaluating the whole performance of EMS with other infrastructures, such as ADBE, renewable energy sources, and energy storage.
A smart home EMS: ADP is used to improve an energy management system (EMS) in order to decrease the electricity bills and minimize the uncertainty of the power, which is exchanging between the grid and the user [42].
A network of wireless sensors, electrical appliances, a cloud-based data collector, AI, and a programming algorithm that is dynamic is the component of this system. The wireless sensors use message queue telemetry transport (MQTT), which is a lightweight messaging protocol.
System evaluation: a test bench, including four smart homes, which take advantage of the proposed EMS system. The test results showed that the uncertainty of the power exchanged between the grid and the user falls to 2.88% and also showed a fall of 3.23% in the electricity bills. Further, the system should be tested in real smart homes, and other functions, such as the health state of the battery in the EMS formulation, should be improved.
Smart management consumption and integrating smart devices, which consume their own produced energy [43].
The system includes IoT nodes, local smart-grid Internet, and the cloud service.
The system is installed in a house, and its effectiveness is evaluated and showed that it is easy to design, install, and operate, and cost-efficient.
HVAC smart random neural network controller that integrates WSN with cloud computing that includes introducing a novel random neural network (RNN)-based model for smart control of heating, ventilation, and air conditioning (HVAC) by deploying IoT with WSN and cloud computing [44]. An efficient data model for energy prediction using a wireless sensor network (WSN) to decrease energy consumption in order to be cost-effective in homes and increase precise energy prediction [46].
A multilayer perceptron (MLP) algorithm for energy prediction is used with the CARET algorithm for splitting data in the dataset; the BORUTA package dataset; a multi-layer feed-forward neural network for modeling energy consumption; Adam optimizer algorithm with a beginning rate of 0.005 and batch size of 500.
Findings of the experiment showed that: The second best MLP is tested in the best scenario (weather and temporal data), and the results are 63% R2, 60.03% RMSE, 27.45% MAE, and 26.85% MAPE. Adding temporal data has enhanced the outputs up to 1% in each experiment. The temporal information has increased the performance of each system, while the light feature has decreased the functioning. Weather data is sufficient for energy consumption predictions. More experimentations are required for validation of the system.
A framework for energy management to propose a distributed optimization algorithm for scheduling the energy consumption of multiple smart homes with distributed and centralized energy resources [45].
Compared the distributed home energy management system (DHEMs) optimization algorithm with a centralized home energy management system (CHEMs).
The cost of electricity in DHEMS is less than that of CHEMS, but with a larger cost of discomfort. DHEMs decreases the computational time, ease of use, and avoids the failures due to cyber-attacks. The proposed distributed algorithm should be tested in a large-scale realistic network with low voltage.
An appliance control System for improving load shedding and energy consumption [47].
Includes supervisory and secondary controllers, including fuse with a wireless transceiver using the Zigbee protocol. Smart plugs, the brute-force search algorithm, conservation voltage reduction, and connection platform.
With applying restrictions along with a 10% voltage reduction, the total power consumption is less than the case without any aforementioned conditions and more than the case with only considered restrictions, although the user satisfaction is less in the last case. Table 5. Summary of selected papers focusing on the AI theme.

Topic and Objective Technology and Feature Outcome and Future Suggestion
A deep-learning for monitoring nutrition called smart log in the IoT [48].
An optical character recognition (OCR) for obtaining nutrition data; Belief network (BN) or Bayesian for food classification is used.
The accuracy of the smart-log is 98.6%. Have suggested tracking user activities for precise automated diet prediction, integrating smart-log with a physiological observing mechanism.
A home-based human-robot interaction (HRI) system object-tracking mechanism for non-GPS environments using an improved deep neural network object tracking system for applications in home robotics [49].
The system consists of the assistive robot: Kobuki Turtlebot 2, modified with ASUS Xtion Pro Live RGB-D camera, powered with a microcontroller, and BOSCH BND055 IMU installed camera. Amazon web services. Alexa custom skill software. Deep convolutional neural networks (CNN).
A resulting plot of a chair detected, while the camera frame moves closer to the chair, shows that raw confidence level of a special object that is tracked by the multi-object detector is noisy; while the filtered data shows a general boosting trend of confidence, providing a true positive detection of the object. Suggested integrating all the decoupled systems to make a comprehensive robotic assistant.
A multi-agent system for gamification between householders and also between families managing smart homes [50].
Includes environmental sensors, such as motion sensors and gas sensors; backpropagation for numerical values, or RMSProp for graphical data; graphics processor and numerical value processor to make the analysis process faster.
The system is evaluated in two groups of experiments, including three families. The gamification results showed that the participants had lots of fun, but in some cases, its effect of enthusiasm for getting more score had some negative results. For example, the agents turned the lights on during the sleeping time at night.
Two-tier anomaly detection based on traffic profiling of the home automation system [42]; To find anomalies by using the network operator in the security of a home area network A two-tier intrusion detection system, which takes advantage of a machine learning method to look for strange anomalies at the data center. The main algorithm used is a data classification algorithm, namely, a naïve Bayesian classifier (NBC).
The findings of the simulation indicate that local anomalies can be useful in terms of signs of potential attacks for identification of the strange act of the endpoints. Table 6. Summary of selected papers focusing on the care system theme.

Topic and Objective Technology and Feature Outcome and Future Suggestion
A wearable health monitoring system to decrease the nightmares of those who suffer from post-traumatic stress disorder (PTSD) by monitoring sleep conditions [51].
A wearable device for monitoring; a hub controller called INSTEON; different types of countermeasures suppressing; wearable devices for vibration alert and lighting smart outlets; machine learning tools for the optimization of countermeasure selection.
The system does not interfere in the normal life of the user. It increases the quality of sleep and life of patients with PTSD. The system can be integrated into patients' personal IoT. Future suggestions: Bluetooth can make insecurity in the system and should be considered in future studies. The spread of private user data is an issue that should be addressed in future studies.
An intelligent hybrid remote patient-monitoring model with a cloud-based framework for knowledge discovery using hybrid architecture in case of internet disconnections [52].
A model for patients under supervision at home (IHCAM-PUSH) contains ambient, medical monitoring, remote monitoring cloud (RMC), local database (LDB), medical service provider cloud (MSPC).
The system relies on MapReduce programming and data mining assignments, such as association rules. The results showed minimal fault in real-time dig data acquisition and analysis, patient monitoring, and emergency cases (blood pressure) detection. The operation of the system for other diseases is suggested to be examined further.
Develop a laboratory voice user interface (VUI) to integrate laboratory devices into an IoT environment in order to control them and read out their specific data [53].
The VUI is a platform to control lab devices and read out specific device data; photometer; VA-enabled device; cloud services (voice model and server, skill host, device shadow); local services (server); natural language processing (NLP) algorithms.
Analysis of the speech examples showed that the standard setting of this system proves a high mean accuracy (95% ± 3.62) of voice identification. This solution makes a hands-free device control and will be an assistant to physically impaired or low vision users. Future suggestions: Security solutions that reflect common privacy rules are suggested to be worked on more.
Bridging e-Health and the IoT; sensor platform for healthcare in a residential environment (SPHERE) to identify different health conditions [54].
Environmental sensors, a Zigbee or 6LoWPAN-based wireless sensor networks, video, and Bluetooth sensors connected to a cellular network, home gateway, data hub.
SPHERE platform tends to address the problem of designing an analytics-driven data gathering system that contains available, efficient, and reliable dataset, whenever the data is needed.

Topic and Objective Technology and Feature Outcome and Future Suggestion
An approach to decision support and home monitoring system for patients with neurological disorders for monitoring people suffering from Parkinson's disease in their homes [55].
A system for screening that includes artificial neural network (ANN) classification algorithms; perceptron and a radial basis functions; network and the adaptive neuro-fuzzy classifier; MySQL in terms of database management.
The system evaluates by testing 10 patients and 10 normal people. Based on the evaluations, the proposed system is an aid for diagnosing Parkinson's disease, so it helps the doctors to detect the people who are suffering from this disorder. A monitoring system that works based on the web. Future suggestions: It is suggested to extend the system to other neurological diseases.
The IoT for dementia care with a fall detector or GPS tracker to stop risk increases at the earliest times of need [56]. Passive environmental, wearable sensors, and obtaining real-time data.
The advanced message queuing protocol (AMQP) for communicating with the TIHM backend system. Health Level-7 (HL7) for clinical and managing data, which transfers among software applications, and the communication between healthcare systems is made with HL7.
The establishment of the data model in order to conform FHIR to TIHM is a necessity. A real-time systematic interpretation with abstraction and pattern recognition methods. An algorithm of rule-based reasoning for vital measuring to provide a clinical flag is developed. Integration of patients', caregivers', and clinicians' experiences and industrial partner's experts are integrated, which is the main key parameter.
Integrated management of energy using diverse data, such as security, healthcare, and energy consumption, collected from different sensors and house appliances for management, security, and visualization purposes [57].
Includes home area network (HAN); ZigBee protocol; pulse and muscle sensor, temperature sensor, fall detection sensor working with an accelerometer, and energy-related devices; EMS to reckon control schemes based on measured data collected from sensors and smart meters carried out by the smart plugs.
Fall detection by using a three-axis accelerometer ADXL330 board and detect the quick variation of accelerometer and sending an alert to the application layer.
Tracking the users' motion profile and comparing different levels of physical activities with healthcare providers' recommendations simultaneously. Limitations: the interchanging process of different data formats (health and energy) and concentrating them and applying deeper analysis for security and privacy services. Suggested to use big data and fog computing methods for data analysis.

Bibliographic Analysis
The aim of this section is to identify relationships, inconsistencies, and the current subtopics in the selected literature and map them to provide a conceptual synthesis for future studies [58][59][60]. Tranfield, Denyer and Smart [59] discussed that the conventional 'narrative' or content reviews usually lack thoroughness, and it is possible to miss a genuine work. Thus, the focus of this bibliographic analysis was to use co-authorships, co-occurrences, citation, and co-citation for identifying interconnections of the selected literature, including selected articles and their corresponding citations. The systematic search and analysis alleviate bias during the search, article selections, and bibliographic analysis [61]. The employed bibliometric method assists in identifying similarities and possible patterns of inquiry based on citation records and cited references [62]. Based on the pilot review, a set of keywords were selected to identify the applications of AI, machine learning, and IoT in smart home development. The pilot review helped to set search strings (refer to Table 3). Figure 2 shows that over 400 co-authors are not fully connected within the database. This shows that collaboration among co-authors may be improved.

Figure 2.
A network of all 430 co-authors of the AISH bibliographic dataset co-authorship network using full counting. AISH, applications of AI and the IoT in smart homes. Figure 3 shows that a limited number of authors are co-authoring their work, and it means that the scholars' network is almost disconnected. Figure 4 shows the co-occurrence analytical map of keywords within the literature. The authors, with the greatest total link strength, were selected. Figure 4 also shows the cooccurrence analytical map of keywords created on the first bibliographic dataset using different colors for each cluster of keywords.  Figure 3 shows that a limited number of authors are co-authoring their work, and it means that the scholars' network is almost disconnected. Figure 4 shows the co-occurrence analytical map of keywords within the literature.  Figure 3 shows that a limited number of authors are co-authoring their work, and it means that the scholars' network is almost disconnected. Figure 4 shows the co-occurrence analytical map of keywords within the literature. The authors, with the greatest total link strength, were selected. Figure 4 also shows the cooccurrence analytical map of keywords created on the first bibliographic dataset using different colors for each cluster of keywords.   Figure 5 shows that the use of IoT is growing in the AISH literature, mainly from 2017, and has become more important in recent years. This also shows that recent publications may tend to utilize the applications of AI and IoT for energy analysis purposes. Figure 5c   The authors, with the greatest total link strength, were selected. Figure 4 also shows the co-occurrence analytical map of keywords created on the first bibliographic dataset using different colors for each cluster of keywords. Figure 5 shows that the use of IoT is growing in the AISH literature, mainly from 2017, and has become more important in recent years. This also shows that recent publications may tend to utilize the applications of AI and IoT for energy analysis purposes. Figure 5c shows that IoT is used for energy utilization and energy efficiency from mid-2018 onwards and shown as light green in the figure. Similarly, the applications of machine learning are increasing from mid-2018, and the use of classification algorithms and learning algorithms are mainly growing from late 2018 and early 2019, as shown in Figure 5b in yellow. Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 45

Content Analysis and Data Mining
Section 4 critically reviews the content of the AISH data set by investigating topics, keywords, and themes. Five high-frequency words, including AI, Big Data, decision, energy, and IoT, were initially chosen for further analysis to reveal expected hidden themes within AISH. Figure 6 shows the number of references within the AISH database across five chosen high-frequency words (AI, Big Data, decision, energy, and IoT). Each group was analyzed by using the chosen five high-frequency words to give an insight into the themes covered in the group before a detail review was started. Thus, the analysis gave an overall view about the relevance of each group to the selected words, which might represent a specific theme. Figure 6 shows that IoT is frequently used in Group 1 along with a decision, thereby suggesting that IoT is one grouping to examine. IoT is the most frequent

Content Analysis and Data Mining
Section 4 critically reviews the content of the AISH data set by investigating topics, keywords, and themes. Five high-frequency words, including AI, Big Data, decision, energy, and IoT, were initially chosen for further analysis to reveal expected hidden themes within AISH. Figure 6 shows the number of references within the AISH database across five chosen high-frequency words (AI, Big Data, decision, energy, and IoT). Each group was analyzed by using the chosen five high-frequency words to give an insight into the themes covered in the group before a detail review was started. Thus, the analysis gave an overall view about the relevance of each group to the selected words, which might represent a specific theme. Figure 6 shows that IoT is frequently used in Group 1 along with a decision, thereby suggesting that IoT is one grouping to examine. IoT is the most frequent word used in Group 2 along with the words AI and energy, suggesting a second grouping. Similarly, IoT, AI, and energy are used in Group 3, but, in this grouping, the most frequent words-decision-making and big data-are included within this group. More detailed information about each group and also the content review are discussed in the following sections.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 13 of 45 word used in Group 2 along with the words AI and energy, suggesting a second grouping. Similarly, IoT, AI, and energy are used in Group 3, but, in this grouping, the most frequent words-decisionmaking and big data-are included within this group. More detailed information about each group and also the content review are discussed in the following sections. The following sections present the results of the content analysis, including a summary of systems developed in the smart home field. Tables 4-6 present the selected papers of each clustered group within the AISH database. Next, the selected articles are reviewed in this section.

Group 1: IoT and Users
The first group of papers includes Filho, et al. [63], Chiu and Ko [64], Chatterjee, et al. [65], Sivanathan, et al. [66], and Kim [67], in which their core discussion is around IoT and users since they have received high references. As shown previously, these papers have utilized IoT for decision purposes for daily activities and users' satisfaction (refer to Figure 7). It shows that the highest reference number is 391 for 'using' with a weighted presentation of 1.05. This word is used in different stems, such as use, usefulness, and uses. For example, "...useful for growing a full decision…", "…used to detect changes in pitch…", and "…used for system selection…". The usefulness is an important discussion in the innovation literature for all new technologies and concepts [68,69]. Another high referenced word is 'information', which is used in this group and refers to 'user information satisfaction', 'information technology/system', 'information and communication', and 'accurate and reliable information'. This helps to point out important concerns in the smart home, such as the reliability of information and measuring user satisfaction. Figure 7 also shows other highly used words in this group.
As an example of collecting 'information' and 'usability' of system, Chiu and Ko [64] developed a personalized intelligent music selection system for psychological health based on heart rate variability and machine learning. Usability, need, and usefulness of a system have been ignored to be examined and validated in some contexts, but it is recommended as one of the key factors of successful technology adoption and implementation in the technology/information system literature [70][71][72][73]. This system intends to utilize an intelligent mechanism for automatic music selection for the users according to their emotions and moods. The proposed system includes: (1) A smartphone, (2) A wearable device, such as smartwatch for tracking heart rate, (3) Time-domain method to determine the emotion according to the heart rate value (HRV), and (4) Machine learning algorithm for selecting music. The music types are determined by valence and emotion degree through classification and regression tree (CART) analysis. To evaluate the proposed system performance, a survey was used: An experiment consisting of 30 graduate students aged 19-36 (14 females and 16 males) was conducted to determine if the user's working function is enhanced by this system. The purpose was The following sections present the results of the content analysis, including a summary of systems developed in the smart home field. Tables 4-6 present the selected papers of each clustered group within the AISH database. Next, the selected articles are reviewed in this section.

Group 1: IoT and Users
The first group of papers includes Filho et al. [63], Chiu and Ko [64], Chatterjee et al. [65], Sivanathan et al. [66], and Kim [67], in which their core discussion is around IoT and users since they have received high references. As shown previously, these papers have utilized IoT for decision purposes for daily activities and users' satisfaction (refer to Figure 7). It shows that the highest reference number is 391 for 'using' with a weighted presentation of 1.05. This word is used in different stems, such as use, usefulness, and uses. For example, " . . . useful for growing a full decision . . . ", " . . . used to detect changes in pitch . . . ", and " . . . used for system selection . . . ". The usefulness is an important discussion in the innovation literature for all new technologies and concepts [68,69]. Another high referenced word is 'information', which is used in this group and refers to 'user information satisfaction', 'information technology/system', 'information and communication', and 'accurate and reliable information'. This helps to point out important concerns in the smart home, such as the reliability of information and measuring user satisfaction. Figure 7 also shows other highly used words in this group.
As an example of collecting 'information' and 'usability' of system, Chiu and Ko [64] developed a personalized intelligent music selection system for psychological health based on heart rate variability and machine learning. Usability, need, and usefulness of a system have been ignored to be examined and validated in some contexts, but it is recommended as one of the key factors of successful technology adoption and implementation in the technology/information system literature [70][71][72][73]. This system intends to utilize an intelligent mechanism for automatic music selection for the users according to their emotions and moods. The proposed system includes: (1) A smartphone, (2) A wearable device, such as smartwatch for tracking heart rate, (3) Time-domain method to determine the emotion according to the heart rate value (HRV), and (4) Machine learning algorithm for selecting music. The music types are determined by valence and emotion degree through classification and regression tree (CART) analysis. To evaluate the proposed system performance, a survey was used: An experiment consisting of 30 graduate students aged 19-36 (14 females and 16 males) was conducted to determine if the user's working function is enhanced by this system. The purpose was to retain the user's HRV at a moderate level. For HRV analysis, the time-domain method was used, and a standard deviation of normal RR intervals (SDNN) was selected as the parameter to determine emotion. The system usability scale (SUS) questionnaire, service quality survey, and the "National Aeronautics and Space Administration-Task Load Index" (NASA-TLX) questionnaire (after each test to assess the users' mental workload) were carried out. A 'satisfaction' assessment and a performance questionnaire were designed to measure 'user's satisfaction' and performance by using this system. However, tasks for the future are suggested to develop wearable units, so that the proposed system can be expanded to be used in other places like factories and healthcare centers.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 14 of 45 to retain the user's HRV at a moderate level. For HRV analysis, the time-domain method was used, and a standard deviation of normal RR intervals (SDNN) was selected as the parameter to determine emotion. The system usability scale (SUS) questionnaire, service quality survey, and the "National Aeronautics and Space Administration -Task Load Index" (NASA-TLX) questionnaire (after each test to assess the users' mental workload) were carried out. A 'satisfaction' assessment and a performance questionnaire were designed to measure 'user's satisfaction' and performance by using this system. However, tasks for the future are suggested to develop wearable units, so that the proposed system can be expanded to be used in other places like factories and healthcare centers. In addition, Kim [67] proposed a door-lock system of smart homes able to work based on behavior tracking, and this has been the main contribution of this research. This system makes use of various kinds of constraint 'satisfaction' problems (CSPs) and forward checking algorithm and works based on the following steps: (1) Every time the door is opened and closed by a resident, a sensor mounted in the lock system makes and gathers log data. So that the system has a long sequential log data about every resident, and it makes a dataset, which includes the time and type of every event (e.g., INDOOR, NUM, TAG, LOCAL, HSP, BUTTON, and SECURITY). (2) The characteristics of each house are defined based on the collected data. For example, the number of residents in each household is defined. (3) Thus, the number of residents at home can be predicted whenever needed. Two real datasets are gathered in order to evaluate the proposed method: (1) logged data gathered from 40 households of various times in Seoul, South Korea, and (2) logged data gathered from 11,986 households of South Korea. The case studies' evaluation shows the effectiveness of the proposed model. This research showed that the model might estimate wrongly in some cases and is just specified to the lock system, and other smart home devices are not considered.

Group 2: Power and Energy
The second group of the AISH dataset includes Jiang [74], Sodagari [75], Lynggaard [76], Liu, et al. [77], Erol, Majumdar, Lwowski, Benavidez, Rad and Jamshidi [49], Jiang, et al. [78]. As shown previously, these papers have utilized IoT and AI algorithms (see Figure 8), where they have also referred to energy efficiency in different contexts and power saving, network energy consumption, and network utility cost. The papers of this group focus on network development and measuring energy consumptions (refer to Figures 6 and 8). Figure 8 shows that the highest reference number is 321 for 'network' with a weighted presentation of 1.12. This word is used in different stems, such as networked, networking, and networks. For example, "...self-organizing networks (for machine to machine) …", "…network nodes…", "…autonomous network management…", "…the network energy consumption…", and "…Autonomous networks…". Another high referenced word is 'power', which is used in this group and refers to 'power in cellular networks', 'power and rate allocations', 'power allocation of neighboring nodes', 'computational power', and 'power control'. This helps to point out an important direction in a smart home, such as developing efficient network In addition, Kim [67] proposed a door-lock system of smart homes able to work based on behavior tracking, and this has been the main contribution of this research. This system makes use of various kinds of constraint 'satisfaction' problems (CSPs) and forward checking algorithm and works based on the following steps: (1) Every time the door is opened and closed by a resident, a sensor mounted in the lock system makes and gathers log data. So that the system has a long sequential log data about every resident, and it makes a dataset, which includes the time and type of every event (e.g., INDOOR, NUM, TAG, LOCAL, HSP, BUTTON, and SECURITY). (2) The characteristics of each house are defined based on the collected data. For example, the number of residents in each household is defined. (3) Thus, the number of residents at home can be predicted whenever needed. Two real datasets are gathered in order to evaluate the proposed method: (1) logged data gathered from 40 households of various times in Seoul, South Korea, and (2) logged data gathered from 11,986 households of South Korea.
The case studies' evaluation shows the effectiveness of the proposed model. This research showed that the model might estimate wrongly in some cases and is just specified to the lock system, and other smart home devices are not considered.

Group 2: Power and Energy
The second group of the AISH dataset includes Jiang [74], Sodagari [75], Lynggaard [76], Liu et al. [77], Erol, Majumdar, Lwowski, Benavidez, Rad and Jamshidi [49], Jiang et al. [78]. As shown previously, these papers have utilized IoT and AI algorithms (see Figure 8), where they have also referred to energy efficiency in different contexts and power saving, network energy consumption, and network utility cost. The papers of this group focus on network development and measuring energy consumptions (refer to Figures 6 and 8). Figure 8 shows that the highest reference number is 321 for 'network' with a weighted presentation of 1.12. This word is used in different stems, such as networked, networking, and networks. For example, " . . . self-organizing networks (for machine to machine) . . . ", " . . . network nodes . . . ", " . . . autonomous network management . . . ", " . . . the network energy consumption . . . ", and " . . . Autonomous networks . . . ". Another high referenced word is 'power', which is used in this group and refers to 'power in cellular networks', 'power and rate allocations', 'power allocation of neighboring nodes', 'computational power', and 'power control'. This helps to point out an important direction in a smart home, such as developing efficient network technology and power networks. Figure 8 provides an insight into the group papers and also shows other highly used words in this group.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 15 of 45 technology and power networks. Figure 8 provides an insight into the group papers and also shows other highly used words in this group. Sodagari [75] presented asynchronous weak commitment search (AWCS) that introduces a decentralized framework of AWCS for independent quality of service (QoS) provision for networks that reach end nodes at IoT. AWCS is a method for independent network management and recovery, which is lightweight and strong in scheduling and power control. This method is based on exchanging local messages and evades the need for knowledge of channel gains. For AWCS study, cognitive spatial reuse time division access (STDMA) and code division multiple access (CDMA) communication networks are elaborated as case studies. Cognitive STDMA networks include two stages: (1) cognitive radios (CRs) interact with primary, in a repetitive manner, to ensure they do not force interference on the basis of primary users and secondary users coexisting, and (2) CRs use AWCS among themselves to reach optimal resource allocations. For cognitive CDMA networks, AWCS can be applied for allocating optimal power satisfying QoS needs of nodes, regarding their constraints on each other. AWCS with multiple local variables is used to allocate optimal rate and powers to CR nodes, without central management. Numerical observations are carried out for the evaluation. The results showed that extensions of this approach could be used in self-organizing networks, e.g., home automation and networking and vehicular technology. The application of this AI in wireless and mobile communications can be applied in home automation to provide quality of service. The application of this method is suggested to be studied for self-organizing networks of vehicular communications and capillary networks that realize IoT.
Lynggaard [76] used machine learning for adaptive interference suppression in wireless sensor networks (WSN) [76], and they aimed to examine the level of WSN interferences and adjust transmitted power. A machine-learning algorithm was used to predict the needed amount of power for transmitting. The WSN nodes were used to measure parameters, such as temperature, humidity, people present, etc. The evaluation results showed that the system is qualified to save battery power from 42% to 82%, and it is able to get 86% (19% power savings) score in training, with five samples in training, and supports online learning.
Liu, Zhang and Fang [77] introduced an efficient and private traffic blockage (EPIC) framework for smart homes in order to protect against traffic analysis attacks. The application of IoT devices in smart homes requires user privacy and system security. Cyber-attack of these applications is a major issue in smart homes and need to be considered. Attacks of traffic analysis to smart homes bring adversaries blockage of the internet traffic to/from the gateways of smart homes and extractions of the residents' information. The framework is equipped with wirelessly connected smart homes, smart community center, multi-hop mesh network with communications resources, multiple pseudonym techniques (for the private and secure data communications), and classification algorithms. The stages of the framework are (1) utility-aware differentially private (DP) proxy gateway selection, which consists of delay constraint and computing resource constraint; (2) secure multi-hop routing, Sodagari [75] presented asynchronous weak commitment search (AWCS) that introduces a decentralized framework of AWCS for independent quality of service (QoS) provision for networks that reach end nodes at IoT. AWCS is a method for independent network management and recovery, which is lightweight and strong in scheduling and power control. This method is based on exchanging local messages and evades the need for knowledge of channel gains. For AWCS study, cognitive spatial reuse time division access (STDMA) and code division multiple access (CDMA) communication networks are elaborated as case studies. Cognitive STDMA networks include two stages: (1) cognitive radios (CRs) interact with primary, in a repetitive manner, to ensure they do not force interference on the basis of primary users and secondary users coexisting, and (2) CRs use AWCS among themselves to reach optimal resource allocations. For cognitive CDMA networks, AWCS can be applied for allocating optimal power satisfying QoS needs of nodes, regarding their constraints on each other. AWCS with multiple local variables is used to allocate optimal rate and powers to CR nodes, without central management. Numerical observations are carried out for the evaluation. The results showed that extensions of this approach could be used in self-organizing networks, e.g., home automation and networking and vehicular technology. The application of this AI in wireless and mobile communications can be applied in home automation to provide quality of service. The application of this method is suggested to be studied for self-organizing networks of vehicular communications and capillary networks that realize IoT.
Lynggaard [76] used machine learning for adaptive interference suppression in wireless sensor networks (WSN) [76], and they aimed to examine the level of WSN interferences and adjust transmitted power. A machine-learning algorithm was used to predict the needed amount of power for transmitting. The WSN nodes were used to measure parameters, such as temperature, humidity, people present, etc. The evaluation results showed that the system is qualified to save battery power from 42% to 82%, and it is able to get 86% (19% power savings) score in training, with five samples in training, and supports online learning.
Liu, Zhang and Fang [77] introduced an efficient and private traffic blockage (EPIC) framework for smart homes in order to protect against traffic analysis attacks. The application of IoT devices in smart homes requires user privacy and system security. Cyber-attack of these applications is a major issue in smart homes and need to be considered. Attacks of traffic analysis to smart homes bring adversaries blockage of the internet traffic to/from the gateways of smart homes and extractions of the residents' information. The framework is equipped with wirelessly connected smart homes, smart community center, multi-hop mesh network with communications resources, multiple pseudonym techniques (for the private and secure data communications), and classification algorithms. The stages of the framework are (1) utility-aware differentially private (DP) proxy gateway selection, which consists of delay constraint and computing resource constraint; (2) secure multi-hop routing, which contains uplink routing design and downlink routing design; and (3) performance evaluation, which includes privacy analysis and numerical evaluation. Results from many simulations showed that this framework surpasses the benchmarking mechanism in protecting smart home's privacy while reducing the network energy consumption and network utility cost.

Group 3: Energy Management and Artificial Intelligence
The third group of the AISH dataset includes 75 articles, which are divided into three themes for conducting more detailed content analysis: (a) energy management in smart homes presenting the current smart home practices in terms of energy consumption monitoring and energy efficiency; (b) applications of AI in smart homes, such as machine learning and deep learning algorithms applied in different contexts; and (c) care systems, which are adopted in different communities and can be learned from these practices. The significance of the care systems is that they can be integrated with EMSs, so the adoption rate of all systems can be greatly increased. Each theme is summarized in a separate table and schematically visualized in the following three figures. Figure 9 shows that the highest reference number is 4738 for 'data' with a weighted presentation of 0.93. Other words are frequently used in this group, such as timing, energy, control, and detections. For example, detection is used in a different context, such as " . . . daylight detected . . . ", " . . . event and pattern detection . . . ", " . . . sensor-based motion detection . . . ", " . . . detecting health conditions . . . ", " . . . detection sensors . . . ", and " . . . detecting simulation information . . . ". Another high referenced word is 'energy', which is used in this group and refers to 'saving energy', 'energy-efficient', 'energy systems', 'solar and wind energies', 'energy management', and 'energy production and consumption'. This helps to point out to important direction mentioned in this group to develop energy-efficient systems and EMSs as the main technologies for smart homes. Figure 9 provides an insight into the group papers and also shows other highly used words in this group.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 16 of 45 which contains uplink routing design and downlink routing design; and (3) performance evaluation, which includes privacy analysis and numerical evaluation. Results from many simulations showed that this framework surpasses the benchmarking mechanism in protecting smart home's privacy while reducing the network energy consumption and network utility cost.

Group 3: Energy Management and Artificial Intelligence
The third group of the AISH dataset includes 75 articles, which are divided into three themes for conducting more detailed content analysis: (a) energy management in smart homes presenting the current smart home practices in terms of energy consumption monitoring and energy efficiency; (b) applications of AI in smart homes, such as machine learning and deep learning algorithms applied in different contexts; and (c) care systems, which are adopted in different communities and can be learned from these practices. The significance of the care systems is that they can be integrated with EMSs, so the adoption rate of all systems can be greatly increased. Each theme is summarized in a separate table and schematically visualized in the following three figures. Figure 9 shows that the highest reference number is 4738 for 'data' with a weighted presentation of 0.93. Other words are frequently used in this group, such as timing, energy, control, and detections. For example, detection is used in a different context, such as "...daylight detected…", "…event and pattern detection…", "…sensor-based motion detection…", "…detecting health conditions…", "… detection sensors…", and "…detecting simulation information…". Another high referenced word is 'energy', which is used in this group and refers to 'saving energy', 'energy-efficient', 'energy systems', 'solar and wind energies', 'energy management', and 'energy production and consumption'. This helps to point out to important direction mentioned in this group to develop energy-efficient systems and EMSs as the main technologies for smart homes. Figure 9 provides an insight into the group papers and also shows other highly used words in this group.  Table 4 shows a summary of the 'energy management' theme. Detailed descriptions of the relevant practices identified in the AISH literature are presented after the table. In this group, Marin-Perez, Michailidis, Garcia-Carrillo, Korkas, Kosmatopoulos and Skarmeta [41] designed a system architecture for increasing the energy efficiency of both smart homes and smart commercial buildings. The proposed model components include the following items: (1) The architecture part working is based on Z-wave technology and is called PLUG-N-HARVEST, which includes four layers: adaptive dynamic building envelope (ADBE) that is related to an insulated aluminum façade, which is flexible, and energy collection device. Interconnected elements ecosystem (IEE) that includes all the sensors and automation devices. Security and safety mechanisms (SSM) that include fault detection and controlling the data. EMS, including  Table 4 shows a summary of the 'energy management' theme. Detailed descriptions of the relevant practices identified in the AISH literature are presented after the table. In this group, Marin-Perez, Michailidis, Garcia-Carrillo, Korkas, Kosmatopoulos and Skarmeta [41] designed a system architecture for increasing the energy efficiency of both smart homes and smart commercial buildings. The proposed model components include the following items: (1) The architecture part working is based on Z-wave technology and is called PLUG-N-HARVEST, which includes four layers: adaptive dynamic building envelope (ADBE) that is related to an insulated aluminum façade, which is flexible, and energy collection device. Interconnected elements ecosystem (IEE) that includes all the sensors and automation devices. Security and safety mechanisms (SSM) that include fault detection and controlling the data. EMS, including three sub-systems-intelligent management and control system (IMCS), optimal OEMS, and demand response flexibility forecasting and optimization (DRFFO). (2) The cooperative part, which is a building management system (BMS) that consists of five security-by-design protocols, such as XACML, KeyRock, DCapBAC, EEC, and HTTPS. The model works based on the following steps: Firstly, the data is gathered by sensors attached to the building and collect the real-time data, and local stations or online services, which report and predict the weather information. Secondly, the EMSs (such as IMCS, OEMS, and DFRRO) can have access to the gathered data via BMS. Thirdly, IMCS makes the best control decisions and transfers them to the building actuators (such as heating ventilation and air conditioning (HVAC), adaptable/dynamic building envelope (ADBE), renewable energy system, and energy storage) via the BMS. Three different real-world prototypes are tested in order to show the proposed architecture (PLUG-N-HARVEST) in three countries (Germany, Greece, and Spain). Implementing the prototypes shows that the 'security-by-design Internet communications' (refers to the security part of the research) and 'building equipment and cloud management systems' (refers to the PLUG-N-HARVEST) work efficiently together. The 'energy consumption' and 'comfort conditions' are also upgraded by the use of cloud intelligent management, and this result is based on the prototype implemented in Spain.
La Tona, Luna, Di Piazza and Di Piazza [42] proposed a system that tends to redesign an EMS in order to decrease the electricity bills and minimize the uncertainty of the power, which is exchanging between the grid and the user. The limitation of this work is that the proposed system has not been widely tested in real smart homes in different contexts. It includes a network of wireless sensors, electrical appliances, a cloud-based data collector, AI, and a programmed algorithm that is dynamic. The artificial neural network (ANN), named nonlinear auto regressive network with exogenous inputs (NARX), is used in the forecasting stage, in order to get better results. The wireless sensors use message queue telemetry transport (MQTT), which is a light-weight messaging protocol. The system works based on the following steps: (1) Forecasting stage that forecasts the amount of required load, environmental variables, and amount of generated load for its following day, based on previous data.
(2) The planning stage, in which the user's cash flow is optimized, and a group of load reference values are made in this stage. The results of this stage measure the best grid-exchanges power profile (GEPP) for the following day. (3) Online re-planning stage, with the purpose of reducing the difference between the real and sent GEPP. It measures the real set of load references for this aim. (4) Local command stage, which sends the aforementioned values to the various parts of the system through an internal home area network (HAN). The proposed system is evaluated by a test bench, including four smart homes, all of which take advantage of the proposed EMS system. A number of wireless sensors are connected with electric devices in order to transfer the data to the EMS. In order to transfer the GEPP, all the homes are connected to a data collector of the grid manager via a safe Internet connection. The gathered data can be used to improve planning. The findings of the system evaluation by a test bench showed that the uncertainty of the power exchanged between the grid and the user falls to 2.88% and also shows a fall of 3.23% in the electricity bills. Moreover, the proposed EMS system is able to perform its difficult task for less than nine minutes. It was suggested to test the proposed system in real smart homes. Besides, other aspects like the health state of the battery, in the EMS formulation, should be considered in the future.
Ferrández-Pastor, García-Chamizo, Gomez-Trillo, Valdivieso-Sarabia and Nieto-Hidalgo [43] proposed a model for integrating smart devices in a home, which consume their own produced energy, and the architecture model includes IoT nodes, such as edge and fog node, local smart-grid Internet, and the cloud service. It also takes advantage of horizontal and vertical algorithms, both of which are two groups of energy management models. The proposed model performs based on the following steps: (1) The architecture model performance: (1-1) The edge node can use simple AI algorithms acting in the local area and is connected vertically with other layers, it also makes use of horizontal algorithms of control. It handles the sensors and actuators. (1-2) The fog node is more capable in terms of the computational aspect in comparison with the edge node. It maintains the data and analyzes the process of energy management by means of AI algorithms and takes the information internationally. While it is not connected with the local data, unlike the edge node. It makes use of vertical algorithms. It can be in the shape of a PC or a server. (1-3) The smart grid is responsible for managing various nodes, and it is an interface to the cloud service. (1-4) The cloud service is a connection between two smart grids. (1) proposed architecture model layers, such as (1-1) an edge node is able to do these tasks: taking the data of energy generation and consumption, taking the environmental data, pre-processing and filtering all the data gathered, controlling the performance of actuators, classifying models, predicting models, processing the communication, and implementing various user interfaces.
(1-2) the fog node is able to do these tasks: learning prediction and classification models, analyzing, storing data, taking data, using AI algorithms, developing interfaces like human-machine interface (HMI), or machine-to-machine interfaces (M2M). (1-3) The smart grid is able to do these tasks: supporting application programming interface (API) management, security activities, maintenance activities, connecting the nodes in terms of cooperation, and supporting cloud service. (1-4) The cloud service is used in other services, such as taking care of numerous devices and big data, cloud data analytics, using dark data, developing an application, event management, being an interface or gateway between the hardware and software services. (2) steps of the proposed computing model, such as (2-1) designing devices, actuators, nodes, the cloud type, architecture of smart grid, and new services, (2-2) data flow that consists of several stages like capturing data by sensors, filtering data, transferring data between nodes and the smart grid, saving data, transferring data between nodes and management layer, transferring data to the cloud service, controlling data, and interfaces between human-machine and machine-machine.
(2-3) Learning includes these stages: pattern identification models to identify the type of energy load, generation prediction to make a regression model, predictive maintenance to identify singular events, training other processes based on AI. (2-4) the operation comprises steps, all of which are related to processes, for one: supervision processes. (2)(3)(4)(5) this step includes supervision, management, and maintenance. The proposed model is evaluated experimentally by means of a system that includes both wind and solar energy. The system is installed in a house, by which the effectiveness of the proposed method is proved. Based on the mentioned experiment, the advantages of the system are being easy to design, install, and operate, and being cost-efficient. All related services to the smart grid are suggested to be integrated into a developed API in the future.
Javed, Larijani, Ahmadinia and Gibson [44] introduced a novel random neural network (RNN)-based model for smart control of heating ventilation and air conditioning (HVAC) by deploying IoT with WSN and cloud computing. The platform consists of wireless sensor nodes for measuring indoor environmental factors, HVAC duct sensor node-built with Arduino UNO board and MOTEINO R4 board for measuring environmental factors of inlet air from HVAC wireless base station, which is connected to the workstation through the serial port to generate the cloud processing scenarios, HVAC control panel, and web portal interface. The workstation on the server is used for data storage and training the RNN by using the hybrid particle swarm optimization and sequential quadratic programming (PSO-SQP) algorithm. Besides, it uploads the environmental factors/control signals on the cloud computing platform. Indoor and duct environment data are obtained by indoor sensors and HVAC duct sensors, respectively. The data is sent to the base station. The base station is connected to the workstation on the cloud for RNN analysis. The smart RNN controller calculates a number of occupants, estimates predicted mean vote (PMV)-based set points for cooling and heating, and learns from user preferences. An evaluation was done by testing an intelligent controller for HVAC in an environment chamber (12 × 8 × 8 feet with one sensor node and one HVAC duct sensor) in the Glasgow Caledonian University campus. There is a chiller, which can reduce the air temperature to 5 • C. The base station is connected to the control panel of the chamber to control the heater, cooler, and ventilation on/off. The evaluation was carried out in three different cases. The results of occupancy estimation using RNN showed that the accuracy of occupancy is 92.5%. The power consumption of the intelligent controller in Case 3-embedding the intelligence in the base station and sensor nodes-is 4.4% lower than the other two cases. Case 3 performs better than other cases in terms of control decision delay. The control decision delay of case 3 is 7 ms.
Joo and Choi [45] aimed to reduce the energy cost of appliances by utilizing renewable energy sources (RES) with respect to user's operation preferences by proposing a quality of experience (QoE)-aware SHEM system. The proposed system uses the following items: (1) A QoE-aware cost-saving appliance scheduling (Q-CSAS) algorithm to schedule and control loads based on each user's profile; (2) A QoE-aware renewable source power allocation (Q-RSPA) algorithm to change the appliances operation schedule in case of surplus renewable electricity; (3) A new classification for thermostatically high load controlling in the appliance modeling; (4) Micro wind turbines and smart grid for RES power supply solar panels; (5) K-mean algorithm in MATLAB software for data clustering; (6) the silhouette value for selecting the optimal number in each cluster for each data (annoyance vector of the user's answers Qzw in the test). The proposed system evaluation and operation are as following: The SHEM system imposed in this paper is tested in a real-time scenario considering 1000 homes with pseudo-randomly choosing user profiles. A prototype has been implemented to validate the presented approach. For system technical evaluation and user evaluation, two groups of users, comprising a group of elderly and disabled people, and a group of younger, who are technologically experienced, have participated in a simulated environment. Each of the survey's pages remained is dedicated to a specific appliance, such as dishwasher (DW), heating ventilation and air conditioning (HVAC), and others. Five preferred times are set up for switchable appliances ranging from −3 to +3 h margin with a half an hour step. For thermostatically controlled appliances, set temperature for energy saving varies within a range of −3 • C to +3 • C with a 0.5 • C step for HVAC and −18 • C to +18 • C with a 3 • C step for the water heater (WH). The questions are answered separately for working days (WD) and days off (DO). As a result, 12 different types of appliance/period in a week is created. A k-means algorithm is used to cluster each user's profile of appliances usage. The optimal number of clusters is four clusters consisting of profile 0, which shows the users who are not willing to change the starting time or set temperature; profile 1, the user who is willing to change the defaults at the entire time range; profile 2, the user who wants to postpone the start time; profile 3, the user who is willing to choose the nearest time to the preferred one. After accepting the time shifts at the end of the task, the user rates the annoyance perceived. A new vector of annoyance is provided for both appliance and user, and its silhouette value is computed according to all the clusters to reassign the well-matched profile. Next, the Q-CSAS algorithm receives the best profile with the highest number of users of the reference appliance model. Task scheduling pattern is in the proposed SHEM, which conducts with Q-CSAS and Q-RSPA algorithms, respectively. Q-CSAS algorithm schedules G2 and G3 appliances tasks in off-peak times by sending appliance power consumption and duration times to the central unit to be analyzed. For G3 appliances, the activation takes place when the temperature set corresponds to a higher level of the annoyance of 1 scale. Simultaneously, the algorithm takes the lowest electricity Appl. Sci. 2020, 10, 3074 20 of 45 price and combines it with the preferred time and temperature to schedule the best starting time. Whenever the power consumption needed by G2 or G3 appliances is lower than the surplus energy generated from RES, the Q-RSPA algorithm starts. G3 appliances' use of RES power depends on their temperature value. The results of system evaluation showed that (1) The achieved values of the silhouette in the QoE process of providing each profile range from 0.725 to 0.930, which are close to 1. This means that every example is matched with its cluster (usage profile). (2) In profile creation of the user's process, the larger shift in start times results in the greater annoyance scale. (3) The cost-saving amount of QoE-aware SHEM without RES is 22% and 33% with RES. The highest cost difference compared between QoE-aware and QoE-unaware is conducted for HVAC and electric oven because of the less percentage of people willing to shift the starting time of such appliances. In the QoE-unaware, cost-saving ranges from 33% without RES to 46% with RES. (4) the annoyance rate with a 95% confidence interval in QoE-aware SHEM is within the average of 1.65 without RES and 1.7 with RES. For better randomness and heterogeneity of user's opinions, other online survey tools, such as Qualtrics, SurveyMonkey, and SurveyGizmo, are suggested to be used in future studies, and also specific target users can be chosen in order to get a certain set of opinion.
Chammas, Makhoul and Demerjian [46] intended to decrease energy consumption in order to be cost-effective in homes and increase accuracy of energy prediction. In their paper, a multilayer perceptron (MLP) algorithm for energy prediction in buildings using a wireless sensor network (WSN) for collecting data is proposed that includes (1) Classification And REgression Training (CARET) algorithm for splitting data in the dataset; (2) BORUTA package dataset; (3) A multi-layer feed-forward neural network for modeling energy consumption; (4) Adam optimizer algorithm with a beginning rate of 0.005 and batch size of 500; (5) Four models are used in the comparison, which are (5-1) R 2 , which is the variance proportion between testing and the predicted variable, (5-2) Root Mean Square Error (RMSE), the difference percentage of testing and predicted variables, (5-3) Mean Absolute Error (MAE), the difference percentage between predicted variables, and (5-4) Mean Absolute Percentage Error (MAPE), which shows the accuracy. The proposed system is developed with its dataset in order to retain information: (1) Dataset consists of an indoor and outdoor sensor used in a two-floor building and a sensor in an airport nearby. Thirty-five variables: temperature, humidity, pressure, dew point, wind speed, visibility data, along with devices and energy consumption of light and temporal information were collected. Ten sensors collect temperature data (one outdoor and nine indoor), and eight sensors collect humidity data (seven indoor with one outdoor) and are located on the building, and the recorded data consists of light intensity, daily energy consumption, and the number of seconds from midnight (NSM). The data is recorded every ten minutes for 137 days.
(2) A multi-layer neural network is used for energy consumption modeling, where the input layer is followed by a set of hidden layers, which are connected to an output layer that represents the home power consumption. (2-1) The rectified linear unit (ReLU) is used on the output to solve the problem of vanishing gradient. The system description is as follows: (2-2) Non-linear activation function, in which the ReLU activation is used for non-linearity. (2-3) Layer normalization: to reduce the covariate shift at every layer in the network by fixing the input variance, which is a high modification process, meanwhile training happens at this level. At this experiment, a six-fold speed increase is achieved. (2-4) Weight initialization: The conservation of a steady variance in the network layers is conducted at this level, which improves the outputs and helps through the faster converge network. This method prevents the signal values to exceed to a high value and holds vanishing it to zero. (2-5) Network training: gradient descent with RMSE (between the expected output and the predicted energy consumption) is used for training network as a loss function. Adam optimizer is conducted with 0.005 initial learning rate and 500 batch size. This algorithm produces a momentum and a bias correction to store an average of the previously squared gradients that are exponentially decaying. The proposed system was evaluated as follows: (1) The evaluation process takes place with four models (R 2 -RMSE-MAE-MAPE) to compare the MLP system with. Four hidden layers are used in the best configuration system (MLP) with 512 neurons on each layer and using a dropout on the hidden last layer by a 50% reduction of the neurons. A quicker intersection is produced when using dropouts. Meanwhile, the second-best MLP is also considered with three layers that are hidden and 512 neurons for each layer without using dropout. Findings of the experiment showed that (1) 64% of the determination R 2 coefficient, 59.84% RMSE, 27% MAE, and 27.09% MAPE in the testing set results are conducted. (2) The NSM is the best feature for predicting energy consumptions among the mentioned algorithms. (3) Using only weather information, the proposed MLP displays a better error rate of 61.75% RMSE, and an accuracy R 2 61%, 28.52% MAE, and 28.34% MAPE with around 7 k epochs. (4) The best scenario is with the weather and temporal data. (5) The second best MLP is tested in the best scenario (weather and temporal data), and the results are 63% R 2 , 60.03% RMSE, 27 (8) The best performance of about 2% is resulted from the best scenario without lights by repeating the experiment for three times. (9) Adding temporal data enhances the outputs up to 1% in each experiment. (10) MLP is more sensitive than Gradient Boosting Machine (GBM) to light features, which decreases the functioning by 6%. (11) The temporal information increases the performance of each system, while the light feature decreases the functioning. (12) In corresponding performance, a 10% decrease is noted compared to other classifiers. (13) Lastly, the weather data is sufficient for energy consumption predictions. The validation of the system proposed requires further experiments on various datasets in future studies.
Parsa, Najafabadi and Salmasi [47] proposed a system for controlling residential appliances with the lowest price and consumer satisfaction. The proposed system comprises (1) supervisory controller and (2) secondary controller (central controller), including fuse, power, CPU core, wireless and online transceivers, date and time module, data storage, RS485 port, power measuring unit. The system is also comprised of (3) smart plugs consisting of fuse, network disorders removal circuit, cut-off relay, power and current measurement unit, transceiver, central processor, monitoring unit, date and time module, pushbuttons, power, isolation circuit, reconnection unit, temperature sensor, brute-force search algorithm, conservation voltage reduction, and connection platform. The proposed system works based on the following stages: Firstly, in peak times or high tariffs, a central controller stabilizes the voltage in an appropriate quantity and reduces the input voltage to the devices. Secondly, the central controller transfers the commands to the smart plugs by applying the brute-force search algorithm. Finally, the brute-force search algorithm is utilized to optimize the problem, in which all possible models of consumption that meet the problem constraints are considered with the processor of the central controller.
This system is evaluated by implementing a pilot home as an experiment, and the results of the pilot study showed that (1) In the control system considering time-of-use (TOU) tariffs, the highest consumption is recorded in times when the least electricity prices have been announced. (2) With applying restrictions along with a 10% voltage reduction, the total power consumption is less than the case without any aforementioned conditions and more than the case with only considered restrictions, although the user satisfaction is less in the last case. (3) Customer satisfaction, along with the reduction in consumption and cost, has been obtained. (4) The 10% reduction in Conservation Voltage Reduction (CVR) brings more consumption satisfaction and less cost due to the pilot home implemented system. Figure 10 shows a typical plan of a smart home, including three layouts and a number of sensors for enhancing the living environment, which is relevant to the energy management. For example, a system for monitor indoor areas [79], a system using users' breathing acoustics [80], and a smart system for controlling heating, ventilation, and air conditioning [44]. Each paper separately is reviewed in this section. automatic planning strategy. To test the platform, an experiment in a prototype smart home 2.0 system is designed and implemented to investigate the growth of the Korean Ginseng plant. An intelligent cultivating strategy related to the plant of the experiment is designed to manage the growth of Korean Ginseng by controlling the main environmental factors. The results of the growth of the experiment satisfy the expectation. The privacy and security issues of smart home 2.0 and improvement assessment in the user's quality of life are suggested to be addressed in the future.  [79] that are visualized in layout number 8 by authors, (ii) a system using users' breathing acoustics for getting permission and identification in a smart home [80] that is visualized in layout number 9 by authors, and (iii) a smart system for controlling heating, ventilation, and air Figure 10. A typical plan of a smart home, including three layouts and a number of sensors for enhancing the living environment. Note: (i) a system able to monitor indoor plants and gain automatic control strategies [79] that are visualized in layout number 8 by authors, (ii) a system using users' breathing acoustics for getting permission and identification in a smart home [80] that is visualized in layout number 9 by authors, and (iii) a smart system for controlling heating, ventilation, and air conditioning by a novel random neural network model [44] that is visualized in layout number 10 by authors. The location of sensors is schematically shown in the figure, and they can be relocated.

Artificial Intelligence and Indoor Systems
Chen, Yang, Zhu, Wang, Liu and Song [79] conducted a study on smart home 2.0 that is a novel smart system of botanical IoT framework to monitor indoor plants and gain automatic control strategies considering the user's mood and emotion in a real-time manner. Smart home 2.0 is the second generation of smart homes that unifies smart home and botanical IoT to make a better suited to the indoor environment and enhance the quality of life, resulting in better physical and mental health for home users. The system includes three parts of smart home 2.0 infrastructure (sensors and construction of the greenhouse), cloud platform, and users. The system collects data on ambient temperature, humidity, soil humidity, illumination intensity, CO 2 , O 3 , O 2 , and NO 2 . By analyzing the data, the system runs intelligent monitoring and automatic planning control strategy. AI technology and machine learning techniques are used for better interactions with the user. The implementation of smart home 2.0 consists of six stages: (1) equipment implementation, (2) equipment registration, (3) user registration, (4) authority allocation, (5) equipment configuration, (6) configuration of automatic planning strategy. To test the platform, an experiment in a prototype smart home 2.0 system is designed and implemented to investigate the growth of the Korean Ginseng plant. An intelligent cultivating strategy related to the plant of the experiment is designed to manage the growth of Korean Ginseng by controlling the main environmental factors. The results of the growth of the experiment satisfy the expectation. The privacy and security issues of smart home 2.0 and improvement assessment in the user's quality of life are suggested to be addressed in the future.
Chauhan, Seneviratne, Hu, Misra, Seneviratne and Lee [80] presented a breathing-based authentication, which is a novel framework for home-automation control, which is based on voice or audio used in the entry point of smart devices for identification and permission. It can be used to unlock, activate, and deactivate constrained smart devices, such as smartphones, smart glasses, wearables, sensor-enabled doors, or coffee makers. This framework consists of the target user, feature extractor (using Mel-frequency cepstral coefficients -MFCC), machine learning techniques (long short-term memory (LSTM), support vector machine (SVM)), and user prediction. First, a target user breathes on the microphone of a device (e.g., to unlock it), from which pre-processing of breathing acoustics and items extracting using MFCC (Mel-frequency cepstral coefficients) is done. Then, the items are inserted into a classifier to get the prediction output using long short-term memory (LSTM) and support vector machine (SVM). If the predicted user is the same as the target user, then the identification is successful. The SVM model is used for a comparative baseline. For the experiment, a dataset consists of acoustic samples of three breathing gestures-deep breathing, normal breathing, and sniffing (two quick inhales)-of 10 users collected during three different sessions. The first 50 samples are selected and enhanced to 550 samples by two common data-augmentation techniques of frequency wrapping and amplitude scaling for model training. The remaining 10 original samples (from sessions 2 and 3) are kept for testing. Four Android-based OS devices of three types (two smartphones, a wearable smartwatch, and a Raspberry Pi (IoT)) are applied for the experiment. The results showed that the accuracy of a suitable quantized LSTM-based (long short-term memory-a variant of RNN) deep-learning model is higher than 90%. The delay for user authentication is very small. Besides, RNNs are persuasive lightweight choices for convolutional neural networks (CNNs) for many sensor devices, especially if the application uses temporal items of the sensor. Table 5 shows a summary of the 'artificial intelligence' theme. Detailed descriptions of the relevant practices identified in the AISH literature are presented following the table. A major part of the article reports the utilization of AI algorithms for smart home applications in recent years.
Sundaravadivel, Kesavan, Kesavan, Mohanty and Kougianos [48] presented a new IoT-based system for monitoring nutrition called smart log, which is a consumer electronics product with Wi-Fi enabled sensors for nutrition quantification and a smartphone application that gathers nutritional facts in food and ingredients. The smart log contains a smart sensor board and a smartphone application. A timestamp for recording the meal type, i.e., breakfast, lunch, dinner, and food weighing sensor to measure the nutrition consumed, which is paired with load cells and a microcontroller, is placed on the sensor board. The load cell chosen has the capability of weighing things within the range of 0 to 5 kg. The analog to digital converter (ADC) used for weighing applications has an on-chip programmable gain amplifier (PGA), analog power supply regulator, and internal oscillator. The proposed system of this paper includes the following parts: (1) a perceptron neural network, which is five-layered along with a network-based model called Bayesian that manages meal estimation, is for better understanding of the smart-log, and the prototype uses an open IoT platform in order to analyze and store data.  (6) The Waikato environment for knowledge analysis (WEKA) is used for data analysis in the experimental case study. The proposed system includes four methods as follows: (1) Nutritional value measurement method, by which the food weight is calculated with load cells, nutrition data is obtained by using smart log, future meals are suggested based on remained food, and the food is classified with the machine learning method. A BN structure is used based on the constraint method, in which the nutritional deficiency is decided based on conditional dependencies. The proposed system is evaluated by conducting an experimental case study, and the proposed smart-log system consists of the following two interlinked stages: The first stage is nutrient value and weight data acquisition, where the implementation of the hardware is done with commercially available off-the-shelf (COTS) components. The load cell used for data acquisition is connected to a 24 bit-ADC), which does the weighing process in applications. The ADC output is the serial data output (DOUT) and serial clock (SCK), and the digital output is finished whenever DOUT is low. The amount of pulse changes at SCK controls the inputs and outputs. The minor size, low-power waste, and high-operational speed of smart-log prototype used in the experiment have resulted in designing the prototype with two microcontrollers-the first one, a wireless module placed on the board, and the second one, which is considered as the final prototype, which are conducted without the wireless module in order to transfer data wirelessly to the cloud environment. Model 2 can be used as a "thing" due to the smaller form component in the IoT-based answer in the proposed system. The second stage is nutrition gaining, where a JAVA application for the nutritional value obtained from the USDA database. Calculating the food item's nutritional value before consumption is obtained from the weight of food acquired by the sensor board and the nutritional data recovered from the cloud. Any remained food will be going under some precise calculation. The third stage is obtaining data analysis, where food item classification into different classes is done by using WEKA, an arff (attribute-relation file format) produced by the application will be passed on to the WEKA, and the results of the classifier is shown by a JAVA application on a web page. The results of evaluation experiment showed that the nutrition prediction accuracy of smart-log results in 98.6% accuracy, and the proposed smart-log system in this paper could be used for adults as well as infants, and the system along with analyzing the meal content can have suggestions in order to decrease unbalance diet. It is suggested to track user activities for precise automated diet prediction for adults integrating smart-log with the physiological observing mechanism.
Erol, Majumdar, Lwowski, Benavidez, Rad and Jamshidi [49] presented a new independent home deep neural network object-tracking mechanism for non-GPS environments using pattern recognition and machine learning techniques for home-based human-robot interaction (HRI) system. The system consists of an assistive robot (Kobuki Turtlebot 2, modified with ASUS Xtion Pro Live RGB-D camera, powered with ODROID XU4 microcontroller, and BOSCH BND055 IMU installed camera), Amazon Echo device, Amazon service for Alexa, Amazon web services, Alexa custom skill software, machine learning techniques, and AI methods (different algorithms like deep convolutional neural networks (CNN)). When an elderly user requests for a service or task by voice, the task is divided into smaller elements of action, location, and object. A deep neural network object detector inspects several possible matching objects and displays them on the screen of the robot. When a certain object is found, it is asked from the user to confirm it. The robot then completes the task using its physical control abilities. For the system's vision-based object detection and mapping, the issues of multi-object detection, object ownership clustering, object tracking, object mapping, object database creation, determination of optimal action sequence, and environment obstacle avoidance are addressed. The system is evaluated, with an experiment, (1) to process the rate for object detection and tracking, and (2) to track the confidence gradient. First, tests are performed using a direct USB 2.0 connection from the desktop computer to the camera onboard the robot. The second tests use images transfers over Transmission Control Protocol for Robot Operating System (TCPROS) on a Wi-Fi connection from the robot to the desktop computer. A resulting plot of the raw and filtered confidence level of a chair detected, while the camera frame moves closer, showed that raw confidence level of a special object that is tracked by the multi-object detector is noisy; while the filtered data showed a general boosting trend of confidence, providing a true positive detection of the object. This system has promoted the functionality of the localization and navigation of the home robotic assistant. The integration of all the decoupled systems is suggested for future studies to make a comprehensive robotic assistant in a home. This robotic assistant can also be tested in different conditions to gather data and improve the algorithms.
Winnicka, Kęsik, Połap, Woźniak and Marszałek [50] proposed multi-agent gamification that tends to assign tasks to family members. This system consists of environmental sensors, such as motion sensors and gas sensors, smartphone or smartwatch, camera, and machine learning algorithms, such as backpropagation for numerical values, or 'RMSProp' algorithm for graphical data. Gamification is, in fact, a home management system that gives tasks to the family members or informs them about some situations. For example, it alerts when something is broken and needs to be repaired. Each user administrates the database, based on which the system works, and he/she is able to edit the database. Every task has some features that are defined to the system, and they are name, frequency, repetition, occurrence, and prize. The prize is given by the system based on a competition, which is between family members or between homes, and as doing task gives them scores, there are factors, such as level of difficulty, the highest and the lowest number of points to win, duration of activity, and priority. The idea of being multi-agent is based on this fact that there should be a wide range of agents in every area of the home to be responsible for a certain task for collecting data about it and is able to send and get data from the database. Every agent consists of sensors and data processors. Machine learning is used in this system in order to make the analysis process faster. The machine learning method works based on two groups of neural networks: (1) graphic processor and (2) numerical value processor. The system works based on the following steps: (1) Every agent that is located in a certain area gathers the data by its sensors and processes it. (2) The processed data then is compared with the data that was previously gathered, and it is sent to the database, in case there is any discrepancy. (3) If the transferred data meets the minimum requirement of the task defined in the system, the database will resent the data to the agent, and the agent will inform the person that the task is done. Then, informs the person about the rest. The system is evaluated in two groups of experiments. Three families filled the questionnaires. The evaluation by the survey depicts that the system performance of giving tasks was very good. The gamification results showed that the participants had lots of fun, but in some cases, its effect of enthusiasm for getting more score had some negative results. For one, the children tended to water the plants without any task. One the other hand, its performance in terms of functionality got the lowest rate from the participants' point of view. For example, the agents turned the lights on during the sleeping time at night. The whole system is suggested to be developed by adding further functions in future studies. La Tona, Luna, Di Piazza and Di Piazza [42] aimed to find anomalies by using the network operator in the security of home area network and is a two-tier intrusion detection system, which takes advantage of machine learning method in order to divide the data gathered from monitoring and looks for strange anomalies at the data center. The main algorithm that is used in this system is a data classification algorithm, which is called a naïve Bayesian classifier (NBC). The simulation components include (1) Wireless sensor network that contains: (1-1) four nodes and border router (as a home gateway) that is based on the ContikiOS protocol. (1-2) sensor nodes and a boarder router (as a sink).
(1-3) the simulation is done in the simulator called Cooja. (2) The Wi-Fi network, including (2-1) four nodes and (2-2) the simulated using Omnet++. The proposed system works based on the following steps: (1) The home gateways include agents, which are installed on them and mounted on the users' properties. (2) The behavior of local smart devices and the gateway is monitored by the mentioned agents. So, data of the different interfaces of the home area network is gathered by agents. (3) The gathered data is then examined in order to identify any attack. (4) If an anomaly is detected, it will be annotated with extra information about the home area network devices, which are connected to the detected packet flow. The performance of the proposed method is evaluated by simulation.
In the first step, the traffic, which is sent by the end nodes, is simulated, and the performance of local anomaly detection is tested by that data. Secondly, annotated anomalies are used to link strange events. The findings of the simulation indicate that local anomalies can be useful in terms of signs of potential attacks for identification of the strange act of the endpoints. Figure 11 shows a typical smart home plan based on the relevant papers of the theme discussed in this section. The plan includes five smart systems: to recognize objects and activities to identify pattern behavior [81]; to control the activities performed in a smart home [82]; to rack objects for non-GPS environments [83]; to select music automatically according to users' emotions and moods [64]. As shown in Figure 11, Saralegui, Antón and Ordieres-Mere [81] proposed a framework to detect indoor occupancy and pattern behavior of the elderly based on already existing environmental monitoring systems in smart homes. The system consists of the physical environment (temperature sensors, CO 2 sensors, relative humidity (RH) sensors), WSN, central node, cloud-based data warehouse, machine learning models (supervised linear and non-linear techniques), and Linux-based Security Manager Protocol (SMP) server. The environmental data is acquired by sensors. A central node for acquiring such data and uploading it to a database in the cloud is used. The level of CO 2 is a key factor in determining the occupancy. Data analysis for relations between variables and the occupancy is done using several classification models, which have been trained after pre-processing the data. For the evaluation of the framework, a model primarily designed for HVAC control that does not require high sampling frequencies is used. The data used for the experiment includes an entire year entry, with one entry every ten minutes. The data is for the monitoring of five different rooms with thirteen residents. The results showed that the most accurate models achieved with the set of trained classifiers have an accuracy of 80%. The accuracy obtained by the model gives confidence in the identification of binary occupancy in the rooms. Building context, real building interconnections, and the airflow through adjoining rooms, windows, openings, ventilation ducts, which may change the level of humidity or CO 2 , are suggested for future researches.
Kaldeli, Warriach, Lazovik and Aiello [82] tended to manage and control the activities performed in a smart home by means of smart devices or an introduced prototype. The proposed system includes a brain-computer interface (BCI) for disabled people; normal user interface like a smartphone, tablet, or computer for normal people; Radio-frequency identification (RFID) tags attached to the foods in the fridge; door/window sensors; temperature and humidity sensors; luminosity sensors; wearable sensors, GPS, fall detectors; and web service (WS) gateway. Following come a number of features about the system that are worth mentioning: An architecture in the context of the European smart home projects for All (SM4ALL) with emphasis on service composition is implemented in this paper, and the architecture is based on Service-Oriented Architectures (SOA) principles and supports the performance of runtime service composition. The architectural system in SM4ALL consists of three main layers-pervasive layer, composition layer, and user layer. Using standards like open service gateway initiative (OSGi) and universal plug and play (UPnP) leads to the platform abstraction of complicated reasoning on the available services along with the BCI user interface interaction. The architecture applied is based on device simulation in OSGI UPnP and dynamic configuration through components inter-communicating with a constraint satisfaction problem (CSP) AI plan. The implementation and visualization are conducted by a virtual home with simulated home services, and the platform is modeled on Google SketchUp. The system operation is as follows: Firstly, default is set for the devices in the home, which is called smart for all architecture (SM4ALL). Then, the user is connected with the devices via the user interface or BCI. So, a number of commands can be asked either altered from the device or prototype. At the final stage, the web service (WS) gateway collects the data gathered by the sensors. At the same time, the required action by the user is sent to the device or the prototype. For future studies, a suitable and powerful interface for designing goal and service descriptions is suggested to be considered. The development of an efficient planning algorithm, which can handle concurrency of tasks, is suggested too. The last sub-group of articles focus on health care and are important since these systems are adopted and can be integrated with EMSs. Table 6 shows a summary of selected articles within the AISH database.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 26 of 45 Figure 11. A typical smart home plan, including four layouts, which take advantage of a number of sensors. Note: This smart home integrates 5 smart systems, including: (1) a system able to recognize objects and activities to detect indoor occupancy and pattern behavior of elderly [81] that is visualized in layout number 4 by authors, (2) a system able to manage and control the activities performed in a smart home [82] that is visualized in layout number 5 by authors, (3) a system for independent objecttracking for non-GPS environments in a home-based human-robot interaction system [83] that is visualized in layout number 6 by authors, and (4) a system able to select music automatically according to users' emotions and moods [64] that is visualized in layout number 7 by authors. The location of sensors is schematically shown in the figure and can be relocated. Figure 11. A typical smart home plan, including four layouts, which take advantage of a number of sensors. Note: This smart home integrates 5 smart systems, including: (1) a system able to recognize objects and activities to detect indoor occupancy and pattern behavior of elderly [81] that is visualized in layout number 4 by authors, (2) a system able to manage and control the activities performed in a smart home [82] that is visualized in layout number 5 by authors, (3) a system for independent object-tracking for non-GPS environments in a home-based human-robot interaction system [83] that is visualized in layout number 6 by authors, and (4) a system able to select music automatically according to users' emotions and moods [64] that is visualized in layout number 7 by authors. The location of sensors is schematically shown in the figure and can be relocated. Table 6 shows a summary of the 'care system' theme. Detailed descriptions of the relevant practices identified in the AISH literature are presented in this section.

Care Systems
McWhorter, Brown and Khansa [51] discussed a wearable health monitoring system for post-traumatic stress disorder. The system tends to decrease the nightmares of those who suffer from post-traumatic stress disorder (PTSD) by monitoring sleep conditions. The wearable health monitoring system for PTSD, which includes (1) Wearable device for monitoring the sick people called Fitbit charge HR (including an optical heart rate monitor, 3-axis accelerometer, altimeter, and a vibration motor); (2) A hub controller; (3) Different types of countermeasures suppression, including smart outlets, oil diffusers, thermostat, lighting, and audio systems; (4) Waking up tools like wearable device for vibration alert and lighting smart outlets; (5) Machine learning tools for the optimization of countermeasure selection without the involvement of the patient or doctor (the system has the ability to optimize the selection of counteractions via machine learning and distance management). The system has four parts of monitoring, suppressing, waking, and exiting. The system consists of four stages: (1) Collecting data (from hardware sensing platform); (2) Creating information (by software processing); (3) Making meaning (by information visualization); (4) Taking action (so-what layer). There are some risks and limitations that appeared for this system as: (1)  Hassan, El Desouky, Elghamrawy and Sarhan [52] introduced a smart context-aware framework called Intelligent Hybrid Context-Aware Model for Patients Under-Supervision in Home (IHCAM-PUSH) for patients monitoring at home using the hybrid architecture of both local and cloud-based components in case of internet disconnections or cloud problems. IHCAM-PUSH consists of four layers: Layer 1: ambient assisted living (AAL), which contains MySignals platform, ambient sensors and devices, and data collector. It manages a large number of AAL devices, monitors, and records essential signs, activity, medication, location, and ambient conditions. Layer 2: outpatient local monitoring module (OLMM), which contains high-level feature provider, high-level feature aggregator, connectivity checker, local database, and personal assistive services. It is responsible for obtaining and processing data collected by AAL. Layer 3: outpatient cloud monitoring module (OCMM), which consists of the patient personal cloud, medical services provider cloud, remote monitoring cloud. It acts as a personalized knowledge discovery module for each patient and is monitored by IHCAM-PUSH when the connection to the cloud system is valid according to the status of the Connectivity Checker (CC) (Online). Layer 4: hybrid classification model (HCM), which consists of knowledge discovery cloud, cloud classification model (online mode), and a personal classification model (offline mode on the local side). The HCM is a hybrid module that consists of components on the cloud and locally. It obtains the best classification results by reducing false alerts regarding the benefits of cloud and local architectures and avoiding their disadvantages. Experiments are conducted to monitor three patients suffering from different diseases with measurements every 15 min for one year for every patient as a source of big data. Experiments are performed to assess the function of the proposed IHCAM-PUSH with different kinds of classifiers. The results showed that this model is successful, effective, fast, accurate, with a minimal fault in real-time big data acquisition and analysis, patient monitoring, and emergency cases (high blood pressure, irregular heartbeat).
The findings of the experiment showed that applying sampling techniques alongside Spark enhances the accuracy of a classification and reduces overall error rate, especially for minority (emergency) classes. The best classifiers are decision tree (J48), random forest (RF), ripper classifier (JRip), and naïve Bayes' (NB), respectively, that allow the best success rates in IHCAM-PUSH.
Based on the experiment, the best sampling techniques are class balancer (CB) and synthetic minority over-sampling technique (SMOTE). Focusing on the operation of this framework for other diseases and further context modes are suggested for future study.
Austerjost, Porr, Riedel, Geier, Becker, Scheper, Marquard, Lindner and Beutel [53] developed a laboratory voice user interface (VUI) to integrate laboratory devices into an IoT environment in order to control them and read out their specific data. The system is equipped with photometer, VA-enabled device, cloud services (voice model and voice server, skill host, device shadow), local services (device server), laboratory devices, natural language processing (NLP) algorithms (to process speech inquiries and create speech output), and visual programming tool Node-RED 0.15.2 (for the integration of devices to IoT). Giving speech command by an operator, recognizing and recording speech by VA-enabled device, processing speech by cloud voice service, converting changes in the cloud service to commands by local services and device server, and reacting to the commands by lab devices are different stages of the system. To verify the system, some examples of speech commands for device interaction are performed, and the mean recognition accuracy of all performed phrases that lead to the same action is assessed. Analysis of the speech examples showed that the standard setting of this system proves a high mean accuracy (95% ± 3.62) of voice identification. This solution makes a hands-free device control and will be an assistant to physically impaired or low vision users. Security solutions that reflect common privacy rules are suggested to be worked on for future study.
Zhu, Diethe, Camplani, Tao, Burrows, Twomey, Kaleshi, Mirmehdi, Flach and Craddock [54] suggested a general platform, which combines complementary data from sensors. The platform monitors health conditions and consists of (1) Environmental sensors, all of which make a Zigbee or 6LoWPAN-based wireless sensor networks, video sensors (RGB-D), which are connected to the Internet, and Bluetooth wearable sensors (which are low energy and have dual-accelerometers) connected to smartphone or tablet that are connected to a cellular network, (2) A home gateway, and (3) A data hub, environmental sensors collect the data of humidity, temperature, quality of air, level of noise, luminosity, occupancy, door information, and energy consumption accurately. Video sensors are RGB-D devices and are placed in different areas of the home. These sensors are supposed to gather the modulation or inflection of the voice of the residents, the residents' manner of walking, and their 3D pathway. Wearable sensors work based on dual-operation mode and make 50-Hz accelerator measurements in addition to localization services. Three sensing technologies are integrated to build the proposed platform, and the system works based on the following steps: Firstly, sensors (environmental sensors, video sensors, and wearable sensors) gather all the necessary data about the residents. Secondly, a gateway collects the data gathered from all sensor groups, secures the collected data in terms of privacy, and keeps the time synchronization. Finally, a data hub gathers the data by the gateway and controls the accessibility like a data library. Figure 12 presents a suggested system that should be further developed and examined adopted from Zhu, Diethe, Camplani, Tao, Burrows, Twomey, Kaleshi, Mirmehdi, Flach and Craddock [54]. Figure 13 shows a typical plan of a smart home, including: (1) a system for Parkinson's disease screening [55]; (2) a system for gathering complementary data [54]; and (3) a system to decrease the nightmares [51]. Further information of a disease screening has been discussed by Chiuchisan and Geman [55] since they proposed an intelligent system for monitoring people who are suffering from Parkinson's disease in their homes and takes advantage of (1) a mouse equipped device that has three sensors for measuring pressure and one sensor as an accelerometer. The mouse is able to sense the patient's motions. (2) A system for screening that includes ANN classification algorithms consisting of the multilayer perceptron and a radial basis functions network and the adaptive neuro-fuzzy classifier.
(3) A web-based monitoring portal. The system works based on the following steps: (1) The first stage is gathering tremor data from the patient motions. So, a smart mouse is used to gather the necessary data based on the patient's motions and to process the data by the accelerometer. Both hand movements and gravitational force are gathered by the device. (2) The processed data is then sent to the local server by means of Bluetooth. (3) Then, feature classification and extraction are done by means of ANN to find out whether the person is a patient or not. (4) Finally, the analyzed data is sent to doctors and specialists in order to inform about the patients' situation. So, the doctor can prescribe medicine or treatment. This study has tested 10 patients and 10 normal people. In this evaluation, the smart mouse and the computer have been connected to each other by means of Bluetooth. Nonlinear dynamic tools have been used to analyze the gathered data from the smart mouse. The patient is also able to chat or have a video call with his doctor, and it is not difficult to work with the app because it does not need special computer skills. It is suggested to extend the system to other neurological diseases in future studies.  Figure 13 shows a typical plan of a smart home, including: (1) a system for Parkinson's disease screening [55]; (2) a system for gathering complementary data [54]; and (3) a system to decrease the nightmares [51]. Further information of a disease screening has been discussed by Chiuchisan and Geman [55] since they proposed an intelligent system for monitoring people who are suffering from Parkinson's disease in their homes and takes advantage of (1) a mouse equipped device that has three sensors for measuring pressure and one sensor as an accelerometer. The mouse is able to sense the patient's motions. (2) A system for screening that includes ANN classification algorithms consisting of the multilayer perceptron and a radial basis functions network and the adaptive neuro-fuzzy classifier. (3) A web-based monitoring portal. The system works based on the following steps: (1) The first stage is gathering tremor data from the patient motions. So, a smart mouse is used to gather the necessary data based on the patient's motions and to process the data by the accelerometer. Both hand movements and gravitational force are gathered by the device. (2) The processed data is then sent to the local server by means of Bluetooth. (3) Then, feature classification and extraction are done by means of ANN to find out whether the person is a patient or not. (4) Finally, the analyzed data is sent to doctors and specialists in order to inform about the patients' situation. So, the doctor can prescribe medicine or treatment. This study has tested 10 patients and 10 normal people. In this evaluation, the smart mouse and the computer have been connected to each other by means of Bluetooth. Nonlinear dynamic tools have been used to analyze the gathered data from the smart mouse. The patient is also able to chat or have a video call with his doctor, and it is not difficult to work with the app because it does not need special computer skills. It is suggested to extend the system to other neurological diseases in future studies.
Enshaeifar, Barnaghi, Skillman, Markides, Elsaleh, Acton, Nilforooshan and Rostill [56] presented a system to help the caregivers to assist dementia patients and to stop risk increasing at the earliest times of need. The proposed system takes advantage of a collection of sensors, which are Enshaeifar, Barnaghi, Skillman, Markides, Elsaleh, Acton, Nilforooshan and Rostill [56] presented a system to help the caregivers to assist dementia patients and to stop risk increasing at the earliest times of need. The proposed system takes advantage of a collection of sensors, which are passive environmental, wearable technologies, and medical devices, along with interactive devices to obtain real-time data based on environmental conditions information in the TIHM that collects real-time data of the health situations of people, the advanced message queuing protocol (AMQP) for communicating with the TIHM backend system, a NoSQL Mongo database for validating the data, HL7 for connecting healthcare systems (health level-7 (HL7) is an international standard for clinical and managing data, which transfers among software application), JSON validator (schema) as data validation, cleaning, assembling, and raw data filtering algorithms to pre-process, and a real-time systematic interpretation with abstraction and pattern recognition methods. Figure 13. A typical plan of a smart home, including three smart systems, for enhancing the living environment: (i) a system for Parkinson's disease screening [55] that is visualized in layout number 1 by authors, (ii) a system for gathering complementary data to make a dataset that can manage different health conditions by monitoring [54] that is visualized in layout number 2 by authors, and (iii) a system that can decrease the nightmares of those suffering from PTSD [51] that is visualized in layout number 3 by authors. Note: The location of sensors is schematically shown in the figure and can be relocated. PTSD, post-traumatic stress disorder.
The proposed system works based on the following stages: firstly, data derived from multiple publishers, which is based on real-time data collection, is delivered to the TIHM system, and an advanced tool analyzes the data and creates notifications considering patients' situations. Secondly, in detail, at first, environmental data, such as temperature and humidity, are collected with home sensors. Meanwhile, medical information is obtained from wearable and medical devices. After that, all the data are recorded and sent to the correlated gateways through Wi-Fi and Bluetooth. Gateways transfer data to the backend system of companies with GPRS, SigFox, or home broadband. A standard JSON data model is used and followed by all the participating companies for the TIHM. Thirdly, the data analysis process begins data validation with the data model, and then the data is sorted in the Mongo database. In the next step, machine learning algorithms and multiple data analysis are used to create notifications for healthcare providers. At the fourth stage, "reminder texts" and "flag resources" are the conducted outputs of data analysis for patients and companies, respectively. The messages in reminder are generated in case of an incomplete or missing measurement and are created with machine learning algorithms and are published to the message queue (MQ). Clinical, environmental, and technical notifications are covered in flags. Finally, the user interface layer or integrated view (iView) collects real-time data every 20 s. Goals achieved in the TIHM project are that (1) an algorithm of rule-based reasoning for vital measuring to provide a clinical flag is developed. Jaouhari, Palacios-Garcia, Anvari-Moghaddam and Bouabdallah [57] implemented smart home for the next generation by using diverse data, such as security, healthcare, and energy consumption, collected from different sensors and house appliances for management, security, and visualization purposes. The proposed system takes advantage of the following components: home area network (HAN); a user interface to show the trading data with secure access to the different services; a notification system to inform people, along with an android application to communicate via Bluetooth low energy (BLE); ZigBee protocol; smart meters. In the application layer, the data exchange tool is encrypted with AES128 for integrity and security purposes, and BLE is used to communicate with a gateway to either read, write, and enable notification receiving for the energy service part; Node.js server (as a smart gateway); EMS to reckon control schemes based on measured data collected from sensors and smart meters; Representational State Transfer -Application Interface (REST-API) and several stacks for communication to interact with smart devices in the gateway. The medical devices, such as pulse and muscle sensor, temperature sensor, fall detection sensor working with an accelerometer, and energy-related devices, such as smart relays smart plugs and energy harvesting sensors; LED and servo motors for proof of concept (PoC); the Kamstrup OMNIA suite in energy monitoring and control service to provide efficient interoperability with a network of Advanced Metering Infrastructure (AMI); a home gateway for energy created by a Danish company called Develco with embedded ZigBee attached to an ARM9 CPU that maintains a Linux OS; and a JAVA EE application ported with GAMS solvers are utilized to go through the optimization algorithms. System evaluation and operation stages: At the first step of the proposed system validation, two elementary algorithms related to the fall detection and temperature evaluation are developed. Fall detection is detected by a three-axis accelerometer ADXL330 board, and the algorithm is proposed to detect a quick variation of accelerometer and sends an alert to the application layer, and values are collected every 2 s. A LED light is also lit in a fall detection situation. A button with a 30 s-time limit is given to the patient for terminating fault alerts. The values in a calibration function are gathered every 1 ms. Well-being monitoring is conducted by pulse sensor and body temperature sensor, pulse sensor takes age and activity features and sends alert to health providers in case of abnormal heartbeat (beyond 60-100 bpm), and the same procedure takes place in temperature sensor with a body temperature above 40 • C. Energy monitoring is operated with an EMS by gathering information on task operating status, user's demand, and signals collected through the AMI system. The physical layer in AMI consists of smart meters and data concentrators in order to collect the measured data and provides a dataset with time steps that are synchronized using a network time protocol (NTP) server. The communication between data concentrators and smart meters is based on EN 13757-5 standard that applies a radio mesh topography. The utility layer in AMI combines the logical software presented by the Kamstrup OMNIA suite with the AMI network. This software communicates with a data concentrator over the Internet and employs all the necessary back-end processes for system configuration along with on-demand operation performing to achieve the periodic records. A multi-criteria decision-making issue is solved by EMS with balancing energy saving and a comfortable lifestyle. The reliability of the system is conducted by finding undetected sensors and using a fault tolerance database. In case of missing or undetected sensor, an alert is shown on the visualization interface. To provide high availability and redundancy to a dataset in case of the primary database, log goes down, and the NoSQL database MongoDB called 'replica set' is implemented that enables the recovery of data by creating copies of such data on multiple database servers. The implementation process is as follows: Hardware implementation is made by using smart plugs on appliances, and their energy consumption data is transferred to the energy home gateway via ZigBee. A smart meter measures the total consumption and is transferred to a data concentrator to provide the utility with the demand description for the billing scheme. The application features a RESTful API to allow acquisition and actuation of data achieved by smart meters. On the well-being hardware implementation, a PoC platform of e-health is developed. At first, the patient's vital signs are collected from sensors and then are connected to 2 Arduinos UNO; Arduino 1 measures the heart rate and activity of muscles and also detects the patient's distance to the platform by using an ultrasound sensor. Green and red LEDs are used, showing heartbeat frequency and abnormality, respectively. Arduino 2 measures body temperature and detects a fall. A red LED is also provided in case of fall detection. A local interface for the user is presented using two LCD displays. Raspberry pi, as a home gateway, links all of the sensors and gathers their data from Arduinos through a USB port and also executes the communication with the energy gateway. Data visualization is provided by a web page showing graphs, which represent the sensor's data. Energy and health data are visualized separately on two different tabs on the web page. Furthermore, a tab for teleconsultation is also included for remote consultation with a doctor. Tele-consultation is provided through a WebRTC multimedia session with the doctor and wearable medical sensors for sending health data simultaneously. With the home energy management system (HEMS) implementation, two tasks are carried out in this system-firstly, the gateway gathers data in the MongoDB database, and essential interfaces are provided subsequently, and next, the encrypted communication is established by a data concentrator with the head-end metering system, which provides a short-term and long-term memory storage of energy information. Following this, the on-demand calculations are also stored by another MongoDB database for up to three days. A database of Microsoft SQL records the measurement history to be accessed by an API presented by the manufacturer. The LabVIEW-based application disputes on-demand measurements from the advanced metering infrastructure (AMI) network and logging alerts, events, or errors. The control unit application sends signals and set points to actuators and device controllers. Three most important information conduits are connected to the HEMS from forecasting (weather and load forecasting) and electricity price services. Then, optimum scheduling is provided and transferred to the gateway and is implemented in every device. The designed architecture facilitates the implementation of two services (healthcare and energy management) at the same time. Its validity is tested in a lab-scale environment using real systems and appliances. Linking the smart home with third parties and developing the idea of the smart city is provided in this paper. Therefore, tracking the users' motion profile and comparing different levels of physical activities with healthcare providers' recommendations are achieved simultaneously. The main challenges faced by this study are (1) the interchanging process of different data formats (health and energy) and concentrating them and (2) applying deeper analysis for security and privacy services. In future works, a significant amount of data in case of having extra services, such as management or entertainment, can be calculated by using big data and fog computing.
Pinheiro et al. [84] proposed a solution to distinguish the IoT devices' performance and events in a smart home scenario and to characterize the behavior of IoT devices representing in smart homes, which involves resources with the low computational process and conserve consumers' privacy. Five algorithms for traffic classification are used at the evaluation level, which are k-nearest neighbors (k-NN), decision tree, random forest, support vector machine (SVM), and majority voting. Besides, python scripts with the use of the panda library are utilized in this paper. A prototype is implemented for IoT devices identification by using a three-stage process, as follows: (1) IoT/non-IoT device identification; (2) Specific IoT device identification; and (3) IoT device events identification. A binary classifier and a multi-class classifier are used for device type identification and type of device determination, respectively (a type of device is a motion sensor, camera, etc.). At the final step, a multi-class classifier detects the event, which generates the traffic. The following are some features of the proposed system: (1) The statistical mean, the standard deviation, and the total bytes transferred over a window in one second, extracted from the encrypted traffic, are used in this system in order to get the IoT device characteristics and make the transmission control protocol (TCP) vectors unnecessary.
(2) Internet traffic is generated from IoT devices, with metadata patterns, such as the packet length to be used in data classification. (3) A one-second window for real-time classification enabling is used. (4) The metadata includes the packet length attributes for characterization. (5) The bias existing among different classifiers is investigated, along with the statistics for characterizing the normal behavior of consumer IoT devices. In this paper, normal behavior is conducted as the device expected function, which is defined by the vendor. (6) The statistics that are used by the solution proposed are calculated in a one-second window from real-world generated traffic. (7) Forest tree-based algorithms are for analyzing the contribution of each device identification statistics. The main contributions are as follows: a solution for privacy-preserving of the IoT devices is provided; low computational consumption of IoT traffic classification encrypted for consumers; the computational performance of the classifier in the process of IoT devices identification is quantified. (8) Statistics that are computed from the packet length metadata over the one-second window is used. (9) Simple operations for statistics are conducted by (9-1) Mean, which is a good scale of the central leaning toward the length; (9-2) The standard deviation, which provides the deviation from the mean. (9-3) The numbers of bytes, device data fluctuations that are transmitted. (10) The median and the mode are used as a central tendency measure in the consumer device's characterization. A prototype is implemented for IoT devices' identification by using a three-stage process: First step, IoT/non-IoT device identification. The second step, specific IoT device identification. Lastly, the third step, IoT device events identification. A binary classifier and a multi-class classifier are used for device type identification and type of device determination, respectively, (types of the devices are motion sensor, camera, etc.). At the final step, a multi-class classifier detects the event, which generates the traffic. The evaluation of the proposed solution is conducted with traffic from two testbeds, in real-world and five traffic classifiers, and the results obtained are validated with hypothesis testing. A packet length of each device is generated and separated; meanwhile, the mean, the median, and the mode in bytes are calculated. The mean calculates and differentiates the devices in the best way above the other statistics. Traffic is collected and analyzed from devices that are off-the-shelf and connected to the testbed. The user interaction with devices can be identified by the proposed solution. Panda library is used in python script in order to calculate the statistics (packet length). It is also used to group the traffic, which is generated by devices into one-second windows. The mean and the packet length standard deviation and the number of the bytes in every group are calculated. The quantification of the contributing process of statistic to each device identification is conducted by the forest tree algorithm. The results from system evaluation showed that: (1) the proposed solution can identify events and IoT devices, by using voice commands to smart assistants. It is also able to differentiate between non-IoT devices and IoT devices. (2) 96% accuracy in the identification of devices is obtained by the random forest algorithm, 99% accuracy in distinguishing between IoT and non-IoT devices, and 99% accuracy in recognizing IoT-based devices events are achieved. (3) Among the five algorithms conducted, the decision tree algorithm has shown the lowest response time in device identification. The unsupervised learning usage to remove the re-training process and human interaction are suggested as future investigations into the ability to deal with uncertain devices.

Directions for Further Studies
This article presented the results of quantitative analysis as a part of a systematic review, and a comprehensive content analysis was carried out on the AISH literature, offering a foundation for developing new frameworks or systems for smart homes. This review would help system designers since it presents state-of-the-art technologies and might reveal contradictories or any inconsistencies in the smart home literature. This review also showed how fragmented is the literature of smart home in terms of technologies applied to smart home development. This paper mainly synthesized diverse directions or outcomes and offers researchers the smart home state-of-the-art snapshot. The content analysis showed limitations of existing gaps in the smart home literature and referred to future research directions in line with EMSs, applications of AI, and aged care needs, which have been further discussed in the following sections.
The analysis showed that there are valuable practices on utilizing IoT for implementing smart home concepts for different purposes, such as energy management, health care, and enhancing people's comfort at home. However, there is an urgent need to develop the applications of AIs in smart homes for generating alternatives and decisions to the user and merging IoT-based systems to offer multipurpose systems for increasing the smart home adoption rate. For example, care systems are a must for elderly people at home, which is why care systems are growing and rapidly advancing. This can be an opportunity not only to learn from these systems but also to integrate EMSs with them to increase the adoption rate. Moreover, it is essential to collect accurate data in a real-time to monitor and initiate dynamic route changes. To collect such data, future studies are needed to develop pervasive tools to capture the behavior of home occupants. For example, a tool could be developed to identify hot spots of the routes daily used by the elderly. Moreover, there is a need to develop/enhance AI and special analysis algorithms that could generate dynamic routes based on multi-modal and real-time data from such data collection tools.
Geographic information systems (GIS) also can be a platform to link and show all activities at home and outside, which are helpful for monitoring purposes and data mining using AI algorithms. Current innovative data collection methods, such as the livability app in Throne et al. [85], can be developed in a GIS environment. The proposed GIS-based app should be able to collect georeferenced text, image, voice, and video data. Voice data will be converted to text. The collected data sets or their text translations will be categorized to find the following complain categories (find words with higher relationship to one complain category): (a) Attractiveness (Which words mostly show attractiveness problems? Which images can be categorized for this problem category?); (b) Accessibility (Which words mostly show accessibility problems? Which images can be categorized for this problem category?); (c) Connectivity (Which words mostly show connectivity problems? What images can be categorized for this problem category?); (d) Safety (Which words mostly show safety problems? What images can be categorized for this problem category?). The app should be able to map these words and complain categories. In doing so, the user can find hotspots for the words categorized in the above-mentioned problem. In this way, the user will find locations of higher concentration of these problems on the map. There is a gap in the AISH literature, which is the connectivity and integration of different smart devices and datasets coming from real-time sensors, building information modeling (BIM), and GIS. Smart homes can give more processed and useful information to occupants if they are connected to smart building systems as well as smart cities. Smart cities are advancing and connecting to a digital twin and a wider range of sensing devices and datasets [86].
The potential of computer vision in smart home applications is limited by the types of cameras. However, in order to collect an accurate 3D model of the environment considering the topographic situation of the ground, a combination of mobile, terrestrial, and airborne point cloud data sets seems essential. A handheld scanner, such as a Zeb Revo tool generating point clouds, can be used for future studies, which can be processed further to find short paths for mobility-impaired people [86]. The collected data by a Zeb tool, demonstrated in Figure 14a,b, are used in fieldwork by two co-authors for indoor modeling of the buildings for construction [87,88]. An example of terrestrial point clouds is also demonstrated in Figure 14c. Another important factor for developing such a model is to develop it within a GIS environment so that spatial analysis techniques can be applied to take advantage of georeferencing. Ground topographic data is required for the identification of the constraints in routes that decrease the level of mobility for the elderly. Lidar data as an accurate 3D data can be used for this purpose. To be able to use such data for determining the accessibility and connectivity of the network, the following proposed steps are suggested: (a) extract ground points from lidar data (such as the work done in Shirowzhan et al. [89]). The extracted ground points then will be processed further to find slopes. (b) identify obstacles.
collected data by a Zeb tool, demonstrated in Figure 14a,b, are used in fieldwork by two co-authors for indoor modeling of the buildings for construction [87,88]. An example of terrestrial point clouds is also demonstrated in Figure 14c. Another important factor for developing such a model is to develop it within a GIS environment so that spatial analysis techniques can be applied to take advantage of georeferencing. Ground topographic data is required for the identification of the constraints in routes that decrease the level of mobility for the elderly. Lidar data as an accurate 3D data can be used for this purpose. To be able to use such data for determining the accessibility and connectivity of the network, the following proposed steps are suggested: (a) extract ground points from lidar data (such as the work done in Shirowzhan et al. [89]). The extracted ground points then will be processed further to find slopes. (b) identify obstacles.
After all the data comes from the accessibility, the connected routes achieved from texts and lidar data sets are collected and mapped, and an essential part is to compare these maps in terms of similarities. A union of the problematic areas from all maps could be a solution to overcome the possible observed dissimilarities among the maps. To analyze the collected text data spatially, there is a need to develop a GIS-based tool that can find and map words in categories of liked, disliked, and others mentioned by the elderly. In doing so, scholars can move further to identify hot spots of disliked areas, which are the locations that need considerations for improvement activities by city councils. Other technical developments for the GIS-based data analysis include the widget development for near real-time spatial data mining for the identification of hot spots of most used routes by the elderly and applying machine learning algorithms (such as the ones used by Shirowzhan and Trinder [90,91]) for finding coarse and fine obstacles. Considering all the information derived from the abovementioned layers on the 3D models, appropriate paths for mobility-impaired people will be identified and will be ready to be imported to the navigation algorithm. The last GIS-based suggestion is to develop a flexible navigation algorithm. The identified 2aCS routes will be used in our developed constrained-based navigation algorithm. Using such an algorithm for online navigation will enhance the capability of current navigations to find the most appropriate routes for mobility-impaired elderly. This algorithm has the flexibility to obtain updated data regularly.
This article presented different typical plans using different technologies, but there are serious risks associated with these technologies. For example, the effect of living in highly dense wireless environments and many electronic devices working close to the body has not been fully investigated. Furthermore, smart devices could make things too perfect by taking off the element of surprise in every-day interactions, which could lead to psychological and emotional conflicts of smart home After all the data comes from the accessibility, the connected routes achieved from texts and lidar data sets are collected and mapped, and an essential part is to compare these maps in terms of similarities. A union of the problematic areas from all maps could be a solution to overcome the possible observed dissimilarities among the maps. To analyze the collected text data spatially, there is a need to develop a GIS-based tool that can find and map words in categories of liked, disliked, and others mentioned by the elderly. In doing so, scholars can move further to identify hot spots of disliked areas, which are the locations that need considerations for improvement activities by city councils.
Other technical developments for the GIS-based data analysis include the widget development for near real-time spatial data mining for the identification of hot spots of most used routes by the elderly and applying machine learning algorithms (such as the ones used by Shirowzhan and Trinder [90,91]) for finding coarse and fine obstacles. Considering all the information derived from the above-mentioned layers on the 3D models, appropriate paths for mobility-impaired people will be identified and will be ready to be imported to the navigation algorithm. The last GIS-based suggestion is to develop a flexible navigation algorithm. The identified 2aCS routes will be used in our developed constrained-based navigation algorithm. Using such an algorithm for online navigation will enhance the capability of current navigations to find the most appropriate routes for mobility-impaired elderly. This algorithm has the flexibility to obtain updated data regularly.
This article presented different typical plans using different technologies, but there are serious risks associated with these technologies. For example, the effect of living in highly dense wireless environments and many electronic devices working close to the body has not been fully investigated. Furthermore, smart devices could make things too perfect by taking off the element of surprise in every-day interactions, which could lead to psychological and emotional conflicts of smart home occupants [92]. Therefore, future studies should investigate the technical, physical, psychological, and emotional impacts of living in highly smart environments, as well as on aligning the design of smart homes, their devices, and AI algorithms to overcome any identified issues. Alternatively, it is also essential to focus on structural and ambient designs to better accommodate IoT devices. For example, designs can include the use of material that enhances wireless coverage by reducing signal absorption, reflection, and noise. Moreover, additional spaces need to be allocated to accommodate miniature mechanical devices (e.g., motors and solenoids) needed to automate windows and blinds, as well as internal wiring and wireless power transmission devices. Making old buildings smarter, without affecting their look and feel, introduces a higher cost, which can affect the adoption of smart homes. In all scenarios, the development of mechanisms to access buildings in the event of total failure of these smart systems (e.g., power failure) is also of interest.
In line with the integration and developing smart home systems, the following directions also can be considered for further investigations:

•
Extending insights derive at a home level to neighborhood, community, city level and vice versa for more meaningful smart decisions/actions-Federated learning • Authentication, authorization, and compliance with policies like the General Data Protection Regulation (GDPR) • Tracking the logs of data and corresponding actions to enhance systems and future actions, as well as find faults and responsible parties for incorrect actions (Blockchain can be a potential solution.) Some potential improvements are listed as follows, which can address potential problems in the literature: • Implementation of high performance and cost-efficient sensors; for example, the use of small wireless, self-powered, and long-life sensors and actuators that are pervasive that users do not even feel they exist. The coverage of wireless signals, absorption, and reflections should be considered.

•
Simplified modes of internal networks and wireless power transmission need improvements in a way to accommodate devices, sensors, and actuators for real-time functioning. • Development of miniature sensors and tools, such as motors and solenoids, which are required for automating the interactions, including the control of windows, blinds, and doors. • Connection to smart building systems and developing novel mechanisms to connect to pathfinding systems for implementing emergency scenarios and evacuation, considering the total failure of networks and power supply.
This article also suggested that another type of "sensors" should be investigated, which is known as 'social sensors'. Many data-centric applications could benefit from incorporating social elements into their analytical models. For example, the proliferation of sensing devices in everyday use, such as smartphones and wearable devices linking social data with sensors, can create effective solutions for various real-time information tracking or highly personalized recommendation. In particular, medical device data linked with a person's social sensing data could lead to making long term predictions on diseases or lifestyle or to faster responses to emergency or alert situations.
An important factor in smart home technology development is "privacy", which is considered as a huge challenge for the successful development of IoT and smart home applications. Privacy and security preserving analytics are required to be considered for smart home data. In particular, for health, people may be sensitive about the data being shared, and so technological solutions that (i) increases the transparency of the data processing and (ii) provides adequate controls over the data to its owners are a must.
Another research direction is the effective management of data quality. The 'smart' technologies heavily rely on a large amount of data but can suffer from not having enough 'quality' data to produce a 'quality' analytical model. This challenge can be seen as two-fold:

•
An effective data quality management/control technique • An effective data generation technique based on an initial set of relatively small datasets.
The article reviewed energy and energy management-related researches in smart homes (in general, where energy use optimization is the main aim). The review also found human-centric-related research on smart homes where human needs (social, physical, emotional, physiological) are of primary concern, and energy is of secondary importance. Recognizing that there is a significant need for human-centric approaches to smart home design will open up more avenues for research in terms of integrating optimal energy conversion processes and energy efficiencies within such systems.

Conclusions
This article reviewed the AISH literature, including key findings of smart home efforts, over the last decade. A systematic thorough review was conducted, including a bibliographic analysis of 160 papers and a content analysis of 87 chosen papers. Details of the selected papers are presented in tables and figures, which can be useful for scholars to readily identify the gaps in the literature and develop directions for further investigations. The article comprehensively reviewed the viability of the innovative idea of developing smart home systems with the integration of EMSs and personal care systems, which are fairly adopted in various locations.
The article carefully investigated the AISH dataset on literature and divided it into three main groups for detailed analysis. The first group of papers mainly discussed the utilization of IoT in smart homes and focused on the usefulness of the systems. The usefulness concept is a key factor of the innovation process as mentioned and needs to be assessed in system development. The second group referred to energy efficiency in different contexts and peak power saving, network energy consumption, and network utility cost. The papers of this group focus on network development and measuring energy consumptions. The third group of the AISH dataset covered more topics and were divided into three themes for conducting detailed content analysis: (a) energy management in smart homes, presenting the current smart home practices in terms of energy consumption monitoring, and energy efficiency; (b) applications of AI in smart homes, such as machine learning and deep learning algorithms applied in different contexts; and (c) aged-care systems, which are adopted in different locations and can be learned from these practices.
Both quantitative analysis and the comprehensive content review results showed the state-of-the-art technology used in the smart home development studies and practices and the most applications of those technologies for energy efficiency and aged occupants. This review article also showed how fragmented the literature of smart home is in terms of using different technologies for system architecture and smart system development.
This extensive critical review based on a systematic approach showed that there is a large gap in the literature since a portion of it is focused on energy efficiency and aged care system development. The findings also identified a considerable gap in terms of AI/IoT integration with geospatial data. However, there is a lack of understanding about occupants' habits and contextual requirements, which would need to be considered in AI algorithms in helping occupants to save time, cost, and energy. The AISH failed to provide a comprehensive system linking different spaces, such as parking, surrounding area, kitchen, bedrooms, and all appliances and security devices. Furthermore, the data needs to be linked to building information modeling (BIM) to provide clear monitoring and warning systems about maintenance while considering the occupant usages overtime. This article, based on experimentation reports and thoughts on the current practices and published research, provided helpful starting points for future studies on smart home improvements for energy efficiency and quality of life. This review might help designers since it presents the state-of-the-art and reveals contradictories or any inconsistencies in the smart home literature. This article might also be crucial for scholars and practitioners who aim to design a road map for developing future smart homes before 2030.