Design, Implementation and Practical Evaluation of an IoT Home Automation System for Fog Computing Applications Based on MQTT and ZigBee-WiFi Sensor Nodes  
[PERSON], [PERSON]  
1 Department of Computer Engineering, Faculty of Computer Science, Universidade da Coruna, 15071 A Coruna, Spain; [EMAIL_ADDRESS] (I.F.-M.); [EMAIL_ADDRESS] (L.C.) Footnote 1: email: [EMAIL_ADDRESS]  
Footnote 2: email: [EMAIL_ADDRESS]  
[PERSON]  
1 Department of Computer Engineering, Faculty of Computer Science, Universidade da Coruna, 15071 A Coruna, Spain; [EMAIL_ADDRESS] (I.F.-M.); [EMAIL_ADDRESS] (L.C.) Footnote 2: email: [EMAIL_ADDRESS]  
Footnote 3: email: [EMAIL_ADDRESS]  
Footnote  
sources of information that interact with the environment and anticipate and predict the actions of the home residents. One of the technologies that has contributed most to the progress of home automation is cloud computing, which offloads home devices from computational-intensive tasks. Nonetheless, in certain home automation scenarios where a fast response and low communications overhead are required, other paradigms have been successful by moving the computing capabilities from the cloud towards the edge of the network [3]. One such paradigm is fog computing, which moves the cloud computational and communication capabilities close to the sensor nodes in order to minimize latency, to distribute computational and storing resources, to enhance mobility and location awareness, and to ease network scalability while providing connectivity among devices in different physical environments [4; 5]. To provide such benefits for home automation, four elements have to interact: IoT nodes that collect data (sensor nodes), IoT nodes that embed actuators (actuator nodes), the cloud, and interconnected IoT gateways that exchange messages with the IoT nodes and with the cloud. Communications can be performed through different technologies that, in the case of home automation, are aimed at improving energy efficiency, safety, comfort, and providing audio/video/control systems. These technologies have been proposed for communicating the sensors and actuators installed in a home, either by using independent wired infrastructure (e.g., KNX [6] or LonWorks [7]) or the already existent infrastructure (e.g., X10 [8]). Among these technologies, some of the latest make use of Wireless Sensor Networks (WSNs), which have been applied successfully to fields like train monitoring [9], telemetry [10; 11], Industry 4.0 [12; 13; 14; 15] or public safety [16; 17]. As of writing, ZigBee is arguably the most popular technology for creating WSNs and it has been included in some of the latest commercial [18] and academic home automation developments [19; 20; 21; 22; 23; 24; 25]. In addition, WiFi networks (i.e., networks based on the IEEE 802.11 family of standards) have become widespread throughout the world and are one of the most popular ways for accessing the Internet due to their flexibility and low deployment cost. However, although the use of commercial WiFi home automation devices is not as popular as the use of ZigBee-based systems, the growing popularity of the IoT paradigm has led to new applications that base their data communications on WiFi networks [26; 27; 28]. This article presents ZiWi, a fog computing Home Automation System (HAS) that bridges the gap between ZigBee and WiFi devices by connecting sensors and actuators seamlessly to make use of such technologies in a home. ZiWi uses WiFi for actuator nodes since, in general, they have to be continuously awake, listening for asynchronous commands, while ZigBee is implemented by the sensor nodes because it is ideal for sending data at periodic intervals in order to save power (since many nodes rely on batteries). Moreover, the system focuses on the growing IoT market and on easing the connection of emerging sensor technologies.