Sunday, February 11, 2007
Hot swappable IDE drives
I have lots of storage needs but I hate having external hard drive cases. So I've taken a couple things to make my own hot swappable IDE solution. I bought a few of these removeable IDE drive trays and installed the tray enclosures in all my desktops. I powered the enclosure like an internal drive, connecting it to a spare power adapter inside the case. IDE drives are not hot swappable in Win2k and later versions, so I used a USB-IDE adapter like this. I routed the other end of the USB cable outside my case and connected it to a USB extension cable so I can easily connect it to the front USB connectors on the desktop PCs. All my spare drives are mounted in the removeable trays, so whenever I need an external drive, I just slide the tray in the rack, connect the usb cable and turn the key on the rack to power up the drive. Then when I want to take the drive out, I just treat it like an external USB drive. I think that's a lot easier than having to find the right power supply for the 5 different external USB cases I probably would have then having to find an open power outlet. I even have a spare enclosure that I can use with my laptop like an external case.
Tuesday, February 6, 2007
Daylight Savings Time and servers and ...
I just ran a program to patch my HA server for the upcoming change in the start and end of DST. Since it still runs Win2k, there's no more support, but there is an application from Microsoft that will let you adjust the start and end of DST. Microsoft's DST info is here. Now, the problem for me is going to be my JDS TimeCommander+, which is EOL'd. I guess I will have to manually update the time or figure a way to script it in starCOM. I had mixed results with setting time via starCOM (trying to sync the clock to account for the TC's drift).
Monday, February 5, 2007
HA Server Rebuild
The main drive in my HA server died, so since I had to re-install the OS, I decided to swap machines as well. The old machine was a Celeron 2.6 gHz and the new one is an Athlon 2800+ XP that I had lying around. I originally chose to build the HA server with the Celeron due to its lower power consumption, but as I added more & more features, it began to bog down. The Athlon provides a little boost in processing power (about 20% or so) but consumes a proportional amount more electricity. I think things are just about all running, but I still have to go through some stupid software activation hoops (HAL).
Friday, January 19, 2007
ImageMagick, command line thumbnails and more
Part of the security camera feature of our system is to take a snapshot of motion in a zone. The snapshot is then shown on our camera control page, showing the last 10 events captured. To ease the loading of these images across the Internet, I needed to automatically generate thumbnails of the pictures. I found an image manipulation package called ImageMagick that has just what I need.
I call one of their apps, convert, from a perl script (in this case, resizing the image to 25% of its original size):
I call one of their apps, convert, from a perl script (in this case, resizing the image to 25% of its original size):
convert -sample 25%x25% image_in.jpg image_out.jpg
Thursday, January 18, 2007
Checking Gmail with xAP Mail Monitor
xAP Mail Monitor can't authenticate over SSL, so by itself it can't check Gmail. Like the previous post, Stunnel can fix that. I changed my stunnel.conf file as follows:
I had to leave the POP3 port as 110 since you can't specify the port in Mail Monitor. Re-start Stunnel and start Mail Monitor. Add the account by clicking File > Properties and selecting "Mailbox and Logins" under "Mail Monitor Configuration." Add an address, setting email address to your_gmail_address@gmail.com, mail server as localhost, login username your_gmail_address and set your Gmail password. That's it.
This will also work with most other mail apps that need SSL support. Just fill out the POP settings as above.
[pop3s]
accept = 127.0.0.1:110
connect = pop.gmail.com:995
I had to leave the POP3 port as 110 since you can't specify the port in Mail Monitor. Re-start Stunnel and start Mail Monitor. Add the account by clicking File > Properties and selecting "Mailbox and Logins" under "Mail Monitor Configuration." Add an address, setting email address to your_gmail_address@gmail.com, mail server as localhost, login username your_gmail_address and set your Gmail password. That's it.
This will also work with most other mail apps that need SSL support. Just fill out the POP settings as above.
Wednesday, January 17, 2007
Command line emailing via Gmail's POP3 interface
Gmail has a POP3 interface which lets you use your own email client. This opens up a lot of possibilities. One thing I use a lot is the command line email tool Blat, but it can't deal with Gmail's SSL requirement. That's where Stunnel comes in. It will wrap the TCP connections from Blat inside SSL.
After installing Stunnel, edit the config file stunnel.conf. I made the following changes:
Save the changes and start Stunnel. This makes it look like you have an SMTP server running on your local machine at port 465. Next, just point blat to this local smtp server.
That's it. You can now send email from scripts and batch files using Gmail's SMTP server.
You can also point other mail apps to this port if they don't support SSL for sending mail.
After installing Stunnel, edit the config file stunnel.conf. I made the following changes:
; Use it for client mode
client = yes
[ssmtp]
accept = 127.0.0.1:465
connect = smtp.gmail.com:465
Save the changes and start Stunnel. This makes it look like you have an SMTP server running on your local machine at port 465. Next, just point blat to this local smtp server.
blat -install 127.0.0.1 your_user_name@gmail.com 1 465 - your_user_name your_password
That's it. You can now send email from scripts and batch files using Gmail's SMTP server.
You can also point other mail apps to this port if they don't support SSL for sending mail.
Wednesday, January 10, 2007
Slim Devices rocks!
I found a deal on an original Slim Devices Squeezebox ($10!!!), but it had a broken screen and IR receiver. I contacted Slim Devices' tech support to see if they offered replacements. I had fully expected them to charge for the parts. Instead, they offered the IR daughterboard and screen assembly for free! Since their office is nearby, I was able to drive over during lunch and pick up the parts. I have to say, that is amazing customer support!
Now, I've got 2 fully functional Squeezebox 1s to go along with 2 of the original SliMP3s.
Now, I've got 2 fully functional Squeezebox 1s to go along with 2 of the original SliMP3s.
Tuesday, January 9, 2007
Script to create playlists of VOB files
We have a D-Link DSM-320 media player and we use TVersity as its media server. We use it mainly to watch movies across our network. One thing we can do is watch the original VOB files ripped from a DVD, but the problem is there are multiple VOB files for a movie and after each one ends, the next one has to be manually started. (You can merge to VOBs into one, but the DSM-320 has a 4GB file limit.) One solution is to create a playlist for each movie, containing all movie's VOB files.
I wrote this Perl script to do just that. (It is similar to the script I wrote to auto-generate music playlists.) It traverses a directory and creates playlists for all subdirectories containing VOB files.
Just set $path (source) and $dest (playlist directory) in the script and then run it. It assumes the folder containing the VOBs will be named after the movie and it uses that folder name as the playlist name.
I wrote this Perl script to do just that. (It is similar to the script I wrote to auto-generate music playlists.) It traverses a directory and creates playlists for all subdirectories containing VOB files.
Just set $path (source) and $dest (playlist directory) in the script and then run it. It assumes the folder containing the VOBs will be named after the movie and it uses that folder name as the playlist name.
Wednesday, January 3, 2007
Using RRDtool to graph CPU temps
I mentioned that I use RRDtool to chart temperatures of my server components. RRDtool works on Windows and Linux.
I'm using Speedfan to monitor temps, and I wrote a perl script to parse the Speedfan logfile, extract the data I want and run RRDtool to update the database and create these graphs:
48 hours

Weekly

Monthly

Yearly

Click here for my sample perl script.
I'm using Speedfan to monitor temps, and I wrote a perl script to parse the Speedfan logfile, extract the data I want and run RRDtool to update the database and create these graphs:
48 hours
Weekly
Monthly
Yearly
Click here for my sample perl script.
Saturday, December 30, 2006
Voice controlled music players revisited
Previously, I mentioned using voice recognition to control our mp3 players. I've been slowly adding playlists to the TellMe app and that seems like the way I'm going to go. It's scaling OK so far and I'm limiting options to our most played music anyway. One annoying thing about the app is for some unknown reason, it destroys the config file. It seems to happen if the machine crashes unexpectedly or the app crashes. I've been making backups of the config file so this hasn't been a major problem yet.
Bye bye caller ID
We've decided to get rid of caller ID on our landline. We rarely get calls we want to answer at home anyway. The main reason is the cost of the service is going up from about $6/month to over $8/month! With Comcast going all out with their telephone service in our area, one would expect SBC/AT&T to be more competitive. Not only that, but one would have hoped prices would come down when SBC merged with AT&T (and subsequently BellSouth). Theoretically, there should be some economies of scale that would lead to lower prices. Instead they're raising prices for their services. Looks more like an oligopoly to me - fewer competitors and more pricing power for them. No wonder the landline business is dying.
I've since disabled all the caller ID logic in our HA system and all calls just go to voicemail. If people need to reach us, they can call our cellphones. Besides, our Treo 700WX's have built-in voice command and they announce incoming caller names and numbers using the old Microsoft Mary TTS voice. So, we're not missing our landline caller ID announce much. It may be a matter of time before we shut off the landline completely...
I've since disabled all the caller ID logic in our HA system and all calls just go to voicemail. If people need to reach us, they can call our cellphones. Besides, our Treo 700WX's have built-in voice command and they announce incoming caller names and numbers using the old Microsoft Mary TTS voice. So, we're not missing our landline caller ID announce much. It may be a matter of time before we shut off the landline completely...
Friday, December 29, 2006
Improvements to HVAC control
Our HVAC system has a couple dumb Aprilaire thermostats, one for the upstairs zone and for downstairs. They have a contact closure input to activate setback mode. The system relies on LM34 sensors in different parts of the house to control when to cycle HVAC. Those setpoints were hardcoded in the TimeCommander+ schedule. I've now made those setpoints variables in the TC+ allowing them to be changed dynamically from an ASP page, script, etc. It makes the system a little bit smarter.
Subscribe to:
Posts (Atom)