31
DIY Home Automation Chris Barrett

DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Embed Size (px)

Citation preview

Page 1: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

DIY Home AutomationChris Barrett

Page 2: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Disclaimer

• I am a hobbyist• I have no attachments to any of the companies that

I will mention other than that I have bought some of their products.

• References to the companies and their products do not constitute endorsements.

Page 3: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

What is Home Automation?

• “home automation”

• “smart homes”

• “intelligent houses”

• Automating aspects of your home to make things more efficient and/or enjoyable.

Page 4: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

My Introduction to HA

Page 5: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

The Technologies in my House

• X10

• 1-wire

• Infrared

• Text to speech

• Caller ID

• Digital IO

Page 6: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

X10

• Powerline Carrier (PLC)

• Control signals are sent over the house’s existing electrical wiring• no extra wiring is required!

• The signals are not noticed by and don’t affect the operation of non-X10 equipment.

• Developed and patented in 1978

Page 7: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Examples of X10 Equipment

CM12AUComputer Interface

AM12Appliance Module

LM15EB“Socket Rocket”

Page 8: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

X10 Addressing Scheme

• Each device (eg a light) is assigned an address• made up of a House code and Unit code

• House Code – A,B,C,…,P

• Unit Code – 1,2,3,…,16

• So a light in the kitchen might be K3

• 256 (16*16) combinations• Multiple devices can have the same code but will be

controlled as one.

Page 9: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Examples of X10 Commands

• K3 ON• Turns the kitchen light on

• K3 OFF• Turns the light off

• K3 DIM25• Turns the light on but at 25% of it’s normal power

Page 10: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

X10 – “Gotcha #1”

• X10 wont work with devices that need a human to press a button for it to do something.

• The device needs to be capable of doing its job as soon as it gets power.

• For example, X10• Wont work with a VCR, but• Will generally work with a kettle or a pedestal fan.

Page 11: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

X10 - “Gotcha #2”

• X10 signals can occasionally get lost or corrupted.

• Most X10 modules are not bi-directional.• No feedback to confirm if the command was

received.

Page 12: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

1-wire

• Firstly, it actually uses two wires …• 1 wire for ground• 1 wire for power and data

• this is where the name comes from

• The 1-wire devices in my house use the existing Cat-5E cabling.

• Each device has a unique ID (like a MAC address)

Page 13: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

iButton

• One physical implementation of 1-wire devices.

• Looks like a watch battery.

• Two main types used for HA:• Thermostat• Serial number

• Can be used to identify regular occupants

Page 14: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Infrared

• IR transceiver connected to the PC• www.usbuirt.com

• Allows the control of:• devices (eg TV, stereo, VCR) from the PC, and• the PC using a surplus IR remote.

• An IR->RF->IR repeater allows me to keep the PC and USB-UIRT in a closet.

Page 15: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Text To Speech

• Reads out information, reminders and warnings:• Reads out the weather forecast each morning.• Reminds me the night before and the morning of

rubbish day.• Tells me when the news is on.

Page 16: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Digital I/O

• Serial interface board• www.weedtech.com

• Each of the 14 lines can be configured as inputs or outputs.• Switches, LEDs, push buttons, etc

Page 17: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Misterhouse

• The ring master or brain of the the system.

• Open source.

• Written entirely in Perl• Multi platform – Win32, Linux, Mac, etc

• All of the automation within my house was created using Perl.

• www.misterhouse.net

Page 18: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Heating

• Wireless thermostat.

• PC based RF receiver (W800RF32)• www.wgldesigns.com

• The system looks at the temperature provided by the thermostat …

• Compares it to my desired temperature for the time of day …

• If necessary sends commands to an X10 controllable relay which in turn controls the ducted gas heater.

Page 19: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Motion Detectors

• Generally one in each room.

• In some rooms, the lights are turned on automatically if motion is detected and it’s dark.

• In all rooms, the lights are turned off if no motion is detected for a user-defined period of time.

Page 20: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Motion Detectors

• Can double as sensors for an security system.

• A work in progress at this stage.

Page 21: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Doors

• The front and back doors are fitted with devices that send a signal whenever the doors are opened or closed.

• The system advises when a door has been left open too long.

• A device has also been fitted to a closet and a light is turned when on the door is opened.• just like the fridge.

Page 22: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Doorbell

• Plays a WAV file when someone presses the button.

• If the front door is not opened within 45 seconds then an email is sent to me indicating that we missed a visitor.

• Future plan is to install a camera (eg web cam) to take a photo and include it in the email.

Page 23: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

The code that manages the doorbell$Doorbell_timer = new Timer(); $Doorbell_Answer_timer = new Timer();

if (state_now $Doorbell =~ /normal/) { play(volume=>100, file=>'Trumpet1.wav'); flash $LoungeRoom_light; if (inactive $Doorbell_timer) {

set $Doorbell_Answer_timer (45); set $Doorbell_timer (120);

} } if (expired $Doorbell_Answer_timer) {

Send_Email(undef,"Doorbell"," No-one answered the door",undef); } if ((state_now $FrontDoor eq "open") && (active $Doorbell_Answer_timer)) {

unset $Doorbell_Answer_timer; print_log "Door has been answered - email will not be sent";

}

Page 24: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Caller ID

• Modem detects the phone ringing.

• The system:• reads the phone number from the modem,• looks up a database of phone numbers and reads

out the name if it’s known or the phone number, and• sends an IR signal to the stereo to turn down the

volume.

Page 25: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Weather Data

• The system downloads:• Weather conditions (current temp, wind speed, etc)

from the Bureau of Meteorology every 20 minutes.• Forecast information once an hour.

• Conditions are plotted on a number of graphs.

• Forecast is read out each morning, and when requested.

Page 26: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Irrigation

• Project is on hold because of the water restrictions.

• Plan is to have a system that will adjust watering parameters depending on:• the forecast for today and the next couple of days, • the current conditions, • the recent past conditions, and• any government imposed watering restrictions.

Page 27: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Example #1- My computer room

Each morning when I walk into the room for the first time, the system:

1. Turns on the light if it’s dark,

2. Reads out the forecast for the day,

3. Reminds me if our dog needs its monthly pills, and

4. Turns on the radio in the lounge room and sets it to Triple J.

Page 28: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Example #2 - Rubbish Day

• We have our rubbish collected on Thursdays.

• On Wednesdays at 18:15, 19:15 and 20:15 the system announces that “It is rubbish day tomorrow.”

• On Thursday morning the system announces at 07:15 and 07:45 that “It is rubbish day today.”

Page 29: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Example #3 - Front door

• Motion sensor outside near the front door detects motion and turns on:• the exterior light if it’s dark outside and• the light immediately inside the front door if it’s dark

inside the house.

Page 30: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Example #4 - News Time

• At 17:57 the system announces that “The news is on soon”.

• At 17:59 the system transmits IR signals to:• Turn the TV on,• Set the channel on the TransACT STB to 9, and• Set the stereo to accept the audio feed from the TV.

Page 31: DIY Home Automation Chris Barrett. Disclaimer I am a hobbyist I have no attachments to any of the companies that I will mention other than that I have

Demonstration

• A live demonstration of the system via the Internet.