Shared by: rogerholland
H.A.C.S. The Home Appliance Control System Presented by The Awesome Group Presented by The Awesome Group What is HACS? A home appliance control system which uses a remote system such as a mobile phone or PDA to monitor, control, and coordinate home appliances such as your security system, oven, TV, etc. Assumptions and Dependencies Infallibility No Power Failures No Network Failures Each Appliance has Sufficient Power and a Dedicated CPU Wireless Network is the same as LAN HACS has an Internet Connection Perfect Cellular Reception Sufficient Hardware Requirements HACS should Allow users to check the status of their appliances, even when not at home Activate and deactivate appliances Alert users and emergency departments to critical malfunctions Be able to accept any HACS compatible appliance Requirements List (1) Appliance Control – Appliances, devices such as an oven, microwave, air conditioner, or sprinkler, can be controlled by a home owner in a remote location. That is the user may set the different attributes (e.g. oven temp, AC fan speed, sprinkler settings etc.) for each appliance from a wireless device (2) Adaptability/Detection – The system will be able to detect changes within the home and maintain the user settings. (3) Manually Adaptable – The user can set system set the status of different appliances manually and user commands have precedence over automatic commands. (4) Communication – HACS should be able to communicate with all appliances. (5) Safety – HACS should maintain the safety of the user’s home and person at all times. Devices should be maintained in non-hazardous states. The Big Picture User HACS User Interface Use Case Diagrams • Bad! (for traceability) setTimer setStatus setStatus HACS GetTemp Oven getStatus getStatus SetTemp toggle toggle User ToggleOn/Off Appliance User Appliance Alert Alert setTemp AC Alert setTemp ToggleOnOff Emergency Service Use Case Diagram: Over All Use Case Diagram for Hacs Register Wireless <<extends>> Add Appliance <<extends>> Register Appliance <<uses>> Remove Appliance User Login <<uses>> Get Status <<extends>> <<extends>> PoliceDept Set Status Manage Status Appliance FireDept Emergency Alert Use Case: Log In Login HACS • HACS must be secure! • Nobody other than the owner should be able to modify an appliance’s status •What if your neighbor down the street decided to “play a joke” and turn on your oven! Sequence Diagrams: Log In :UserInterface :HACS :UserRecord User : User issuesCommand connect(id) verify(id) returnVerification Use Case: Get Status Manag e Status <<extends>> User Appliance • Is the garage door open? GetStatus • Did you leave the oven on? • The user wants to know how the appliances are operating at any given time! Sequence Diagrams: Get Status :UserInterface :HACS :Appliance User: User selectApp getStatus(app,uid) Login getStatus() returnStatus returnStatus displayStatus In general, this should represent a simple sequence of events Sequence Diagrams: Get Status But what if access is denied? :UserInterface :HACS :Appliance : User selectApp getStatus(app,uid) Login loginDenied displayDenied Use Case: Set Status Manag e Status <<extends>> User Appliance Set Status • Now that you know what the appliance is up to, don’t you want to change what it is doing? Sequence Diagrams: Set Status :UserInterface :HACS :Appliance : User selectApp setStatus(app,uid,attribute, value) Login setStatus(attribute,value) returnStatus returnStatus displayStatus Use Case: Register Appliance Add Applianc e <<extends>> Register Applianc e <<extends>> Appliance Remove User Applianc e • Register Appliance is extended by Add/Remove appliance use cases to handle registration interactions within the HACS system. Sequence Diagram: Add Appliance :Interface :HACS xyz:Appliance User : User setup appliance provide appliance identification details configure appliance settings detect appliance provide ACK add appliance provide response set range limits store range limits Sequence Diagram: Remove Appliance :UserInterface :Hacs :appliance User : User request remove appliance request remove appliance remove appliance notify Send new status notify Use Case: Register Wireless register wireles s User Wireless • The user registers a wireless device with HACS. Sequence Diagram: Register Wireless :HACS xyz:Appliance User : User add user provide identification details add device send confirmation Use Case: Emergency Alert notify Fire_Department Intruder_Detector Alert_controller Emergency_Dept Fire_Detector Police_Department • Reuse! Use Case: Evolved Emergency Alert PoliceDept Emergency Alert Appliance FireDept Sequence Diagram: Alert System :Hacs :Device_interfac abc:Alert_contr emergency: :Police :Fire e oller Emergency_dept create_sockets() Here it is assumed devices communicate on start_threads() sockets start_sensing() Hacs notified on socket forward request on socket Demultiplex_request() Hacs notified on socket connect to data base connect to data base Notify_request() will use some api or sockets for communication wid specific department Class Diagram: Alert System CRC Cards: Appliance Appliance Object • Interface between • HACS HACS and specific appliances CRC Cards: Oven Oven Appliance • Report Exceptions • HACS • Change Temperature • Alert Controller • Change Mode • Set Timer • Turn On/Off CRC Cards: Garage Door Garage Door Appliance • Open • HACS • Close • Alert Controller • Report Exceptions CRC Cards: Light Light Appliance • On • HACS • Off • Alert Controller • Set Intensity • Report Exceptions CRC Cards: Alert Controller Alert Controller Object • Control Alerts • HACS • Pass Exceptions to • Appliance HACS • Appliance subclasses • Alert Emergency • Emergency Department Departments Class Diagram: HACS System Note hid will contain perhaps an internet address for the Hacs system HACS hid UserInterface userRecords currentWindow apps uid EMservices hid connections UserRecord user_id Connect(uid) displayWindow(window) getStatus() setId(user_id) getStatus(hid, appliance) setStatus() getId() setStatus(hid, appliance, attribute, value) addAppliance() getAppliances(hid) delAppliance() notify() Login() <<actor>> appliance appId attributes hid get(attribute) set(attribute, value) alert(hid) GarageDoor Windows lights FireAlarm open() close() setSecurity(on_off) on() detect() detectMotion() off() setIntensity(value) The END! Questions? Comments? Praise for our greatness?