tailieunhanh - Smart Home Automation with Linux- P27
Smart Home Automation with Linux- P27:I will end on a note of carefree abandon—learn to steal! Once you’ve learned the pieces of the puzzle and how to combine them, there is very little new to invent. Every new idea you discover is a mere permutation of the old ideas. And ideas are free! Every cool feature discussed on TV shows or presented in the brochures or web sites of commercial HA companies can be taken, adapted, and implemented with the information presented here using very little effort | CHAPTER 7 CONTROL HUBS public static function getPages return array Multimedia News Information Life Status Administration public static function generate appman if self automaticInclude return appman- getMasterBar getPages else return The details of this should be obvious Since you can now build your own custom pages using the existing applets let s look at what applets are available. Existing Applets The supplied applets are split into several broad categories media lifestyle information and administration. Most applets use the Bearskin abstractions since one of the many benefits of using a loosely coupled component-based development model is that many small tools can be combined into larger ones. These web applets are one such case. Each applet presented here relies on underlying code and data from simpler front ends. With this in mind the configuration of each applet will be given in its entirety from basic data to web-oriented page so as to give an immediate understanding of the entire data flow without scattering the information between its subcategories of Bearskin command abstraction configuration and so on. Media These applets allow you to control the playback of media in its various forms and include a CD player a volume mixer an MP3 jukebox a VLC server and client and a front end for displaying the TV guide. The CD player is a very simple abstraction of the Bearskin cdplayer command that allows control of the disc as shown in Figure 7-3 along with the album and track names present. The bridge between the PHP applet code and the Bearskin system command is handled by zinc system with zinc conf being used to indicate the location of the executable and device to use. 243 CHAPTER 7 CONTROL HUBS Figure 7-3. The server s CD player being controlled through the Web The audio mixer follows the same idea as the CD player and simply calls out to the underlying Bearskin command
đang nạp các trang xem trước