Home Appliance Control System-phase 2

58
HOME APPLIANCE CONTROL SYSTEM Phase II Class: CS 6359 Section: 581 Semester: Summer 2005 Team: Kris Horn 460838543 [email protected] Santhoshi Smitha Thota 999-20-9641 [email protected] Uday Chandra Karrotthi 999-31-9966 [email protected] Link: http://utdallas.edu/~sxt035000/HOME APPLIANCE CONTROL SYSTEM-phase2.doc http://utdallas.edu/~kjh032000/HOME APPLIANCE CONTROL SYSTEM-phase2.doc http://utdallas.edu/~uck031000/HOME APPLIANCE CONTROL SYSTEM-phase2.doc 1

Transcript of Home Appliance Control System-phase 2

Page 2: Home Appliance Control System-phase 2

Table of Contents:

Overview of HACS (Home Appliance Control System):....................................................6Project Analysis:..................................................................................................................7CRC cards:.........................................................................................................................10

CRC card for HACS class:............................................................................................10CRC card for User class:...............................................................................................10CRC card for Owner class:............................................................................................10CRC card for Administrator class:................................................................................11CRC card for Fire_Dept class:.......................................................................................11CRC card for Appliance class:......................................................................................11CRC card for Air_Conditioner class:............................................................................11CRC card for Oven class:..............................................................................................12CRC card for Fire_Alarm class:....................................................................................12

Use case Diagram:.............................................................................................................12LogIn use case:..............................................................................................................13SetParameters use case:.................................................................................................13SetMode:........................................................................................................................14CheckApplianceStatus:..................................................................................................14ConfigureAppliance:......................................................................................................14ManageAppliances:.......................................................................................................14ManageUsers:................................................................................................................15AlarmAlert:....................................................................................................................15

Class Diagrams:.................................................................................................................16Sequence Diagrams:..........................................................................................................20

Sequence diagram for LogIn:........................................................................................20Sequence diagram for SetParameters:...........................................................................21Sequence diagram for SetMode:....................................................................................22Sequence diagram for CheckApplianceStatus:..............................................................23Sequence diagram for ConfigureAppliance:.................................................................24Sequence diagram for ManageAppliances:...................................................................25Sequence diagram for ManageUsers:............................................................................26Sequence diagram for AlarmAlert:................................................................................27

Collaboration diagrams:.....................................................................................................28Collaboration diagram for LogIn:..................................................................................28Collaboration diagram for SetParameters:.....................................................................28Collaboration diagram for SetMode:.............................................................................29Collaboration diagram for CheckApplianceStatus:.......................................................30Collaboration diagram for ConfigureAppliance:...........................................................30Collaboration diagram for ManageAppliances:.............................................................31Collaboration diagram for ManageUsers:.....................................................................31Collaboration diagram for AlarmAlert:.........................................................................32

Statechart Diagrams:..........................................................................................................33System Operation:.........................................................................................................33HACS controller operation:...........................................................................................34Oven operation:.............................................................................................................35

2

Page 3: Home Appliance Control System-phase 2

Air conditioner operation:..................................................................................................36Alarm operation:................................................................................................................37Activity Diagrams:.............................................................................................................37

Activity diagram for Login:...........................................................................................38Activity diagram for SetParamters:...............................................................................39Activity diagram for SetMode:......................................................................................40Activity diagram for CheckApplianceStatus:................................................................41Activity diagram for ConfigureAppliance:....................................................................42Activity diagram for ManageAppliances:.....................................................................43Activity diagram for ManageUsers:..............................................................................44Activity diagram for AlarmAlert:..................................................................................45

Component Diagram:.........................................................................................................46Deployment Diagram:.......................................................................................................47Assumptions:.....................................................................................................................48Conclusion:........................................................................................................................48References:........................................................................................................................48

3

Page 4: Home Appliance Control System-phase 2

List of Figures:

Figure 1: Overall block view of HACS...............................................................................5Figure 2: Use case diagram................................................................................................12Figure 3: Class diagram for HACS....................................................................................15Figure 4: HACS class........................................................................................................16Figure 5: User class...........................................................................................................16Figure 6: Appliance class...................................................................................................16Figure 7: Oven class..........................................................................................................17Figure 8: Air_Conditioner class.........................................................................................17Figure 9: Fire_Alarm.........................................................................................................18Figure 10: Sequence diagram for LogIn............................................................................19Figure 11: Sequence diagram for SetParameter................................................................20Figure 12: Sequence diagram for SetMode.......................................................................21Figure 13: Sequence diagram for CheckApplianceStatus.................................................22Figure 14: Sequence diagram for ConfigureAppliance.....................................................23Figure 15: Sequence diagram for ManageAppliances.......................................................24Figure 16: Sequence diagram for ManageUsers................................................................25Figure 17: Sequence diagram for AlarmAlert...................................................................26Figure 18: Collaboration diagram for LogIn.....................................................................27Figure 19: Collaboration diagram for SetParameters........................................................27Figure 20: Collaboration diagram for SetMode.................................................................28Figure 21: Collaboration diagram for CheckApplianceStatus...........................................29Figure 22: Collaboration diagram for ConfigureAppliance..............................................29Figure 23: Collaboration diagram for ManageAppliances................................................30Figure 24: Collaboration diagram for ManageUsers.........................................................30Figure 25: Collaboration diagram for AlarmAlert.............................................................31Figure 26: State chart diagram for system operation.........................................................32Figure 27: State chart diagram for HACS controller.........................................................33Figure 28: State chart diagram for oven operation............................................................34Figure 29: State chart diagram for AC operation..............................................................35Figure 30: State chart diagram for alarm operation...........................................................36Figure 31: Activity diagram for Login..............................................................................37Figure 32: Activity diagram for SetParameter...................................................................38Figure 33: Activity diagram for SetMode.........................................................................39Figure 34: Activity diagram for CheckApplianceStatus...................................................40Figure 35: Activity diagram for ConfigureAppliance.......................................................41Figure 36: Activity diagram for ManageAppliances.........................................................42Figure 37: Activity diagram for ManageUsers..................................................................43Figure 38: Activity diagram for AlarmAlert.....................................................................44Figure 39: Component diagram for HACS........................................................................45Figure 40: Deployment diagram for HACS.......................................................................46

4

Page 5: Home Appliance Control System-phase 2

Overview of HACS (Home Appliance Control System):

The main concern in systems development has been the integration of technologies to increase customer satisfaction; the most recent being the integration of wireless devices and home appliances. HACS is one such system which aims at accomplishing this. It is a system which is controlled by wireless devices like cell phones, PDAs, palm tops etc. and in turn controls home appliances like ovens, water sprinklers, garage doors, TV sets, home alarm system, air conditioner etc.

Users use HACS to control their home appliances by using their wireless devices. If for example the user wants the water sprinklers to be turned on while he is out, he can do so by using HACS. It is an adaptable system too; it detects changes in environment and acts accordingly. It should be flexible enough to allow addition or removal of devices to control its functioning, and also the appliances it controls. Also it should be capable enough to add new users or remove obsolete ones.

Figure 1 shows the high level block diagram of HACS:

Figure 1: Overall block view of HACS

HACS

Cell Phone

PDA

Oven

TV

Alarm

5

Page 6: Home Appliance Control System-phase 2

Project Analysis: HACS is controlled by wireless devices and in turn it controls the home appliances connected to it. Commands are given to home appliances when signals are received from wireless devices requesting an action by users. HACS acts as a middle ware and controls the way different users access appliances. Users are comprised of owners, who own HACS; administrators, who are responsible for managing and configuring HACS and the fire department personnel, who are contacted in case of an emergency.

A wide range of activities can be performed by HACS. For this project, our team has selected air conditioners, fire alarms and ovens as appliances which the HACS would control. Also a capability to add new appliances or remove appliances is provided. This way, it can be a very adaptable system and these actions of adding/removing appliances/users can be performed only by administrators who have special privileges to access the system. Also users can be added or removed from accessing the system.

6

Page 7: Home Appliance Control System-phase 2

7

Page 8: Home Appliance Control System-phase 2

8

Page 9: Home Appliance Control System-phase 2

CRC cards:

During the initial analysis phases of the project, the team came up with CRC cards to represent the responsibility of classes at a very high level. CRC cards for the main classes are shown here, they represent out initial analysis about the classes we wanted to implement.

CRC card for HACS class:

Class Name: HACS Super Class: NoneSub Classes: None

Responsibilities: Collaborators:Allows interaction between users and home appliances

User, Appliance

Provides an interface for the user to operate the system

User

Controls the appliance operations Appliance

CRC card for User class:

Class Name: UserSuper Class: NoneSub Classes: Owner, Administrator, Fire Dept

Responsibilities: Collaborators:Interacts with the HACS system to provide appliance access to users

HACS

CRC card for Owner class:

Class Name: OwnerSuper Class: UserSub Classes: None

Responsibilities: Collaborators:Interacts with the HACS system to provide appliance access to owners

HACS

Provides attributes and functions (derived and new) for owner interaction with HACS.

User

9

Page 10: Home Appliance Control System-phase 2

CRC card for Administrator class:

Class Name: AdministratorSuper Class: UserSub Classes: None

Responsibilities: Collaborators:Interacts with the HACS system to provide appliance access to administrators

HACS

Provides attributes and functions (derived and new) for administrator interaction with HACS

User

Special rights to configure and manage appliances in the HACS system

Appliance, HACS

CRC card for Fire_Dept class:

Class Name: Fire_DeptSuper Class: UserSub Classes: None

Responsibilities: Collaborators:Interacts with the HACS system to get fire alarm alerts

HACS

Provides attributes and functions (derived and new) for fire department interaction with HACS

User

CRC card for Appliance class:

Class Name: ApplianceSuper Class: NoneSub Classes: Air_Conditioner, Oven, Fire_Alarm

Responsibilities: Collaborators:Interacts with the HACS system to control appliances

HACS

Provides generic attributes and operations for the subclasses to derive

Air_Conditioner, Oven, Fire_Alarm

CRC card for Air_Conditioner class:

Class Name: Air_ConditionerSuper Class: ApplianceSub Classes: None

10

Page 11: Home Appliance Control System-phase 2

Responsibilities: Collaborators:Interacts with the HACS system to control the air conditioner

HACS

Interacts with the fire alarm when fire breaks out

Fire_Alarm, HACS

CRC card for Oven class:

Class Name: OvenSuper Class: ApplianceSub Classes: None

Responsibilities: Collaborators:Interacts with the HACS system to control the oven

HACS

Interacts with the fire alarm when fire breaks out

Fire_Alarm, HACS

CRC card for Fire_Alarm class:

Class Name: Fire_AlarmSuper Class: ApplianceSub Classes: None

Responsibilities: Collaborators:Interacts with the HACS system to control the fire alarm

HACS

Interacts with the other appliances when fire breaks out

Oven, Air_Conditioner

Use case Diagram:

Use case diagrams model the behavior of the system by depicting the relationships between users of the system, i.e. actors and the system. Also a brief description is provided for each use case.

Our analysis of the problem domain revealed the presence of eight important use cases. The use case diagram of HACS is shown in Figure 2:

11

Page 12: Home Appliance Control System-phase 2

Figure 2: Use case diagram

LogIn use case:

This use case is for authorizing access to HACS and prevents any malicious use of the system. Users have to log in to HACS by providing a user name and password. They are validated against a set of existing users and only authorized users are provided access to the system. Each time a user wants to access HACS, log in is required. This just ensures additional safety.

SetParameters use case:

This use case shows how the users of HACS set parameters of the appliances. The settings of parameters like temperature of the A/C, oven, etc. are handled by this use case. The user (in this case, the owner) logs onto HACS and after being authorized, selects the appliance he wants to set parameters of. After the selection is made, a menu of

12

Page 13: Home Appliance Control System-phase 2

parameters relevant to the selected appliance is displayed. The user makes the appropriate parameter selection and enters values. These parameters of the appliance are then set by HACS. Owner logs off after setting parameters.

SetMode:

This use case shows how users can set the mode of devices like the cooking mode of an oven, heater or A/C mode of an air conditioner etc. The owner logs on to HACS and then selects the appliance he wants to set the mode of. A menu of modes is displayed and when the owner selects the mode, it is set appropriately by HACS. Owner logs off after setting mode.

CheckApplianceStatus:

Users can check the status of appliances connected to HACS by this use case. They log on to the system and select the appliance they want to view the status of. Upon selecting an appliance, HACS displays the status of the selected appliance. For example, if the user wants to check if an appliance is turned on or off, this use case is relevant. After checking the status, the user logs out of HACS.

ConfigureAppliance:

This use case shows the interaction of HACS with the administrators of the system to configure the appliances. Configuring appliances refers to the actions to be done by administrators when the system is installed like setting of default parameters, modes etc. In order to configure appliances, administrators have to log on to HACS and a list of appliances is provided. The appliance to be configured is to be selected and then the configuration parameters are prompted to the user. Upon entering valid values, these parameters of the appliances are configured by HACS. After configuring appliances, the administrators logs off.

ManageAppliances:

This use case shows the interaction of HACS with the administrators of the system to manage the system. Managing the system refers to actions like adding new appliances, removing existing appliances etc. Administrators log onto the system in order to accomplish this action. Then the list of appliances along with their status is displayed. The administrators can then add new appliances or remove existing ones. If new appliances are added, then they should be configured. After managing appliances, the administrators logs off.

13

Page 14: Home Appliance Control System-phase 2

ManageUsers:

This use case shows the interaction of HACS with the administrators of the system to manage the users of the system. Managing users refers to actions like adding new users, removing existing users etc. Administrators log onto the system in order to accomplish this action. Then the list of users is displayed. The administrators can then add new users or remove existing ones. After managing users, the administrators logs off.

AlarmAlert:

This use case shows what events the alarm generates when it detects smoke. The alarm checks the density of smoke and detects if it is hazardous. If yes, then it informs HACS which in turn informs the owner and the fire department. HACS also has the capability to turn the oven and the A/C off in case of emergencies to prevent further damages.

14

Page 15: Home Appliance Control System-phase 2

Class Diagrams:

A class diagram shows the existence of classes in the system and also their relationships in a logical view. Our system consists of six classes. Figure 3 shows the overall class diagram with the classes and their relationships. A brief description for each of the classes is also provided.

Figure 3: Class diagram for HACS

15

Page 16: Home Appliance Control System-phase 2

HACS:

This is the highest level class in the class hierarchy. HACS is responsible for allowing the correct user to interact with the home appliances. It provides an interface for the user to operate the system.

HACS

Login()Logout()selectAppliance()fireAlert()callFireDept()callOwner()...()

Figure 4: HACS class

User:

This class is accountable for filing the user’s id name and password. Any one who is to interact with HACS is a type of User.

User

name: Stringpassword: String

Figure 5: User class

Appliance:

This class is a super class of specific home appliances in the system. All appliances are a type of Appliance, which has an appliance id tag and a description of its status.

Appliance

applianceId : Integerdescription: String

setParameter()...()

Figure 6: Appliance class

Oven:

This class provides the attributes and operations to systematically control the oven. It allows the user to set the temperature, mode, and duration at any specific time.

16

Page 17: Home Appliance Control System-phase 2

Oven

tem p : Integerm ode : Integers tatus : Integertime : Integerduration : Integer

setTem p()getTem p()getMode()setMode()getStatus()setTime()getTime()setDuration()getDuration()switchOvenOff()...()

Figure 7: Oven class

Air_Conditioner:

This class enables the user to control the air conditioner in the home. The user is able to login and remotely set the desired temperature at any time of the day.

Air_Conditioner

temp: Integermode:Integertime: timeduration: time

setTemp()getTemp()setMode()getMode()getStatus()setTime()getTime()setDuration()getDuration()switchA/cHeaterOff()...()

Figure 8: Air_Conditioner class

17

Page 18: Home Appliance Control System-phase 2

Fire_Alarm:

This class controls the fire alarm of the house. It allows the alarm to be adaptable to the environment. It notifies HACS when the temperature or smoke density rises over a safe threshold.

Fire_Alarm

temp: IntegersmokeDensity: Integerstatus: Integer

detectFire()...()

Figure 9: Fire_Alarm

18

Page 19: Home Appliance Control System-phase 2

Sequence Diagrams:

Sequence diagrams display the interactions between various objects. They lay emphasis on the time ordering of messages exchanged.

Sequence diagram for LogIn:

Figure 10: Sequence diagram for LogIn

This sequence diagram shows the set of messages exchanged between the objects for the “Login” use case. To access HACS, the user first enters a username and password. Then the HACS system validates the user and sends an acknowledgement to the user.

19

Page 20: Home Appliance Control System-phase 2

Sequence diagram for SetParameters:

Figure 11: Sequence diagram for SetParameter

This sequence diagram shows the time-ordered set of messages exchanged between the three objects involved in the “SetParameter” use case. The user first enters his username and password to log in to HACS. Then HACS displays a set of appliance options to the user. Then the user selects an appliance and HACS displays the status of the particular selected appliance to the user. The user can select the parameters he wants to modify and change its value. HACS then sets the value of that parameter in the appliance and sends a confirmation to HACS. HACS displays the modified status to the user and the user logs out.

20

Page 21: Home Appliance Control System-phase 2

Sequence diagram for SetMode:

Figure 12: Sequence diagram for SetMode

This sequence diagram shows the time-ordered set of messages exchanged between the three objects involved in the “SetMode” use case. The user first enters his username and password to log in to HACS. Then HACS displays a set of appliance options to the user. Then the user selects an appliance and HACS displays the status of the particular selected appliance to the user. The user can select the mode he wants to set and change its value. HACS then sets that mode in the appliance and sends a confirmation to HACS. HACS displays the modified status to the user and the user logs out.

21

Page 22: Home Appliance Control System-phase 2

Sequence diagram for CheckApplianceStatus:

Figure 13: Sequence diagram for CheckApplianceStatus

This sequence diagram shows the messages exchanged between the two objects involved in the “CheckApplianceStatus” use case. The user logs in to HACS and gets an acknowledgement if he is a valid user. HACS then displays a set of appliance options to the user and the user selects an appliance whose status he wants to check. HACS then displays the status of the selected appliance and the users can logout.

22

Page 23: Home Appliance Control System-phase 2

Sequence diagram for ConfigureAppliance:

Figure 14: Sequence diagram for ConfigureAppliance

This sequence diagram shows the time ordered set of messages exchanged between the three objects involved in the “ConfigureAppliance” use case. The user (administrator) logs in to HACS and a list of appliances are displayed, and the administrator selects an appliance of his choice. Then the configuration parameters for that appliance are displayed and the admin enters values for these configuration parameters. HACS then configures the selected appliance and the admin can then log out of the system.

23

Page 24: Home Appliance Control System-phase 2

Sequence diagram for ManageAppliances:

Figure 15: Sequence diagram for ManageAppliances

This sequence diagram shows the set of time ordered messages exchanged between the two objects involved in the “ManageAppliance” use case. The user (administrator) logs in to HACS which then sends an acknowledgement and displays a list of appliances and their status. Then the admin can add or remove appliances and log out of the system.

24

Page 25: Home Appliance Control System-phase 2

Sequence diagram for ManageUsers:

Figure 16: Sequence diagram for ManageUsers

This sequence diagram shows the set of time ordered messages exchanged between the two objects involved in the “ManageUsers” use case. The user (administrator) logs in to HACS which then sends an acknowledgement and displays a list of users. Then the admin can add or remove users and log out of the system.

25

Page 26: Home Appliance Control System-phase 2

Sequence diagram for AlarmAlert:

Figure 17: Sequence diagram for AlarmAlert

This sequence diagram shows the set of time ordered messages exchanged between four objects involved in the “AlarmAlert” use case. The fire alarm first detects fire and alerts the HACS system. It then calls the fire department and the owner of the house. It also switches off the air conditioner and the oven.

26

Page 27: Home Appliance Control System-phase 2

Collaboration diagrams:

Collaboration diagrams show the direct links between objects in the system. They emphasize on the structural organization of objects and the messages exchanged.

Collaboration diagram for LogIn:

Figure 18: Collaboration diagram for LogIn

This collaboration diagram shows the set of messages exchanged between the objects for the “Login” use case. To access HACS, the user first enters a username and password. Then the HACS system validates the user and sends an acknowledgement to the user.

Collaboration diagram for SetParameters:

Figure 19: Collaboration diagram for SetParameters

27

Page 28: Home Appliance Control System-phase 2

This collaboration diagram shows the set of messages exchanged between the three objects involved in the “SetParameter” use case. The user first enters his username and password to log in to HACS. Then HACS displays a set of appliance options to the user. Then the user selects an appliance and HACS displays the status of the particular selected appliance to the user. The user can select the parameters he wants to modify and change its value. HACS then sets the value of that parameter in the appliance and sends a confirmation to HACS. HACS displays the modified status to the user and the user logs out.

Collaboration diagram for SetMode:

Figure 20: Collaboration diagram for SetMode

This collaboration diagram shows the set of messages exchanged between the three objects involved in the “SetMode” use case. The user first enters his username and password to log in to HACS. Then HACS displays a set of appliance options to the user. Then the user selects an appliance and HACS displays the status of the particular selected appliance to the user. The user can select the mode he wants to set and change its value. HACS then sets that mode in the appliance and sends a confirmation to HACS. HACS displays the modified status to the user and the user logs out.

28

Page 29: Home Appliance Control System-phase 2

Collaboration diagram for CheckApplianceStatus:

Figure 21: Collaboration diagram for CheckApplianceStatus

This collaboration diagram shows the messages exchanged between the two objects involved in the “CheckApplianceStatus” use case. The user logs in to HACS and gets an acknowledgement if he is a valid user. HACS then displays a set of appliance options to the user and the user selects an appliance whose status he wants to check. HACS then displays the status of the selected appliance and the users can logout.

Collaboration diagram for ConfigureAppliance:

Figure 22: Collaboration diagram for ConfigureAppliance

29

Page 30: Home Appliance Control System-phase 2

This collaboration diagram shows the set of messages exchanged between the three objects involved in the “ConfigureAppliance” use case. The user (administrator) logs in to HACS and a list of appliances are displayed, and the administrator selects an appliance of his choice. Then the configuration parameters for that appliance are displayed and the admin enters values for these configuration parameters. HACS then configures the selected appliance and the admin can then log out of the system.

Collaboration diagram for ManageAppliances:

Figure 23: Collaboration diagram for ManageAppliances

This collaboration diagram shows the set of ordered messages exchanged between the two objects involved in the “ManageAppliance” use case. The user (administrator) logs in to HACS which then sends an acknowledgement and displays a list of appliances and their status. Then the admin can add or remove appliances and log out of the system.

Collaboration diagram for ManageUsers:

Figure 24: Collaboration diagram for ManageUsers

30

Page 31: Home Appliance Control System-phase 2

This collaboration diagram shows the set of messages exchanged between the two objects involved in the “ManageUsers” use case. The user (administrator) logs in to HACS which then sends an acknowledgement and displays a list of users. Then the admin can add or remove users and log out of the system.

Collaboration diagram for AlarmAlert:

Figure 25: Collaboration diagram for AlarmAlert

This collaboration diagram shows the set of messages exchanged between four objects involved in the “AlarmAlert” use case. The fire alarm first detects fire and alerts the HACS system. It then calls the fire department and the owner of the house. It also switches off the air conditioner and the oven.

31

Page 32: Home Appliance Control System-phase 2

Statechart Diagrams:

State chart diagrams show a state machine which consists of states, transitions, events and activities. State chart diagrams are described below.

System Operation:

Figure 26: State chart diagram for system operation

The above diagram gives an overview of the state transitions in the operation of the whole system. The system as a whole can be in one of the three states as shown in the diagram. Initially the system is in an “Idle” state, upon receiving a signal it goes to the “Processing” state. From this state, the system sends a signal and goes to the “Sending Signal” state which has a transition back to the idle state. The system can shut down either in the idle or sending signal states. In this, it is assumed that the system does not fail or shut down when in the processing state.

32

Page 33: Home Appliance Control System-phase 2

HACS controller operation:

Figure 27: State chart diagram for HACS controller

This diagram shows the state transitions for the HACS controller operation. It is initially in the idle state and when it receives a signal, goes to the processing state. When a status operation is performed it goes to the display status state. When a set operation is performed, it goes to the updating appliance state. After each of these states, there is a transition to the idle state, which is the default state. This has a transition to the final state.

33

Page 34: Home Appliance Control System-phase 2

Oven operation:

Figure 28: State chart diagram for oven operation

This diagram shows the state transitions for the oven operation. It id initially in the idle state, and continues to stay there even when a parameter or mode are set. When it receives the start cooking signal, it goes to the cooking state and after cooking, notifies completion and comes back to the idle state. The oven can also be turned off after cooking. The oven goes to the sending state by getting the signal get status and after notifying completion, moves back to the idle state. This state has a final state too. The oven can be turned off while in the idle state.

34

Page 35: Home Appliance Control System-phase 2

Air conditioner operation:

Figure 29: State chart diagram for AC operation

The air conditioner is initially in the idle state and stays there even when a parameter or mode are set. When the temperature is reduced, it goes to the cool state and after a certain duration returns to the idle state. It can also be turned off at this state. When the temperature is increased, it goes to the heat state and after a while comes back to the idle state. It can be turned off at this state too. When the get status signal is sent, it goes to the sending status state and goes back t the idle state. It can be turned off even after sending status.

35

Page 36: Home Appliance Control System-phase 2

Alarm operation:

Figure 30: State chart diagram for alarm operation

This diagram shows the operation of the alarm, which can be in one of the two states. The default state is the idle state where it keeps checking for fire. When it detects fire, it alerts the HACS system about the fire and then goes back to the idle state. At this state, it can also be turned off.

Activity Diagrams:

Activity diagram is a special kind of state chart diagram which shows the different activities and also the flow between them. Activity diagrams for all the use cases are shown here.

36

Page 37: Home Appliance Control System-phase 2

Activity diagram for Login:

Figure 31: Activity diagram for Login

This diagram shows the main activities in the login use case. The first activity is to enter a user name and password, and then the validate user activity validates the user who tries to login. If the user is valid, then the acknowledge user access activity is invoked otherwise the deny user activity is invoked. There are two swimlanes separating the activities by user and HACS controller.

37

Page 38: Home Appliance Control System-phase 2

Activity diagram for SetParamters:

Figure 32: Activity diagram for SetParameter

This activity diagram shows the main activities in the set parameter use case. The first activity is where the user logs in and then he selects an appliance and modifies a selected parameter. He can perform the same activity by selecting another appliance. After parameters are modified, they are set to the appliance. The user can either select another appliance or logout. There are two swimlanes separating the activities by user and HACS controller.

38

Page 39: Home Appliance Control System-phase 2

Activity diagram for SetMode:

Figure 33: Activity diagram for SetMode

This activity diagram shows the main activities in the set mode use case. The first activity is where the user logs in and then he selects an appliance and modifies a selected mode. He can perform the same activity by selecting another mode. After mode is modified, they are set to the appliance. The user can either select another appliance or logout. There are two swimlanes separating the activities by user and HACS controller.

39

Page 40: Home Appliance Control System-phase 2

Activity diagram for CheckApplianceStatus:

Figure 34: Activity diagram for CheckApplianceStatus

This activity diagram has the main activities in the check appliance status use case. The first activity is for the user to log in then he selects an appliance and the check appliance status activity is invoked. Then the user can either view the status of another appliance or log out. There are two swimlanes separating the user from the HACS controller.

40

Page 41: Home Appliance Control System-phase 2

Activity diagram for ConfigureAppliance:

Figure 35: Activity diagram for ConfigureAppliance

This activity diagram shows the main activities for the administrator to configure the appliance. The first activity is where the user logs in and selects an appliance he wishes to configure. Then the enter configure parameters activity is invoked. The user can keep continuing this activity by configuring other parameters of the selected appliance. Then the configure appliance in the HACS controller is invoked. Then the user can either configure another appliance or logout of the system. There are two swimlanes separating the user from the HACS controller.

41

Page 42: Home Appliance Control System-phase 2

Activity diagram for ManageAppliances:

Figure 36: Activity diagram for ManageAppliances

This activity diagram shows the main activities involved in managing appliances by the administrator. The first activity is for the admin to log in and view status of the appliances. Then he can choose to either add or delete an appliance and the corresponding activities of add appliance and delete appliance are invoked respectively. The admin can continuously add or delete appliances from the system.

42

Page 43: Home Appliance Control System-phase 2

Activity diagram for ManageUsers:

Figure 37: Activity diagram for ManageUsers

This activity diagram shows the main activities involved in managing users by the administrator. The first activity is for the admin to log in and view the list of users. Then he can choose to either add or delete a user and the corresponding activities of add appliance and delete user are invoked respectively. The admin can continuously add or delete users from the system.

43

Page 44: Home Appliance Control System-phase 2

Activity diagram for AlarmAlert:

Figure 38: Activity diagram for AlarmAlert

This diagram gives the main activities involved in the alarm alert use case. The detect fire activity is invoked when fire is detected by the fire alarm. Then HACS is alerted and a set of four concurrent activities are invoked. HACS controller calls the fire department, owner and also switches the AC and oven off. After these activities are done, it would be waiting to reset, from where it could also be shut down.

44

Page 45: Home Appliance Control System-phase 2

Component Diagram:

The component diagram shows the main components in the system and the dependencies between them. The component diagram for HACS is shown below.

Figure 39: Component diagram for HACS

This diagram shows the main components in the HACS system. The HACS component, which is a class, interacts with the Bluetooth component, which is a set of dlls. This is for the HACS controller to communicate with the appliances installed remotely. This Bluetooth component then interacts with the appliance component which is a class. This in turn interacts with the actual component appliances which are also classes. The other component interactions can be seen between the user and the owner, administrator and fire department which are all classes.

45

Page 46: Home Appliance Control System-phase 2

Deployment Diagram:

The deployment diagram shows the configuration of run-time elements and visualizes the distribution of components across the enterprise. The deployment diagram for HACS with the main nodes is shown below.

Figure 40: Deployment diagram for HACS

This diagram shows the nodes in the system at runtime. The HACS web server node is the one that allows users to access HACS. This interacts with the HACS application server which gives access to the appliances. The other nodes deployed in the system are the oven appliance, fire alarm appliance and the air conditioner appliance.

46

Page 47: Home Appliance Control System-phase 2

Assumptions:

1. The user is assumed to know how to operate the remote systems.2. All the devices are assumed to be in working condition.

Conclusion:

Wirelessly controlling home appliances in the comforts of any environment will revolutionize our way of living. Controlling appliances remotely will one day become a reality thanks to the capabilities of HACS. Home owners can one day come to an ideal environment coming from their daily activities. HACS might one day become a standard in the new homes to come.

References:

Grady Booch, James Rumbaugh and Ivar Jacobson “The Unified Modeling Language User Guide”, 1999, Addison-Wesley.

James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy, William Lorensen “Object –Oriented modeling and Design”, 2002, Prentice Hall

47