06-10-2016, 04:16 PM
1458108441-04230964.pdf (Size: 456.26 KB / Downloads: 27)
Abstract
This paper discusses the design and implementation of
a prototype system which integrates various existing
technologies for home monitoring and control that fits
with the future smart home concept. The system provides
two way communications between home appliances
/electronics devices, and a mobile phone. The home
devices which are connected wirelessly using Bluetooth
technology to a home server can be monitored and
controlled via the mobile phone using a portable MIDlet
application. The prototype system supports three main
services: monitoring the status of devices; controlling
their setting through configurations that are device
dependent; and periodic notification of the status of all
devices. The wireless technologies to realize the project
are GSM and Bluetooth. J2ME for the mobile application,
Java for the server application, and C for the
microcontroller application are the programming
languages used in the prototype system
1. Introduction
Recent advances in wireless technologies, such as GSM,
Bluetooth, WiFi, etc. coupled with the ability to integrate
these technologies in transparent manner are opening
many diverse application areas. The possible applications
areas include smart homes, patient monitoring, and
security systems. This paper presents a complete
prototype system that integrates wireless technologies and
applies them to realize a smart home.
A smart home is one that enables its owner to monitor
and control various processes in it remotely. The project
discussed in this paper is a step toward a Future Smart
Home (FSH) [1]. FSH is expected to consist of five major
components: an external network, a gateway, services, a
local network, and appliances or home devices [1, 2].
The home owner uses the external network to monitor
the home remotely. The external network can be one of 3
types: a high-level network such as the Internet, a wired
network, or a wireless network such as WiMAX and GSM
[3]. The gateway is the point of communication between
the external network and the internal network. It is usually
a computer server or a processor with interfacing devices
to both external and internal networks. The home devices
are connected via a local network which may be wired or
wireless. The wireless LAN technology which is usually
used is WiFi or Bluetooth. The services may be
programmed on the server or hardwired on the devices'
controller.
The FSH concept is introduced to provide flexible and
comfortable services for the home owner both inside and
outside the home. FSH services consist of the owner
ability to control and monitor the status of the home
appliances and devices remotely. Such devices may be an
air conditioner, a lighting system, an alarm system, a
dishwasher, a refrigerator, entertainment devices, medical
devices, or electronics systems for special needs [4].
The prototype system described in this paper uses a
mobile GSM network for the external network. A mobile
phone application using J2ME [6, 7] is designed to control
and monitor various types of devices. It communicates
with a home computer server which is connected
wirelessly to the microcontroller of the devices via
Bluetooth [5]. Although the Bluetooth technology used for
the internal network has some limitations in a low
bandwidth, low range and scalability, it has been chosen in
this prototype for its small hardware size and its need of
only a very small amount of power. This technology may
be replaced with a WiFi technology for higher range and
scalability but at the expense of higher power and
expensive device interface.
Section II describes the components of the system
prototype and demonstrates the integration of the various
technologies in the system. In Section III the services
provided by the system are detailed. Section IV discusses
the system design issues while Section V illustrates the use
of the system with an example. We conclude the paper in
Section VI which also provides a list of tasks that we are
currently working on to improve the system.
System Architecture
Fig. 1 describes the architecture of the designed system
including the various technologies used in the prototype.
The system consists of a Java-enabled mobile phone with
a mobile application, a computer server with a Java
application, a modem connecting the server to the external
network, a PIC microcontroller with a hardwired
application connected to the devices, and Bluetooth
adapters connecting the server and the microcontrollers to
the internal network. The prototype system supports twolevel
devices that only need to be switched on or off, as
well as multi-level devices that have various settings such
as the fan speed of an air condition.
A.
B.
C.
External Network
As shown in Fig. 1 the external network used in the
system is the widely-used GSM (Global System for
Mobile communications) network [3]. A mobile phone
communicates with the home server using SMS (Short
Message Service) messages. The mobile application which
is written using J2ME (Java 2 Micro Edition) technology
includes a menu-driven GUI (Graphic User Interface).
Two basic layers of J2ME are used to implement the
mobile application, namely CLCD (Connected, Limited
Device Configuration) and MIDP (Mobile Information
Device Profile). The implemented application using J2ME
technology is called a MIDlet [8]. The GUI is used by the
user to input all information to the system. It has a list to
display the main system services, buttons to turn on, turn
off or monitor a device, text fields to get the configuration
information, and commands to move from menu to sub menus.
Internal Network
The system uses the Bluetooth P-to-P (Point-to-Point)
over RFCOMM (Radio Frequency COMM) protocol
technology as the wireless internal network to connect the
home devices' microcontrollers to the home server [5]. The
P-to-P communication means that the server can only
communicate to a single device at a time. Since there is
usually more than one device at home, a point-to-point
communication between the server and the device needs to
be established every time it is needed. This type of
communication eliminates the need for a Bluetooth
gateway which is used for multipoint communication. It
also reduces power consumption since the Bluetooth
connection does not have to be active at all times.
In order to simplify the communication with the
Bluetooth devices, a Bluetooth stack is used in both the
server and microcontroller applications. The Bluetooth
stack is a controlling agent that implements the Bluetooth
protocol and allows controlling Bluetooth devices using
APIs similar to using drivers by an operating system.
Bluetooth has many profiles for serial connection and
networking. A Bluetooth profile is the designed set of
functionalities for Bluetooth devices. The prototype
system supports the Serial Port Profile. It is a profile that
interacts directly with the RFCOMM layer in the
Bluetooth protocol stack. This profile is used to create a
virtual serial port Bluetooth-enabled device.
Home Server
The home server is the core of the system. It is
connected to the GSM network via a GSM modem to
send/receive SMS messages to/from the mobile phone. It
also connects to home devices through the Bluetooth
connection. Fig. 2 shows the software architecture of the
home server.
The server application is written using the Java
programming language. The application inherits methods
from two basic APIs: Jsms API and Bluecove API.
The lowest level of the home server software
architecture is the Java Environment. The next two layers
are COMM API version 2.0 and the Microsoft Bluetooth
Stack. COMM API provides abstract interface methods for
Jsms API 2.1.2 which is used to send and receive SMS
messages using a GSM modem. The Microsoft Bluetooth
Stack is used to establish a Bluetooth connection with a
home device via the Bluecove API.
D.
A.
B.
Home Appliances
A PIC microcontroller is connected to the home devices
in order to monitor or control them at the hardware level.
It is also connected to a Bluetooth adapter to accept the
Bluetooth serial P-to-P connection with the home server.
An application which is written in C and downloaded to
the PIC receives commands from the server, interprets
them and sends the information to the devices. It also reads
the status of devices and sends it to the server. The
presence of the microcontrollers makes the system
independent of the type of devices.
3. SYSTEM SERVICES
The Future Smart Home concept was introduced to
provide flexible and comfortable services for the home
owner both inside and outside the home. One of the main
services of the FSH is the ability of the owner to monitor
and control the home devices remotely.
The designed system provides three main services
which are: monitor the settings of home devices and
appliances, control the settings of home devices, and get
status of devices periodically. Some additional minor
services provided by the system are events and problems
logging and prediction of connections problems.
Controlling and Monitoring a Device
Controlling a home device includes changing the setting
of the device by sending a command via an SMS
containing the name of the device to be controlled and the
control command as illustrated in Fig. 3. The control
commands currently implemented are: turn off device, turn
on device to a certain level, and change the level of device.
When the user selects the control mode and then selects a
device, initially two buttons are displayed: turn-off and
turn-on buttons. If the device has only two levels (a light
as an example) the turn-on command will be sent with no level information. However, if the device has more than
two levels (fan with different speed) the turn-on command
will be sent with specific level information. The server
receives the command and forwards the information to the
appropriate device via its microcontroller.
Monitoring home devices consists of checking the
setting of devices. The command is sent via an SMS as
illustrated in Fig. 4. When the user selects the monitor
mode and then selects a device, one button will be
displayed: the monitor button. For all devices the same
monitor menu is displayed since there is no level setting in
the monitoring mode. The forward path for monitoring a
device is the same as in the control mode. However, when
the home server sends the setting command to the
microcontroller it does not close the Bluetooth connection.
The server keeps the connection open waiting for the PIC
microcontroller to reply with the status information. When
this information is received, the server closes the
Bluetooth connection and then sends the information to the
mobile phone via an SMS.
Periodic Notification of Device Status
Instead of running the J2ME application every time and
get the device status, an SMS message is generated by the
home server that periodically shows all devices status. The
SMS message is sent according to a pre-programmed time
interval. This time interval can be changed by the mobile
phone application by sending a special command to the
server. The SMS notification is a thread created by the
home server that reads the current time all the time. When
the defined time interval expires, it establishes a Bluetooth
connection with all PIC microcontrollers one at a time. It
sends a monitor command and waits for a reply that
includes the status of the device. Once all devices status is
ready at the home server, it packages them into one SMS
message and sends it to the mobile phone.
4. System Application design
The system requires the design of two major software
components, namely the mobile application and the home
server application. Fig. 5 shows the behavior model of the
mobile application. The application passes through four
states to send an SMS which contains the commands.
When the user selects the application on the mobile
handset it starts running and waits for the user interactions.
The user can then select one of the following categories:
monitor, control, or configure. The application sends an
SMS message if the turn-on, turn-off or select level is
pressed.
Similarly, the home sever behavioral model is shown in
Fig. 6. The process of sending SMS notification can be
clearly seen.