Home Automation with Perl and X10 - PowerPoint PPT Presentation

About This Presentation
Title:

Home Automation with Perl and X10

Description:

Sender sends signals over power lines. Receiver switches electrical ... Mac: $30 Keyspan 19HS /dev/ttyS0. Receiver. E.g. connected to your Cable Modem: Protocol ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 27
Provided by: Yah982
Category:
Tags: automation | home | keyspan | perl | x10

less

Transcript and Presenter's Notes

Title: Home Automation with Perl and X10


1
Home Automation with Perl and X10
  • Mike Schilli, Yahoo!
  • 06/25/2007

2
Whats X10?
  • Sender sends signals over power lines
  • Receiver switches electrical devices on/off
  • Cheap Technology
  • Sender 10
  • Receiver 10

3
What can you do with X10?
  • Examples include
  • Water your plants
  • Reboot your cable modem
  • Control any device via Gaim/Jabber

4
X10 Signal Flow
5
X10 CM11 Control Unit
  • Serial plug connects to PC
  • Power plug injects X10 signals into power line
  • lt 10 plus shipping on Ebay
  • Dont have a serial port? Buy a PCI card
    (ttyS4/5)
  • Alternatively CM17 (RF)

6
No Serial Port?
  • PC 10 PCI card
  • /dev/ttyS4
  • Mac 30 Keyspan 19HS
  • /dev/ttyS0

7
Receiver
  • E.g. connected to your Cable Modem

8
Protocol
  • One four-bit house code (A-P)
  • One or more four-bit unit code(s) (1-16)
  • One four-bit command
  • Example
  • House Code K, Unit 9, Turn on

9
How X10 transmits

10
How X10 transmits

11
Protocol
  • 1110 Starting sequence
  • Binary 1 Presence, Absence
  • Binary 0 Absence, Presence
  • Each signal sent twice
  • Overall data transfer 20 bits/sec

12
Setting up a serial port
  • Init serial port
  • use DeviceSerialPort
  • my serial DeviceSerialPort-gtnew(
  • /dev/ttyS0, undef)
  • serial-gtbaudrate(4800)
  • Send command
  • use ControlX10CM11
  • ControlX10CM11send(serial,
  • house_code . unit_code)
  • ControlX10CM11send(serial,
  • house_code . J) JON KOFF

13
Receivers
  • Lamp Module
  • Triac Solid State
  • On/Off/Dimming
  • No Appliances or electronic devices
  • Appliance Module
  • Relay switches On/Off
  • Maintains last state during power outages

14
Example 1 Lights on/off with Gaim
  • NetJabber

15
Example 1 Lights on/off with Gaim
  • A Jabber listener performs X10CM11 commands

16
Example 2 X10 Console
  • YUI components for ajaxed web console
  • Reboot routers, print servers, DSL modem

17
Example 3 Water your Plants
  • Aquarium Pump in Water container
  • Switched on/off by X10
  • Host checks weather report (WeatherCom) to
    determine amount of water
  • Secured by external timer

18
Video Demo
19
X10Home
  • use X10Home
  • my x10-gtX10Home-gtnew()
  • Address services by name
  • x10-gtsend("bedroom_lights", "on")
  • Also remembers status

20
X10Home
  • x10.conf sample file
  • module ControlX10CM11
  • device "/dev/ttyS0
  • receivers
  • - name office_lights
  • code K10
  • desc Office Back Lights
  • - name water
  • code K11
  • desc Plant Sprinkler

21
Problems with X10
  • No security on the X10 level
  • No feedback with cheap units
  • Signals get lost
  • Power outages might affect outcome
  • Two senders Collisions
  • Slow (1 sec/command)

22
Precautions
  • Use Fail Safe strategies
  • Limit potential damage
  • Consider additional autonomous devices like
    digital timers

23
QA
  • Questions?

24
Thanks!
  • Contact mschilli_at_yahoo-inc.com

25
References
  • X10 YUI Console http//www.linux-magazin.de/heft_a
    bo/ausgaben/2007/04/heimschaltwarte
  • http//www.linux-magazine.com/issue/50/Perl_Buildi
    ng_a_Jabber_Bot.pdf
  • ftp//ftp.x10.com/pub/manuals
  • http//misterhouse.net
  • Moshe Bar, Home Automation with Perl, TPJ,
    02/2003

26
References (continued)
  • http//forums.cabling-design.com/X10-and-Linux-art
    icle12453--49.htm
Write a Comment
User Comments (0)
About PowerShow.com