Asterisk For Dummies

2y ago
92 Views
5 Downloads
1.16 MB
43 Pages
Last View : 1d ago
Last Download : 2m ago
Upload by : Maxton Kershaw
Transcription

Linux Smart HomesFORDUMmIESby Neil Cherry‰

Linux Smart Homes For Dummies Published byWiley Publishing, Inc.111 River StreetHoboken, NJ 07030-5774www.wiley.comCopyright 2006 by Wiley Publishing, Inc., Indianapolis, IndianaPublished by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior writtenpermission of the Publisher, or authorization through payment of the appropriate per-copy fee to theCopyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online athttp://www.wiley.com/go/permissions.Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for theRest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related tradedress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the UnitedStates and other countries, and may not be used without written permission. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. WileyPublishing, Inc., is not associated with any product or vendor mentioned in this book.LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUTLIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THEUNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OROTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF ACOMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THEAUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATIONOR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE.FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVECHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.For general information on our other products and services, please contact our Customer CareDepartment within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.For technical support, please visit www.wiley.com/techsupport.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic books.Library of Congress Control Number: 2006923951ISBN-13: 978-0-7645-9823-4ISBN-10: 0-7645-9823-6Manufactured in the United States of America10 9 8 7 6 5 4 3 2 11O/RZ/QX/QW/IN

About the AuthorNeil Cherry has been working with computers, computer electronics, andsoftware since 1978. He has been playing with X10 since 1982. He beganautomating his home in 1992 when a friend gave him an X10 computer interface,and he started the Linux Home Automation Web site (www.linuxha.com) in1996. When he’s not riding his bicycle or playing with home automation, heworks for AT&T Research Lab South, Middletown, NJ, as a Test Engineer. Youcan reach him by e-mail at linuxha@linuxha.com.About the ContributorsTerry Collings is the owner of TAC Technology, located in eastern Pennsylvania.He provides Linux consulting and training services to a variety of clients.Terry has been an adjunct faculty member at several colleges in his areawhere he taught A and Network certification courses. He also taughtcourses on UNIX, Linux, TCP/IP, and Novell Netware. Terry is the author ofRed Hat Enterprise Linux 4 For Dummies, has co-authored three editions ofRed Hat Networking and System Administration and contributed to severalother Linux books. He was the technical editor for the following books: KDEBible, The Samba Book, UNIX Weekend Crash Course, Red Hat Linux 9 ForDummies, Solaris 9 For Dummies, Fedora Linux 2 For Dummies, and LinuxTimesaving Techniques For Dummies.Gurdy Leete is a co-author of OpenOffice.org For Dummies, a technical editorfor Free Software For Dummies, and the co-author of five other popular computer books. He’s also an award-winning software engineer and a co-author ofthe Multitile plug-in for the GNU Image Manipulation Program (GIMP). Gurdyteaches digital imaging, graphic design, Web design, video, and animation atMaharishi University of Management in Fairfield, Iowa, where he has been apioneer in using GNU/Linux applications in undergraduate art and designclasses. His blog, titled Free Software for Art, Music and Personal Creativity, isat www.peaceloveandhappiness.org.Mary Leete wrote Free Software For Dummies and co-wrote OpenOffice.orgFor Dummies. She has a B.S. in Computer Science and a Masters in ProfessionalWriting, and she lives to write code as well as write about it. Mary has extensive experience as a systems analyst and programmer with a multitude ofsoftware on way too many platforms. She is also a freelance Web designer, avideo producer, and an award-winning screenwriter, and she has writtenunder contract for the producer of The Buddy Holly Story, among others.

Author’s AcknowledgmentsI wish to thank my wife, Diane, for putting up with my years of experimentsand for not allowing me to kludge together anything. She’s kept me honestand helped make our home automation work better. Honey, I love you and I’lltake you out to dinner but first just one more compile.Thanks to Terry Collings and Gurdy and Mary Leete who helped by writingvarious chapters that I was unable to. They really helped to make this bookpossible.Thanks to Nicole Sholly and Virginia Sanders, the editors who worked withme on this book. I doubt most people know the amount of work a book takesto get written and how much help the editors give to make a book successful.I really appreciate all the help — thank you very much and I hope I get it now.I’d also like to thank the rest of the folks at Wiley who are too numerous tomention. They do a lot of the work to help get a book put together and to thestores but seldom get mentioned.Thanks to Deepak Dube for his kind words of encouragement, without which Iwouldn’t have thought I could write a book.Thanks also to Donald Brookman and Vincent Miller, my friends who alwaysask the most pertinent questions. (Are we there yet?!)

Publisher’s AcknowledgmentsWe’re proud of this book; please send us your comments through our online registration formlocated at www.dummies.com/register/.Some of the people who helped bring this book to market include the following:Acquisitions, Editorial, andMedia DevelopmentComposition ServicesProject Editor: Nicole ShollyAcquisitions Editors: Kyle Looper, Tiffany MaCopy Editor: Virginia SandersTechnical Editor: Dan DiNicoloEditorial Manager: Kevin KirschnerMedia Development Specialists: Angela Denny,Kate Jenkins, Steven Kudirka, Kit MaloneAssociate Project Coordinator: Tera KnappLayout and Graphics: Carl Byers, Andrea Dahl,Denny Hager, Joyce Haughey,Stephanie D. Jumper, Barbara Moore,Heather Ryan, Alicia B. SouthProofreaders: Leeann Harney, Heidi UngerIndexer: TechbooksSpecial Help: Andy Hollandbeck, Pat O’BrienMedia Development Coordinator:Laura AtkinsonMedia Project Supervisor: Laura MossMedia Development Manager:Laura VanWinkleEditorial Assistant: Amanda FoxworthSr. Editorial Assistant: Cherie CaseCartoons: Rich Tennant(www.the5thwave.com)Publishing and Editorial for Technology DummiesRichard Swadley, Vice President and Executive Group PublisherAndy Cummings, Vice President and PublisherMary Bednarek, Executive Acquisitions DirectorMary C. Corder, Editorial DirectorPublishing for Consumer DummiesDiane Graves Steele, Vice President and PublisherJoyce Pepple, Acquisitions DirectorComposition ServicesGerry Fahey, Vice President of Production ServicesDebbie Stailey, Director of Composition Services

Contents at a GlanceIntroduction .1Part I: Bringing the Future Home.7Chapter 1: Exploring the Possibilities of Home Automation .9Chapter 2: Filling Your Home Automation Toolkit with Linux Software.23Part II: Connecting Multiple Computerswithout the Wires .37Chapter 3: Going Wireless .39Chapter 4: Creating a Wireless Access Point .67Chapter 5: Routing Network Traffic for Free.89Part III: Entertaining Your Brainwith a Little Help from Linux.111Chapter 6: Building a Personal Video Recorder with MythTV .113Chapter 7: Streaming Music without the Wires .129Chapter 8: Having Fun with a Webcam .141Chapter 9: Setting Up a Smart Phone System .157Part IV: Keeping a Linux Eye on the Sky.185Chapter 10: Letting Linux Watch the Weather For You.187Chapter 11: Getting Online Weather Information.199Chapter 12: Staying Comfortable with Thermostat Controls .211Part V: X10-ding Your Environment withHome Automation .225Chapter 13: Introducing X10 Home Automation .227Chapter 14: Going Wireless with X10 .249Part VI: Controlling and Securing YourAutomation Network .259Chapter 15: Controlling Your House with MisterHouse .261Chapter 16: Controlling X10 from MisterHouse.281Chapter 17: Using the Web Interface for Remote Control .297Chapter 18: Remotely Accessing Your MisterHouse Controls.313

Part VII: The Part of Tens .331Chapter 19: (Nearly) Ten Cool Chores You Can Automate .333Chapter 20: Ten Gadgets Worth Checking Out .339Appendix.345Index .351

Table of ContentsIntroduction.1About This Book.1Foolish Assumptions .2Conventions Used in This Book .3What You Don’t Have to Read .3How This Book Is Organized.4Part I: Bringing the Future Home.4Part II: Connecting Multiple Computers without the Wires.4Part III: Entertaining Your Brain with a Little Help from Linux.4Part IV: Keeping a Linux Eye on the Sky .4Part V: X10-ding Your Environment with Home Automation .5Part VI: Controlling and Securing Your Automation Network .5Part VII: The Part of Tens .5The CD appendix .5About the CD-ROM .5Icons Used in This Book.6Where to Go from Here.6Part I: Bringing the Future Home .7Chapter 1: Exploring the Possibilities of Home Automation . . . . . . . . .9Functional and Fun: Home Automation Applications .9Controlling your environment .10Taking your entertainment wherever you go .15Watching the weather .18Creating a sophisticated phone system .20Using Linux to Your Advantage .21Chapter 2: Filling Your Home Automation Toolkit withLinux Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Using New Software on Old Hardware.23Choosing a Linux distribution .23Choosing computer hardware .24Finding Linux-Based Home Automation Software.25About X10 .25Software for ActiveHome, HomeDirector,and Firecracker devices.26Software for X10 Firecracker devices (CM17A) .29Home networking .31

xiiLinux Smart Homes For DummiesDigital video recorder and media center.32Motion detection .33Remote control .33Smart telephone system.33Weather.34Webcams, home security, and videoconferencing.34Finding even more software.35Doing the Tough Work with Low-Level Software .35Dressing Up the Rough Stuff .36Part II: Connecting Multiple Computerswithout the Wires.37Chapter 3: Going Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39Wireless Networking 101 .39Wireless hardware components .41Wireless network standards: 802.11.42Linux wireless support .43Getting Started with NdisWrapper.45Before you start .46Hardware setup .46NdisWrapper drivers.48Configuring NdisWrapper.49Compiling a Custom Kernel .50Backing up your current kernel.51The compiling .52Configuring LILO.58Configuring GRUB.60Getting Started with WPA-Supplicant .61Compiling WPA-Supplicant.62Configuring WPA-Supplicant .62Installing the startup script .64Chapter 4: Creating a Wireless Access Point . . . . . . . . . . . . . . . . . . . .67Discovering the Linksys WRT54GL .67Discovering OpenWrt .69Preparing to Install and Configure Your WAP .71LAN information .73WAN information .75Wireless information.77Upgrading Your WAP to OpenWrt .78Configuring Your WAP .81Touring OpenWrt.85

Table of ContentsChapter 5: Routing Network Traffic for Free . . . . . . . . . . . . . . . . . . . . . .89A Brief Introduction to IP Routing.89Getting Acquainted with Quagga .92Installing Quagga via a Package Manager .93Compiling and Installing Quagga.96Installing Quagga on Your WRT54GL .98Routing with Quagga.99Configuring Quagga.100Routing About.103Part III: Entertaining Your Brainwith a Little Help from Linux .111Chapter 6: Building a Personal Video Recorder with MythTV . . . . .113Building Your MythTV PVR.114Selecting the hardware .114Installing MythTV .115Configuring MySQL .117Configuring the MythTV backend server .117Configuring the MythTV frontend server.122Watching TV.125Managing Your Recordings .125Scheduling your recordings .125Watching your recordings .126Deleting a recording .126Managing Your Media .127Playing music with MythTV .127Playing videos with MythTV .128Viewing image slide shows with MythTV.128Chapter 7: Streaming Music without the Wires . . . . . . . . . . . . . . . . .129Selecting the Hardware and Software.129Configuring Your System.132Installing and configuring the media server .132Connecting and configuring the D-Link media client.134Choosing Your Music Format .137Ripping CDs and Encoding Music Files with Grip.137Streaming Your Audio.139Chapter 8: Having Fun with a Webcam . . . . . . . . . . . . . . . . . . . . . . . . .141Sharing the Fun with a Webcam .141Installing CamStream .142Viewing your webcam on your computer with CamStream .146xiii

xivLinux Smart Homes For DummiesHaving Fun with Videoconferencing .151Installing Ekiga.152Configuring Ekiga.152Making calls.153Looking Around with Pan and Tilt .155Putting Your Webcam to Work.156Chapter 9: Setting Up a Smart Phone System . . . . . . . . . . . . . . . . . . . .157Asterisk 101.158Dial plans .159Context.161Gathering the Ingredients .165Fitting the hardware pieces together.166Configuring the SPA-3000.167How the other half lives: The software.176Making a Smart Call .182Part IV: Keeping a Linux Eye on the Sky .185Chapter 10: Letting Linux Watch the Weather For You . . . . . . . . . . . .187Choosing the Weather Station Hardware and Software .187Building the Weather Station .188Installing the Weather Station Software .189Configuring the weather station program.191Making the weather station cable .193Configuring additional weather station settings .193Mounting the Weather Station.197Putting Your Weather Data on the Web.198Chapter 11: Getting Online Weather Information . . . . . . . . . . . . . . . .199Getting Weather Data on Your Desktop.199Getting Weather Data from Your Browser.203Using MythTV to Get Weather Data.207Setting up MythWeather .207Viewing your MythWeather information .209Chapter 12: Staying Comfortable with Thermostat Controls . . . . . . .211Installing Thermostat Controls .212Installing the TXB16 thermostat.212Installing a two-thermostat X10 control system.216Installing a Thermostat Set-back Controller .218Waking Up to a Warm House.219Saving Money with Controlled Heating .219Saving money by using X10 thermostat systems .220Saving money with the Linux DIY Zoning Project .220

Table of ContentsPart V: X10-ding Your Environment withHome Automation.225Chapter 13: Introducing X10 Home Automation . . . . . . . . . . . . . . . . .227Introducing X10 Power Line Carrier .228X10 PC interfaces.230A (very short) list of X10 modules .231Purchasing X10 devices .232Building a Starter Kit .233The software: Compiling Heyu.234The hardware.235Module setup .236Cool Things to Do with X10 .237Egg timer.238Sunrise, Sunset .240X10-powered printer .242Troubleshooting X10 Problems.244Common problems.245Isolating a problem.247Chapter 14: Going Wireless with X10 . . . . . . . . . . . . . . . . . . . . . . . . . .249Getting Familiar with the X10 Interfaces.250Gathering the Tools .251Software .252Hardware .253Setting Up the X10 Wireless Network .253Setting up the X10 transceiver.253Starting the Apache http server (httpd) .254Installing BlueLava .255Installing BottleRocket.255Configuring BlueLava.256Using your wireless X10 network .258Part VI: Controlling and SecuringYour Automation Network .259Chapter 15: Controlling Your House with MisterHouse . . . . . . . . . . .261Introducing MisterHouse .262The MisterHouse interfaces.263So what can MisterHouse do?.263Installing MisterHouse.265Logging in as root .266The installation.266xv

xviLinux Smart Homes For DummiesPreparing MisterHouse for Setup.268Setting Up MisterHouse.272Starting MisterHouse .272Modifying the parameters .274Restarting MisterHouse.

Dummies, Solaris 9 For Dummies, Fedora Linux 2 For Dummies, and Linux Timesaving Techniques For Dummies. Gurdy Leete is a co-author of OpenOffice.org For Dummies, a technical editor for Free Software For Dummies, and the co-author of five other popular com-puter books. He’s also an award-winning software engineer and a co-author of

Related Documents:

Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade . Excel Workbook For Dummies and Roxio Easy Media Creator 8 For Dummies, . Greg went on to teach semester-

Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com and related trade dress are trademarks or registered . English Grammar For Dummies, English Grammar Workbook For Dummies, Research Papers For Dummies, College Admissions Essays For Dummies, SAT I . Getting the Story from Prose

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

To access the Asterisk command-line interface (CLI), pass the-cor-rargument to the Asterisk executable. In other words, type this from your shell prompt: # asterisk -r If you want the system to provide you with more information about what it is doing (an excellent idea, especially when you're new to Asterisk), you can add the argu-

Asterisk Server Security 144 Internal Access Control 144 Host Security Hardening for Asterisk 147 Integrity Checker 147 Root-Kit Detection 147 Automated Hardening 148 Role Based Access Control (RBAC) 148 Network Security for Asterisk 149 Firewalling the Asterisk Protocols 149 SIP (Session Initiation Protocol) 150 H.323 150 IAX 151

5. Basic Asterisk Server Configuration: a. SIP Extension Configuration. b. Register Your PC / Android Mobile Phone With Asterisk. c. Register Analog Telephone Adapter (ATA) With Asterisk. 6. What Is Next? a. Send/Receive Calls Using Your Asterisk Server While You Are Anywhere Across The Globe! b. Connecting Two Asterisk Servers Together Via SIP .

About the Author Geraldine Woods teaches English and directs the independent study program at the Horace Mann School in New York City. She is the author of more than 50 books, includ-ing English Grammar For Dummies, SAT For Dummies, Research Papers For Dummies, College Admission Essays For Dummies, AP English Literature For Dummies, and AP English Language and Composition For Dummies, all .

Section 501 SECTION 501 5-3 1 2 LIME-TREATED SOIL 3 501-1 DESCRIPTION 4 Perform the work covered by this section including, but not limited to, treating the subgrade, 5 embankment, natural ground or existing pavement structure by adding water and lime in the 6 form specified herein, mixing, shaping, compacting and finishing the mixture to the required 7 density. Prepare the soil layer to be .