Smart Home Automation with Linux
von: Steven Goodwin
Apress, 2010
ISBN: 9781430227793
Sprache: Englisch
303 Seiten, Download: 4513 KB
Format: PDF, auch als Online-Lesen
Title Page | 2 | ||
Copyright Page | 3 | ||
Contents at a Glance | 5 | ||
Table of Contents | 6 | ||
About the Author | 13 | ||
About the Technical Reviewers | 14 | ||
Acknowledgments | 15 | ||
Introduction | 16 | ||
CHAPTER 1 Appliance Control | 18 | ||
Making Things Do Stuff | 18 | ||
X10 | 18 | ||
About X10 | 19 | ||
General Design | 21 | ||
Simple Case | 21 | ||
Standard Case | 21 | ||
Fully Automated | 22 | ||
Assigning Addresses | 22 | ||
Using Multiple House Codes | 23 | ||
Device Modules | 23 | ||
Controlling Lights | 24 | ||
Lamp Module (LM12U) | 24 | ||
Bayonet Lamp Module (LM15EB) | 25 | ||
Wall Switch (LW10U) | 26 | ||
MicroModule with Dimmer (LWM1) | 27 | ||
DIN Rail Dimmer (LD11) | 28 | ||
Appliance MicroModule (AWM2) | 28 | ||
Controlling Appliances | 29 | ||
Appliance Module (AM12U) | 29 | ||
Appliance MicroModule (AWM2) | 30 | ||
Internal Devices | 31 | ||
Combination Devices | 31 | ||
Electronic Curtain Rails: Retrofit | 32 | ||
Electronic Curtain Rails: Prebuilt | 32 | ||
Stand-Alone Controllers | 32 | ||
Tabletop Transmitter Modules | 32 | ||
Mini Controller (MC460) | 33 | ||
Sundowner Dusk/Dawn Controller (SD7233/SD533) | 33 | ||
Mini Timer (MT10U) | 33 | ||
Maxi Controller (SC2800) | 34 | ||
Handheld Transmitter Modules | 35 | ||
Handheld RF Remote (HR10U) | 35 | ||
Keyfob Remote (KR22E) | 35 | ||
EasyTouch Panel10 RF | 36 | ||
EasyTouch35 Universal Remote Control | 36 | ||
In-Wall Transmitter Modules | 36 | ||
Motion Sensors | 37 | ||
Gateways and Other Exotic Devices | 37 | ||
Computer Control | 40 | ||
Heyu | 41 | ||
Configuration | 42 | ||
Sending Messages | 42 | ||
Receiving Messages | 43 | ||
Programming the EEPROM | 44 | ||
C-Bus | 45 | ||
About C-Bus | 45 | ||
Differences Between X10 and C-Bus | 45 | ||
Devices | 46 | ||
Controlling Lights | 46 | ||
Controlling Appliances | 47 | ||
Controllers | 47 | ||
Gateways | 48 | ||
Networked Devices | 48 | ||
Ethernet Devices | 48 | ||
Networking Primer | 48 | ||
Concepts | 49 | ||
Addressing | 49 | ||
Computer Names | 52 | ||
Network Services | 53 | ||
CCTV Cameras | 55 | ||
Wireless Cameras That Aren’t | 56 | ||
Custom Hardware | 57 | ||
Linux Software | 57 | ||
Stand-Alone BitTorrent Clients | 58 | ||
Infrared Remote Control | 58 | ||
All-in-One Remotes | 59 | ||
IR Relays | 59 | ||
Over the Aerial Cable | 59 | ||
IR-RF-IR Gateways | 60 | ||
IR Over IP | 60 | ||
IR Control | 63 | ||
Conclusion | 65 | ||
CHAPTER 2 Appliance Hacking | 66 | ||
Converting Existing Technology | 66 | ||
Software Hacks | 66 | ||
Linksys NSLU2 | 66 | ||
Unslung | 67 | ||
SlugOS | 68 | ||
Developing on the Slug | 68 | ||
Hacking Game Consoles | 69 | ||
Sega Dreamcast | 69 | ||
Sony PlayStation | 70 | ||
PlayStation 1 | 70 | ||
PlayStation 2 | 71 | ||
PlayStation Portable | 72 | ||
Microsoft Xbox | 72 | ||
Running Linux | 73 | ||
Xbox Media Center | 74 | ||
Hardware Hacks | 75 | ||
Linksys NSLU2 | 75 | ||
Always On | 75 | ||
Overclocking | 75 | ||
Serial Port | 76 | ||
LEGO Mindstorms | 77 | ||
Arduino as an I/O Device | 78 | ||
Installation and Setup | 79 | ||
Arduino Software | 80 | ||
Reading Digital Inputs | 81 | ||
Reading Analog Inputs | 84 | ||
Sending Digital Outputs | 85 | ||
Sending Analog Outputs | 86 | ||
Creating Audio Outputs | 87 | ||
Communication with a PC | 87 | ||
Arduino Hardware | 89 | ||
Ethernet Networking | 90 | ||
Wireless Control | 90 | ||
Sound | 90 | ||
Motors | 90 | ||
Example: The Arduino Welcome Mat | 90 | ||
Example: The Arduino Dictaphone | 93 | ||
Joysticks for Input | 96 | ||
Other Input Controllers | 97 | ||
Hacking Laptops | 97 | ||
Your Own X10 Devices | 98 | ||
Conclusion | 100 | ||
CHAPTER 3 Media Systems | 101 | ||
Incorporating the TV and the HiFi | 101 | ||
The Data Chain | 101 | ||
Extracting the Data | 102 | ||
Compact Disc | 102 | ||
DVD | 103 | ||
Rip As ISO | 104 | ||
Rip As Movie Files | 104 | ||
Issues with Movies | 105 | ||
Cassette Tapes and Vinyl | 106 | ||
Storage | 107 | ||
Stand-Alone NAS Systems | 107 | ||
Hard Drive Considerations | 107 | ||
Networking Considerations | 109 | ||
Extra Functionality | 110 | ||
NAS with Media Playback | 110 | ||
Configuring a Linux Box | 111 | ||
Preparing a Machine | 112 | ||
Preparing a Filesystem | 113 | ||
Preparing a Master Server | 113 | ||
Media Extenders | 114 | ||
Stand-Alone Hardware | 115 | ||
Hauppauge MediaMVP | 115 | ||
Creating a Server | 115 | ||
MediaMVP Media Center | 116 | ||
Weather Reports | 117 | ||
Video Transcoding | 117 | ||
Other Functionality | 119 | ||
The Xtremer | 119 | ||
Squeezebox | 119 | ||
Server Software | 120 | ||
Other Software | 120 | ||
Emprex ME1 | 120 | ||
Just Linux | 121 | ||
The Operating System | 121 | ||
The Software | 121 | ||
MythTV | 122 | ||
Freevo | 122 | ||
Xbox Media Center | 123 | ||
The Video Disk Recorder Project | 123 | ||
Distribution | 123 | ||
Local Processing vs. Remote Processing | 123 | ||
AV Distribution | 123 | ||
Switching | 124 | ||
Splitting and Merging | 124 | ||
Wiring Looms | 125 | ||
Wireless AV Distribution | 126 | ||
Matrix Switchers | 126 | ||
Control | 128 | ||
Local Control | 128 | ||
Remote-Control Methods | 128 | ||
Direct Control | 128 | ||
Relay Control | 129 | ||
Server Control | 130 | ||
A Web Interface | 130 | ||
SMS | 130 | ||
Conclusion | 131 | ||
CHAPTER 4 Home Is Home | 132 | ||
The Physical Practicalities | 132 | ||
Node0 | 132 | ||
Function and Purpose | 132 | ||
Determining the Best Room | 133 | ||
Lawful Considerations | 133 | ||
Necessary Considerations | 133 | ||
Negative Effects | 134 | ||
Human Considerations | 135 | ||
Primary Options | 136 | ||
Building the Rack | 137 | ||
Servers | 138 | ||
Purposes of Servers | 138 | ||
CPU Power | 138 | ||
Disk Space | 139 | ||
Server Extensibility | 139 | ||
Bandwidth Capabilities | 139 | ||
Types of Server | 140 | ||
Rack Mount | 140 | ||
Desktop PC | 140 | ||
Mini-ITX | 141 | ||
Mini-PC | 142 | ||
Custom Embedded | 143 | ||
Power Consumption | 143 | ||
Server Coordination | 146 | ||
UPS | 147 | ||
Backups | 151 | ||
Hiding Your Home | 155 | ||
Adding to Your Home | 156 | ||
General Considerations | 157 | ||
Wired Network | 158 | ||
Wireless Points | 160 | ||
Audio Cabling | 161 | ||
Other Access Points? | 162 | ||
Conclusion | 163 | ||
CHAPTER 5 Communication | 164 | ||
Humans Talk. Computers Talk. | 164 | ||
Why Comms? | 164 | ||
IP Telephony | 165 | ||
Skype | 165 | ||
Asterisk | 166 | ||
166 | |||
Preparing E-mail in Linux | 166 | ||
Sending E-mail | 167 | ||
Autoprocessing E-mails | 168 | ||
Security Issues | 171 | ||
Voice | 172 | ||
The Software for Voice Recognition | 173 | ||
Remote Voice Control | 175 | ||
Speech Synthesis | 176 | ||
Piecemeal Samples | 179 | ||
Web Access | 180 | ||
Building a Web Server | 181 | ||
Virtual Sites | 181 | ||
Secure Server | 183 | ||
Controlling the Machine | 187 | ||
Media Access | 188 | ||
SMS | 189 | ||
Processing with a Phone | 190 | ||
Custom Numbers and APIs | 193 | ||
Sending Messages | 193 | ||
Receiving Messages | 196 | ||
Conclusion | 199 | ||
CHAPTER 6 Data Sources | 200 | ||
Making Homes Smart | 200 | ||
Why Data Is Important | 200 | ||
Legalities | 200 | ||
Screen Scraping | 201 | ||
Data Through APIs | 204 | ||
Distribution | 205 | ||
Public Data | 205 | ||
TV Guides | 205 | ||
Train Times | 206 | ||
Road Traffic | 208 | ||
Weather | 208 | ||
Forecasts | 208 | ||
Local Reporting | 212 | ||
Radio | 212 | ||
CD Data | 214 | ||
News | 216 | ||
Reported Stories: Push | 216 | ||
Retrieving Data: Pull | 218 | ||
Private Data | 219 | ||
Calendar | 219 | ||
Webmail | 221 | ||
223 | |||
Posting Tweets with cURL | 224 | ||
Reading Tweets with cURL | 224 | ||
Reading Tweets with RSS | 225 | ||
225 | |||
Automation | 225 | ||
Timed Events | 226 | ||
Periodic Control with Cron Jobs | 226 | ||
Occasional Control with At | 228 | ||
Error Handling | 228 | ||
Conclusion | 229 | ||
CHAPTER 7 Control Hubs | 230 | ||
Bringing It All Together | 230 | ||
Integration of Technologies | 230 | ||
The Teakettle: An Example | 231 | ||
Minerva | 233 | ||
Overview | 234 | ||
Linux Users Are Not HA Users | 235 | ||
The Minerva User | 237 | ||
The Public User | 237 | ||
Device Abstractions | 237 | ||
Typical Application Abstractions | 238 | ||
Monexec | 239 | ||
TODO: A Worked Example | 240 | ||
Conduits | 241 | ||
Echo | 242 | ||
242 | |||
Infrared Remote Control | 242 | ||
Logging | 242 | ||
SMS | 242 | ||
242 | |||
The Voice Conduit | 243 | ||
Web Log | 243 | ||
Window Alert | 243 | ||
Administering Conduits | 243 | ||
Messaging Conduits | 244 | ||
Output Conduits: Transmission | 244 | ||
Input Conduits: Receiving Messages | 246 | ||
TODO: Building a Conduit | 248 | ||
Message Relays | 249 | ||
Time-Based Messaging | 249 | ||
Other Uses for MTS | 251 | ||
Location-Based Messaging | 251 | ||
Cosmic | 252 | ||
Configuration | 252 | ||
Creating Modes | 254 | ||
Web Applets | 254 | ||
Zinc: Between Web and Native | 255 | ||
Of Web Pages and Applets | 255 | ||
Existing Applets | 258 | ||
Media | 258 | ||
Lifestyle | 260 | ||
Information | 263 | ||
Administration | 264 | ||
Creating Your Own Applets | 265 | ||
The WARP Directories | 266 | ||
The Components of WebFace | 266 | ||
The Basic Structure | 266 | ||
TODO: Controlling the Applet | 267 | ||
Global Configuration | 269 | ||
Applet Configuration | 270 | ||
Utilities | 271 | ||
Release | 271 | ||
Manifest | 271 | ||
Marple | 272 | ||
The Workings | 273 | ||
Handling Protocols | 273 | ||
Bearskin Compatibility | 275 | ||
Utility Scripts | 276 | ||
Status | 276 | ||
User Tools | 276 | ||
Topology Ideas | 277 | ||
Networking | 277 | ||
Wiring Looms | 279 | ||
Conclusion | 282 | ||
Index | 283 |