Tải bản đầy đủ (.pdf) (10 trang)

Smart Home Automation with Linux- P29 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (557.96 KB, 10 trang )

CHAPTER 7 ■ CONTROL HUBS

263


Figure 7-7. A simple network configuration
This allows you to reuse the router as a network switch and employ servers with only one network
port, such as the majority of small low-power mini PCs on the market. If this configuration is too
limiting, such as when you want to use Linux as the router itself, then you can adopt a configuration
like the one shown in Figure 7-8. With this setup, you will need two network cards and a separate
network switch.


Figure 7-8. Using a Linux server to separate the two network domains
CHAPTER 7 ■ CONTROL HUBS

264

In either case, you use a remote server, such as a colocated server or a virtual machine located in a
data center, to accept and process all traffic thereby hiding the identity of your home machine.


Figure 7-9. Using an external server
Wiring Looms
Whole-house audio and video with media accessible in every room can happen in one of two primary
ways. The first is by using small PCs in each room, connected to the network to decode the audio locally.
This is easier to upgrade and allows audio and video data to be streamed and controlled locally with very
little effort. It is, however, expensive because of the hardware needed in each room. It is also
inconvenient in those cases where you want to move between rooms while watching or listening since
you have to manually restart it.
7



The cheapest way of distributing AV data is by running cables to each room. This involves a
combination of amplifiers and switchers, as shown in Figure 7-10.



7
The software to manage this is currently minimal to nonexistent.
CHAPTER 7 ■ CONTROL HUBS

265


Figure 7-10. A simple AV distribution network
In all cases, the generic term of AV is used to refer to audio and/or video data, according to your
needs. You will notice that distribution among the rooms upstairs is easier, since the cables can be run
up into the attic, across the attic space in any haphazard manner you please, and down into the other
rooms. Here there is a single set of AV cables running down the downstairs, giving full control to the
living room.
The primary limitation with this setup is the single AV channel coming from the Node0 server,
meaning that any media not held on Node0 cannot be distributed or used elsewhere. The PVR, for
example, can be controlled and viewed only in the living room. This is solved in Figure 7-11.

CHAPTER 7 ■ CONTROL HUBS

266


Figure 7-11. Placing all the AV in Node0
In this environment, all the AV equipment is placed physically within Node0, making for short cable

runs and easy-to-install IR transmitters. And there is still only a single AV cable to lay into each room
wanting media. This is both a benefit, because the installation is much cheaper, and a hindrance,
because only the same media can be experienced in each room. This is solved with a matrix switcher,
shown in Figure 7-12, which allows any input to be sent to any room.


Figure 7-12. The benefits of a matrix switcher
Note that in all cases, the placement of the particular amplifiers will be determined by the amps
themselves. Some provide two power outputs, allowing all speakers to be passive (that is, unpowered),
while others provide only a line-out level requiring an additional amplifier (and therefore power socket)
for each room in which they’re installed.



CHAPTER 7 ■ CONTROL HUBS

267

Conclusion
As you’ve seen with the example using the teakettle, there are comparatively few pieces of software
needed to smartly automate a house. Once you can process incoming e-mails or text messages and issue
an X10 command, then the task of “e-mailing your teakettle” becomes a simple matter of combining the
two scripts in a trivial (almost banal!) fashion. The next level of interest is generated from the usability
features and the specificity of function. Usability is something you can add only after living with the
configuration for a while—having Festival use speech synthesis to say “the teakettle has boiled” is an
easy technological change but is something so uniquely specific that only a geek living in the
environment could actualize it with such effortless precision. Make the most of the opportunity.




269

Index
■Numbers & Symbols
10-foot user interface, 106
24-hour rolling news, 201
433MHz range, 4
5812 series plug adapters, 30
802.11 wireless protocol, 31
■A
abcde tool, 86
abstractions, 222–225
access files, 168
active distribution, 107
AD10 module, 82
Add-a-Motor 80 (CM80), 15
addminervaapplet script, 256
addr directory, 226
addresses
assigning, 5– 6
network, 32–35
for X10-controlled devices, 2
administration applets, 249
aerial cable, IR relays over, 42
albumart tool, 200
aliases, 25
all-in-one remotes, 42
AM12U module, 8, 12–13
AM12W module, 81
AND gate, 8–9

Apache server, 166–174
apcupsd package, 134
APIs, data through, 189–190
applets directory, 251
appletUtils class, 256
appliance control, 1–48
C-Bus, 28–31
infrared remote control, 41–48
networked devices, 31–41
X10, 1–27
about, 2–3
computer control, 23–27
device modules, 6–15
gateways, 20–23
general design, 4–6
stand-alone controllers, 15–20
appliance hacking, 49–83
hardware hacking, 58–83
Arduino, 61–78
input controllers, 80
■ INDEX
270

joysticks, 79– 80
laptops, 80
Lego Mindstorms, 60–61
Linksys NSLU2, 58–59
mains-powered devices, 81–83
software hacking, 49–57
developing on the Slug, 51

game consoles, 52–57
Linksys NSLU2, 49–51
appliance modules, 12–14
AM12U, 8 , 12–13
AWM2, 11, 13
C-Bus, 30
X10, 2
application abstractions, 223–224
Arduino
as I/O device, 61–78
benefits, 62
communication with PC, 70–72
creating audio outputs, 70
Dictaphone (example), 76–78
hardware, 72–73
installation and setup, 62–63
reading analog inputs, 67–68
reading digital inputs, 64–66
sending analog outputs, 69
sending digital outputs, 68
shields, 72
software, 63–70
Welcome Mat (example), 73–76
Arduino Diecimila, 61
Arduino Duemilanove, 61
Asterisk, 151
at command, 213
Atmega168 chip, 61
Atmega 328 chip, 61
attic, as location for Node0, 122

Audacity, 90
audio cabling, 146–147
audio mixer, 244
auth directory, 226
authentication
certificates, 169–171
enabling, 168–169
automated devices, assigning addresses to,
5–6
automation, 210
error handling, 213–214
teakettle example, 216–218
timed events, 211–213
AV connections, 146
AV distribution, 107–108, 119
splitting and merging, 108
switching, 108
wireless, 110
AV source selector box, 108
AV switch box, 108
AWM2 module, 11, 13

■ INDEX
271

■B
back-EMF, 13
backups, 93, 136–139
bandwidth, 124
bayonet lamp module (LM15EB), 8– 9

Bearskin, 222–223, 260
Bearskin commands, 224, 240–244
bedroom, as location for Node0, 121
binary messages, 180
BitTorrent clients, 41
Bleb, 191
Bluetooth address, 113
Bluetooth communication, 113
Bluetooth control apps, 113
Bluetooth monitor software, 236
Boxee, 57
bridges, 22
broadband adapter (BBA), 52
broadband modems, 118
■C
c1–c8 scripts, 239
cable modems, 118
cables
audio, 146–147
Cat5, 119, 143–145, 147
in ceiling, 142
installation of, 142–143
pulling, 142

star configuation, 142
wired networks and, 143–145
caching, 256
calendars, 204–206, 246
cameras, 38–41, 147
camserv, 41

cassette tapes, 90–91
Cat5 cables, 119, 143–145, 147
C-Bus, 28–31
about, 28
appliance modules, 30
compared with X10, 28–29
controllers, 30
devices, 29–30
dimmers, 30
gateways, 31
installation, 28
remote control using, 29
wireless, 28
C-Bus Toolkit, 31
CCTV cameras, 38–41
CD data, 199–201
CD player, 243
cdplayer abstraction, 223
cdplayer command, 243, 258
Centre for Speech Technology Research
(CSTR), 161
certificate authorities, 169
cineDISK NAS, 95
CM11 control, 5, 23–24
■ INDEX
272

cmd directory, 226
cocktail party effect, 163
combination devices, 14–15

communication, 149–184
between Arduino and PC, 70–72
e-mail, 151–157
IP telephony, 150–151
messages
location-based, 236
relays, 234
receiving, 231–233
time-based, 234–236
transmission, 229–231
methods of, 149–150
Short Message Service (SMS), 174–183
two-way, 10, 24
voice, 157–165
Web access, 165–174
compact discs (CDs), 86
compact fluorescent lamps, 7
computer controls, 23–27
computer interface, 5
computer names, 35–36
computer-to-human communication, 150
conduits, 226–234
administration of, 228
building, 233–234
directory hierarchy, 226
echo, 227
email, 227
infrared remote control, 227
input, 226, 231–233
logging, 227

message relays, 234
output, 226, 229–231
sms, 227
twitter, 227
vox, 228
web gateway, 240
weblog, 228
winalert, 228
conf directory, 251
consumer electronics bus (CEBus), 28
contacts applet, 247
control
direct, 112
local, 112
relay, 113
remote-control methods, 112–115
server, 114–115
control codes, for IR transmission, 46
control hubs, 215–267
Cosmic, 237–239
integration of technology, 215–216
Minerva, 218–262
topology, 262–266
web applets, 239–256
controller modules, physical size of, 6
cookery applet, 247
copyright, 185

×