Docstoc

phase2

Document Sample
phase2 Powered By Docstoc
					    HOME APPLIANCE CONTROL SYSTEM
                     PROJECT – PHASE II




Submitted By

Ann K George - http://utdallas.edu/~akg043000
Nithya Inbamani - http://utdallas.edu/~nxi041000
Shilpa Maddi    - http://utdallas.edu/~sxm047200
               TABLE OF CONTENTS



1) Problem Definition…………………………………………………....3

2) Appliances and Features……………..……………………………….4

3) CRC Cards……………………………………………………………4

4) Assumptions made……………………...…………………………….7

5) Diagrams……………………………………………………………...8

6) Use Case Diagram…………………………………………………….9

7) Use Case Templates…………………………………………………12

8) Interaction Diagrams (Sequence and Collaboration)………………...15

9) Class Diagram………………………………………………………..24

10) State Chart Diagrams………………………………………………..29

11) Activity Diagrams…………………………………………………...33

12) Package Diagram……………………………………………………38

13) Component Diagram………………………………………………...39

14) Deployment Diagram………………………………………………..40

15)User Manual …………………………………………………………41




                                                              2
Problem Definition

        A home appliance control system (HACS) is a system which is controlled by a
remote system such as a mobile phone or a Laptop. It remotely controls, monitors and
coordinates home appliances such as the thermostat, alarm system, indoor/outdoor lights,
water sprinkler, VCR, Bath tub etc.


        In this phase of the project, we have analyzed the requirements of the system. We have
selected 3 important appliances to be attached to the HACS system. They are


     Thermostat System
     Bath Tub System
     Sprinkler System


    The main purpose of HACS is that the user can have control of the systems when he is away
from his home, at work, out of station or on vacation etc.
    If the user wants to take a long bath, after his hard day of work, he can give command to the
bath tub to fill itself with water with a desired temperature, before he comes home.
    If the user is away on vacation, he can control the sprinkler system by switching it on or off,
for a specific time and duration.
    The user can save electricity by switching off the ac/heater when he is away and switching it
on, an hour before he returns home, so that the temperature in the house is comfortable.
    We can depict the whole system in brief with the help of a block diagram. This diagram gives
us an idea about how the system should be functioning and how the various elements in the
system interact with each other as shown below.




                                                                                                 3
Appliances and Features

Thermostat System : The user can remotely control the temperature settings, whether heater or
air conditioning should be switched on, whether the system should work in an auto mode or fan
mode.


Bath tub System : The user can remotely control the temperature, level of water in the bath tub
and when the filling should be performed.


Sprinkler System : The user can remotely control the start date, start time, duration of the
sprinkler and the various zones around the house which has to be watered.




CRC Cards


        We used CRC cards to discuss the functionality of the various systems and the features to
be present in various systems. The class diagrams were discussed based on the functionalities and
the attributes, which are important for each appliance system.


        The CRC cards are as follows:



                                        Hacs Controller
            RESPONSIBILITIES                                     COLLABORATORS

-Accepts access requests from User.                                    Users
-Request UserId & Password from the                               AddRemoveApp
User.                                                            ApplianceController
-Accepts command from User
-Displays menu to user.
-Displays appliance list to user.



                                                                                               4
                                    AddRemoveApp
           RESPONSIBILITIES                             COLLABORATORS

-Adds appliance from the list of appliances.
-Removes appliances from the list of                     HacsController
 appliances




                                  ApplianceController

         RESPONSIBILITIES                           COLLABORATORS
                                                    HacsController
-Accept command from HacsController.                 ThermostatController
-Sends command to respective devices.                SprinklerController
-Accept status from the HacsController.              BathTubController
-Gets the name of the device from
HacsController.
 -Check Status of the device
-Updates the status of the device.
-Switches the device on.
-Switches the device off.




                                                                            5
                                 BathTubController
           RESPONSIBILITIES                           COLLABORATORS

-Receives the commands from Appliance
Controller                                            ApplianceController
-Gets the Temperature.
-Gets the Level.
-Gets start time.
-Sets the Temperature.
-Sets the Level.
-Sets start time.
-Sets the BathTub.




                                SprinklerController


            RESPONSIBILITIES                          COLLABORATORS

-Receives the commands from Appliance
Controller                                            ApplianceController
-Gets the Zone.
-Gets the Duration.
-Gets start time.
-Sets the Zone.
-Sets the Duration.
-Sets start time.
-Sets the SprinklerController..




                                                                            6
                                      ThermostatController
             RESPONSIBILITIES                                       COLLABORATORS

-Receives the commands from Appliance
Controller                                                           ApplianceController
-Gets the Temperature.
-Gets the Heat or Ac.
-Gets start time.
-Sets the Temperature.
-Sets the Heat or Ac.
-Sets start time.
-Sets the thermostat.




  Assumptions made

  These were the assumptions made by us before designing the system:


     1) Each appliance has an inbuilt chip which can coordinate with the Appliance Controller
         and can send and receive wireless signals from it.


     2) Each appliance has an inbuilt clock which has the current date and time settings.


     3) The user has to first log on to the HACS before he can have control over the appliances.
         The validation should be performed and only then can the session with the Appliance
         Controller be established.


     4) The Appliance Controller is a centralized device which has the capability of sending and
         receiving wireless signals from the user and from the appliances in the house of the user.


     5) There is an inbuilt system in the appliance which responds to the wireless signals and can
         schedule itself to perform the tasks as selected by the user.


                                                                                                  7
Diagrams:

Use Case Diagram : A use case diagram is one which shows a set of use cases and actors and
their relationships.


Class Diagram : A class diagram is one which shows a set of classes, interfaces, collaborations
and their relationships.


Interaction Diagram : An interaction diagram shows an interaction, consisting of a set of objects
and their relationships, including the messages that may be dispatched among them.


        The two types of interaction diagrams are:


     Sequence Diagram: A sequence diagram is an interaction diagram that emphasizes the
        time ordering of messages.
     Collaboration Diagram : A collaboration diagram is an interaction diagram that
        emphasizes the structural organization of the objects that send and receive messages.


State Chart Diagram : A state chart diagram shows a state machine, consisting of states,
transitions, events and activities.


Activity Diagram : An activity diagram shows the flow from activity to activity within a system.
An activity shows a set of activities, the sequential or branching flow from activity to activity,
and objects that act and are acted upon.


Package Diagram : A package can otherwise be called a collection of logically related UML
elements.


Component Diagram : A component diagram shows a set of components and their relationships.
We use the component diagram to illustrate the static implementation view of a system.


Deployment Diagram : A deployment diagram shows a set of nodes and their relationships. We
use deployment diagrams to illustrate the static deployment view of an architecture.


                                                                                                8
Use Case Diagram



                                                  This is used for connecting and
                                                  disconnecting appliances to the
                                                  Hacs Controller



         The Owner can
         access the appliances
         using wireless device                       Add/Remove Appliance
                                                                                    <<uses>>




                  User                                                          <<uses>>                           Login


                                                                                    This is used for controlling
                                                                                    appliances in the house
                                                              Set Appliance

                 Logout


         This is used to log out
         of the system after the
         user finishes using it.
                                    Set Bathtub                Set Sprinkler            Set Thermostat



Explanation of the Use Cases :


Login use case :
        Login use case is used when the user wants to establish a session with the Hacs
Controller in order to send commands to an appliance in his home.
Flow of events:
1) User is asked to enter userid and password .
2) The validation is done by the hacs controller.
3) If the values entered are correct, a session is established.
4) Otherwise the user is prompted to enter the correct userid and password.



                                                                                                                   9
5) The menu is displayed to the user.


Logout use case :
        Logout use case is used when the user wants to end the session with the Hacs Controller.
Flow of events:
    1) User clicks logout button
    2) The session is ended.




Add/Remove Appliance use case:
        This use case helps us to add or remove appliances from the list of already existing
appliances. The “Add appliance” feature is used when the user wants to add an appliance to the
list of appliances in order to remotely control the appliance. The “Remove appliance” feature is
used when the user wants to remove an appliance from the list of appliances, when he no longer
wants to remotely control the functioning of the appliance.
Flow of events:
    1) The user clicks on “add/remove appliance” option
    2) The appliance menu is displayed
    3) The user selects the appliance to be added or removed
    4) That particular appliance is added or removed from the list of appliances
    5) Feedback is sent to the user.


Set Appliance use case:
        This use case is a generalization of the three usecases – Set Bathtub, Set Sprinkler, Set
Thermostat..
Flow of events:
    1) The user clicks on the Set Appliance.
    2) The appliance menu is displayed.
    3) The user selects the desired appliance.
    4) Based on the selection of the appliance, the control is transferred to the appropriate “Set
        Appliance”.


SetBat tub use case:
        This use case is used to control the setting of the Bath tub.


                                                                                               10
Flow of events:
   1) The user selects the bath tub system.
   2) The user gets the current status of the system.
   3) Then he selects the temperature, level and the time to start the system.
   4) Feedback is then sent to the user.




Set Sprinkler use case:
       This use case is used to control the setting of the Sprinkler.
Flow of events:
   1) The user selects the sprinkler system.
   2) The user gets the current status of the system.
   3) Then he selects the start time, duration and zones to start the sprinkler system.
   4) Feedback is then sent to the user.




Set Thermostat use case:
       This use case is used to control the setting of the Thermostat.
Flow of events:
   1) The user selects the thermostat system.
   2) The user gets the current status of the system.
   3) Then he selects the temperature, heat or ac, start time options to start the system.
   4) Feedback is then sent to the user.




                                                                                             11
Use Case Templates
      Login Use Case Template
      Use Case            1.LOGIN
                          History created 5/7/2005

      Descripti           User uses this use case to establish a session with the HACS
on                controller

      Actors              User

      Assumpti            The user has to first log on to the HACS before he can have
ons               control over the appliances. The validation should be performed and only
                  then can the session with the HACS Controller be established

      Steps               1.User enters the UserID and Password and submits to HACS.


      Issues              What is the mode of communication between User and HACS
                  controller.




      Logout Use Case Template
      Use Case                  2.LOGOUT
                                History created 5/7/2005

      Description               User uses this use case to end a session with the HACS
                    controller.

      Actors                    User


      Assumptions               The user is logged in.


      Steps                     1.User clicks LOGOUT button and the session is ended.



      Issues                    What is the mode of communication between User and HACS
                    controller.




                                                                                             12
       Add/Remove Appliance Use Case Template
       Use Case                3.ADD/Remove Appliance uses 1.LOGIN
                               History created 5/7/2005
       Description             User uses this use case to add or remove appliances from
                       already existing set of appliances.
       Actors                  User

       Assumptions             The user is logged into the system and established a session
                       with HACS controller.
       Steps                   1.User clicks on “add/remove appliance” option .
                               2. The appliance menu is displayed
                               3. The user selects the appliance to be added or removed
                               4. That particular appliance is added or removed from the list
                       of appliances
       Issues                  What is the mode of communication between User and HACS
                       controller.


       Set Appliance Use Case Template
       Use Case            4.Set Appliance uses 1.LOGIN
                           History created 5/7/2005
       Descripti           This use case is a generalization of the three systems –Set Bath
on                 tub,Set Sprinkler, Set Thermostat.
       Actors              User

       Assumpt             The user is logged into the system and established a session with
ions               HACS controller.
       Steps               1.The user clicks on the Set Appliance.
                           2.The appliance menu is displayed.
                           3. The user selects the desired appliance
                           4. Based on the selection of the appliance, the control is transferred
                   to the appropriate appliance
       Issues              What is the mode of communication between User and
                   HACS controller.



                                                                                                    13
      Set Thermostat Use Case Template
      Use Case           4.Set Thermostat Uses 1.LOGIN
                         History created 5/7/2005
      Descripti          This use case is used to control the settings of the
on                Thermostat.
      Actors             User

      Assumpti           The user is logged into the system and established a session
ons               with HACS controller.
      Steps              1.The user selects the thermostat system .
                         2.The user gets the current status of the system .
                         3.Then he selects the temperature, heat or ac, auto or fan
                  options to set the settings of the system.


      Issues             What is the mode of communication between User and
                  HACS controller.




                                                                                        14
Interaction Diagrams




Sequence Diagram for Login



       :User                                        app:Hacs
                                                    Controller
                       1: Login()

                                                        2: Validate user


               3: Correct-Session Establised/
                   Incorrect-Repeat Login



                    User is prompted if
                    userid or password
                    is incorrect




Collaboration Diagram for Login

                                                                   2: Validate user



                                 1: Login()
     :User                                                           app:Hacs
                                                                     Controller
                      3: Correct-Session Establised/
                        Incorrect-Repeat Login


                              User is prompted if
                              userid or password
                              is incorrect




                                                                                      15
Sequence Diagram for Logout



       :User                              app:Hacs
                                          Controller
                       1: Logout()


                                               2: Take action

                      3: Session Ends




Collaboration diagram for Logout


                                                       2: Take action



                           1: Logout()
     :User                                              app:Hacs
                                                        Controller
                        3: Session Ends




                                                                        16
Sequence diagram for Thermostat system




      :User                             app:HacsContr                    thermostat:Thermostat
                                             oller                             Controller

              1: Select thermostat system

                                                   2: Get thermostat status

                                                   3: Send thermostat status
              4: Display thermostat status


        5: Enter temperature,heat/ac, startTime

                   6: Set thermostat

                                                        7: setThermostat()

                                                                                      8: Take action

                                                        9: Send feedback

                 10: Display feedback



                                                            User selects thermostat
                                                            system,enters the
                                                            settings and specified
                                                            action takes place




                                                                                                       17
Collaboration diagram for Thermostat System




       :User                      1: Select thermostat system
                            5: Enter temperature,heat/ac, startTime
                                       6: Set thermostat


                                4: Display thermostat status
                                   10: Display feedback                 app:HacsContro
                                                                              ller

                                     3: Send thermostat status
                                         9: Send feedback
       8: Take action                                                 User selects thermostat
                                                                      system,enters the
                                         2: Get thermostat status     settings and specified
                                            7: setThermostat()        action takes place

    thermostat:Thermostat
          Controller




                                                                                                18
Sequence Diagram for Bath Tub System




      :User                         app:HacsController                      bathtub:BathTub
                                                                               Controller

              1: Select bath tub system

                                                    2: Get bath tub status

                                                   3: Send bath tub status
              4: Display bath tub status


         5: Enter temperature,level,start time

                                                         6: setBathTub()



                                                                                    7: Take action

                                                         8: Send feedback

                 9: Display feedback



                                                            User selects bath tub
                                                            ,enters the settings
                                                            and specified action
                                                            takes place




                                                                                                     19
Collaboration Diagram for Bath tub System




     :User                   1: Select bath tub system
                        5: Enter temperature,level,start time




                           4: Display bath tub status
                              9: Display feedback                     app:HacsContro
                                                                            ller
                                3: Send bath tub status
                                   8: Send feedback
     7: Take action

                                    2: Get bath tub status
                                                                User selects bath tub
                                       6: setBathTub()          system,enters the
                                                                settings and specified
    bathtub:BathTub                                             action takes place
       Controller




                                                                                         20
Sequence Diagram for Sprinkler System




      :User                            app:HacsContr                       sprinkler:Sprinkler
                                            oller                              Controller
              1: Select sprinkler system

                                                   2: Get sprinkler status

                                                  3: Send sprinkler status
              4: Display sprinkler status

         5: Enter start time, duration, zones


                 6: Set sprinkler on

                                                       7: setSprinkler()

                                                                                     8: Take action

                                                       9: Send feedback

                10: Display feedback




                                                           User selects sprinkler
                                                           system,enters the
                                                           settings and specified
                                                           action takes place




                                                                                                      21
Collaboration Diagram for Sprinkler System




         :User                1: Select sprinkler system
                          5: Enter start time, duration, zones
                                  6: Set sprinkler on


                            4: Display sprinkler status
                              10: Display feedback
                                                                 app:HacsContro
                                                                       ller
                                3: Send sprinkler status
                                   9: Send feedback
      8: Take action

                                    2: Get sprinkler status      User selects sprinkler
                                       7: setSprinkler()         system,enters the
                                                                 settings and specified
    sprinkler:Sprinkler                                          action takes place
        Controller




                                                                                          22
Sequence Diagram for Add/Remove Appliance

      :User                                app:HacsCo                            addrem:AddR
                                             ntroller                             emoveApp

          1: Select add/remove appliance option

                   2: Select Appliance

                                                  3: Send Add/Remove appliance command


                                                                                          4: Take action




Collaboration Diagram for Add/Remove appliance



     :User
                              1: Select add/remove appliance option
                                        2: Select Appliance



      4: Take action                                                                     app:HacsCo
                                                                                           ntroller



     addrem:AddRe                        3: Send Add/Remove appliance command
       moveApp




                                                                                                           23
Class Diagram




                24
Explanation of Class Diagram


The various classes in the class diagram are as follows:


Users
This class contains 2 attributes,
     1) userid
     2) password.


This class gets the userid and password from the user and sends it to the ApplianceController
class.


HacsController

The attributes are :
    1) userid
    2) password
    3) appliance[] - appliance[] is an array which holds the names of the appliances controlled
         by the Appliance controller.


The operations are:
    1) login( ) – This operation checks whether the userid and password are correct and then
         establishes the session for the user.
    2) logout( ) - This operation is used to end the session of the user.
    3) menuDisplay( ) – This operation displays the menu with the following options
              Add/Remove appliance
              Set Appliance.
    4) appListDisplay( ) – When the user clicks on Appliance System, this operation displays
         the current list of appliances which can be controlled by the user.
    5) getAppStatus( ) – When the user clicks on a specific appliance, this function gets the
         appliance status from the appliance and displays it.




                                                                                            25
    6) addRemoveApp( ) – When the user clicks on the option “Add/Remove appliance”, this
        calls the AddRemoveApp class functions, for adding or removing appliances from the list
        of appliances.


AddRemoveApp

The attribute is:
appliance[]- It is an array holding the various appliances which the user can control.


The operations are:
    1) addApp( ) – This is for adding a new appliance to the already existing list of appliances.
    2) removeApp( ) – This is for removing an appliance from the already existing list of
        appliances.


ApplianceController

This is an abstract class which is inherited by the following classes
     BathTubController
     ThermostatController
     SprinklerController


It has the attributes and operations which are common to all these three classes.


The attributes are:
    1) appId : This indicates the appliance Id.
    2) status : This shows the current status of the selected appliance.
    3) appName : This indicates the appliance name.


The operations are:
    1) getName( ) : This is used to get the name of the selected appliance.
    2) getStatus( ) : This is used to get the current status of the selected appliance.
    3) updateStatus( ) : This is used to get the updated status of the selected appliance at any
        time.



                                                                                               26
    4) switchOn( ) : This is used to switch the appliance on.
    5) switchOff( ) : This is used to switch the appliance off.


BathTubController

The attributes are :
    1) temp : It is used to store the temperature of water in the bath tub.
    2) level : It is used to store the level of the water in the bath tub i.e. high, medium and low.
    3) startTime : It is used to store the time at which the bath tub has to start filling.


The operations are:
    1) setTemp( ) : This is for setting the temperature of the water in the bath tub.
    2) setStartTime( ) : This is for setting the Start Time for filling the bath tub.
    3) setLevel( ) : This is for setting the level of water in the bath tub.
    4) getTemp( ) : This is used to get the current temperature of water in the bath tub.
    5) getStartTime( ) : This is used to get the assigned Start Time for filling the bath tub.
    6) getLevel( ) : This is used to get the current Level of water in the bath tub.
    7) setBathTub( ) : This is used to set the Bath tub with the parameters specified by the
        user.




ThermostatController

The attributes are :
    1) temp : It is used to store the temperature to be maintained throughout the house.
    2) heatOrAc : It is used to indicate whether to switch on the heater or ac.
    3) startTime : It is used to indicate the starting time for the heater or ac.


The operations are :
    1) setTemp ( ): This is used to control the temperature of the house .
    2) setHeatOrAc( ) : This is used to set the system in either heater or ac mode.
    3) setStartTime() : This is used to set the starting time for the heater or ac.
    4) getTemp( ) : This is used to get the current temperature of the house.



                                                                                                   27
    5) getHeatOrAc( ) : This is used to find out whether the heater or the ac is currently
        running.
    6) getStartTime( ) : This is used to get the assigned Start Time for filling the bath tub.
    7) setThermostat( ) : This is used to set the Thermostat with the parameters specified by
        the user.


SprinklerController

The attributes are:
    1) zoneSelect[] : This is an array which stores the zones which have to be watered.
    2) startTime : This specifies the time at which the sprinkler should start.
    3) duration : This specifies the duration for which the sprinkler should be on.


The operations are:
    1) setZone( ) : This is used to set the zones which have to be watered.
    2) setStartTime( ) : This is used to set the start time of the sprinkler.
    3) setDuration( ) : This is used to set the duration for which the sprinkler should work.
    4) getZone( ) : This is used to get the zones which have been set to be watered.
    5) getStartTime( ) : This is used to get the assigned Start Time for starting the sprinkler.
    6) getDuration( ) : This is used to get the current duration of the sprinkler.
    7) setSprinkler( ) : This is used to set the Sprinkler with the parameters specified by the
        user.




                                                                                                   28
State Chart Diagrams
        The State chart diagram is a state machine that specifies the sequence of states an
object goes through during its life time in response to events, together with its responses
to those events.



State Chart Diagram for HacsController object.

       The HacsController object is alive until the user chooses to logout.




                               Login[userid,password]
                  Idle                                      Validating
                                                                               This diagram depicts the states the
                                                                               HacsController object goes through
                                    invalid entry                              depending on the menu option selected.
               shutdown

                                                                  valid/menuDisplay[ ]
                                               logout



                             "Add/Remove Appliance" command                    Task performed
       Performing tasks for Add/Remove                      Displaying                             Performing tasks for Set
             Appliance command                                Menu                                  Appliance command

                                           Task performed                "Set Appliance" command




                                                                                                            29
State Chart Diagram for AddRemoveApp object.


                                  Add/Remove appliance request
                     Idle                                                           Add/Remove
                                                                                  appliance - Active



         shutdown
                                                                                              Selecting Appliance
                                 Appliance Added/Removed


                                                                                  Adding/Removing
                                                                                     Appliance


                        This diagram shows the states
                        the AddRemoveApp object goes
                        through in its lifetime




State Chart Diagram for BathTubController object


                                                    Bathtub Status
       start                                          Displayed
                                                                            setBathtub[temp,level,startTime]

                                   getStatus[ ]
                     Idle                                                                       Set
                                                                                               BathTub
      shutdown


                                                                                                    at startTime




                               BathTub            current level reaches "level"     BathTub
                                  Off                                                 On

                                                                                          failure

       This state diagram depicts the
       states the BathTubController object
                                                                                     Cancel
       can go through in its lifetime.

                                                                                         shutdown




                                                                                                                    30
State Chart Diagram for ThermostatController Object




                                                    Thermostat Status
                                                        Displayed
                                                                         setThermostat[temp,heatOrAc,
         start                getStatus[ ]                                      startTime]

                     Idle
                                                                                                 Set
                                                                                              Thermostat

        shutdown               switchOff[ ]
                                                                        at specified startTime

                                                      Maintain temp

                                        Heat/Ac                               Heat/Ac On
                                          Idle

                                                  room reaches specified temp
                                                                                    failure

      This diagram depicts the states                                           Cancel
      the ThermostatController object
      goes through in its lifetime.
                                                                                     shutdown




                                                                                                           31
State Chart Diagram for SprinklerController Object


                                                          Sprinkler Status
                                                            Displayed

                                                                                   setSprinkler[zoneSelect,
                                      getStatus[ ]
             start                                                                      startTime,duration]

                          Idle
                                                                                                        Set
                                                                                                      Sprinkler
            shutdown

                                                                             at specified startTime



                                                                 job done
                                              Sprinkler                              Sprinkler
                                                 Off                                    On


                                                                                 failure
     This diagram depicts the
     states the SprinklerController
     object goes through in its                                                        Cancel
     lifetime.


                                                                                            shutdown




Activity Diagram
         An activity diagram shows the flow from activity to activity within a system. It shows a
set of activities, the sequential or branching flow from activity to activity, and objects that act and
are acted upon. An activity diagram can be considered to be a fancy flow chart.


         While a statechart diagram focuses attention on an object undergoing a process
(or on a process as an object), an activity diagram focuses on the flow of activities
involved in a single process.




                                                                                                                  32
Activity Diagram for HacsController




                                       Receive userid
                                       and password

                                                  [userid, password received]


                                             Validate
                                                                                   This diagram depicts the
                                                                                   flow of activities of the
                                                                                   HacsController.

                           [invalid entry]


                                                [valid entry]

                           [task performed]
                                                          [task performed]
      Perform tasks for                      Display                         Perform tasks for
     Add/Remove option                        Menu                           Appliance option

   ["Add/Remove Appliance" command]
                                                                ["Set Appliance" command]


                                                 [logout command]


                                             Log out




                                                                                                               33
Activity Diagram for AddRemoveApp




                   Receive Add/Remove
                    Appliance Request




                    Get name of appliance
                   to be added or removed



                    Perform Add/Remove
                          Appliance

        continue


                               stop




                                            34
Activity Diagram for BathtubController




     Receive command to get status
               of Bathtub

                          [command received]
                   Display
                   Status
                          [status displayed]

           Receive command to
               set Bathtub
                          [at specified time]

                  Switch on               This diagram depicts the flow of
                   Bathtub                activities in BathTubController.


                             [failure]
                                                 Cancel
                                                Operation
   [at specified level]

                 Switch off
                  Bathtub

               [end]




                                                                             35
Activity Diagram for ThermostatController




          Receive command to get
            status of thermostat

                           [command received]

                      Display
                      Status

                           [status displayed]

            Receive command to
              set Thermostat
                                                       This diagram depicts the
                           [at specified startTime]    flow of activities of the
                                                       ThermostatController.
                  Switch on
                   Heat/AC



    [Maintain temp]             [failure]        Cancel
                                                operation
                          [at specified temp]

                Bring Heat/AC
                    to Idle

           [switch Off]




                                                                                   36
Activity Diagram for SprinklerController




      Receive command to
      get status of sprinkler
                     [command received]

                Display
                Status

                     [status displayed]

      Receive command to
          set sprinkler

                     [at specified time]

               Switch on                   The diagram depicts the
                                           flow of activities in the
               Sprinkler
                                           SprinklerController



                            [failure]           Cancel
                                               Operation
  [job done]

               Switch off
               Sprinkler
                     end




                                                                       37
Package Diagram
         For the purpose of simplifying complex class diagrams, we group classes into packages.
A package can otherwise be called a collection of logically related UML elements.
         When one package is dependent on another, any change in one can possibly force change
in the other.


         The HACS system consists of the following packages


                 User Services
                 Hacs Controller
                 Database
                   Device Controller

                                  Elements in this package
                                  mainly control the whole
                                  system by importing
                                  Device Controller Package




      User Services                       Hacs                 <<imports>>           Device
                                         Controller                                 Controller



                                                                         The Device Controller consists
     All the html and jsp                                                of SprinklerController,
     pages are in this                                                   BathtubController and
     package                                                             ThermostatController.

                                         Database




                                  Elements in this package
                                  maintain access and update
                                  data




                                                                                                          38
Component Diagram
      The component diagram shows the organization and dependencies among the set
of components of the system. The HACS contains the following components:

    HacsController.exe – This component is responsible for controlling all the appliance
       systems.
    AddRemoveApp.class – This component is responsible for adding and removing
       appliances from the system.
    Database - This component represents the physical storage.
    Sprinkler.class – This component is responsible for controlling the sprinkler settings.
    Thermostat.class – This component is responsible for controlling the thermostat settings.
    Bathtub.class – This component is responsible for controlling the bathtub settings.


                    Web Component
                    (html, jsp pages)
                                                                         Responsible for
                                                                         controlling all the                      Responsible for adding and
                                                                         appliance systems                        removing appliances from
                                                                                                                  the system




                                                               HacsController                                              AddRemove
                                                               .exe                                                        App.class



               Database



           Physical data
           storage




                                      Sprinkler.                 Thermostat.                         Bathtub
                                      class                      class                               .class




                           Responsible for controlling   Responsible for                       Responsible for
                           the Sprinkler settings        controlling Thermostat                controlling
                                                         settings                              Bathtub settings




                                                                                                                     39
Deployment Diagram
      The deployment diagram shows the configuration of run-time processing
elements and the software processes living on them.

The nodes in the deployment diagram are as follows:


    Web Browser on a remote system : The remote system can be a cell phone, computer
       or a PDA.
    Web Server : This is where all the web related files will be deployed.
    HACS Application Server : This is where the HACS system files will be deployed.
    Database Server : This serves as a database support for the system.




                                                                                       40
                                   User Manual

        The j2ee kit we have used for the project is j2sdkee1.3.1. The jdk kit we have
used is j2sdk1.4.2_06. Install the kits and make the necessary changes to the environment
variables.

       Download the zip folder which has the program in zipped format. Extract it and
deploy the “.ear” file using the deploytool facility.

       After deploying, open the browser and type http://localhost:8000/ourhacs/ on the
address bar.

       The following screen appears:




                                                                                      41
      This page requests the user to type in the Userid and password. The Userid and
Password combinations accepted by the system are as follows:


Userid               Password

ann                  ann
nithya               nithya
shilpa               shilpa
guest                guest


On entering one of the above mentioned Userid and the corresponding Password, Click
on the Login button.

Upon validation, the user is taken to the Main Menu page.




                                                                                 42
      On clicking on Appliance Control option, the user is taken to the next screen as
shown below:

The devices he can control are:
    Bath tub
    Sprinkler
    Thermostat




                                                                                   43
Bath tub option:
        On clicking the Bath Tub option, the user is taken to the next screen as shown
below where he is allowed to set the Bathtub with the parameters- temperature of water,
start time for filling the bath tub and level to which the water is to be filled.




      On entering the Start Time, Level, Temperature, the user is taken to the next
page where the current status of the Bath tub will be displayed.




                                                                                    44
        This screen shows that the bath tub has been set to start at 11:30:00. And it will
finish filling at 11:30:10.

        The status shows that the Bath Set!, which means that the values are remembered
by the system.


       If the user changes his mind and does not want to fill, he can stop by selecting
Stop option from the listbox.

        Note : If the user selects a time that has past, then the Bath tub will be set to start
at a time 2 minutes later than the current time. A note will be displayed to the user saying
that the system will start after 2 minutes. But the user can choose to stop it by selecting
Stop from the listbox.




                                                                                            45
        When the current time reaches the Bath start time the Bath tub will start filling. So
the status of the Bathtub will be Running…




When the user clicks on the “View Status again” option, after the Bath finish time, the
status of the Bathtub will be “Bath Stopped!”.




                                                                                          46
47
Once Stop is selected, the status will be “Bath Stopped!”.




                                                             48
Sprinkler option:
       On clicking the Sprinkler option, the user is taken to the next screen as shown
below where he is allowed to set the Sprinkler with the parameters- zones to be watered,
starting time for the sprinkler and the duration for the sprinkler.




       On entering the Start Time, Duration, Zones, the user is taken to the next page
where the current status of the Sprinkler will be displayed.




                                                                                     49
       The above screen shows that the Sprinkler is set.

       Here also the user can choose to stop the Sprinkler by selecting the Stop option
from the listbox.


       When the user views the status, after the sprinkler Start time, the status of the
sprinkler will be Running…




                                                                                     50
        When the user views the status, after the Sprinkler Finish Time, the sprinkler
status will be “Sprinkler Stopped!”




                                                                                   51
52
Thermostat option:
       On clicking the Thermostat option, the user is taken to the next screen as shown
below where he is allowed to set the Thermostat with the parameters- temperature,
heater/ac, start Time and duration.




        On entering the Start Time, Duration, Temperature and Heater/AC, the user is
taken to the next page where the current status of the Sprinkler will be displayed.


       The current status is displayed to be “Therm Set!”.




                                                                                    53
      When the user views status after the Heat/AC start time, the status will be
Running…




                                                                              54
     When the user views status after the Heat/AC finish time, the status will be
Therm Stopped!




                                                                              55
        The user can log out of the system at any time by clicking on the Logout button
on the top right side of the screen.




                                                                                    56

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:6
posted:8/16/2011
language:English
pages:56