h.a.c.s. the home appliance control system presented by the awesome group
Post on 17-Dec-2015
218 Views
Preview:
TRANSCRIPT
H.A.C.S.
The Home Appliance Control System
Presented by The Awesome GroupPresented 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.
Use Case Diagrams(for traceability)
Appliance
setTimer
GetTemp
SetTemp
Oven
ToggleOn/OffUser
setTemp
setTemp
AC
ToggleOnOff
UserAppliance
setStatus
getStatus
toggle
Alert
setStatus
getStatus
toggle
Alert
HACS
Emergency Service
Alert
• Bad!
Use Case Diagram: Over AllUse Case Diagram for Hacs
PoliceDept
FireDept
Register Wireless
Emergency Alert
Login
User
Set Status
Get Status
Manage Status
<<uses>>
<<extends>>
<<extends>>
Remove Appliance
Add Appliance
Appliance
Register Appliance
<<uses>>
<<extends>>
<<extends>>
Use Case: Log In
•What if your neighbor down the street decided to “play a joke” and turn on your oven!
LoginHACS
• HACS must be secure!• Nobody other than the owner should be able to modify an appliance’s status
Sequence Diagrams: Log In
User : User:UserInterface :HACS :UserRecord
issuesCommand
connect(id)
verify(id)
returnVerification
Use Case: Get Status
User
GetStatus
Appliance
• Is the garage door open?• Did you leave the oven on?• The user wants to know how the appliances are operating at any given time!
Manage Status <<extends>>
Sequence Diagrams: Get Status
In general, this should represent a simple sequence of events
User: User:UserInterface :HACS :Appliance
selectApp
getStatus(app,uid)
Login
getStatus()
returnStatus
returnStatus
displayStatus
Sequence Diagrams: Get StatusBut what if access is denied?
: User:UserInterface :HACS :Appliance
selectApp
getStatus(app,uid)
Login
displayDenied
loginDenied
Use Case: Set Status
• Now that you know what the appliance is up to, don’t you want to change what it is doing?
User Set Status
Appliance
Manage Status <<extends>>
Sequence Diagrams: Set Status
:HACS : User
:UserInterface :Appliance
selectApp
displayStatus
setStatus(app,uid,attribute, value)
Login
setStatus(attribute,value)
returnStatus
returnStatus
Use Case: Register Appliance
User Remove Appliance
Appliance
Register Appliance
<<extends>>
• Register Appliance is extended by Add/Remove appliance use cases to handle registration interactions within the HACS system.
Add Appliance
<<extends>>
Sequence Diagram: Add Appliance
:Interface :HACS xyz:Appliance
setup appliance
provide appliance identification details
configure appliance settings
detect appliance
provide ACK
add appliance
provide response
set range limits
store range limits
User : User
Sequence Diagram: Remove Appliance
:UserInterface :Hacs :appliance
request remove appliance
request remove appliance
remove appliance
notify
Send new status
notify
User : User
Use Case: Register Wireless
User
register wireless Wireless
• The user registers a wireless device with HACS.
Sequence Diagram: Register Wireless
:HACS xyz:Appliance
add user
provide identification details
add device
send confirmation
User : User
Use Case: Emergency Alert
Fire_Department
Police_Department
Emergency_Dept
notify
Intruder_DetectorAlert_controller
Fire_Detector
• Reuse!
Sequence Diagram: Alert System
:Hacs :Device_interface
abc:Alert_controller
emergency: Emergency_dept
:Police :Fire
create_sockets()
start_threads()
start_sensing()
forward request on socket
Demultiplex_request()
connect to data base
connect to data base
Notify_request()
will use some api or sockets for communication
wid specific department
Hacs notified on socket
Here it is assumed devices communicate on
sockets
Hacs notified on socket
Class Diagram: Alert System
Emergency_Dept
tel_pol[5] : int = defaulttel_fire[5] : int = defaultThread_main : thread = nullalert_controler : socket = nullport_alert : socket = nullip_alert : int = defaultname2
Demultiplex_req()Connect_db()notify_dept()
classes interact with socketsAlert_Controller
Alert_controller : socket = nullthread_main : Thread = nullthread_sense : Thread = nullport_alert_controller : int = defaultipaddress_alert_controller : string = default
Start_sensing()Stop_sensing()create_sockets()forward_request()start_threads()
HACS
notify()
CRC Cards: OvenOven Appliance
• Report Exceptions• Change Temperature• Change Mode• Set Timer• Turn On/Off
• HACS• Alert Controller
CRC Cards: Garage DoorGarage Door Appliance
• Open• Close• Report Exceptions
• HACS• Alert Controller
CRC Cards: LightLight Appliance
• On• Off• Set Intensity• Report Exceptions
• HACS• Alert Controller
CRC Cards: Alert Controller
Alert Controller
Object
• Control Alerts• Pass Exceptions to HACS• Alert Emergency Departments
• HACS• Appliance• Appliance subclasses• Emergency Department
Class Diagram: HACS System
Note hid will contain perhaps an internet address for the Hacs system
FireAlarm
detect()
GarageDoor
open()close()
Windows
setSecurity(on_off)detectMotion()
lights
on()off()setIntensity(value)
UserInterface
currentWindowuidhid
Connect(uid)displayWindow(window)getStatus(hid, appliance)setStatus(hid, appliance, attribute, value)getAppliances(hid)
UserRecord
user_id
setId(user_id)getId()
HACS
hiduserRecordsappsEMservicesconnections
getStatus()setStatus()addAppliance()delAppliance()notify()Login()
applianceappIdattributeshid
get(attribute)set(attribute, value)alert(hid)
<<actor>>
top related