43
Home Appliance Control System Ann K George Nithya Inbamani Shilpa Maddi

Home Appliance Control System Ann K George Nithya Inbamani Shilpa Maddi

Embed Size (px)

Citation preview

Home Appliance Control System

Ann K George

Nithya Inbamani

Shilpa Maddi

Block Diagram of HACS System

Home Owner

Hacs

Controller

Thermostat System

Bath tub System

Sprinkler System

Use Case Diagram

• Shows a set of use cases, actors and relationships

• Addresses static use case view of a system.

Use Case Diagram

Login

Set Bathtub Set Sprinkler Set Thermostat

<<uses>>

<<uses>>

The Owner can access the appliances using wireless device

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

This is used for controlling appliances in the house

Add/Remove Appliance

Set Appliance

Logout

User

This is used to log out of the system after the user finishes using it.

Login Use Case TemplateUse Case 1.LOGIN

History created 5/7/2005

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

Actors User

Assumptions 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 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 TemplateUse 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.

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 TemplateUse Case 4.Set Appliance uses 1.LOGIN

History created 5/7/2005

Description This use case is a generalization of the three systems –Set Bath tub,Set Sprinkler, Set Thermostat.

Actors User

Assumptions The user is logged into the system and established a session with 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.

Set Thermostat Use Case TemplateUse Case 4.Set Thermostat Uses 1.LOGIN

History created 5/7/2005

Description This use case is used to control the settings of the

Thermostat. Actors User

Assumptions The user is logged into the system and established a session 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.

Interaction Diagrams

Sequence Diagram Emphasizes the time-ordering of messages.

Collaboration DiagramEmphasizes structural organization of objects that send and receive messages.

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

:User app:Hacs Controller

2: Validate user

Incorrect-Repeat Login

User is prompted if userid or password is incorrect

1: Login()

3: Correct-Session Establised/

Sequence Diagram for Logout

:User app:Hacs Controller

1: Logout()

3: Session Ends

2: Take action

Collaboration Diagram for Logout

:User app:Hacs Controller

2: Take action

1: Logout()

3: Session Ends

Sequence Diagram for Add/Remove Appliance

:User app:HacsController

addrem:AddRemoveApp

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

app:HacsController

addrem:AddRemoveApp

4: Take action

1: Select add/remove appliance option2: Select Appliance

3: Send Add/Remove appliance command

Sequence Diagram for Bath Tub Controller

:User app:HacsController bathtub:BathTubController

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

Collaboration Diagram for Bath Tub Controller

:User

app:HacsController

bathtub:BathTubController

7: Take action

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

1: Select bath tub system5: Enter temperature,level,start time

4: Display bath tub status9: Display feedback

2: Get bath tub status6: setBathTub()

3: Send bath tub status8: Send feedback

Sequence Diagram for ThermostatController

:User app:HacsController

thermostat:ThermostatController

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

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

Collaboration Diagram for ThermostatController

:User

app:HacsController

thermostat:ThermostatController

8: Take actionUser selects thermostat system,enters the settings and specified action takes place

1: Select thermostat system5: Enter temperature,heat/ac, start...

6: Set thermostat

4: Display thermostat status10: Display feedback

2: Get thermostat status7: setThermostat()

3: Send thermostat status9: Send feedback

Sequence Diagram for SprinklerController

:User app:HacsController

sprinkler:SprinklerController

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

Collaboration Diagram for SprinklerController

:User

app:HacsController

sprinkler:SprinklerController

8: Take action

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

1: Select sprinkler system5: Enter start time, duration, z...

6: Set sprinkler on

4: Display sprinkler status10: Display feedback

2: Get sprinkler status7: setSprinkler()

3: Send sprinkler status9: Send feedback

Class Diagram

• Shows a set of classes, interfaces and collaborations and their relationships.

• Static view of a system.

Class Diagram

Users

useridpassword

HacsController

useridpasswordappliance[]

login()logout()menuDisplay()appListDisplay()getAppStatus()addRemoveApp()

ApplianceController

appIdstatusappName

getName()getStatus()updateStatus()switchOn()switchOff()

BathTubController

tempstartTimelevel

setTemp()setStartTime()setLevel()getTemp()getStartTime()getLevel()setBathTub()

ThermostatController

tempheatOrAcstartTime

setTemp()setHeatOrAc()setStartTime()getTemp()getHeatOrAc()getStartTime()setThermostat()

SprinklerController

zoneSelect[]startTimeduration

setZone()setStartTime()setDuration()getZone()getStartTime()getDuration()setSprinkler()

AddRemoveApp

appliance[]

addApp()removeApp()

The HacsController class calls either the AddRemoveApp class or one of the 3 ApplianceController classes which are the specializations of the class ApplianceController, based on the user selection.

State Chart Diagrams

• Shows a state machine, consisting of states, transitions, events and activities.

• Address the dynamic view of a system.

State Chart Diagram for HacsController

State Chart Diagram for AddRemoveApp

Idle Add/Remove appliance - Active

Add/Remove appliance request

Adding/Removing Appliance

Selecting ApplianceThis diagram shows the states the AddRemoveApp object goes through in its lifetime

State Chart Diagram for BathTubController

Idle Set BathTub

setBathtub[temp,level,startTime]

BathTub On

at startTime

BathTub Off

current level reaches "level"

Cancel failure

Bathtub Status Displayed

getStatus[ ]

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

State Chart Diagram for ThermostatController

Idle Set Thermostat

setThermostat[temp,heatOrAc,

Heat/Ac On

startTime]

at specified startTime

Heat/Ac Idle

room reaches specified temp

Cancel

Thermostat Status Displayed

getStatus[ ]

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

failure

Maintain temp

switchOff[ ]

State Chart Diagram for SprinklerController

IdleSet

Sprinkler

setSprinkler[zoneSelect,

Sprinkler On

at specified startTime

Sprinkler Off

Cancel

Sprinkler Status Displayed

getStatus[ ]

job done

startTime,duration]

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

failure

Activity Diagram

• Shows the flow from activity to activity within a system.

• Dynamic view of the system.

Activity Diagram for HacsController

Activity Diagram for AddRemoveApp

Receive Add/Remove Appliance Request

Perform Add/Remove Appliance

Get name of appliance to be added or removed

Activity Diagram for BathTubController

Display Status

Receive command to set Bathtub

Switch on Bathtub

Switch off Bathtub

[at specified time]

[at specified level]

Receive command to get status of Bathtub

This diagram depicts the flow of activities in BathTubController.

Activity Diagram for SprinklerController

Receive command to get status of sprinkler

Display Status

Receive command to set sprinkler

Switch on Sprinkler

Switch off sprinkler

[at specified time]

[job done]

The diagram depicts the flow of activities in the SprinklerController

Activity Diagram for ThermostatController

Receive command to get status of system

Display Status

Receive command to set Thermostat

Switch on Heat/AC

Make Heat/Ac Idle

[at specified startTime]

[at specified temp]

This diagram depicts the flow of activities of the ThermostatController.

[switch off]

[Maintain temp]

Package Diagram

• Package – A general purpose mechanism for organizing elements into groups.

• Static view of the system.

• Purely conceptual.

Package Diagram

User Services

Hacs Controller

Database

Device Controller

<<imports>>

The Device Controller consists of SprinklerController, BathtubController and ThermostatController

Component Diagram

• Shows the organizations and dependencies among a set of components

• Static implementation view of the system.

Component DiagramWeb Component (html, jsp pages)

HacsController.exe

AddRemoveApp.class

Database

Sprinkler.class

Thermostat.class

Bathtub.class

Deployment Diagram

• Shows the configuration of run-time processing nodes and the components that live on them.

• Addresses static deployment view.

Deployment Diagram

Web Browser On a Mobile Phone

Web Server

HACS Application Server

Database Server

Implementation

• Planning to implement using J2EE.

• JSP, HTML for providing the visual interfaces for the user.

• Servlets, Beans

• Cloudscape - database.