Apress - Smart Home Automation with Linux (2010)- P30 doc

5 135 0
Apress - Smart Home Automation with Linux (2010)- P30 doc

Đang tải... (xem toàn văn)

Thông tin tài liệu

CHAPTER 4 ■ HOME IS HOME 123 • Audio power amplifier • TV aerial booster This connects to the rest of the house via Cat5 and AV cables where the data is picked up by the following: • Media-playing head boxes • Additional speakers • Secondary audio amplifiers • Personal laptops and desktop PCs • Secondary TVs, using aerial input Servers To be a truly effective smart automated home, you will need a server that’s on 24/7. Although many of the devices you’ve seen (such as the CM11U in Chapter 1) can be programmed to work offline, you only get a sense of power when there is something ready, willing, and able to make decisions at any time of the day or night. And a timed light switch doesn’t count. There are so many cool and interesting technologies in a home environment that it’s very easy for the ideas to run away from themselves and for you start to place orders for the biggest and most powerful servers that you can’t afford! In reality, there is no need to have only one server, provided there is only one in overall charge. Purposes of Servers The workload of a server breaks down into three areas: • CPU processing power • Disk space • Bandwidth capabilities I’ll cover these in order. CPU Power With a few exceptions, home automation software takes very little power. All the standard tasks, such as web servers, e-mail, alarm clocks, SMS processing, message routine, and music playback require virtually no processing, and the lowliest Mini-ITX is capable of handling everything without breaking a silicon sweat. Transcoding media from one format (such as the high-definition DVD rip stored on your server) into another (a smaller version suitable for low-end hardware such as the MVP or for playback on your portable device) is significantly more processor-heavy. Consequently, it is not uncommon to have two main servers, each one dedicated to these two main tasks. CHAPTER 4 ■ HOME IS HOME 124 Disk Space Again, most of the HA tasks don’t require lots of hard disk space, so if your operating system fits (and they’re approaching 1GB in size these days), then the extra 25MB required for the control software is not going to break the bank. Only the media server requires extra space, and for this you’ll need as much space as you can afford. External USB drivers are an excellent way of cheaply (and conveniently) increasing disk space, and they’re fast enough to stream movies to the server and then across the network. You might consider a separate file server whose sole job is to provide files for the rest of the house. In this way, it can be stored in a physically secure location (hidden out of sight, perhaps in the loft or attic) to prevent precious data from being accidentally destroyed or stolen. Securing the server in a solid rack also helps prevent against theft, because no one can easily walk off with a Backblaze Pod (http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/)! Server Extensibility In the corporate world, improving the facilities of a server generally means more memory or more disk space. To us, it also includes new hardware. Although not all HA applications or servers require new hardware, it is best to consider what else the server might handle. TV cards are obvious, because a high-powered server could record from several TV stations at once or transcode a channel into a head unit–friendly format for streaming. Projects such as PromiseTV (www.promise.tv) take this to an extreme, but it’s a viable option. Similarly, additional sound cards can provide extra scope to functionality. Although the setup in Linux can be slightly painful, having two sound cards allows you to directly control the audio in other rooms. This can remove the necessity of having local control panels, since you can use any device that connects to the computer, such as a web browser, phone, or HR10U connected through Cosmic. Furthermore, remember that each sound card has inputs as well as outputs. This allows you to build a large-scale baby monitor for each room in the house. If you have a voice recognition system (covered in Chapter 5), then you have instant control in each room. There have been projects in the past to coax 6.1- supported sound cards to into three separate stereo ones, but they have not been maintained as well recently. Bandwidth Capabilities This is generally a nonquestion, since the current crop of network cards are all at least 100Mb, which is fast enough to distribute several movie streams around the house. The modem speed will usually limit your external streaming capabilities, but so will many other factors such as broadband contention in your area, current network traffic, and the target machine and its LAN. Unlike corporate servers, most home servers can suffice with only one network port since a decent stand-alone router can perform most of the necessary filtering and configuration tasks that often need two Ethernet sockets. However, any future upgrades to your machine (such as moving the firewall software to the server) or changes in family (introducing a separate restricted intranet for the kids) will need a second port. Also note that there is no longer any cost benefit of buying hubs over network switches, so a switch should be the only choice because it allows the full 100Mb to every port, and therefore every machine, on the network. You should route all network cables back to a single switch located physically next to your Node0 server to minimize maintenance. In a standard three- or four-bedroom house, this switch should have at least 16 ports. CHAPTER 4 ■ HOME IS HOME 125 Types of Server Naturally enough, given the title of this book, the server will be running Linux. It is not by luck that Linux is able to run on virtually any device, so it’s no longer a question of hardware compatibility, but one of compromise between physical size, power consumption, and CPU power. There is nothing ultimately special about the hardware. Off-the-shelf machines are fine. You will be familiar with most (if not all) of the devices listed here. We need to consider their specific relative merits in the HA sphere. In most cases, the server will always have a mouse, keyboard, and monitor attached (unlike those in the business centers) to allow for simpler software maintenance—and if the server is located somewhere accessible, the monitor can display a web page presenting the current “house report status” for virtually zero processing cycles. When these peripherals are not to be connected permanently, you may need to adjust the BIOS to allow the machine to boot without them. This is especially true of desktop machines that will beep three times when no monitor is present and often issue the infamous “No keyboard connected – Press F1 to continue” error. Rack Mount These can be bought in many variants including those with redundant or dual power supplies and quad processors being the standard rather than the exception. Consequently, these power houses of processing can handle the transcoding needs of several users simultaneously, with enough cycles to spare to handle all the other services (web, e-mail, and so on) without affecting any other user. They are the industry standard for commercial applications for a reason since they can handle any load, for any length of time, and can run happily for many years without change. Unfortunately, they are suitable for home use only if you can place them away from the living areas since they usually have large noisy fans inside and give off a lot of heat. Although the noise can be muted by placing the machine in a cupboard, you can’t generally achieve the same result by replacing components with low-noise equivalents, since they’re generally not of the standard PC design. The heat is also something you will need to effectively dispose of. Air conditioning is standard in offices but not at home where the same effect is generally achieved by opening a window. Running a rack server at home will often need some kind of extractor fan at the very least. The non-PC-ness will also hit home when considering its upgrade status. You will not be able to fit a PCI TV card into many rack machines because the connection form factor and size will be prohibitive. You will also need to buy a physical rack, or half-rack, in which to mount the unit. These are designed and priced at commercial installations, and although you will always need some kind of mounting for all the equipment mentioned earlier, there are cheaper ways of doing it with DIY shelving. Desktop PC This is the most popular choice, for all the obvious reasons: they are understandable, common, cheap, and built for home use. They can also be upgraded easily with additional cards, and replacements for worn-out (or too noisy) parts are available in your local bricks-and-mortar store. The current range of machines is fast enough to perform transcoding for a couple of media head units around the house, as well as handle all the other standard tasks. Unfortunately, the home machine is intended to be used as a home machine, that is, for a few hours in the evening to check e-mail and play games. Using it as a server, running 24/7, can strain the physical components of the machine (fans and discs mostly) and increase the risk of breaking the machine’s integrity. Unlike racks, these machines are built to a price point, not a quality factor, and so will use components that allow the price to hit that magic 299 figure, or whatever. Consequently, these CHAPTER 4 ■ HOME IS HOME 126 components might have a lower tolerance for temperature variances (which will happen if the machine is working all day) or have a lower mean time between failures (MTBF). When the machine is continually accessing data, either from memory or from a hard disk, the chance of this happening will naturally increase. My personal setup uses a desktop PC as the media transcoding server, which runs most of the time. I bought higher in the price range than I would for a traditional desktop machine, with quieter-than- standard fans and better components. I also bought spares for the fans at the same time so that if I needed to replace the moving parts of the machine, I would have some available. RAM chips (which are, admittedly, also likely to go bad over time) are usually available for many years after a machine’s release, whereas the particular size of CPU fan isn’t. This is because any server that lasts several years will outlive the current design of processors and motherboards, making spares for these components very difficult to come by. I also admit that when (not if) these components finally die, I will probably be unable to buy replacements and so will have to endure the pain of setting up an entirely new machine. Mini-ITX The Mini-ITX is a family of machines based around the 170 ×170mm ITX motherboard. Within this specification, there are a number of different options with varying processors, graphics chips, and cooling methodologies. This includes many machines that are fanless, relying only on the heat sink for cooling. This makes them more energy efficient than their desktop counterparts and suitable for placing in more communal areas, such as the living room where they are often used as media players. Like desktop machines, there are a wide range of configurable options with ITX machines including TV (S-Video) and DVI output, compact flash (CF) adapters for diskless operation, wireless networking, and so on. They also have standard PCI ports for other cards. This configurability is both their manacle and demonic charm, because the workability of any particular device isn’t necessarily known when you buy the machine. Although any ITX is powerful enough to run all the basic services of an HA setup, most machines cannot transcode media fast enough, and the older ones cannot play back modern formats (such as DivX, which has a fairly high CPU requirement). Furthermore, there are some issues with outputs, other than SVGA, being supported by the Linux drivers, making it an issue for using them as a head box for anything other than projectors. New combinations of ITX are released on a regularly basis, along with updated drivers, so always check with your dealer for support, along with the current web forums. The other configuration consideration with the ITX machine is the case, since it’s not supplied with the machine and you have to buy it separately. Furthermore, since space is such a premium here, you should buy any and all peripherals you intend to keep inside the case at this time. You should not expect to be able to update, or add to, the components and still have it fit within the same case. Even a 3mm gap between components can be the difference between a nice working system and one that overheats. So, consider whether you want a hard drive or CF card and whether a (slimline) DVD player would be necessary at the start. ■ Note Always buy the case from the same dealer as the machine so you can ensure they will fit together. These cases are considerably more expensive that desktop cases and therefore a costly mistake. CHAPTER 4 ■ HOME IS HOME 127 Naturally, with so many cases to choose from, you have every chance of getting just the size you want. They come in four basic variants, with most HA servers being a cube or rack, while the ITX motherboards used in media units often choose book. • Book, around 70 ×270 ×320mm, with up to two drive bays; not all support PCI cards • Cube, around 180 ×220 ×280mm, with up to four drive bays and usually a PCI card • Rack, a 1U (482.6 ×44.45 ×381), with up to four drive bays and up to two PCI cards • Vehicle, variable around 210 ×254 ×56mm, with one or two drive bays and occasionally one PCI card A vehicle mount case is used for mounting in harsh environments, such as a car or garage, where it can be used as a kids entertainment center or web terminal. All four come in a variety of sizes, with the drive bays being either 2.5 inch or 3.5 inch. It should be note that not all ITX cases are compatible with all types of motherboards. In the ITX world, one size certainly does not fit all. So, check and recheck your specification. ITX has begat two younger brothers, the Pico-ITX with a 100 ×72mm motherboard and the Nano- ITX at 120 ×120mm. Although the size reduction isn’t worth the price increase if you still have to buy a larger case to fit a DVD drive, this size of machine can be hid virtually anywhere, making it good for media head units or for running control panels in the kitchen. Mini-PC The Mini-PC is a high-power, prebuilt PC in a box that has a very small form factor (often around 80 ×50 ×30mm) and usually a similarly low-power footprint. This causes them to be sometimes termed GreenPCs, but whereas Mini-PC often has a low-power footprint, a GreenPC must have one, as should its manufacturing process. Typical machines of this type include the Zonbu and Fit-PC2. Functionally, they are a cross between laptops (because they’re prebuilt and therefore can’t be upgraded, and the OS really needs to be preinstalled to ensure a complete set of drivers), desktop machines (with a high machine spec and single network port), and Mini-ITX machines (which look nice when placed under TVs, for use as head units). Consequently, many people will use them as more client- focused machines for web browsing and media playback. But, as I’ve mentioned previously, the CPU required for most of your HA tasks is so minimal that these are perfectly suited to it. They also make good secondary servers in cases where the building itself doesn’t allow for a single machine in Node0 to reach the entire house, as can be the case with X10 messages and wireless communication. Furthermore, since the power usage of these devices is often 10 watts or less, they are efficient and add very little overhead to an existing setup. The specifications of these machines differ wildly, because many include custom hardware to improve on the apparent capabilities. The Fit-PC2, for example, includes only a low-powered Atom processing but is able to play back HD 1080p H.264 video by incorporating hardware acceleration. 3 3 The drivers for this are closed source but available for Linux. . theft, because no one can easily walk off with a Backblaze Pod (http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/)! Server Extensibility In the corporate. I’ll cover these in order. CPU Power With a few exceptions, home automation software takes very little power. All the standard tasks, such as web servers, e-mail, alarm clocks, SMS processing,. server to minimize maintenance. In a standard three- or four-bedroom house, this switch should have at least 16 ports. CHAPTER 4 ■ HOME IS HOME 125 Types of Server Naturally enough, given

Ngày đăng: 03/07/2014, 20:20

Mục lục

  • Contents at a Glance

  • About the Technical Reviewers

  • Appliance Control

    • Making Things Do Stuff

    • Using Multiple House Codes

    • Controlling Lights

      • Lamp Module (LM12U)

      • Bayonet Lamp Module (LM15EB)

      • Wall Switch (LW10U)

      • MicroModule with Dimmer (LWM1)

      • DIN Rail Dimmer (LD11)

      • Controlling Appliances

        • Appliance Module (AM12U)

        • Combination Devices

          • Electronic Curtain Rails: Retrofit

          • Electronic Curtain Rails: Prebuilt

          • Tabletop Transmitter Modules

            • Mini Controller (MC460)

            • Sundowner Dusk/Dawn Controller (SD7233/SD533)

            • Mini Timer (MT10U)

            • Handheld Transmitter Modules

              • Handheld RF Remote (HR10U)

              • Keyfob Remote (KR22E)

              • EasyTouch35 Universal Remote Control

              • Gateways and Other Exotic Devices

              • Differences Between X10 and C-Bus

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan