Saturday, January 2, 2010

IRWatch version 2 released

Today, after a MUCH longer delay than anticipated, I've finally made available the newest version of my IRWatch utility. It's been rewritten from scratch for a much cleaner and more modular design. No longer are you required to go into the main perl script and enter all of the logic into the while loop (making sure not to mess any of it up). Now there are much simpler config files for you to edit (ok...technically you are still modifying perl code, but it's MUCH MUCH prettier than before). The special event handling logic has also been exported to a plugin format, which makes it much easier for you to design your own custom event handlers and then share that with other users

Configuration
First, you need to download the latest version of IRWatch and also the RFLibs libraries.

Next, you need to set them up in the right locations. I put both the irwatch and the RFLibs folders into /usr/local/scripts. If you want to place them somewhere else, you will need to modify the first line of irwatch.pl so that the perl include (-I) specifies the appropriate location.

Now you need to do some relatively simple configuration. You can probably just wing it by modifying the 000_general file in the config directory, but if you need more help, there is more extensive documentation in the README file. The important parts here are to make sure the values in the settings hash are correct, then define aliases for your remote(s) in the remotes hash, then go through the events hash and define just how you want the remote to behave.

You will notice the 500_aquos.disabled file in the config folder. The .disabled extension tells irwatch not to process that config file. For most users, that is what you want (otherwise, the config file will tell irwatch to load the aquos plugin, which will fail becuase it can't connect to the aquosserver, so irwatch will abort). However, if you are running a compatible Sharp Aquos TV with a serial port, and if you have successfully setup my aquosserver script to control the TV, then you will want to enable this functionality. Just rename the file to 500_aquos (ie: remove the .disabled extension) and edit the file to your liking.

Once again, check the README file for more details

Writing Plugins

Writing plugins is actually relatively easy. Most of the info you need is (once again) in the README file. Simply put, you need to create your plugin in the plugins folder, add a corresponding config file in the config folder, and make sure the config file indicates to load the newly created plugins. When writing a plugin, you want other users to be able to use it without modifying the plugin code at all. So, to that end, make you put configurable option like paths, ip addresses, ports, etc into the config file in the settings hash.

If you write any interesting plugins that you think others might find handy, please send me a copy via email. If it looks interesting, I'll include it on my website.

...click here to read more!