International Journal of Internet of Things

2013;  2(1): 5-11

doi:10.5923/j.ijit.20130201.02

Internet of Things: Ubiquitous Home Control and Monitoring System using Android based Smart Phone

Rajeev Piyare

Department of Information Electronics Engineering, Mokpo National University, Mokpo, 534-729, Korea South

Correspondence to: Rajeev Piyare, Department of Information Electronics Engineering, Mokpo National University, Mokpo, 534-729, Korea South.

Email:

Copyright © 2012 Scientific & Academic Publishing. All Rights Reserved.

Abstract

This paper presents a low cost and flexible home control and monitoring system using an embedded micro-web server, with IP connectivity for accessing and controlling devices and appliances remotely using Android based Smart phone app. The proposed system does not require a dedicated server PC with respect to similar systems and offers a novel communication protocol to monitor and control the home environment with more than just the switching functionality. To demonstrate the feasibility and effectiveness of this system, devices such as light switches, power plug, temperature sensor and current sensor have been integrated with the proposed home control system.

Keywords: Internet of Things, Smart Home, Home Automation, Android Smartphone, Arduino

Cite this paper: Rajeev Piyare, Internet of Things: Ubiquitous Home Control and Monitoring System using Android based Smart Phone, International Journal of Internet of Things, Vol. 2 No. 1, 2013, pp. 5-11. doi: 10.5923/j.ijit.20130201.02.

1. Introduction

The Internet of Things (IoTs) can be described as connecting everyday objects like smart-phones, Internet TVs, sensors and actuators to the Internet where the devices are intelligently linked together enabling new forms of communication between things and people, and between things themselves[1]. Building IoTs has advanced significantly in the last couple of years since it has added a new dimension to the world of information and communication technologies. According to[2], it is expected that the number of devices connected to the Internet will accumulate from 100.4 million in 2011 to 2.1 billion by the year 2021, growing at a rate of 36% per year. In the year 2011, 80% machine to machine (M2M) connections were made over mobile networks such as 2G and 3G and it is predicted that by 2021, this ratio will increase to 93% since the cost related with M2M over mobile networks are generally cheaper than fixed networks as illustrated in Figure 1. Now anyone, from anytime and anywhere can have connectivity for anything and it is expected that these connections will extend and create an entirely advanced dynamic network of IoTs. The development of the Internet of Things will revolutionize a number of sectors, from automation, transportation, energy, healthcare, financial services to nanotechnology. IoTs technology can also be applied to create a new concept and wide development space for smart homes to provide intelligence, comfort and to improve the quality of life. Different devices and the appliances in the home such as lightings, air condition, home security and entertainment systems are now being connected to the Internet so that it can be controlled remotely using the Smart phones or Tablets. Not only devices can be controlled, but home environment can also be continuously monitored for maintaining certain desired temperature or monitoring amount of energy consumption[3]. Hence, this will contribute to overall cost reduction and energy saving which is one of the main concerns of today.
Figure 1. M2M device connections and future predictions
This paper is the extension of our previous work[4] and presents a low cost and flexible home control and monitoring system using an embedded micro-web server, with IP connectivity for accessing and controlling devices and appliances remotely using Android based Smart phone app. The proposed system does not require a dedicated server PC with respect to similar systems and offers a novel communication protocol to monitor and control the home environment with more than just the switching functionality. We have utilized RESTful based Web services as an interoperable application layer that can be directly integrated into other application domains like e-health care services, utility, distribution, or even vehicular area networks (VANET).
The remaining of the paper is organized as follows. In Section 2, we briefly discuss related work. Section 3 describes the proposed system architecture and its features while Section 4 outlines the system implementation of the home control and monitoring system. Finally, some conclusions are presented.

2. Related Work

Home automation or Smart Homes (also known as domotic) can be described as introduction of technology within the home environment to provide convenience, comfort, security and energy efficiency to its occupants[5]. Adding intelligence to home environment can provide increased quality of life for the elderly and disabled people who might otherwise require caregivers or institutional care. There has been a significant increase in home automation in recent years due to higher affordability and advancement in Smart phones and tablets which allows vast connectivity. With the introduction of the Internet of Things, the research and implementation of home automation are getting more popular[6]. Much of the research attention has been given in academia. Various wireless technologies that can support some form of remote data transfer, sensing and control such as Bluetooth, Wi-Fi, RFID, and cellular networks have been utilized to embed various levels of intelligence in the home[7]. The studies in[4, 8-14] have presented Bluetooth based home automation systems using Android Smart phones without the Internet controllability. The devices are physically connected to a Bluetooth sub-controller which is then accessed and controlled by the Smart phone using built-in Bluetooth connectivity. However, due to limited range of operation (maximum up to 100 m) the system is unable to cope with mobility and can only be controlled within the vicinity. Researchers have also attempted to provide network interoperability and remote access to control devices and appliances at home using home gateways.[15] introduced a Wi-Fi based home control system using PC based web server which manages the connected home devices. Similar designs have also been presented in[16-19] where a dedicated web server, database and a web page have been developed to interconnect and manage the devices with the Internet. The disadvantages of these systems are twofold. Firstly, a high end personal computer has been utilized which not only increases the cost of installation but also increases the energy consumption. Secondly, development and hosting of web pages which also add to the cost. A GSM based communication and control for home appliances has also been presented by[20] where different AT commands are sent to the Home Mobile for controlling different appliances. The drawback of this system is that users are not provided with a graphical user interface and users have to remember different AT commands to control the connected devices.[21] proposed mobile IP based architecture and its potential applications in Smart homes security and automation without any actual deployment and testing. Lately few researchers have also presented use of Web services, Simple Object Access Protocol (SOAP) and Representational State Transfer (REST) as an interoperable application layer to remotely access home automation systems.[22] introduced a smart home management scheme over the Ethernet network based on XML SOAP standards. The drawback of using SOAP based Web a service is that it is complex and adds overhead to the client and server when parsing the message, resulting in slower operation and higher Bandwidth. REST[23] has been presented as a Web-based interaction for controlling household appliances using Web techniques such as HTTP caching and push messaging. Also a Web-based graphical user interface has been developed to manage the home devices. Home automation using Cloud computing has also been proposed by[24, 25] where users were able to control various lights and appliances within their home.
The above mentioned systems have made significant contributions to the design and development of home automation systems. However, the existing works were mainly focused on switching and controlling home appliances or connected devices rather than remotely monitoring of home environment.

3. Proposed System and Architecture

3.1. Features of the Proposed System

In order to address the mentioned issues of flexibility and functionality in the literature survey, we designed and implemented a novel, standalone, flexible and low cost home controlling and monitoring system using RESTful based Web services as an interoperable application layer. The system consists of a micro Web - server based on Arduino Ethernet, hardware interface modules and the Android compatible Smart phone app. The architecture presented in this work can be customized in different ways in order to accommodate different application scenarios with minimum recoding and design i.e. each time a new device is added to the micro Web-server, a new thread dedicated to the device is automatically created in the Smart phone app. Hence, the aim of the proposed work is not to incorporate expensive components such as high end personal computers. This system allows authorized home owners to remotely control and monitor connected devices at home using any Wi-Fi or 3G/4G enabled Smart phone which supports Java. The smart phone app provides a graphical user interface (GUI) for accessing and controlling the devices at home through server real IP.

3.2. Description of Proposed Architecture

This section describes the proposed architecture and design of flexible and low cost home controlling and monitoring system. The architecture is divided into three layers: Home Environment, Home Gateway and Remote Environment (see Figure 2).
Remote Environment represents authorized users who can access the system on their Smart phone app using the Internet via Wi-Fi or 3G/4G network. Home Environment consists of Home Gateway and a hardware interface module. The primary function of the Home Gateway for the proposed architecture is to provide data translation services between the Internets. The main component of the Home Gateway is a micro Web - server based on Arduino Ethernet. The main task of the server is to manage, control and monitor system components, that enables hardware interface modules to successfully execute their assigned task using actuators and to report server with triggered events via sensors.
Hardware interface modules are directly interfaced with sensors and actuators through wires. It has the capabilities to control energy management systems like lightings, power plugs, HVAC (heating, ventilation, and air conditioning) systems and security systems such as door locks, and gate. For monitoring Home Environment the system supports sensors such as temperature, humidity and current.
Figure 2. A Overview of Conceptual architecture

4. System Implementation

As mentioned, the proposed ubiquitous home control and monitoring system consists of three main modules: the micro Web server, hardware interface module and the software package (Smart phone app). To demonstrate the feasibility and effectiveness of this system, devices such as light switches, power plug, temperature sensor and current sensor have been integrated with the proposed home control system. This section describes the system implementation details.

4.1. Software Development for Home Gateway

Figure 3. Home Gateway flow chart for the connection establishment with the Internet
Software of the proposed home automation system is divided into two parts: server application software and microcontroller firmware. The server application software is a library implementation of a micro Web-server running on Arduino Uno using the Ethernet shield. This Ethernet shield has the capability to be used both, as a client or a server. To successfully communicate between remote user and the Home Gateway, configuration stage and sensor/actuator control stage layers have been implemented on the Arduino Uno. The <Ethernet.h> libraries are used to receive data on Arduino Uno and creates output messages in JavaScript Object Notation (JSON) format. Figure 3 shows the flowchart of connection establishment between the Arduino Uno and the Internet. The Home Gateway is connected to Internet over TCP/IP. Since Arduino Ethernet shield already supports a TCP/IP stack, we have focused on implementing software to connect it to the remote user. The Home Gateway once started enters the configuration stage. During the configuration stage the Ethernet module establishes connection with Local Area Network (LAN) using a static IP address. To optimize the process of connection, we have used static IP address rather than acquiring an IP via Dynamic Host Configuration Protocol (DHCP). Once the Home Gateway has been initialized, it enters into an idle state until any command is received from the remote user. Upon successful reception of commands as strings from the Smart phone app, it’s decoded and appropriate control action is taken. These actions can be either actuation or sensing.

4.2. Home Gateway Application Framework

The access to Web services has to be easy, direct, open and interoperable. That is, the provided communication means and programming interfaces (APIs) shall be easy to implement on every platform and developing environment[26]. The most open and interoperable way to provide access to remote services or to enable applications to communicate with each other is to utilize Web services. There are two classes of Web services: Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). RESTful is a much more lightweight mechanism than SOAP offering functionality similar to SOAP based Web services.
Therefore, in our approach we have used the RESTful based Web service utilizing standard operation such as GET and POST requests that return JavaScript Object Notation (JSON) responses to communicate between the remote user and the micro Web server. JSON is a lightweight data-interchange format. It is easy for human beings to read and write. It is also simpler for machines to parse and generate messages than using XML. For example, to turn ON the light, an HTTP POST request is sent to the resource of the server as illustrated in Figure 4
Figure 4. Messages between Arduino and micro Web-server

4.3. Smartphone Application and Features

Figure 5. Screenshots for Graphical user interface for the home control system
There are several platforms for developing Smartphone application such as Windows Mobile, Symbian, iOS and Android. Since most of the Smart phones support Android OS, therefore, we decided to develop and implement the application in JAVA programming language using the Android Software Development Kit (SDK)[27]. The most important feature of our Smartphone app is to hide several processes from the user while allowing full interaction with the application. By using the several software packages, we were able to customize the application to include a variety of user interface elements such as text boxes, choice groups, lists and command buttons. Figure 5 illustrates some designs for the graphical user interface. The Smart phone app for home control and monitoring applications provides the following functionalities to the user: 1) Remote connection to the Home Gateway. 2) Device control. 3) Device Monitoring. 4) Managing schedule. To successfully connect to the Home server, the user has to configure the IP address and the Port number of the micro Web-server in the app (Figure 5.a). Then the user has to synchronize the app with the Web-server (see Figure 5.b) to retrieve the actuators and sensors those are connected to the Arduino Uno and what they are used for.
While performing synchronization, the Smart phone app sends the following to the Arduino: http://arduinoip/?out = all and to acknowledge the command, the Web-server replies with the following JSON message:
{"ip" : "117.17.80.199", "devices" :[{ "type" : "light", "name" : "Light 1", "out" : "4"},{ "type" : "light", "name" : "Light 2", "out" : "5"},{ "type" : "temperature", "name" : "Temp", "out" : "3"},{ "type" : "plug", "name" : "Power Plug", "out" : "6"},{ "type" : "door", "name" : "Front Door", "out" : "7"},{ "type" : "gate", "name" : "Main Gate", "out" : "8"},{ "type" : "wattmeter", "name" : "Main Switch Board", "out" : "2"}]}
The JSON message indicates the IP address of the remote home server, the Arduino I/O ports where the device is connected to and the device type. To connect the new device and add it to the app, the user has to only program the home server. Each time a new device is programmed in the server, a new thread dedicated to the device is automatically created in the app (see Figure 5.c) e.g. Light 1 and Light 2. After synchronizing the app with the home server, the user has to just press the device icon in the app to turn it ON or OFF.
The Smart phone app sends the following to the home server: http://arduinoip/?out=1&status=1. The out indicates the I/O port on the Arduino and the status can be either 1 (ON) or 0 (OFF). Figure 5(d) shows the temperature display on the app. The Manage schedule items (Figure 5.e) lists and manages the current devices which can be scheduled to operate at a specific time.

4.4. Hardware Implementation and Home Automation Devices

For proof of the concept, low cost and off the shelf electronics hardware is used to setup the test bench. The overall implementation diagram is illustrated in Figure 6.
Figure 6. Hardware architecture and implementation
The Arduino Uno and Ethernet shield were used to implement the micro Web-server for the Home gateway. Home gateway connects to the Internet according to the details provided in Section 4.1. The Arduino Uno is an open-source microcontroller that uses ATMEGA 328, an Atmel AVR processor which can be programmed by the computer in C language via USB port. Arduino Uno also has on-board 5 analog pins and 13 digital pins for input and output operations, supporting SPI and I2C which can be used to interface with other devices. The Ethernet module acts as a bridge to connect the Home Gateway to the local proxy. A conventional light switch was integrated with the Arduino using relays to demonstrate the switching capability as illustrated in our previous work[4] and an LM35 temperature sensor was used for temperature monitoring while a non-invasive 30A current sensor was utilized for power monitoring. Details provided in[28] are used to successfully integrate the current sensor with the Arduino Uno. The hardware architecture presented is flexible and allows other home appliances and devices to be seamlessly integrated with minimal changes.

5. Conclusions

In this paper, a novel architecture for low cost and flexible home control and monitoring system using Android based Smart phone is proposed and implemented. The proposed architecture utilizes RESTful based Web services as an interoperable application layer for communicating between the remote user and the home devices. Any Android based Smart phone with built in support for Wi-Fi can be used to access and control the devices at home. When a Wi-Fi connection is not available, mobile cellular networks such as 3G or 4G can be used to access the system. Future works will focus on creating a wireless network between the home server and the home devices using Zigbee and implementation of voice commands for controlling the application via voice.

ACKNOWLEDGEMENTS

The This work was supported by Priority Research Centers program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (2009-0093828) and MKEC (The Ministry of Knowledge Economy), Korea, under the ITRC (Information Technology Research Center) supported program supervised by the NIPA, National IT Industry Promotion Agency (NIPA-2013-H0301-13-2005).

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this article.

References

[1]  G. Kortuem, F. Kawsar, D. Fitton, and V. Sundramoorthy, "Smart objects as building blocks for the internet of things," Internet Computing, IEEE, vol. 14, pp. 44-51, 2010.
[2]  S. Hilton. (2012, 14 January). Progression from M2M to the Internet of Things: an introductory blog. Available: http://blog.bosch-si.com/progression-from-m2m-to-internet-of-things-an-introductory-blog/
[3]  C.-H. Chen, C.-C. Gao, and J.-J. Chen, "Intelligent Home Energy Conservation System Based On WSN," presented at the International Conference on Electrical, Electronics and Civil Engineering, Pattaya, 2011.
[4]  R. Piyare and M. Tazil, "Bluetooth based home automation system using cell phone," in Consumer Electronics (ISCE), 2011 IEEE 15th International Symposium on, 2011, pp. 192-195.
[5]  Wikipedia. (2012, 12th December). Home automation. Available: http://en.wikipedia.org/wiki/Home_automation
[6]  Y. Liu, "Study on Smart Home System Based on Internet of Things Technology," in Informatics and Management Science IV. vol. 207, W. Du, Ed., ed: Springer London, 2013, pp. 73-81.
[7]  M. A. Al-Qutayri and J. S. Jeedella, "Integrated Wireless Technologies for Smart Homes Applications," in Smart Home Systems, M. A. Al-Qutayri, Ed., ed: InTech, 2010.
[8]  C. Chiu-Chiao, H. Ching Yuan, W. Shiau-Chin, and L. Cheng-Min, "Bluetooth-Based Android Interactive Applications for Smart Living," in Innovations in Bio-inspired Computing and Applications (IBICA), 2011 Second International Conference on, 2011, pp. 309-312.
[9]  J. Potts and S. Sukittanon, "Exploiting Bluetooth on Android mobile devices for home security application," in Southeastcon, 2012 Proceedings of IEEE, 2012, pp. 1-4.
[10]  R.A.Ramlee, M.H.Leong, R.S.S.Singh, M.M.Ismail, M.A.Othman, H.A.Sulaiman, et al., "Bluetooth Remote Home Automation System Using Android Application," The International Journal of Engineering And Science, vol. 2, pp. 149-153, 2013.
[11]  R. A. Ramlee, D. H. Z. Tang, and M. M. Ismail, "Smart home system for Disabled People via Wireless Bluetooth," in System Engineering and Technology (ICSET), 2012 International Conference on, 2012, pp. 1-4.
[12]  M. Yan and H. Shi, "SMART LIVING USING BLUETOOTH-BASED ANDROID SMARTPHONE," International Journal of Wireless & Mobile Networks (IJWMN), vol. 5, pp. 65-72, 2013.
[13]  Deepali Javale, Mohd. Mohsin, Shreerang Nandanwar, and M. Shingate, "Home Automation and Security System Using Android ADK," International Journal of Electronics Communication and Computer Technology, vol. 3, pp. 382-385, 2013.
[14]  S. V. A. Syed Anwaarullah, "RTOS based Home Automation System using Android," International Journal of Advanced Trends in Computer Science and Engineering, vol. 2, pp. 480-484, 2013.
[15]  A. ElShafee and K. A. Hamed, "Design and Implementation of a WiFi Based Home Automation System," World Academy of Science, Engineering and Technology, pp. 2177-2180, 2012.
[16]  A. Z. Alkar and U. Buhur, "An Internet based wireless home automation system for multifunctional devices," Consumer Electronics, IEEE Transactions on, vol. 51, pp. 1169-1174, 2005.
[17]  U. Sharma and S. R. N. Reddy, "Design of Home/Office Automation Using Wireless Sensor Network," International Journal of Computer Applications, vol. 43, pp. 53-60, 2012.
[18]  N.-S. Liang, L.-C. Fu, and C.-L. Wu, "An integrated, flexible, and Internet-based control architecture for home automation system in the Internet era," in Robotics and Automation, 2002. Proceedings. ICRA'02. IEEE International Conference on, 2002, pp. 1101-1106.
[19]  A. Rajabzadeh, A. R. Manashty, and Z. F. Jahromi, "A Mobile Application for Smart House Remote Control System," World Academy of Science, Engineering and Technology, vol. 62, pp. 80-86, 2010.
[20]  R. Shahriyar, E. Hoque, S. Sohan, I. Naim, M. M. Akbar, and M. K. Khan, "Remote controlling of home appliances using mobile telephony," International Journal of Smart Home, vol. 2, pp. 37-54, 2008.
[21]  B. Park, "Mobile IP-Based Architecture for Smart Homes," International Journal of Smart Home, vol. 6, pp. 29-36, 2012.
[22]  T. Perumal, M. N. Sulaiman, K. Y. Sharif, A. R. Ramli, and C. Y. Leong, "Development of an Embedded Smart Home Management Scheme," International Journal of Smart Home, vol. 7, pp. 15-26, 2013.
[23]  A. Kamilaris, V. Trifa, and A. Pitsillides, "HomeWeb: An application framework for Web-based smart homes," in Telecommunications (ICT), 2011 18th International Conference on, 2011, pp. 134-139.
[24]  M.B.Salunke , Darshan Sonar, Nilesh Dengle , Sachin Kangude, and D. Gawade, "Home Automation Using Cloud Computing and Mobile Devices," IOSR Journal of Engineering, vol. 3, pp. 35-37, 2013.
[25]  N. Dickey, D. Banks, and S. Sukittanon, "Home automation using Cloud Network and mobile devices," in Southeastcon, 2012 Proceedings of IEEE, 2012, pp. 1-4.
[26]  C. Doukas, Building Internet of Things with the Arduino vol. 1, 2012.
[27]  (2012, 17th December). Get the Android SDK. Available: http://developer.android.com/sdk/index.html
[28]  (2012, 15th September). OpenEnergyMonitor. Available: http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface.