home appliance control system (hacs)
Post on 08-Apr-2015
133 Views
Preview:
TRANSCRIPT
HOME APPLIANCE CONTROL SYSTEMHOME APPLIANCE CONTROL SYSTEM (HACS)(HACS)
FINAL PROJECT PHASE 1 SUBMISSIONFINAL PROJECT PHASE 1 SUBMISSION
CS 6359 – Object Oriented Analysis and DesignSummer 2008
https://utd. edu/~sum051000/ index.htmlhttps://utd. edu/~sum051000/ index.html
John Chenault joc072000@utdallas.eduSarika Mahangare sum051000@utdallas.eduSonali Pagade spp063000@utdallas.eduAaditya Deo axd071000@utdallas.eduNaresh Elireddy nke061000@utdallas.eduLiang Wang lxw0507000@utdallas.eduLakshmi Deepthi Yerubandi ldv061000@utdallas.edu
1
1. Introduction......................................................................................................................31.1 Purpose................................................................................................................31.2 Scope....................................................................................................................31.3 Assumptions........................................................................................................41.4 Functional Requirement Specifications...............................................................41.5 Non Functional Requirement Specifications.......................................................41.6 References............................................................................................................51.7 Definitions, acronyms, and abbreviations...........................................................5
2. Use Cases.........................................................................................................................52.1 Actors.........................................................................................................................62.2 Use Case Description.................................................................................................72.2.1 Use Case Name – Login/Authenticate....................................................................72.2.2 Use Case Name – Control.......................................................................................82.2.3 Use Case Name – Operate......................................................................................82.2.4 Use Case Name – Restart/Redo..............................................................................82.2.5 Use Case Name – Operate_Oven...........................................................................92.2.6 Use Case Name – Operate_AC...............................................................................92.2.7 Use Case Name – Operate_HSS.............................................................................92.2.8 Use Case Name – Add/Remove Remote System.................................................102.2.9 Use Case Name – Add/Remove Device...............................................................102.2.10 Use Case Name – Check/Update Status.............................................................102.2.11 Use Case Name – Manage User Accounts.........................................................11
3. Sequence/Collaboration Diagrams................................................................................12Operating Device Sequence Diagram............................................................................12Operate Device Collaboration Diagram........................................................................13Add/Remove Device Sequence Diagram......................................................................14Add/Remove Device Collaboration Diagram................................................................15Security Sequence Diagram...........................................................................................16Security Collaboration Diagram....................................................................................17
4. CRC Cards.....................................................................................................................185. Class Diagram................................................................................................................21
i. HACSAdmin Class............................................................................................21ii. HACSUser Class...............................................................................................21iii. RemoteSystem Class.....................................................................................21iv. HACSController Class...................................................................................22v. Device Class......................................................................................................22vi. Oven, AirConditioner, and SecuritySystem Classes.....................................22vii. SecurityEmergency Class..............................................................................22viii. Status Class....................................................................................................22ix. 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.
Accordingly, it is desired to provide a system to enable advanced home control features such as location based control, capabilities such as view, change, recall and save states of the appliances, generic commands(through cell phone, computer or even voice commands) to manipulate home appliances and remote Internet based control capabilities. The appliances may include, but are not limited to, televisions, VCRs, DVD players, CD players, game consoles, home lighting, fans, HVAC systems, thermostats, personal computers, security systems, network enabled automobiles, etc. Different types of technologies can be used to implement the HACS system like a distributed networked environment or Bluetooth communication.
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
The system shall be composed of a central HACS controller, emergency alert/alarm system, and individual devices.
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
The development team assumes the role of the set of users. While designing the initial system we have assumed there are no power
failures. Later iterations of HACS should include backup and recovery functions to handle power failures.
Like power failures in this iteration of HACS there is assumed to be no network failures. Later iterations should compensate for network failures.
For developing this system the wireless network is assumed to work the same way as a LAN.
HACS has a high speed Internet connection. Cellular reception is assumed to be perfect. Later iterations should
compensate for poor cellular reception.
1.4 Functional Requirement Specifications
HACS should be able to communicate with all kinds of appliances. The HACS shall accept instructions from a local or remote device and
accordingly control the appliances. Provides user authentication. Allows the user to add, remove, check status, control/manipulate any HACS
compatible appliance without interfering with its normal operations. It shall take necessary actions (calling 911, notifying the user etc.) depending on
the alarm generated. Database requirement to store and track all relevant changes to the HACS system.
1.5 Non Functional Requirement Specifications
1. Portability2. Security3. Performance4. Reliability5. 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
1.7 Definitions, acronyms, and abbreviations
User : A person who connects remotely to a monitor or modifies the status of appliances.
HACS : The Home Appliance Control System is the system for remote monitoring and manipulation of household appliances.
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
a. Operate and schedule the home appliances.b. Check for the current status of home appliances.c. Update the status of home appliances.
2.1.2 HACS_Admin
HACS_Admin is a user who has additional access rights beyond the normal HACS_User. This user cana. Add/Remove Deviceb. Add/Remove Remote Systemc. 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
Oven is a special home appliance that has several operations:a. Allows the user to turn on/ turn off the oven.b. Allows to set the oven timer to start cooking at a time and for the duration as
desired by the user.c. Allows the user to set temperature for cooking. If the temperature is too high, the
remote system should switch off the oven, and notify the user.
2.1.3.2 Security System
Security system includes doors, windows and garage door of a house.a. Garage door is a special home appliance that has operations of opening and
closing to be manipulated remotely. The remote system shall control the light in the garage i.e. turn the light on when the door is opening and turn it off, two minutes after the door gets closed.
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.
2.1.3.3 Air Conditioner
Air conditioner is a special home appliance that has several operations:a. Allows the user to turn on/ turn off the air-conditioner.b. Allows the user to set temperature to a desired level and the remote system shall
“memorize” the user preference.c. Allows the user to set the timer to turn on the air conditioner remotely for a
specific duration.
2.1.4 Remote System
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.
2.1.5 Emergency Department
Emergency Department is a public department that can help if there is an emergency situation in the house.a. Police Department is a special emergency department which shall be notified
when there is a critical breach in security system.b. Fire Department is a special emergency department which shall be notified when
there is a fire in the house due to malfunctioning of oven or air-conditioner.
2.2 Use Case Description
2.2.1 Use Case Name – Login/Authenticate
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 operationf. 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.
2.2.3 Use Case Name – Operate
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.
2.2.4 Use Case Name – Restart/Redo
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.
2.2.5 Use Case Name – Operate_Oven
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.
2.2.6 Use Case Name – Operate_AC
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.
2.2.7 Use Case Name – Operate_HSS
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.
2.2.8 Use Case Name – Add/Remove Remote System
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.
2.2.9 Use Case Name – Add/Remove Device
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.
2.2.10 Use Case Name – Check/Update Status
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.
2.2.11 Use Case Name – Manage User Accounts
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.
2.2.12 Use Case Name – Schedule
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
Operating Device Sequence Diagram
: HACS_UserRemote Sys tem Device
From Menu Select Required Device
GetDeviceStatus
displayDeviceStatus
sendOperation(Operation)
ExecuteOperation(Operation)
sendStatus
displayStatus
operateDevice(Operation)
returnDeviceStatus
The user can choose any Device
perform operation conform ing to that Device
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 Device3) 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
Operate Device Collaboration Diagram
: HACS_UserRemote Sys tem
Device
7:
1: From Menu Select Required Device5: operateDevice(Operation)
4: displayDeviceStatus9: displayStatus
2: GetDeviceStatus6: sendOperation(Operation)
8: sendStatus3: returnDeviceStatus
13
Add/Remove Device Sequence Diagram
: HACS_Adm inRemote System Device
HACS Adm in Login
Select Add/Remove Device Option
Select Add/Remove Device
actionPerform edConfirm
actionPerform ed
displayDeviceStatus
Send Add/Rem ove Device
Admin Authenticated
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
Add/Remove Device Collaboration Diagram
: HACS_Admin
Device
6: actionPerformed
Remote System
2: Adm in Authenticated
1: HACS Admin Login3: Select Add/Rem ove Device Option
4: Select Add/Rem ove Device
8: displayDeviceStatus
7: actionPerformedConfirm
5: Send Add/Remove Device
15
Security Sequence Diagram
Device Home Security System
Remote System
Emergency Department
: HACS_User : Police Departm ent : Fire Department
Sends Status Every Minute
Sends Status Every Minute
ThreatDetected Report HACS USer
Acknowlegem ent
ThreatDetected
Check DeviceStatus for security breach/threat
ThreatDetected Report Police Dept
ThreatDetected Report Fire Dept
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
Security Collaboration Diagram
Device Remote System
: HACS_User
Home Security System
Emergency Department
: Fire Department
: Police Departm ent
1: Sends Status Every Minute
2: Sends Status Every Minute
5: ThreatDetected3: Check DeviceStatus for security breach/threat
4: ThreatDetected Report HACS USer
8: Acknowlegement
6: ThreatDetected Report Police Dept
9: Acknowlegement
7: ThreatDetected Report Fire Dept
10: Acknowlegement
17
4. CRC Cards
HACSAdminRESPONSIBILTIES COLLABORATORS- allows user to get and set account name- allows user to get and set password- allows admin to add and delete accounts
HACSController
HACSUserRESPONSIBILTIES COLLABORATORS
- allows user to get and set account name- allows user to get and set password HACSController
HACSControllerRESPONSIBILTIES COLLABORATORS
- allows addition and removal of devices- allows addition and removal of remote systems- sends commands to devices- handles login/logout functions- configures devices- displays applicable devices
HACSUserHACSAdmin
Device
RemoteSystemRESPONSIBILTIES COLLABORATORS
- gets and sets user info- gets and sets device type- sends commands to the HACSController
HACSControllerHACSUser
HACSAdmin
18
DeviceRESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device- operates a device HACSController
OvenRESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device- operates a device- 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
HACSController
AirConditionerRESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device- operates a device- 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
HACSController
HomeSecuritySystemRESPONSIBILTIES COLLABORATORS
- gets and sets the status of a device- operates a device- gets the Open/Closed Status of the device- notifies emergency contacts
HACSControllerSecurityEmergency
SecurityEmergencyRESPONSIBILTIES COLLABORATORS
19
- calls the appropriate actorsHomeSecuritySystem
StatusRESPONSIBILTIES COLLABORATORS
- gets and sets status- gets and sets the On/Off Status of the device
- gets and sets the temperature- gets and sets a cooking time- gets and sets a start time
Device
OvenStatusRESPONSIBILTIES COLLABORATORS
- gets and sets statusDevice
AirConditionerRESPONSIBILTIES COLLABORATORS
- gets and sets the status- gets and sets the On/Off Status- gets and sets the temperature- gets and sets a time- gets and sets a start time
Device
HomeSecuritySystemRESPONSIBILTIES COLLABORATORS
- gets and sets the status- gets the Open/Closed Status Device
20
5. Class Diagram
i. HACSAdmin Class
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.
ii. HACSUser Class
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.
iii. RemoteSystem Class
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
iv. 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.
v. Device Class
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.
vi. Oven, AirConditioner, and SecuritySystem Classes
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.
vii. SecurityEmergency Class
The SecurityEmergency class represents an entity that needs to be notified by the SecuritySystem class in the event of an emergency. It consists primarily of the entities name and contact information.
viii. Status Class
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.
ix. OvenStatus, AirConditionerStatus and SecuritySystemStatus Classes
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
top related