Internet hom control

download Internet hom control

of 7

Transcript of Internet hom control

  • 8/7/2019 Internet hom control

    1/7

    Internet hom controlsystem usin luetooth

    by K. K. Tan and C.Y SohTh is paper presents the development of a systemfor controlling lionze electrical appliances over the Internet.The needjw a physical conriection to the Internet is removed b y usirig Bluetooth wireless technology to

    provide a linkfrom the appliance to the Irrternet a n d the Wireless Application Protocol (WAF')to providea data link between the Internet and a mob i l e phone. Thepaper describes the hardware and software design

    considerations offlie system and discusses possib lefntnre developments explo iting th el in i and thirdgeneration wireless techriologies.

    ne of mankind's greatest dreanls has alwaysbeen to have an intelligent home, such asthose depicted in the Hollywood movies0Jctsons and Bark E Th e Future 11. Th e

    obvious benefits of convenience and conlfort broughtby home automation, as well as the possibilities forremote operation ofday-to-day home processes such asgardening and pet feeding, have fuelled thedevelopment of such system over the past decade.

    Home automation' involves the use of nucro-processor-based intehgence to integrate or controlelectronic products and systems in the home. Theseproducts and systems include ' floodlight?, coffeemakers,' computers, security systems, heating andcooling system, lighting control system?, andaudiohide0 (home theatre) systems.

    The home automation conmiunity is striving todevelop a technical standard-in the form ofa chip thatcan he built into home elecmnics-that d facilitate

    intercom~nutucation between devices throughout anentire house. The oldest standard isX102.The SMARTHOUSE' standard has been utihsed for years, hut in alimited fashion because of the proprietary nature of thetechnology. Other, more open protocols underdiscussion include the Consumer Electronics Bus(CEBus') and the LonWorks systemspan open,networked automation and control solution for thebuilding, industrial equipment, transportation, andhome markets. Based on physical transceivers andapplication layer software, LonWorks nodes can heconnected to multiple types ofniedia; twisted-wire pairand power lines are among the niost conmion.Although there are many home networks already inexistence, and new protocols for wired networks such asSiinple Conml Protocol (SCP) and the HomePlugI'owerline technologes arc emerging, to-date no industrystandardha?prevailed. T h s h z probably acted as a majordisiiicentive to home ownen to he s t in inihrmctu~.

    thermostat

    television

    dimmer SwnCh

    ceiling lightWll&SSnetwork

    Fig. 1 Hardware interactionENGINEERING SCIENCE AND EIXJCATION JOUKN AL AUGUST 2002

    126

  • 8/7/2019 Internet hom control

    2/7

    0 ' 0 0

    - - embedded- - ---I SlgnalS toI on or onI Switch appliance

    Fig. 2 Hardwareconnectivity within the' Bluetoothnetwork

    Wiring up an entire house (whether new or old) withtwisted-wire pain involves making a big decision. Awireless (infra-red or radio fiequency) solution ispmbably more easiiy adoptable.

    This paper addresses the control of a home networkthrough a wireles medium by exploiting the emergingwireless technologies of Bluetooth and WirelrssApplication Protocol (WAP). There are reasom foradopting a wireless approach apart From ensuringthat thesystem will he able to work in most existing homes withnunimum modifications and these will be elaboratedin the following sections. An overview of otherWAl-over-Bluetooth applications can be found inReference 6.Bluetoothand WAPBluetooth*' refers to a new nd io technology, expectedto be delivered commercially in hulk h m 2002, whichpromises to change sigdcandy the way machines areused. It is a small-forn-factor, low~-costtechnology thatprovides low-power, short-range (up to 1Oni) linksbetween mobile PCs, cell phones, printers or otherdevices arranged in ad hoc 'piconetq' of up to eightdevices. I t operates in the 2.4GHz band and uses afrequency hopping (FH)scheme.

    Conceived initially by Ericsson, the Bluetoothstandard has been adopted by many conipanies world-wide. A Bluetooth clup is designed to replace cables bytalang the information normdly carried by the cable andtrammining it at a special frrquency to a receiverBluetooth chip, which will then give the informationreceived to the computer, phone, etc.Interest in Bluetooth has been increasing over last fewyears and consumers ma y expect to encounter anabundance of Bluetooth-enabled products as manycompanies have invested in this technolog. Companiessuch a Toshiba and Sony are planning to build*'Bluetooth' 15 rhc Englirh name for th c Danish Viking KingHanld Blbrand, who lived in rhc latier part of the 10th centuryHarald Ullrarid unircd an d cunrrollrd Ilcnmark 2nd NowaySimilarly die Biuc tooth radio technology i s intended to un i t edevices.

    Bluetooth into most of the products they manufacture,includng consumer electrical home appliances, forexample toasters, video recorders and nucmwave ovens.

    Much of the effotr expended around the Bluetoothtechnology is aimed a t promoting interoperability Tothis end the Bluetooth Special Interest Group (SIG) hasproduced over400pages ofproues (publishedas volume2 of the version 1.1 specification)'. Cross-platform,cross-vendor interoperability is a goal shared by manyvendors and is a fuudamental objective ofthe technologyas it will allow future home appliances manufactured bydifferent vendors to talk to each other, thus making theintegration of the appliances into a home automationsystem @oweredby Bluetooth) a seamlessprocess.

    Bluetooth is a sinipler technoloby than any of thevariants ofthr popular IEEE 802.11standard for wirelesslocal-area networks. By 'simpler' is nieant here fewerand/or less-demandingRF semiconductor chips, fewerpassive coniponents arid less complex dgital basebandchips. Over the next few years it looks 3s if the bdl ofmaterials (UOM)for a Uluetooth systemwill be halfthatof an equivalent IEEE 802.11 system. As morecompanies adopt Bluetooth in their product5, the priceof Bluetooth chips is e*pected to drop further.

    In view of its cost advantage and greater popularityamongst home appliance manufactures, Bluetooth wasthe candidate identified for the wireless control networkused in the work describedin this paper.

    The Wireless Application Protocol (WAP) isanopen,global spechcation that enables users easily andinstantaneously to access and interact with informationand services through mobile wireless devices. In thework described in this article we have used it for long-m g e conlmunication between a user at a remotelocation and a Bluetooth network in the user's home byleveraging on the Internet revolution.System architectureThe hardware needed for our home control systern isshown in Fig. 1 . A Pentium 111 450MHz personalcomputer with 192 Mbytes ofmemory is linked to theInternet by a broadband connection or a modeni. The

    ENGINEEKING SCIENCE AND EDUCATION JOURNAL AUGUST 200212 7

  • 8/7/2019 Internet hom control

    3/7

    Fig. 3 Switching circuitfor controllingAC power

    triac switch220 V ACMOC3010

    I

    Fig. 4 The switching device

    Fig. 5 An electric kettle being controlled by the switchingdevice

    host computer operates on a RedHat 6.2 platform withan upgraded version 2.4.2 kernel.

    The hardware connectivity within the back-endBluetooth network, or piconet, is shown in Fig. 2. Other hardware consideration3

    Preferably the home automation system should bebackwards compatible with existing home appliancesthat are not Bluetooth enabled. To achieve this, anexternal Bluetooth-enabled device has to be wired tothe conventional home appliance in order to integrateit into the system.As a pilot system, a simple Bluetooth-enabledswitching device has been constructed to facilirate theswitching on and off of conventional appliances.Fig. 3 shows the circuit of this device (Fig. 4), whichmay be controlled by a PC or via an embeddedBluetooth-enabled system.A 5 V signal at the input ofthe MOC3010 optoisolatord turn on the triac,hence switching on the appliance;a ground signal willswitch off the appliance.

    The power to a home appliance can be controlled byplugging its power leads into the socket of the device,as shown in Fig. 5. Thus existing appliances as well asfuture Bluetooth-enabled apphcances can be part ofthehome automation network.Software implementation detailsTh e software architecture is shown in Fig. 6. It isessentially made up of two subsystem-the hn t- en dgraphical user interface (CUI)on the niobile phone andthe back-end Bluetooth powered automation system-which interact with each other through WN.Front-end CUIThe h nt -e nd graphical user interface is implementedusing Wireless Markup Language (WML), a markup

    ENGINEERING SCIENCE AND EDUCATION JOU RNAL AUGUST 2002128

  • 8/7/2019 Internet hom control

    4/7

    Fig. 6 Interactionof the subsystem softwarelanguage based on X M L (Extensible MarkupLanguage)'. Th e official WML specification is devel-oped and maintained by the WAP Forum, an industry-wide consortium founded by Nokia, Phone.com,Motorola, and Ericsson. This specification defines thesyntax, variables, and elements used in a valid WMLfile. A valid WML document must correspond to thespecification or it cannot be processed.

    The user interface allows user input h m the phonekeypads using input fielh and presents data in the formof static text, tables, hyperlinks and monochromeimages.Fig. 7shows the user interface on a WAP phone.Back-end sysfemIn a typical Bluetooth network, or piconet, R Fconnections are established between a master device,which controls the network, and up to a maximum ofseven active slave devices, which communicate withthe master when permitted. Slave devices do notcommunicate with one another directly.Masterdevice system : Th e master device in our piconet

    is the personal computer that functions as a server andwhch has a Bluetooth module wired to it via a serialcable. It pmvides critical information related to SeNiCeSthat are active,on the Bluetooth devices. Essentially, ithandles all connections b m the client Bluetooth

    devices and acts as the bridge for conmiunicationbetween the individual Bluetooth devices.In addition, the host computer also rum a Web serviceprovided by Apache 1.3.12that coma with the RedHat6.2 distribution. The Web service facilitates Web access,connecting the WAE' phone user from a remote locationto the Bluetooth network back at home.

    Slave device system: The slave device in our work is theswitching device shown in Figs. 4and 5. The systemcontrols the switching circuit, and hence the electricalappliance, by providing a 0 or 5V signal according tocommands h m the users.

    iFig. 7 The GU I displayed on a SiemensWA P phone

    ENGINEERING SCIENCE AND EDUCATIONJOUKNAL AUGUST 2002129

    http://phone.com/http://phone.com/
  • 8/7/2019 Internet hom control

    5/7

    Fig. 8 Screenshot of an authentication process on a WA PphoneOperational principlesBack-end connections

    The Bluetooth application that we have developedresides on top of the host stack and uses the protocolcomponents malang up the stack to establishconnections between the master and slave devices.

    The application program communicates with thestack using function calls and the stack communicateswith the former using event triggers. In establishing theconnection, the program perform the steps outlinedbelow:

    Inquiry: After initialising all the necessary componentsin the stack, the client Bluetooth device begins a 'devicediscovery' (or inquiry). When it conies to withinamund lOnr of thc master device it determines theaddresses of other Bluetooth devices in its vicinity aswell as their capability using the class of device (COD)information. The client device does h s by repetitivelytransmittingINQUIRY packets. Other devices wishingto reveal their presence within a 10m service arearespond with messages containing their unique address,as well as illformation indcating the seMces they

    support and the attributes of these services.Service search: Upon obtaining the Bluetooth address

    of the master devicr in its vicinity the client devicesearches the service discovery server of the master to getinformation about the services offered. Importantinformation presented to the client includes no t onlythe services offerrd but also the way that the client mustestablish a connection. In our work, a connection willbe made by an emulated serial link.

    Eniulated serial comertion: Armed with the necessaryinformation, the client attempts to access the server,which it does by senmng a connection request toestablish a connection. The connection is establishedupon acknowledgment from the server.

    Point-to-point protocol: Next, the Point-to-PointProtocol (PPP) is activated by the application programto facilitate the use of TCP/IP (Transmission ControlProtocol/lnternet Protocol) components. The server,in this application, assumes the IP address of192.168.65.1, which resides in the band of class Cprivate IP addresses"'. The IP address of the client isassigned by the server. The application, running o nTCP/IP and on the corresponding sewer node, cannow be started and used.

    Application Layer: Next, the application on the clientconnects to the server on TCP/IP and initialises aservice database with information on the serviceprovided by the device and the commands it accepts.For the switching device in our work, the conunands'switch:l', 'switch:2' and 'switch:3' will switch on,switch offand display the power status of the electricalappliance, respectivelySecurity

    On the client side, a user begins a session with thehome automation system by logging into the system(Fig. 8).

    Since the Internet is a public network, securitymeasures have to be used to protect the back-end homeautomation system from unauthorised access. It wouldbe catastrophic if an unauthorised user could access thesystem illegally and do things like opening the door ofthe house.

    Th e WAP specifications do not include a basic

    Aauthenucallon

    Fig. 9 The authentication processENGINEERING SCIENCE AND EDUCA TIONJOURNAL AUGUST mn z

    130

  • 8/7/2019 Internet hom control

    6/7

    authentication scheme like that of HTTI? As a result,security in the system is provided by verifyinginformation about the users and their passwords storedin a Microsoft Access database on the host computerthrough ODBC (Open Database Connectivity), seeFig. 9.CCI program

    CGI (Common Gateway Interface) is used to runan application on the host coniputer and to formconnections to the Bluetooth devices. For our controlapplication we have written the CGI program in thePEKL language. Having S U C C C S S ~ ~ I ~ ~ Ylogged on to thesystem, the CGI program telnets* to the applicationprogram server. A command is issued to the server,requesting it to search for all Bluetooth devices thatare connected to the system. The names ofth e devicestogether with the services they provide are fed backto the client WAP browser (see Fig. 10). When adevice to he connected to is selected, a menu o f thefunctions that can be executed on that device isdisplayed on the graphical user interface, as shown inFig. 11.

    Besides acting as a bridge between the WAP phoneuser and the back-end Bluetooth devices, the CGIprogram also has a certain amount of built-inintelligence. Upon receiving data fiom a Bluetoothdevice, the CGI program W IU parse the data andrecognise any commands embedded in it. Thecommands are converted into hyperlinks forpresentation to the user. This enables the user tocontrol the device without actually keying inconmunds. Instead, a click on the hyperlink enablesthr user to switch the electrical appliance on or off.On-demand WAPservice

    A dial-in server is a host cquipped with a modem andphone line that allows clients to call in and connect toit. There are several reasons 3 person nught want to dothis, e.g. to use the resources on the did-in server, or,if the dial-in server is on a network, to use the dial-inserver to access the network.

    We wanted our home automation system to beavallablr to a wide nn ge of users and not just to a smallgroup of usen having broadband access in their homes.Hence, the host computer was configured as a dial-inserver, as in Reference 11.A GSM (Global System forMobile connnunicationr) modem is connected to thehost on conmunications port 2, through which itreceives data calls 6-om mobile phones and establishesaPPP connection with them.

    The last component needed to allow a WAP phoneuser to access the system via dial-up is the WAPgateway or server. Gateways are pruxies that docompression before serving them to a hand-helddevice. Depending on the vmdor, gateways can have avariety of enhancements beyond this basicfunctionality The trend is for WAP server products toadditionally offer scripting and Java servlet support.Tclnet is a tcrmiod emulation pmgiam for TCP/II networks.

    I

    Fig. 10 Screenshot of a WAP interface showing thedevices connected

    Fig. 11 Screenshot of functions supported by theswitching device

    Evaluationof the systemWAP emulators that model mobile phones such as theSiemens SL45, No!& 6210, Nokia 7110, MotorolaTalkahout T2288 and Ericsson R380 have been usedto test the system, which can be accessed and controlledusing all these WAF simulators. In addition, a Web-based WAP simulator from a US-based web site hasbeen included in the test so as to evaluate the system3response outside Singapore.

    A system based on the Internet can exploit its ever-changing technologies but at the same time issubject to its linutations. Internet delay caused byunpredictable network traffic is the number oneproblem facing Internet applications. The local WAPsimulators responded alniost instantaneously whereas

    ENGINEERING SCIENCE AND EDUCATIONJOURNAL AtiGUST 2002131

  • 8/7/2019 Internet hom control

    7/7

    their Web-based counterpart was a few seconds slower;nonetheless, the delaywas still acceptable.

    In adhtion to meeting or exceeding the capabilitiesofconventional home automation system running overwires, the system presented here is fully wireles. Homeappliances can easily be integrated into the system 3sthere is no need for any retrofitting of the house.Future trendsThe work reported in this paper represents a small butsignificant step in the evolution of Internet-basedhome automation systems. Although our pilot systemmerely switches electrical appliances on or off, itcould be extended to control the speed of a fan, tocontrol remotely a video recorder or to perform manyother functions by Bluetooth-enabling existing homeappliances as was done with the switching devicedescribed in this paper. This will involve more workand it may be necessary to use analogue signals.However, increasing adoption of the Bluetoothstandard among home appliance manufacturers in thenear hture will reduce the amount of work neededto provide control of appliances in the home networkand interoperability will be guaranteed by theBluetooth standard. All that will be requircd will be ahost computer that issues commands specified in itsprofile to control the Bluetooth-enabled devices.Jini

    Being a connectivity tool, Bluetooth technologycan provide the physical medium for other emergingtechnologies that will enhance the service of homeautomation systems. One such technology is SunMicrosystem's Jini technologyI2. The J ini system is anetwork-centric technology that assumes andrequires that the communication between a client andthe services used by that client is accomplishedthrough a Java interface. Therefore when a device isneeded, it is plugged into the network and Jinidownloads the information needed to connect it. Asa result, a device A can communicate with a device Bthat it has never before encountered without a humanhaving to install the required drivers for B. This non-protocol based methodology is a new approach indistributed computing.

    One day all of our digital devices will be able tocommunicate easily with one another. For example, akidge in the home network will automaticallysynchronise with the host computer. Should there be ashortage of certain groceries, the fridge will alert thehost computer, which will link this information to agrocery distributor via the Internet. The union ofBluetooth andJini promises to enable all this and more.3G networks

    The wireless world is undergoing anotherrevolution with the imuunent introduction of 3rdgeneration (3G) wireless technology" based onwideband code division multiple access (W-CDMA).

    This should provide a more sophisticated and diverserange of services than ever before offered. Forexample a mobile phone could be used 3s if it were acamera, video camera, computer, stereo and radio allrolled into one. Fbch media information wdl be atour fingertips whenever it is needed as long as we arewithin range of a wireless network.

    Thc wider bandwidth provided by the 3G networkwill allow large amounts of information to betransmitted across the wireless Internet at a fasterspeed. This will makes wireless Internet a veryfavourable medium for control in many areas in thefuture. For instance, live video images of the homecould be streamed over the network ont o the mobilephone. This would allow users to monitor what washappening at home and take the concept of theInternet-based smart home to a new level ofsophistication.

    ConclusionThis paper has presented the development of a Web-based home automation system that provides simpleon-off control and monitor ing from a remotelocation using a WAP phone. The pilot set-up couldbe extended to many other ways of controlling homeappliances. The connection of appliances to theInternet opens the door to many creative ways ofenhancing the quality of our lives through convenientand flexible control and co-ordination of theseappliances. We anticipate that our system will be ableto work in conjunction with other existingtechnologies in the near future.

    References1 See l , t tp : / /wwwalbanynrt /~~E~~~l /avc /(Audio Vidco2 'What is XlO!'. See h t r p : / / s m a r t h o m r . c o * ~ / ~ h ~ " ~ l O . h ~3 Se e http://www.smart-hourecom/ (Smart House Inc.)4 Se e http://wwwcebus.org/ (CEBur Industry Council Inc.)5 Se e http://wwwechelon.corn/ (Echelon Corp.)6 HARTWIG, S. , RAUTENBERC, T., SIMMER, M.,TEMOVIC, D., an d VAN BEBBER, A,: 'WAP overBluctooth technology and applications'. Proc. ICCE Int.Conf on ConsumerElectronics, Lor Angrlrr, CA, USA,19th-2lrtJune 2001, pp.12-13 (IEEE, 2001)7 Se e http://~.bluetooth.com(the official BluetoothWeb rite)8 'Bluetooth specification'.See hrtp://~.bluetaoth.com/dev/rpecificarions.ap (Huetooth SIG)9 'Extensible Markup Language'. See http://\nuww3.arg/

    X M L /

    Connection Web site)

    10 'RFC1918. Se e ftp://ftp.iri.edu/in.notes/*cl918.~t11 GENTRY, JOSH: 'Lmux di&n S C W ~ T setup guide'. Se ehttp://~.swcp.com/-jgenny/pers.html12 lini technology'. Se c http://\n\?YJini.org/ 13 'Third generation mobile telephony'. Se e http://\\Ruwerics~ron.com/technoloW/3G.rhnlllQIEE: 2002The authors are with the Dcpartnient of Electrical an dComputer Engineering, National Univrrriry of Singpopore,4 Engineering Drive 3 , Singpore 117576.

    ENGINEERING SCIENCE A N D EDUCATIONJOURNAL AUGUST 2002132

    http://www.smart-hourecom/http://wwwcebus.org/http://wwwechelon.corn/http://nuww3.arg/http://n/?YJini.orghttp://n/?YJini.orghttp://nuww3.arg/http://wwwechelon.corn/http://wwwcebus.org/http://www.smart-hourecom/