A Hybrid Web-client Access Architecture for Home Automation

6 downloads 247 Views 566KB Size Report
Microcontroller is a hybrid web client/server system that utilizes Hypertext Transfer .... Preprocessor (PHP) is a server-side scripting engine specifically designed ...
ICICS-PCM 2003 15-18 December 2003 Singapore

3C1.2

A Real-time Hybrid Web-client Access Architecture for Home Automation S. Kuo, Z. Salcic, U. Madawala The Department of Electrical and Electronics Engineering The University of Auckland Private Bag 92019, Auckland, New Zealand (E-mail: [email protected], {z.salcic, u.madawala}@auckland.ac.nz)

Abstract

protocol. Figure 2 describes the relationship of these three fundamental requirements [2] [3].

This paper describes the development of a real-time home automation system utilizing existing web-based technologies. The system uses a Residential Gateway consisting of an Embedded Internet Microcontroller and a dial-up modem to enable Internet connectivity for the household devices. The Embedded Internet Microcontroller is a hybrid web client/server system that utilizes Hypertext Transfer Protocol as the high-level application protocol for its interaction with the Remote Home Server. This provides the system with remote control, monitoring and proactive notification capabilities. Results are presented including the application of the home automation system in the task of security monitoring using a web-based camera. Keywords: Home automation, Embedded systems, Web service, HTTP, Remote control, Real-time Networking.

Figure 1 – An Internet-based Home Automation System

1. Background Home automation is the process of monitoring and controlling interconnected devices within a home environment, which can be achieved either automatically or remotely. In recent years home automation services have attracted the attention of major technology and service providers. It has been predicted by analysts that the home technology market segment will grow to about US$2.4 billion by the year 2003 [1]. This will only increase as more and more homes become connected with the introduction of applications and services for the home area networks. A typical home area network in a home automation system is illustrated in Figure 1. It is a generic environment consisting of different household devices (e.g. microwave, coffee machine, security camera, etc.), which are not always compatible.

Figure 2 – Home Automation System Framework

To develop a working paradigm that supports universal access across a multitude of platform dependent network devices for a home automation system, three main components need to be addressed: Information Appliances, access control architecture and the communication

0-7803-8185-8/03/$17.00 © 2003 IEEE

1

1.1 Information Appliance

to enable Information Appliances to provide efficient Internet-based services over the web client/server networks; however, this protocol does not support realtime interaction and proactive event notification [10].

An Information Appliance is a device capable of performing dedicated tasks within the home environment and has the ability to share its information with others. Information Appliances operate within three broad groups of physical media: existing wiring (i.e. power, phone), structured wiring (i.e. Ethernet, LAN), and wireless [4]. The Residential Gateway (RG) is a dedicated module providing a single point of convergence for Information Appliances in the home area network. It acts as a service platform that integrates incompatible networks within the home area network, and also provides IP (Internet Protocol) based services for multiple devices (i.e. lighting, heating etc.) [5].

One of the most important criteria for any home automation system is real-time interaction and notification capability [11]. This is important for home automation system applications such as home security or a home monitoring system. For example, with real-time capabilities, a person in the office can remotely turn off a household appliance that was accidentally left on or view snapshots from a surveillance camera installed in the house. Another example of an application requiring realtime capabilities is a utility company (such as an electricity company) remotely monitoring and diagnosing power meters located in residential areas for maintenance as well as for remote metering.

1.2 Access Network Architecture Access control network architecture is a network strategy to efficiently operate Information Appliances in the networked environment. There are many kinds of access control architecture under development for the requirements of different underlying networking strategies. The Internet communication protocol TCP/IP (Transmission Control Protocol/Internet Protocol) has become the de facto standard for connecting diverse media through the home network [6]. Other popular protocols to enable interconnection of devices include HomePNA (Home Phoneline Networking Association), HAVi (Home Audio/Video Interoperability), UPnP (Universal Plug and Play) and JINI.

Another important criteria for a home automation system is for consumers to be able to remotely access, monitor and control the home area network [12]. The Internet infrastructure is the main communication channel used by current automation systems to achieve this. The World Wide Web is the main outlet for these Internet-based systems because most devices, from PCs to cellular phones, can globally access it. However, the current webbased models used for home automation systems are unable to support real-time interaction and asynchronous notification. This is because the current web-based systems utilize web servers, which are passive Internet terminals that sit and wait for service requests from client systems. Therefore, they are not capable of actively seeking connections to external web hosts for real-time interaction and notification [9]. Most of the current home automation systems can only achieve real-time capabilities through specialized and dedicated wiring such as Ethernet. They are available only to the select group of individuals with the required circumstances.

1.3 Communication Protocol A communication protocol is a set of rules to standardize communication between information appliances. Current developing standards for networking of Information Appliances includes HTTP (Hypertext Transfer Protocol of the World Wide Web), SMTP (Simple Mail Transport Protocol), SNMP (Simple Network Management Protocol) and SIP (Session Initiation Protocol) [7].

This paper describes the developments towards the objective of a real-time web-based home automation system that can be ubiquitously implemented utilizing existing home wiring such as the phone line or the power line.

The existing technologies commonly applied to the home automation network have several limiting factors that restrict wider deployment. In the area of the Information Appliances, most existing RG systems require the installation of expensive dedicated structural wiring to the home environment. This complicates the process of installation, maintenance and upgrade [4][6]. In the area of the access network architecture, systems utilizing the web client/server network access architecture require permanently assigned IP addresses, and can only operate within the Ethernet environment [8]. Distributed network architectures support real-time peer-to-peer interactions between the remote user and Information Appliances, but they require dedicated Internet access protocols and infrastructures [9]. Finally concerning the communication protocol, the HTTP protocol has been widely implemented

2. General Description Of The System Figure 3 describes the system architecture of the home automation system. This system is based on the web client/server architecture, utilizing the HTTP Internet protocol, to provide the remote user with the ability to monitor and control the home area network in real-time. Firstly, it consists of a RG system, which integrates the various devices within the home area network via existing communication mediums. Secondly, the Remote Home Server (RHS) provides an access point for the remote user to interact with the home area network. Finally, a remote

2

user communicates with a HTTP enabled client such as a web browser to access the RHS.

time web-based applications over the World Wide Web with proactive and instantaneous event notification via emails and SMS (Short Message Service) short text messages for cellular phones. The RG interfaces with household devices located on different communication platforms with hardware adaptors and software drivers. These networks include the powerline network, the phoneline network and the computer terminal network.

Figure 3 – General Architecture of the System The access protocol used by the RG and the remote user to communicate with the RHS system are different. The right section of Figure 3 shows the web-based client/server network for the remote users and the RHS utilizing the HTTP communication. The remote users interact with the RHS to gain indirect access to the RG. The left section of Figure 3 is the modified web client/server access network. This access strategy is based on a hybrid theory of the P2P (Peer-to-Peer) network model and the web client/server network model [13]. Essentially it is a web client/server network with P2P networking functionalities. It redefines the identities of the client/server systems and relaxes their specific roles. With this access method, web servers are able to initiate communication with other web-based systems and web clients are given the ability to listen for incoming connection requests.

Figure 4 – The Residential Gateway System The RG was developed using the Systronix JStamp Development Station (JSDS), which is an embedded controller supporting a powerful native Java processor for the execution of real-time applications. The JSDS does not have Internet networking capabilities. Therefore, an Internet modem was required to provide it with Internet connectivity. The iModem, produced by ConnectOne, is an Internet modem which consists of a 33.6Kbps dial-up socket modem and an intelligent Internet protocol chipset. It provides the JSDS with a set of Internet communication protocols and low-level networking functions. Web Client Mode. In web client mode, the RG functions as an Internet browser and is able to send HTTP request headers to the RHS system using the GET or the POST request method. The RG opens an active socket connection to the RHS and requests for services including the update of household device control parameters, RG system configuration and RG clock synchronization. Furthermore, the HTTP request headers are also used to upload information to the RHS.

2.1 Residential Gateway The RG is a dedicated module providing a communication bridge between the home area network and the Internet. Figure 4 illustrates the operation of the RG implemented with an Embedded Internet Microcontroller (EIM). Installed within the home area network, the RG enables the household devices to be remotely monitored and controlled via a web browser. By using a dial-up modem and an ISP Internet account, Internet connectivity is provided for the RG and the devices connected to it.

Web Server Mode. In the web server mode, the RG opens a passive socket on an arbitrarily chosen listening port and services HTTP requests from the RHS. The RHS then forwards commands on behalf of the remote users. Proactive notification and real-time monitoring and control are possible across the World Wide Web.

The RG is designed as a hybrid web client-server system enabling it to function as both a web client and a web server. This approach allows it to efficiently integrate with the existing web client/server systems and to provide real-

3

2.3 Active Hypertext Links

Currently, dial-up modems are the most widely used Internet connection device for the average household to connect to the Internet. The problem associated with dialup modems is that they are unable to maintain an Internet connection for a prolonged amount of time due to the restrictions imposed by the ISPs (Internet Service Provider). Furthermore, the ISPs usually employ dynamic IP address assignment for their consumers. This means that for an embedded device connecting to the Internet with a dial-up modem, its IP address would change each time it connects to the Internet.

The remote users communicate via active hypertext links provided by the RHS to execute remote control of the RG.

The hybrid client/server network enables RG’s dynamic assigned IP address to be logged and stored in the RHS database system during it’s online initialization routine. In this instance, the RG enters web client mode as it connects to the Internet and transmits its current IP address to the RHS. Therefore, the RHS always has the most recent IP address of the RG for real-time communication.

2.2 Remote Home Server

Figure 5 – The Conceptual Outline of the RHS

The RHS comprises three main components: a multithreaded HTTP web server, a server-side HTML scripting engine and a Relational Database Management System (RDBMS). The Apache web server provides the framework of the RHS system. The PHP Hypertext Preprocessor (PHP) is a server-side scripting engine specifically designed for the creation of dynamic content web pages and active hyperlinks. The last component of the RHS system is the MySQL database engine.

The remote users invoke the active links from PHP scripts to execute a set of predefined actions. Upon an invocation of an active hypertext link, a HTTP header containing the description of the execution information is transmitted to the RG where it is interpreted and executed.

3. Results The home area network was developed using a simulator to model the behavior of common household devices. The simulator includes a power meter, a water meter, a gas meter, a light switch, a motion sensor and a security alarm. The purpose of the device simulator is to demonstrate the RG’s ability to perform the tasks of remote control and diagnostics for the home area network. The home area network also provides an online surveillance system using the Mattel Nick Click digital camera to capture instant color digital PNG (Portable Network Graphics) encoded images. The camera can be controlled remotely using a web browser to capture snapshot images of the home environment. These images are uploaded to the RHS where remote users can view them. The PNG Images generated are 50KB in size and can be uploaded to the RHS under 15 seconds in normal network traffic situation.

The RHS is the heart of the home automation system. It is a multi-threaded web server system that permits simultaneous client connections and employs Internet security features such as the password authentication and verification scheme. Its primary task is to coordinate interactions between the RG and the remote user. The RHS provides interactive HTML content pages and active hypertext links for its web clients. These dynamic pages can be accessed using a HTTP client program such as a web browser. The RHS utilizes the modified web client/server access architecture to provide a communication platform for realtime interaction with the RG. This capability enables remote monitoring and controlling of the RG from a remote Internet terminal using a web browser.

Shown in Figure 6 is an interactive web page displaying the images obtained from the online surveillance system setup in the University of Auckland. The camera was triggered remotely from a web browser using a laptop computer located over 10Km from the university. The images were successfully downloaded in real-time for the monitoring of the remote site as an operational test.

Figure 5 shows the conceptual outline of the RHS system and the transaction stages of a typical web database access from the web clients to the web server. It also shows the relationship between the web database architecture of the RHS and the modified web client/server communication model. There are two types of web clients that will interact directly with the RHS: the RG and the remote user. The RHS uses a single web interface to communicate with these web clients using HTTP.

The RHS system also keeps detailed records and permanently stores them in the database system, where the remote users can review them to inspect the status of the

4

home area network. Each message is recorded with its time of occurrence and a timestamp to note its delivery time to the RHS system. The notification messages include the remote readouts of the utility meters, monitoring sensor outputs and status of appliances.

Transfer Protocol extensively. It is a well-known protocol implemented for all Internet web client and server systems. The adoption of this protocol for the RG and the Remote Home Server enables them to be integrated into existing web systems. The architecture was applied to an online surveillance system that used a simple digital camera to take snapshots of the home environment for security surveillance. The system demonstrated the ability for a remote user to control devices using a web browser. The remote user can instantly take real-time snapshots of the home environment and review them at anytime.

5. References [1] P. Khoo, "Home – Networked Storage: The Heart of Your Future Home", Innovation, vol. 2(4), pp. 34-36, 2002. [2] N. Liang, L. Fu, C. Wu, “An integrated, flexible, and Internet-based control architecture for home automation system in the Internet Era”, Proceedings of the 2002 IEEE International Conference on Robotics and Automation, pp. 1101-1106, 2002. [3] U. Saif, D. Gordon, D. J. Greaves, “Internet Access to a Home Area Network”, IEEE Internet Computing, Jan-Feb, pp. 54-63, 2001. [4] S. Teger, D. Waks, “End-User Perspectives on Home Networking”, IEEE Communications Magazine”, April, pp. 114-119, 2002. [5] K. Hofrichter, “The Residential Gateway as Service Platform”, IEEE Consumer Electronics, pp. 304-305, 2001. [6] G. T. Edens, “Home Networking and the CableHome Project at CableLabs”, IEEE Communications Magazine, June, pp. 112-121, 2001. [7] S. Moyer, D. Marples, S. Tsang, “A Protocol for WideArea Secure Networked Appliance Communication”, IEEE Communications Magazine, October, pp. 52-59, 2001. [8] T. Ess, “Accessing Devices Using a Web Service”, IEEE Proceedings SoutheastCon 2002”, pp. 463-467, 2002. [9] M. Huhns, “Networking Embedded Agents”, IEEE Internet Computing, Jan-Feb, pp. 91-93, 1999. [10] J. Riihijarvi, P. Mahonen, “Providing Network Connectivity for Small Appliances: A Functionally Minimized Embedded Web Server”, IEEE Communications Magazine, October, pp. 74-79, 2001. [11] E. Koppen, G. Neumann, “Active hypertext for distributed Web applications”, IEEE 8th International Enterprises Proceedings, 1999. [12] R. J. Nunes, C. M. Delgado, “An Internet Application for Home Automation”, In Proceedings of the IEEE 10th Mediterranean Electrotechnical Conference, pp.298-301, 2000. [13] S. Kuo, "A Web-based Remote Server Multi-client Access Architecture for Embedded Internet Microcontrollers," Masters Thesis, University of Auckland, 2003.

Figure 6 – Online Surveillance Web Page

4. Conclusions And Summary The paper describes the design and the implementation of a home automation system that utilizes the existing in-house networking media for the remote monitoring and control of household devices. This has involved the development of a web-based access architecture that facilitates real-time interaction and proactive notification between a remote user and a home network environment. The research presented involves the development of the three main components of home automation systems: Information Appliances, access control architecture, and the communication protocol. Information Appliances involve the implementation of an Embedded Internet Microcontroller (EIM) functioning as a Residential Gateway (RG) system to integrate the existing in-house networking technologies and to provide Internet connectivity. The RG utilizes an embedded system platform and a 33.6Kbps dial-up modem to enable the integration of the home area network and its devices, and to communicate over the World Wide Web and interact with web-based systems. Due to the requirements of the RG to be real-time and proactive for web-based applications, the hybrid web client-server system was developed to give instantaneous and asynchronous remote monitoring and control capabilities. The home automation access control architecture provides a communication platform for the effective interoperation of multiple RG systems over the World Wide Web. It also provides the remote user with real-time control of the home area network. This access strategy, known as the modified web client/server architecture, employs a Remote Home Server to coordinate the interaction between the remote user and the RG. The communication protocol for the home automation system utilized the Hypertext

5