Sei sulla pagina 1di 31

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 users
home and person at all times. Devices should be maintained in
non-hazardous states.

The Big Picture

User

User
Interface

HACS

Use Case Diagrams


(for traceability)

Bad!

setTimer

setStatus
HACS

setStatus

GetTemp
Oven

getStatus

getStatus

toggle

toggle

SetTemp

User

ToggleOn/Off

Appliance

User
Appliance
Alert

setTemp

Alert

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
Nobody other than the owner
secure!
should be able to modify an
appliances
status
What if your
neighbor down the street decided
to play a joke and turn on your oven!

Sequence Diagrams:
Log In
User : User

:UserInterface

:HACS

:UserRecord

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
User: User

:UserInterface

:HACS

:Appliance

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?

: User

:UserInterface

:HACS

selectApp
getStatus(app,uid)
Login
loginDenied

displayDenied

:Appliance

Use Case: Set Status


Manag
e
Status <<extends>>

User

Appliance
Set
Status

Now that you know what the appliance is up to,


dont you want to change what it is doing?

Sequence Diagrams:
Set Status
: User

:UserInterface

:HACS

:Appliance

selectApp
setStatus(app,uid,attribute, value)
Login
setStatus(attribute,value)
returnStatus
returnStatus
displayStatus

Use Case: Register


Appliance
Add
Applian
ce
Registe
r
Applian
ce

User

<<extends>>

<<extends>>

Remove
Applian
extendedceby

Appliance

Register Appliance is
Add/Remove appliance use cases to handle
registration interactions within the HACS
system.

Sequence Diagram:
Add Appliance
:Interface

User : User

: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

Sequence Diagram:
Remove Appliance
:UserInterface

:appliance

:Hacs

User : User

request remove appliance


request remove appliance
remove appliance
notify
Send new status
notify

Use Case: Register


Wireless

User

regist
er
wirele
ss

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
e

abc:Alert_contr
oller

emergency:
Emergency_dept

:Police

create_sockets()
Here it is
assumed devices
communicate on
sockets

start_threads()

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

:Fire

Class Diagram: Alert


System
Alert_Controller
Alert_controller : socket = null
thread_main : Thread = null
thread_sense : Thread = null
port_alert_controller : int = default
ipaddress_alert_controller : string = default
Start_sensing()
Stop_sensing()
create_sockets()
forward_request()
start_threads()

HACS
notify()

classes
interact with
sockets
Emergency_Dept
tel_pol[5] : int = default
tel_fire[5] : int = default
Thread_main : thread = null
alert_controler : socket = null
port_alert : socket = null
ip_alert : int = default
name2
Demultiplex_req()
Connect_db()
notify_dept()

CRC Cards: Appliance


Appliance
Interface between
HACS and specific
appliances

Object
HACS

CRC Cards: Oven


Oven
Report Exceptions
Change
Temperature
Change Mode
Set Timer
Turn On/Off

Appliance
HACS
Alert Controller

CRC Cards: Garage Door


Garage Door
Open
Close
Report Exceptions

Appliance
HACS
Alert Controller

CRC Cards: Light


Light

On
Off
Set Intensity
Report Exceptions

Appliance
HACS
Alert Controller

CRC Cards: Alert Controller


Alert
Controller
Control Alerts
Pass Exceptions to
HACS
Alert Emergency
Departments

Object
HACS
Appliance
Appliance
subclasses
Emergency
Department

Class Diagram: HACS System


Note hid will contain perhaps an
internet address for the Hacs
system

HACS
hid
userRecords
apps
EMservices
connections

UserInterface
currentWindow
uid
hid
Connect(uid)
displayWindow(window)
getStatus(hid, appliance)
setStatus(hid, appliance, attribute, value)
getAppliances(hid)

UserRecord
user_id

getStatus()
setStatus()
addAppliance()
delAppliance()
notify()
Login()

setId(user_id)
getId()

<<actor>>
appliance
appId
attributes
hid
get(attribute)
set(attribute, value)
alert(hid)

FireAlarm

detect()

GarageDoor

open()
close()

Windows

setSecurity(on_off)
detectMotion()

lights

on()
off()
setIntensity(value)

The END!
Questions?
Comments?
Praise for our greatness?

Potrebbero piacerti anche