|
www.brianziman.com
Linux – Java – Web – Questions Answered, Problems Solved
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brian Ziman about contact terms of use privacy policy activity site map |
Welcome to www.BrianZiman.comWelcome to your source for high quality freelance coding, research, and training in Northern Virginia. If you need to build a simple Linux system for your home office, or set up a sophisticated file server for your company, with in-office training for you and your staff, I can help. Do you need a custom application written in Java or PHP? I can help. Want to learn how to write code for yourself? I can teach you. Do you have a business idea, but no idea how to implement it? That's what I do. Linux. Java. Web. Questions answered, problems solved. To get started, please use the contact page to send me a note, then watch, as your problem is solved. If you are interested in learning more about what I do, please take a look at my résumé, or browse my technical blog, below. Harmony One, Streamzap, EventGhost and XBMC, Oh My!(Monday, March 30, 2009)Last month, I announced that I'd finally got my media center PC up and running, and outlined quite an extensive to-do list to make the system truly usable. The first task was to get a remote control to operate the PC, and after reviewing the devices supported out-of-the-box by EventGhost, a utility that allows you to capture events on Windows (like a pressed key on a remote control) and respond appropriately (like emulating a keyboard button, which is the easiest way to control XBMC), I chose the Streamzap remote, as the lowest cost USB remote that appeared to have the necessary number of functions. One quick note — apparently, someone has been working on direct integration between EventGhost and XBMC, however there are way too many references to "the latest beta" for me to bother with it. I prefer to stick to stable releases. And while the forum claims Harmony support, you'll probably still have all the issues between the Harmony and the Streamzap that I walk through below. With a little tweaking, the Streamzap remote works very well with EventGhost and XBMC. I'm using the default Keymap.xml that is found in the System folder of the XBMC installation. After installing EventGhost, I exported an XML version of the configuration, which is much easier for me to work with than the GUI (though, the GUI is fairly good, as much as a GUI can be). I then heavily customized the configuration (download my evg3.xml to import into EventGhost):
At this point, it was time to replace the Streamzap and the plethora of other remotes with the Logitech Harmony One Advanced Universal Remote. Even if I wasn't obsessively trying to simply my entertainment experience, the Harmony One provides a significant step up from the Streamzap remote. While the Streamzap IR receiver provides enough distinct functions to operate XBMC, it is necessary to assign those functions to buttons that might have otherwise been designed for something else, or worse, simply given a color, which my feeble mind is incapable of remembering. So, the goal was to set up the Harmony One with logical mappings between the buttons on the remote and the functions that are actually run on the media center. Configuring the Harmony One should have been a relatively simple task. Unfortunately, it has been cursed with the world's most feeble software utility. You know you are in for pain and suffering when the first thing an application tells you to do is to change your screen resolution. The application then goes on to be totally unusable with only the keyboard. Never mind that it is totally incompatible with Linux (and I really do prefer not to install poorly written, untrustworthy software on the Vista media center system, as I considering the stability of Windows to be tenuous at best). Fortunately, there is a (slightly) simpler approach. After you've installed the software, you can go directly to http://members.harmonyremote.com/, where you can use your browser to perform all of your vital functions — when the time comes for it to interact with the remote, your browser downloads a firmware image that the software knows how to install. That part, at least, seems to work pretty well. So the first thing I had to do was set up a bunch of activities on the remote, so it could operate the television, the receiver, the TiVo, and the DVD player. That was fairly simple — the device catalog knew about each of these. One key point for me, is that the volume controls always go to the receiver, which allows me to overload the mute button on the Streamzap remote, for that one extra function! Unfortunately, Logitech's device catalog fails completely when it comes to the Streamzap remote. There's an entry for the device. But not a single button press is recognized by receiver. In the end, I had to have the Harmony One manually "learn" each and every button on the Streamzap remote. That didn't take terribly long, except for the wasting of several hours figuring out that it was necessary. You need to be really careful while you're doing it, too, because I apparently mispressed a button, and had to go through the process again to fix it. Once you have taught the remote how to send the right commands, you actually need to map the buttons to the commands. From the web interface, you need to customize your PC activity, and then click on the link to change the behaviour of the buttons. All of the buttons on your Harmony One should be listed, and you'll need to specify a device and command for each. All of the buttons are moved to the PC device, except the two volume buttons and the mute button, which go to the receiver. I also set up five "Additional Buttons", which show up on the device menu on the Harmony One's screen. A few are actually duplicates of hard buttons, but with my memory, sometimes it's hard to remember what button does what. Here's the complete mapping of buttons to commands to keystrokes (in the order that they appeared for me on the Logitech web site):
Here are the noteworthy items that merit further discussion. I've become very used to the "skip back a few seconds" feature of my TiVo, and it took me a while to figure out how to do it with XBMC. It turns out that during video play back, the left and right arrow buttons do a skip back and skip forward, with a default interval of 30 seconds. For skipping forward, that's just about right for a commercial, but for skipping back after you've missed a few seconds of dialog, or whatever, is way too much. It turns out that this can be configured via the AdvancedSettings.xml file, which you need to create in your UserData folder. It took me a while to figure out that this is NOT the UserData folder under the XBMC directory, but rather (at least on Vista) the UserData folder in your user directory. For other platforms, see the FAQ for that platform. I created a version of the file that contains two sections. One with the actual customizations, called "video", and a bogus section called "videoAllSettings" which contains the all of the possible video settings, along with their defaults, for my own future reference. The only really meaningful customization is changing timeseekbackward from -30 to -5. (Download my advancedsettings.xml and copy it to the appropriate UserData folder.) The other noteworthy item is that the Streamzap IR receiver doesn't have the ability to wake the PC from S3 sleep. It should have the ability to do so. The documentation from Streamzap says that the receiver "doesn't provide enough power" to do so, but that's nonsense. If you have your BIOS configured to allow a USB device to wake the computer from S3 sleep, then the IR receiver should stay fully powered, and the hardware should watch for a "power on" command. Unfortunately, I'm not sure if that's something they can fix with a driver update, or not. Depressingly, my proposed workaround is both expensive and complicated. Currently, I wake the PC from sleep by sending a magic wake-on-LAN packet from my laptop. This is only temporary. I am in the process of setting up a full Insteon-based home automation system. One of the niftier Insteon devices, is the IRLinc IR receiver. This will allow me to (at least in theory) configure the Harmony One to send commands to the home automation system. Since I'll be routing all of the home automation commands through a central server using the Insteon PowerLinc Serial Modem, I can just have the server watch for the "turn media center on" command, and issue the magic wake-on-LAN packet. This would be a total deal-breaker for the Streamzap, if I weren't already planning on adding these other components. If that's way too much for you to deal with, your other choices are leaving the PC on all the time, or using a more sophisticated IR controller, such as the Microsoft Windows MCE Remote (which I actually wanted, but couldn't verify actual continued support for from Microsoft). So that's what I have for you for now. Stay tuned as more details emerge. Programming Flash with haXe for the Chumby (Saturday, March 14, 2009)For Christmas, I received a Chumby interactive media player. It is basically a cuddly Linux computer, the size of an alarm clock, that serves widgets to its touch screen. With my interest in home automation, I think the Chumby device would make a terrific platform for controlling a home automation system. Widgets for the Chumby are written using Flash, and unlike most of the use of Flash on the Web, it makes a great deal of sense for a device like the Chumby. So, after a bit of research, and deciding firmly that I did not want to use any proprietary software products from Adobe or painful graphical IDEs, I found haXe, a novel programming language that can be compiled for a number of platforms — including Flash. I've spent the last couple of days learning haXe, and all the painful Flash APIs, and for my first program, I have developed a widget that I can use with the Chumby to control my house. I call it ScraXml. Click on the little question mark in the widget to read all about it. The Media Center Lives (Sunday, February 22, 2009)Just over two years ago, I built a PC for the purpose of using it as a media center. Then I let it sit for a year and a half. About six months ago, I found a useful way to control it with Synergy. And then let it sit some more. But now, after two years, with the processor now totally obsolete, it is set up to be a usable media center. The core ingredient of the media center is XBMC, the open source software project on which Boxee is based. Boxee does some fairly cool stuff, but the "extras" it provides, like social networking, are things that not only do I not need, but that I don't want. The last thing I need is for my media center to be able to send information about me out on to the Net without asking me first. Boxee also has some closed-source bits. And for some people those bits, and those relationships are important. For me, not so much. If there is streaming media available in a usable and open way, then XBMC can handle it. If it is only available through some sort of business arrangement, then sure, it would be cool... but I can live without it. This isn't going to replace my DirecTV with TiVo, and it isn't going to replace Netflix. It is just one more piece that will let me use my own media collection in a slightly easier way. So aside from installing XBMC, I had to do a few other things to finally make it work. When I first got the system, the salesman swore up and down that the integrated NVidia graphics on the motherboard could do Vista's fancy Aero interface. But it couldn't. Turns out that was because NVidia hadn't bothered to get the drivers working yet. Well, the new drivers have long since been available, and after a quick update, I now have a "fancy" interface. I also found that Vista really wanted me to install SP1 before I could go on. That went off without a hitch, much to my surprise — with SP2 on the horizon, I hope I have similar good luck. Microsoft also offered me updated sound drivers, but after that update, there was no sound at all, so I got to test out Vista's ability to roll back a driver. That worked too. That impressed me. One of the issues that has kept this machine a paperweight for the past two years is that the CPU fan sounds like a jet engine warming up. As slow as the CPU is, by modern standards (and too slow to decode 1080p video, according to XBMC's documentation), I may upgrade it, and get a new quieter fan when I do. But in the meantime, I usually want the system off. And that means getting up and walking across the room to turn it on. If I wanted to walk across the room, I could grab a DVD or a CD and load it into a machine while I'm up. I'm way too lazy for that. But I found a solution for this issue as well. My system supports wake-on-LAN, and combined with Vista's hybrid sleep feature, I can now turn the system on and off remotely. When I press the "shutdown" button in the XBMC interface, it instructs Vista to sleep, which causes it, by all appearances, to just right down. In reality, it goes into a low power state, while at the same time, dumping memory to disk, so that if there's a power failure, it will behave as though it had hibernated, but under normal circumstances keeps power to the memory, so the system can come up immediately when summoned via the LAN. Very nifty. And when it's sleeping, all the fans are off, so it is basically indistinguishable from being powered off completely. Except for one little thing — the annoyingly bright blue power indicating LED blinks when the system is sleeping. Or it did. I opened the case and disconnected the power for the LED, so now I don't have to look at it, no matter what state the system is in. I can tell when it's on, because I have the pretty media center up on the screen, and I can tell when it's off by the blissful sound of silence. And with the hybrid sleep feature, I don't really have to worry about it — if it doesn't magically come on when I ask it to, then shame, I have to walk over and press the button, because the power failed. Except it won't, because the system is on a UPS. There are two more bits to this puzzle that I need to take care of. The first is that my media library is an embarrassing mess. I have gigabytes of media in random folders with equally random names. I need to take the time to go through and organize my movies and music into appropriate folders, give the files appropriate names, and maybe even add meta data to them... I wonder if XBMC will go ahead and do that for me? I bet it will. The second thing I need to do is get a remote control for the system. While it works great using the laptop as a remote control, the laptop isn't quick and practical for daily use — and who wants to sit around with a laptop on your lap when you're entertaining guests. Eventually, I'm going to get myself a Logitech Harmony One to control all of my plethora of systems, and I will likely be using EventGhost to allow the remote to control XBMC. So, it is important to get a USB remote control that will be compatible with both — IR compatible with the Harmony One, and software compatible with EventGhost. There are a number of USB remote control devices available, and while it seems the Harmony One can probably handle any of them, the software compatibility isn't quite so broad. You may be surprised to discover that the one I'd most like to have is the Microsoft MCE Remote Control for Vista. Unfortunately, it is obscenely expensive, and very difficult to find. There are a lot of products that call themselves that, but aren't actually the Microsoft product, but rather a product simply claiming to be compatible with Vista and abusing Microsoft's trademark in their name. And since I need to be able to interface with both the software and the remote control, I need to be absolutely sure of what I'm getting. And Microsoft doesn't even list the product on their web site anymore. So while I'd prefer the Microsoft remote, its limited support and availability has forced me to consider other options. It seems like the smartest and most flexible choice would be the USB-UIRT, which is a made-to-order USB universal infrared receiver (and transmitter), which allows your computer to receive any IR signal, and then you can use a program like EventGhost to map those signals to whatever key strokes or macro functions you want. The device is $50, and when you order it, Jon Rhees builds one and mails it to you. There's a lot of people out there using one, but I don't know, it still seems a bit shady to me. That's why I'm leaning toward the Streamzap PC Remote, which has broad support for Windows and Linux. It's $30 and comes with a receiver and remote control, which will be useful until I get the Harmony One, and for training the Harmony One if I have any difficulty with configuration. The Streamzap is more limited than the UIRT, because it only has 35 buttons (XBMC has 38 keyboard bindings!), but I think that will be okay. EventGhost supports this remote, and doesn't require some of the hacking and guesswork of the UIRT. In the meantime, I'm in business with Synergy, and I can focus on getting my media library back in working order. Oh, and I probably should spend some time learning how to use XBMC — it has a lot of cool features and add ons, and for the most part, I'm clueless about all of them! Job Opportunity: Java Support Analyst, Roanoke, VA (Wednesday, January 28, 2009)Client is seeking a Java Support Analyst to act as the first line of support for customer service team, and act as a liaison between customer support and the experienced two person Java development team. Desired skill set: Java, Databases. Strong communication skills. Entry level okay. Contact: Jessica Owens, TekSystems, 336-851-6895. Electronics Recycling (Monday, January 5, 2009)If you're anything like me, then you've spent most of the last decade (or more!) accumulating the latest in today's gadgets, all of which were obsolete by the time you got them out of the box. And you can't just throw the old stuff in the trash (even if you had that sort of self control), because you know it's just going to end up in land fill, or worse, in China. So, it turns out that Fairfax County is offering free recycling on Electric Sundays at the I-66 Transfer Station on West Ox Rd in Fairfax on January 11, February 8, and March 8. I have boxes of old modems and ancient Soundblasters and other museum-worthy pieces of electronics that need to go, to make way to newer museum-worthy pieces, and I may some day decide I will never again use. The event is being run by Covanta Energy, Inc, which seems to have a fairly good reputation for converting waste to energy, and in a quick search, I wasn't able to find anything scandalous about them shipping their waste off to Asia to be stripped to its elemental components by starving children. If you have heard of anything like that, please leave a comment with sources... we don't want to spread evil, after all! Job Opportunity: Senior Java Developer, Radford, VA (Monday, December 8, 2008)Client is seeking a Senior Java Developer with project management experience. For this position, candidates must be able to obtain a Department of Defense (DoD) Secret Clearance, and have strong soft skills to interface with the customers. This position is a contract to hire opportunity. Desired skill set: Java, J2EE, Hibernate, Struts. Contact: Jessica Owens, TekSystems, 336-851-6895. From Broken HTML to XML Data (Wednesday, December 3, 2008)Being a tech junkie, I have a small addiction to data feeds. One particular set of data that interests me is weather data. The main National Weather Service station near me is at Dulles Airport, which is close enough for forecasts, but not close enough for actual data, like temperature, humidity, and wind. Don't ask why I need that data. It's the addiction. Anyway, I was real close to buying a weather station and hooking it up to my computer, after all, many years ago in school, I managed a weather station for the geoscience lab. And then it occurred to me... the neighborhood schools all have weather stations, just like the one I installed, with their data feeds available online. At least I hoped they were. It turns out that the data is available. Unfortunately, it's an HTML page, not an XML data feed. And it's not even standard HTML, but horrible broken, non-compliant HTML, that uses tables, line breaks, and bold elements for data layout. Nevertheless, using the DOM API in PHP, I was able to parse out the page, and convert it, on demand, to an XML data feed. The program actually collects all the data from the HTML into a programmatically accessible data structure — the XML page is just a handy way of displaying it. Job Opportunity: Java/webMethods Developer, Dallas, TX (Friday, November 21, 2008)The Senior webMethods Developer will apply software engineering experience and knowledge of webMethods 6.x – 7.x platform products to design, implement, test, maintain and support Enterprise Application Integration (EAI), Enterprise Service Bus (ESB), and Business-to-Business (B2B) (supply chain) integration initiatives. Desired skill set: Java (6 years or so), EAI (3 years), SOAP (3 years), HTTP(S) & FTP, ESB, BPMS, BAM, AS2 (any exp), SFTP (anything counts), and any Lawson or Siebel products. Contact: Bridget Scott, ScottSearch, LLC, 214-800-2836. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
All material copyright © 1995-2009 by
Brian Ziman, unless otherwise noted.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||