Beruflich Dokumente
Kultur Dokumente
(HACS)
1
1. Introduction......................................................................................................................3
1.1 Purpose................................................................................................................3
1.2 Scope....................................................................................................................3
1.3 Assumptions........................................................................................................4
1.4 Functional Requirement Specifications...............................................................4
1.5 Non Functional Requirement Specifications.......................................................4
1.6 References............................................................................................................5
1.7 Definitions, acronyms, and abbreviations...........................................................5
2. Use Cases.........................................................................................................................5
2.1 Actors.........................................................................................................................6
2.2 Use Case Description.................................................................................................7
2.2.1 Use Case Name – Login/Authenticate....................................................................7
2.2.2 Use Case Name – Control.......................................................................................8
2.2.3 Use Case Name – Operate......................................................................................8
2.2.4 Use Case Name – Restart/Redo..............................................................................8
2.2.5 Use Case Name – Operate_Oven...........................................................................9
2.2.6 Use Case Name – Operate_AC...............................................................................9
2.2.7 Use Case Name – Operate_HSS.............................................................................9
2.2.8 Use Case Name – Add/Remove Remote System.................................................10
2.2.9 Use Case Name – Add/Remove Device...............................................................10
2.2.10 Use Case Name – Check/Update Status.............................................................10
2.2.11 Use Case Name – Manage User Accounts.........................................................11
3. Sequence/Collaboration Diagrams................................................................................12
Operating Device Sequence Diagram............................................................................12
Operate Device Collaboration Diagram........................................................................13
Add/Remove Device Sequence Diagram......................................................................14
Add/Remove Device Collaboration Diagram................................................................15
Security Sequence Diagram...........................................................................................16
Security Collaboration Diagram....................................................................................17
4. CRC Cards.....................................................................................................................18
5. Class Diagram................................................................................................................21
i. HACSAdmin Class............................................................................................21
ii. HACSUser Class...............................................................................................21
iii. RemoteSystem Class.....................................................................................21
iv. HACSController Class...................................................................................22
v. Device Class......................................................................................................22
vi. Oven, AirConditioner, and SecuritySystem Classes.....................................22
vii. SecurityEmergency Class..............................................................................22
viii. Status Class....................................................................................................22
ix. OvenStatus, AirConditionerStatus and SecuritySystemStatus Classes.........22
2
1 1. Introduction
The extensive use of Internet at home inspires the convenient use of home network to
control and manipulate home appliances. The idea revolves around a home control
system and its features for controlling and operating a variety of home appliances from a
variety of different locations.
A better understanding of our project shall be obtained from UML diagrams and
accompanying documentation.
1.1 Purpose
This project concerns the development of a system for remotely controlling home
appliances. It is often desirable to be able to check the status of and in some case
manipulate appliances while away from home. For example, a user who is unable to
remember if he closed the garage door on leaving the house in the morning would be able
to remotely check the status. Additionally, such a system could be used to monitor for
emergency situations such as fires or burglaries.
While the concept is easily extensible to a wide variety of appliances and interactions,
this development effort shall focus on only three. The system shall be developed to
monitor and control an oven, an air conditioner and the doors and windows of the house
(including the garage door). These are a representative sample of the types of appliances
that could be controlled and the types of effects that can be achieved.
In carrying out our analysis and design for the Home Appliance Control System we have
used UML diagrams such as Use Case Diagrams, Sequence Diagrams, Collaboration
Diagrams, Class Diagrams and Activity Diagram.
1.2 Scope
3
The central controller handles interaction between appliances and user.
The controller shall take necessary actions (calling 911, notifying the user,
Police Station, Fire Department etc.) in case of an emergency depending on
the alarm generated.
Individual appliances shall be capable of detecting changes in the environment
and adapting their settings accordingly.
The current appliances defined for this project are oven, air conditioner and
home security system. Appliances can be added/ removed later.
1.3 Assumptions
1. Portability
2. Security
3. Performance
4. Reliability
5. User Friendliness
4
1.6 References
1. http://www.utdallas.edu/~chung/OOAD/syllabus.htm
2. http://www.utdallas.edu/~chung/OOAD/Presentations06F/index.htm - Team 1
2. Use Cases
5
2.1 Actors
2.1.1 HACS_User
HACS_User is an entity that uses the HACS System. The HACS_User has an
account and password and logs in via a remote system. The HACS_User can then
access the features of the HACS. The features include
2.1.2 HACS_Admin
HACS_Admin is a user who has additional access rights beyond the normal
HACS_User. This user can
a. Add/Remove Device
b. Add/Remove Remote System
c. Manage User Accounts
2.1.3 Device
Device refers to a home appliance that could be added onto the HACS System. This
device must be configurable and can then be operated remotely. The devices we
decided to focus on are oven, air conditioner and security system (this includes doors,
windows and garage door of a house).
2.1.3.1 Oven
6
b. The doors and windows of the house can be opened / closed by the user remotely.
c. The remote system shall notify the user and the General Security if there is any
security breach of non-critical status. If the remote system considers the breach to
be critical, it shall notify the user, General Security and the Emergency
Department.
Remote System refers to system that has wireless connection. It can be added onto
HACS system, configured with HACS, and communicate with HACS. Palm-top and
Cell phone are special remote systems.
Flow of events:
Precondition: User needs a valid user name and password to logon to the HACS
system.
Main Flow:
a. This use case takes in the user name and password and checks for its
validity.
b. After validation, the HACS Controller establishes a session between the
remote user and the system.
Exceptional flow: If the validation fails it sends a message and asks the user to
re-enter the user name and password.
Post condition: A session is established for the authenticated user.
7
2.2.2 Use Case Name – Control
Flow of Events:
Pre condition: Valid session had been established. The user is capable of communicating
with HACS through the remote system.
Main Flow:
a. This use case begins when the user accesses the HACS via a remote system such
as cell phone or palm top.
b. The system provides the device menu to the user.
c. The user selects the device.
d. The system displays the current status of the selected device along with its
operation menu.
e. System acts upon the selected device according to the user’s selected operation
f. Transfers control to the specific use case according to the user’s input.
Exceptional Flow:
a. Sometimes the device may malfunction. For example, the oven may keep
cooking for an hour, which is not required by the users. The use case Control
detects such malfunctioning by checking the state of the device, stop it (using
operate use case), and inform the user what happened.
b. In case of an emergency, for example, a break in through the garage door or
fire starts, the HACS shall detect them and notify the police department and
the fire department respectively.
Post Condition: Control is transferred to the specific use case according to the user
input.
Flow of Events:
Pre condition: Valid session had been established. The user is capable of communicating
with HACS through the remote system.
Main Flow:
a. The use case Control transfers control to the Operate use case when the user
selects an operation on a device. For example, user can send messages to turn
on an air conditioner, set oven timer to cook for five minutes and the
corresponding device shall perform the necessary action.
Exceptional Flow: This is explained in the Restart/Redo use case.
Flow of Events:
Pre condition: Valid session had been established. User selects an operation on a device
but the HACS could not perform the request that the user sent.
Main Flow:
8
a. HACS detects and fixes the error or restart the device to make it function
normally. The operation shall be conducted once more.
b. HACS shall inform the user about this exception.
Exceptional Flow: If HACS couldn’t perform the operation even for the second time,
it shall notify HACS_Admin about the problem.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected oven from the
device menu.
Main Flow:
a. If the user sets the Status to ‘On’ the oven is turned on.
b. If the user sets the Status to ‘Off’ the oven is turned off.
c. The food is cooked for the amount of time set by the user.
d. The food is cooked at the temperature set by the user.
e. The cooking starts at a time scheduled by the user.
Exceptional Flow: Due to some technical problems like power cut, the session ends
abruptly.
Post Condition: Based on the user preference, the food is cooked and the oven is turned
off.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected air conditioner
from the device menu.
Main Flow:
a. If the user sets the Status to ‘On’ the air condition system is turned on.
b. If the user sets the Status to ‘Off’ the air conditioner is turned off.
c. The user’s temperature preference is automatically stored.
d. The temperature is set by the user.
e. The air condition system starts at a time scheduled by the user.
f. The air condition system functions for the duration selected by the user.
Exceptional Flow: Due to some technical problems like power cut, the session ends
abruptly.
Post Condition: Based on the user preference, the air condition shall function for the
specified period and would then turn off.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected home security
system from the device menu.
9
Main Flow:
a. If the user sets ‘open garage door’ the garage door is opened and the light in
the garage is turned on.
b. If the user sets ‘close garage door’ the garage door is closed and the lights are
turned off, two minutes after the garage door is closed.
c. If the user sets ‘open window’ the window is opened.
d. If the user sets ‘close window’ the window is closed.
e. If the user sets ‘open door’ the door is opened.
f. If the user sets ‘close door’ the door is closed.
Exceptional Flow: - There is a security breach that has non-critical status.
- There is a critical breach that has status critical.
Post Condition: - For non-critical security breach the user and General Security is
notified.
- For critical security breach the user, General Security and Emergency Department are
notified.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected Add/Remove
System option from the device menu.
Main Flow:
a. If the user selects add remote system, user can add remote system like cell
phone or palm top to the HACS.
b. If the user selects remove remote system, user can remove remote system that
controls the devices.
Exceptional Flow: This is explained in the Restart/Redo use case.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected Add/Remove
Device option from the device menu.
Main Flow:
a. If the user selects add device, user can add device like oven, air conditioner to
the HACS.
b. If the user selects remove device, user can remove device that is part of
HACS.
Exceptional Flow: This is explained in the Restart/Redo use case.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected Check/Update
10
Status from the menu.
Main Flow:
a. If the user selects check status option, the user gets the option of which device
status requires to be checked. The user is notified about the status of the
device selected by the user.
b. If the user selects update status option, the user gets the option of which
device status requires to be updated. An update message is sent to the user
selected device.
Exceptional Flow: This is explained in the Restart/Redo use case.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected Manage User
Accounts from the menu.
Main Flow:
a. The add user option shall add a user to the HACS system.
b. The modify user option shall modify user properties.
c. The delete user option shall remove a user from the HACS system.
Exceptional Flow: This is explained in the Restart/Redo use case.
Flow of Events:
Pre Condition: Valid session had been established. The user has selected ‘Schedule’
option from the menu.
Main Flow:
a. The user selects the time and duration for which the device should be
operating.
Exceptional Flow: This is explained in the Restart/Redo use case.
11
3. Sequence/Collaboration Diagrams
The us er can
choos e any Device
From Menu Select Required Device
GetDeviceStatus
returnDeviceStatus
dis playDeviceStatus
operateDevice(Operation)
s endOperation(Operation)
perform operation conform ing
to that Device
ExecuteOperation(Operation)
s endStatus
dis playStatus
Flow of Events:
1) After the user has been authenticated by the Remote System. The user can select any
Device from the List presented by the Remote System.
2) The user then Selects the Device
3) Remote System them prompts the user with the varied commands relevant to the
selected Device.
4) The user then selects the Command which is then sent to the Device via Remote
System.
5) The System executes the Command and sends its updated status to the Remote System
which then send it to the user.
12
1.9Operate Device Collaboration Diagram
Rem ote
: HACS_Us er 4: dis playDeviceStatus Sys tem
9: dis playStatus
7:
3: returnDeviceStatus
8: s endStatus
Device
2: GetDeviceStatus
6: sendOperation(Operation)
13
1.10
1.11 Add/Remove Device Sequence Diagram
Adm in Authenticated
actionPerform ed
actionPerform edConfirm
displayDeviceStatus
Flow of Events:
1) The user is prompted with an Admin Login Page. Only the Admin has the
privileges to Add/Remove a Device.
2) Once the Admin is Authenticated then Admin selects the option of Add/Remove
Device and then selects the appropriate device.
3) This action is performed by the Remote system and if successful adds the device.
4) The Device returns it status which is dully reported to the user.
14
1.12 Add/Remove Device Collaboration Diagram
2: Adm in Authenticated
8: dis playDeviceStatus
: HACS_Adm in
7: actionPerform edConfirm
Device
15
1.13 Security Sequence Diagram
Em ergency Department
Sends Status Every Minute
ThreatD etected
Report HACS USer
ThreatDetected
Acknowlegem ent
Acknowlegem ent
Acknowlegem ent
Flow of Events:
1) The Device/Home Security System sends its status to the Remote System
periodically.
2) The Emergency dept. interacts with the Remote system to check for any
discrepancies.
3) If a threat is detected the emergency Dept. notifies the Users as well as the police
dept. and fire dept and waits for ack.
16
1.14 Security Collaboration Diagram
9: Acknowlegem ent
8: Acknowlegem ent
: HACS_Us er
17
4. CRC Cards
HACSAdmin
RESPONSIBILTIES COLLABORATORS
- allows user to get and set account name
- allows user to get and set password HACSController
- allows admin to add and delete accounts
HACSUser
RESPONSIBILTIES COLLABORATORS
- allows user to get and set account name
- allows user to get and set password HACSController
HACSController
RESPONSIBILTIES COLLABORATORS
- allows addition and removal of devices
- allows addition and removal of remote HACSUser
systems HACSAdmin
- sends commands to devices Device
- handles login/logout functions
- configures devices
- displays applicable devices
RemoteSystem
RESPONSIBILTIES COLLABORATORS
- gets and sets user info
- gets and sets device type HACSController
- sends commands to the HACSController HACSUser
HACSAdmin
18
Device
RESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device
HACSController
- operates a device
Oven
RESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device
- operates a device HACSController
- gets and sets the On/Off Status of the
device
- gets and sets the temperature of the oven
- gets and sets a cooking time
- gets and sets a start time for the oven
AirConditioner
RESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device
- operates a device HACSController
- gets and sets the On/Off Status of the
device
- gets and sets the temperature of the A/C
- gets and sets a time
- gets and sets a start time for the A/C
HomeSecuritySystem
RESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device
- operates a device HACSController
- gets the Open/Closed Status of the device SecurityEmergency
- notifies emergency contacts
SecurityEmergency
RESPONSIBILTIES COLLABORATORS
19
- calls the appropriate actors
HomeSecuritySystem
Status
RESPONSIBILTIES COLLABORATORS
- gets and sets status
- gets and sets the On/Off Status of the Device
device
- gets and sets the temperature
- gets and sets a cooking time
- gets and sets a start time
OvenStatus
RESPONSIBILTIES COLLABORATORS
- gets and sets status
Device
AirConditioner
RESPONSIBILTIES COLLABORATORS
- gets and sets the status
- gets and sets the On/Off Status Device
- gets and sets the temperature
- gets and sets a time
- gets and sets a start time
HomeSecuritySystem
RESPONSIBILTIES COLLABORATORS
- gets and sets the status
- gets the Open/Closed Status Device
20
5. Class Diagram
The HACSAdmin class represents the HACS system administrator. The Admin inherits
the base functionality from the HACSUser class. The Admin however has the additional
capabilities to add and delete User accounts.
The HACSUser class is the main user of the HACS system. A user is anyone who
interacts with the HACSController via Remote Systems in order to monitor or modify the
state of HACS controlled appliances. The user has the basic functionality to get and set
his user account and password.
The RemoteSystem class is used to model the software that runs on remote devices that
shall interface with the main HACSController. These devices may include cell phones,
palm pilots or other devices. The RemoteSystem shall have the ability to get and set its
userinfo and device type as well as sending commands to the HACSController.
21
1.14.4 HACSController Class
The HACSController class contains much of the main functionality of the HACS System.
It receives commands from remote devices and forwards them along to the Device class.
The HACSController class has the ability to add and remove both devices and remote
systems from the HACS configuration. Additionally, the login/logout basic
authentication functionality is contained in this class. Perhaps most importantly this class
contains most of the major device commands such as the ability to display usable
devices, configure them and send commands.
The Device class is the base class for Devices in the HACS system. It has the ability to
get and set its abilities and properties as well as operate the physical device it represents.
The Oven, AirConditioner and SecuritySystem classes are subclasses of the Device base
class. These subclasses can represent specific or general subtypes of devices controlled
by the HACS system. The most important feature of all of these subclasses is that they
override and implement operate in a way that is applicable to the particular device. These
classes contain any device specific commands or attributes. For example, Oven contains
methods to get and set the temperature. These would be reported back via the base
class’s getStatus/setStatus commands as well as the Operate method. SecuritySystem on
the other hand, has no temperature associated with it, but it does have an additional notify
method. In this way, devices are able to be accessed through a common scheme while
maintaining unique features as needed.
The Status class is a general base class that is used to represent the status from the
get/setStatus methods in the Device base class. Status represents the overall state of a
particular device as well as any applicable member portions. The exact details may be
overridden in subclasses for particular types of devices.
22
These subclasses represent device specific details. They contain getters and setters for
device relevant attributes that can be combined into an overall device status that can be
reported through the parent class’ get/setStatus methods.
23