Mobile Remote Control for Home Automation

— Domotic: Existing home automation technologies permit persons to control elements of the home using a computer connected to a local network. However, the real challenge is to remotely control objects, permitting users to exercise greater freedom and versatility. This work presents an inexpensive controller device developed for high density constructions typical of many developing countries throughout the world that is designed to remotely control home luminescence, air conditioner and water pumps through mobile devices such as a smart phone or tablet. Results show the packet delivery was acceptable within a range of 15 meters in a concrete, two-story dwelling, thus demonstrating its applicability in small homes in countries which share the same construction features as those of Mexico.


INTRODUCTION
A simple definition of home automation is "a system that automates different things in the house". Home automation, also known as domotics, is a field of study that has generated much interest because of potential benefits related to health, security, comfort and ecology, among others [1].
Today, research is being carried out worldwide, but particularly in Japan, Europe and the United States, because of the potential commercial benefits of products that employ wireless technologies to control systems and remotely monitor dwellings [2].
Mobile devices are handheld devices such as smart phones or tablets that can have touch or non-touch display screens, or even mini keyboards. These 4G compatible devices currently provide sufficient computing capacity, programming and transmission range to make controlling household appliances or functions possible [3].
The current revolution in smart phone and tablet technologies has significantly impacted the lifestyle of people throughout the world and the number of users has increased to over 6.8 billion [4]. A study of over 5,000 people carried out in The United States, The United Kingdom, China, India, South Korea, Indonesia and Brazil shows that 84% of the respondents report that mobile technologies have improved their lives as it allows them to contact family and friends, as well as allows them to carry out business communications and online operations. [5].
Because the initial cost of a smart phone or tablet can be up 650 dollars, the need to provide added value for the consumer market is imperative. This additional value for mobile or tablet users can be provided either through additional applications or by expanding the convenience, range, and use of mobile technologies [6]. One area that is increasingly attractive is home and office automation. The ability to remotely control devices will inevitably grow and evolve as the processing power of mobile devices increases, the size and efficiency of control devices decreases, and the effective transmission range of mobile devices expands.
This work focuses on using of mobile devices inside and outside the home to communicate with the controller developed to control lights, water pumps and air conditioner through smart phones and/or tablets using three different web browsers (Google Chrome, Safari, Opera) with the goal of making these two functions more accessible to the general public and fully functional in high density constructions of at least 30 countries [7].

II. STATE OF THE ART
The relevance of traditional cable networks has decreased considerably due to their greater costs and limitations. Traditional cabled networks, which require considerable physical infrastructure, are increasingly being replaced by wireless technologies because they are more flexible and require far less infrastructure [8].
The first communication protocol used in a home automation system was named X10, which was developed by a Scottish company called Pico Electronics in 1975 [9].
The X10 protocol works through household electrical systems, transmitting pulse bursts and managing communication among compatible devices.
A few months later, the first X10 controller/actuators to handle electrical currents were developed to receive instructions they received via communication protocols [10]. After creating this protocol, more integrated projects that incorporated these new technologies to control home devices started to appear as the area of home automation began to grow.
One of the projects published using X10 was developed in 2004 entitled "Architectures for Ubiquitous Environments" [11]. This project consists of a central computer used as a server within the local network to receive requests from a PDA device ( Figure 2) to turn on or off any device connected to an X10 controller. The major drawback of this technology is that the controller entirely depended on the home's electrical wiring, which in many cases proved to be inadequate. PAPER MOBILE REMOTE CONTROL FOR HOME AUTOMATION Figure 2. PDA domotic application [11].
Three decades after the first cabled networks were introduced, a series of high-level protocols for low-power wireless communication called Zigbee, designed by Zigbee Alliance, greatly facilitated indoor wireless networking and communications [12]. In 2005 the Xbee wireless radio was introduced to work with Zigbee to provide connectivity between various points [13]. Once wireless networks for automation environments started to become popular, several proposals were put forth to develop a "Domotic multipurpose platform based on wireless technology with distributed processing capabilities" [14].
These projects consisted of independent controllers that were installed in each room and communicate over the wireless network and the actual monitoring and control was carried out by an interconnected network consisting of cameras, sensors and actuators. This permitted persons to control the home network through a PC, but required persons to be present to actually monitor and control the household.
Mobile networks began to migrate to mobile technologies through; GPRS, which is available in most areas, covered and offers the advantages of packetoriented data communications and use a cell phone to control the devices ( Figure 4) [15].
A project was developed to control different household devices such as television or lamps are described in [16]. This proposal uses cameras installed in strategic positions of the house that provide real-time visual monitoring of the devices to be controlled.
All of the cameras are connected to a central computer that contains the necessary software to recognize the elements that are targeted with a laser. Consequently, line of sight was a vital concern. In this scheme, the computer takes care of sending the command to the actuator to turn on or off the targeted device. The term smart buildings refers to a relatively new concept in which multiple home appliances communicate with each other using short range wireless communicated technologies such as ZigBee [13] and WiFi [17].
The University of Greenwich performed experiments with these 2 wireless technologies and the results show that WiFI on channel 6 (2426 MHz to 2448 MHz) and ZigBee-Pro on channel 12 (2409 Mhz to 2411 MHz) operate without any serious difficulties [17].
The Hebei University of Science and Technology examined the possibility of employing a WSN and service robots for smart home applications. In this case, the service robots can be considered mobile nodes that provide additional sensor information, improve and repair the connectivity, and collect information from surrounding wireless sensor nodes [18].
Currently, there are several manufactures that wish to enter the field of home automation systems and Belkin is one of the most important companies involved in this field [19].
This company has developed a device that connects to the network and functions as a controller/actuator. Its drawback is that it is limited to lamps and each element operates independently, so the devices cannot work together, thus making it is necessary to work them individually [19].

III. OVERVIEW OF THE SYSTEM
The presented architecture is designed to be implemented in homes constructed with high-density materials, which commonly share the following features in many parts of the world: Wall-to-wall construction: There are no lateral spaces between houses as the houses are built with adjoining walls [7].
Interior wall construction: Interior walls are made of 20-cm. thick baked brick wall with between 4 and 6 cm. of cement/sand finish. The actual space for wiring, plumbing, etc. is actually hollowed out of the brick itself. In short, the walls have no air spaces and the materials are much denser than their American or European counterparts.
Ceiling construction: Ceilings are traditionally made of a 10 cm solid concrete slab, although more modern constructions combine concrete and cinder blocks [7].
Due to the thickness and density of the house internal and external walls, the controller/actuator must be at a distance no greater than 15 meters from another PAPER MOBILE REMOTE CONTROL FOR HOME AUTOMATION controller/actuator or the communication server to be completely secure.
The controller/actuator can turn on and off any water pump, including 220 V pumps [20].
It is possible to turn lights, water pumps and the air conditioner on and off from any part of the world from a computer or mobile device that is connected to the Internet.
If electrical power should be turned off or fail, the server and drivers return to normal operation 7 seconds after the power is restored [21]. Figure 5 shows the proposed scenario where the developed controller was used to control lights, air conditioner and water pumps in Mexican households. • Main controller/actuator: Necessary to meet the basic needs of home automation systems and connects to the server via Xbee S1 radius using the IEEE 802.15.4 protocol. This controller acts as an actuator to connect directly to the lamps and water pumps to turn them on or off, depending on the instructions received by the server.
• Server: Essential to provide connectivity between the radios and the Internet. It consists of a Raspberry PI that has a Web server, PHP and MySQL. The server has an Xbee radio that is wirelessly connected with the Main Controller / Actuator. It connects to the Internet via the local network (Ethernet) or can function as access point using a wireless card. This computer was chosen because of its low power (5V, 700mA) and small size [22].
• Internet: Needs to ensure that the server and the mobile device are connected to the Internet so that they can remotely control the functions of turning the lights, air conditioning and water pumps on and off. Importantly, if an Internet connection is not available, persons can still control the automation system within the physical confines of the home.
• Mobile device: Provides communications to the home automation network remotely using 802.11/3G/LTE. The device should function regardless of the operating system used, although the Apple IOS operating system for the iphone and iPad was used in this work.
Importantly, the domotic system also requires a main computer; therefore, a Raspberry PI was also used in this work. This element of the home automation system is very important because it consumes relatively little power, possess a stable operating system and can act as a Web Server (PHP/ MySQL) [23]. The Main Controller/ Actuator shown in Figure 4 was developed to be connected directly to the domestic electrical installation. This device includes an Xbee S1 radio that is synchronized with a server to receive on/off requests for lights and water pumps. The microcontroller allows control of up to 16 elements (lights or water pumps) that can be distributed throughout a household using one relay per electronic element [24]. One of the main features of the Main Controller / actuator is its size, because it is smaller than a regular pen.
The controller is low consumption and operating at 5V. It is necessary to have one per room with a maximum distance of 15 meters between each to ensure proper operation. An important feature of this device is that costs only 22 dollars with the hardware needed to control lights, water pumps and air conditioners by infrared transmission.
To avoid clogging the communication between the controller and air conditioners, will be located at the site of the luminaire replaces the traditional focus for Compact Fluorescent Lamp or LED Lamp, depending on the lumens needed in space (Figure 7). The last element of this system is the mobile device. For this case study, an iPhone 5 and an iPad 4 with iOS 6.1 were used however it can use any device with a Web browser.
An interface Web and an iOS application were developed to communicate the mobile device with the Raspberry through the local network and the Internet. The IEEE 830 standard was employed to develop the software PAPER MOBILE REMOTE CONTROL FOR HOME AUTOMATION and IEEE 829 was used for software testing as it permits home electronics users to turn apparatuses on and off by touching a digital switch with a finger (Figure 8). This iOS application makes it possible to control the air conditioner and lighting by means of the interphase shown in Figure 9. This application makes saving energy possible by automating the state of the devices depending on the realtime home demands (i.e. at home, at work, on vacation, etc.), which users can program ( Figure 10).
This architecture permits users to remotely monitor and control lights, air conditioning and water pumps wirelessly through the Internet from any mobile communications device (mobile phone, i-pad, tablet, etc.).

IV. RESULTS
Binding and packet loss rate tests were performed in a typical Mexican home built with high density materials (Figure 7) to identify the coverage of the Xbee radios that conform this architecture. As seen in Figure 11, nodes were placed in different sections of the house to determine the received signal strength from the node T (transmitter) to any node listed. The circles marked with the symbol (*) correspond to nodes placed on the roof of that position. Table 1 shows the values of RSSI (Received Signal Strength Indication) obtained from each node placed in the home: PAPER MOBILE REMOTE CONTROL FOR HOME AUTOMATION It was observed that wireless communications are continuously attenuated by multiple elements that affect the transmission / reception of information, so that this type of infrastructure cannot be used in all the scenarios [25].
If a distant transmitter is moved closer to a receiver, the strength of the transmitted signal at the receiving antenna will increase. Measure the strength of the signal at the receiving antenna is one method of determining the quality of the communication link [26]. It is for this that when designing a wireless network, it is important to consider how the signal propagates. In order to get reasonably reliable estimates of the behavior of an electromagnetic signal is necessary to make use of electromagnetic propagation models.
Electromagnetic propagation models aim to predict to what extent affects the propagation medium to electromagnetic energy carried by between two antennas that are communicating [27].
Radios were placed in different areas of the house to check the extent of the radio signal and perform calculations using the formula for the propagation model exposed by Farahani [28]: ! ! ! !"!!!! Where: • Pd = signal power (dBm) at a distance d • P0 = signal power (dBm) at zero distance from the antenna • f = signal frequency in MHz • d = distance (meters) from the antenna • n = path loss exponent, and is determined experimentally Table II illustrates the different values that the factor "n" can take in different environments. Given the experimental stage, we consider a factor n=2.8 and n=3.5 corresponding to indoors office building, without line of sight. The figure 12 shows the comparison between the data obtained through Farahani model and the results of this experiment. The experiment helped us to verify that can control and monitor lights, air conditioner and water pumps remotely using the inexpensive controller developed for use in high density constructions typical of many developing countries.
Future work will include expanding the applications of the controller we developed to implement new infrared communication protocols with the goal of applying them to home appliances and multimedia devices.