Feb
11
2009
0

Server Tips: Personal FM Radio Station

I have a fairly large MP3 collection and I wanted a way to listen to it anywhere in my house. I thought about installing some sort of house stereo system with speakers in every room but that is a little difficult when the house has already been built.

In my Internet travels I ran across this neat little device called the WholeHouseFMTransmitter.  It is basically what it’s name says it is, an FM transmitter for the entire house.  With this device I connect it to my server’s audio output port and then just shuffle through my MP3 collection.  I then can tune to my own personal radio station using any FM stereo around the house or in the garage.  Actually I can receive my radio station within a block of my house while the transmitter is in my basement next to my big metal furnace.  I’ve thought about moving the transmitter to the attic to get a greater range but it works just fine where it is.

The transmitter is pretty small.  It’s measurements are 3 3/8″ x 2 1/2″ x 3/4″.  The front of the transmitter has a power button and some logo stuff.

wholehousefmtransmitter_front-thumb

The power is supplied through a power jack on the side.  It uses 5VDC I couldn’t see any current rating on their website.  It has four different ways to power it, shown below.  I use the USB power adapter so it is power directly from my server.  The USB power adapter is retractable, I think it is only about 3-4 feet long which I think it should be longer but it works.

wholehousefmtransmitter_power-thumb

Wall Outlet - (110/220V AC Power Supply)
Wall Outlet
(110/220V AC)

Car Adapter - (12/ 24V DC Mobile Power Adapter)
Car Adapter
(12/24V DC)
Computer USB Power Cable
Computer USB Adapter
Plus, batteries (takes 3 “AA” batteries and will run about 110 hours)

The audio input is a 1/8″ (3.5mm) headphone jack.  This is very nice since you can use about any audio source, such as output from computer, ipod or any MP3 player.

wholehousefmtransmitter_audioin-thumb

On the other side there is a set of three dip switches.  These are used to select the frequency or FM radio station the transmitter broadcasts on.  If you set the frequency to the same channel as a nearby radio station you wont get as good of performance.  You should set it to an unused channel between radio stations.

wholehousefmtransmitter_dipswitch-thumb

On the back of the transmitter is the channel selection guide.  This shows the dip switch positions to select the desired FM frequency or channel.

wholehousefmtransmitter_channelselect-thumb

So I’ve got this hooked up to my server computer.  I’ve set my server to automatically start my favorite MP3 player software Winamp when windows loads.  The only problem I found was that after running constantly for a couple days Winamp would tend to freeze causing the MP3 currently being played to do a 1 second loop which sounds terrible.  To solve this I decided to restart my computer every night.  Being a big fan of batch files I created a batch file to restart my computer.  My batch file only contains one line:

shutdown /r /t 60 /f /c “Restarting for daily reboot…”

The flags I used are as follows:

  • /r  -  Shutdown and restart the computer
  • /t xxx  -   Set the time0out period before shutdown to xxx seconds.  The valid range is 0-600, with a default of 30.
  • /f  -  Force running applications to close without forewarning users.  (The /t flag also implies the /f flag but I put it in anyway just for kicks)
  • /c “comment”  -  Coments on the reason for the restart or shutdown.

I use a neat little windows utility called Task Scheduler to schedule my server restart in the middle of the night.

How To Schedule Tasks in Windows XP

While scheduling tasks you basically just browse for the batch file then set when you want the task to run and how often.

Written by KludgeGuru in: Server Tips |
Feb
07
2009
1

Server Tips: Backup Files Using a Batch File

In my server I have 4 hard drives and each has a purpose:

  1. Operating system – WinXP
  2. Personal files such as family pictures, home movies & mp3s
  3. Backup of personal files
  4. Media drive containing ripped DVDs

I used to setup hard drives 2 & 3 in a RAID 1 which is a mirrored raid array.  That way both hard drives contain the exact same data so if one ever failed I would not loose the data.  Since then I’ve found that sometimes I erase data that I don’t mean to and sometimes it’s hard to get it back.  So I came up with a solution.  I use a batch file to backup my data nightly to from hard 2 to hard drive 3.  That way if I delete some data it actually doesn’t get deleted off my backup drive.  If I overwrite something I didn’t mean to I have until the nightly backup to retreive it.  The dos utility xcopy works great for that.  Here is a link to an xcopy users guide http://www.seqsoft.com/xcopy_ug.pdf

In the batch file I start off by saving the date and the start time to two variables:

SET DATE=%date:~4,2%-%date:~7,2%-%date:~10,4%
SET START=%time:~0,2%%time:~3,2%%time:~6,2%

I then use xcopy with a bunch of switches to copy any new data to the backup hard drive.  I also create a log file called InProcess.log so I can go back later and check that everything is working alright.

xcopy /d /c /e /r /y /f e:\ f:\ >f:\backuplog\InProcess.log

Here is a list of the switches I use:

  • /d  -  Copies files changed on or after the specified date.  If no date is given, copies only those files whose source time is newer that the destination time.
  • /c  -  Continues copying even if errors occur.
  • /e  -  Copies directories and sub-directories, including empty ones.
  • /r  -  Overwrites read-only files.
  • /y  -  Suppresses prompting to confirm you want to overwrite an existing destination file.
  • /f  -  Displays full source and destination file names while copying.

I then specify the source drive e:\ which is my personal files drive.

Next the destination drive f:\ which is my backup hard drive is specified.

Then I tell it to white to a log file instead of to the screen using >f:\backuplog\InProcess.log

After the xcopy command I save the end time to a variable:

SET END=%time:~0,2%%time:~3,2%%time:~6,2%

I then rename the InProcess.log file that was created to a date and time stamp that says what time the process was started and what time it ended.

rename f:\backuplog\inprocess.log “%DATE% %START%-%END%.log”

So I save all of these lines into a batch file called backup.bat.  Here is what the entire batch file looks like:

SET DATE=%date:~4,2%-%date:~7,2%-%date:~10,4%
SET START=%time:~0,2%%time:~3,2%%time:~6,2%

xcopy /d /c /e /r /y /f e:\ f:\ >f:\backuplog\InProcess.log

SET END=%time:~0,2%%time:~3,2%%time:~6,2%

rename f:\backuplog\inprocess.log “%DATE% %START%-%END%.log”

The batch file is great but I need a way to automate it so I don’t have to remember to run the batch file whenever I want to backup my data.  It’s also nice to schedule the backup in the middle of the night when I most likely won’t be using my computer to access the server.  I use a neat little windows utility called Task Scheduler.

How To Schedule Tasks in Windows XP

While scheduling tasks you basically just browse for the batch file then set when you want the task to run and how often.

There are other solutions for backing up data but I like batch files, it’s free, easy and I don’t have to use some third party program.

Written by KludgeGuru in: Server Tips |
Feb
04
2009
0

Server Tips: Operating System

Normally I’m all for open source and free software but for operating systems in my experience it’s hard to beat Windows XP.  I have some experience using Linux but I’m not a Linux Guru and when there is a problem it might take me a few hours to a few days to figure out how to fix it.

I prefer to have an operating system that has a Graphical User Interface (GUI) rather than a command line interface.  It’s my opinion that the command line interface is powerful but it is also very archaic.  I’d prefer to have a GUI for my main operating system with a command line utility.

I did try installing Ubuntu on my server and it took a few days to get it working and configured the way I wanted it.  I have my server in my furnace room and there isn’t room in there for a monitor or keyboard so I remote into it to manage it.  With the Ubuntu install everything was working fine until the remote desktop stopped working.  I spent a couple days trying to figure out how to fix it and I finally got frustrated and installed Windows XP on it.  It took me a couple hours to get it installed and everything setup and I rarely have problems with it.

My choice of Windows XP to use as my server operating system mostly was decided for my experience with windows.  If I had more experience with another operating system such as Linux then I might have chosen it.  

Written by KludgeGuru in: Server Tips |
Feb
03
2009
0

Server Tips

I decided to create a new category called Server Tips.  I wanted to share my ideas on setting up a home server and I also wanted an easy way to document how I setup my server in case I ever need to reinstall it.  My home server serves a few purposes:

  • File Server – A central place that our family pictures, videos & music are stored.
  • Backup Server – The server does a nightly backup of our family pictures, videos, music…etc.
  • Web Server – The server also hosts my www.kludgeguru.com website.
  • Media Server – I also keep all of my ripped DVD collection on the server that can be access to stream movies to any PC or TV in the house.
  • Personal FM Radio Station – I have my favorite MP3 collection transmitted on an FM channel that can be tuned to using any standard radio within a block of my house.

My Server Tips Index:

  1. 02-04-2009  -  Operating System
  2. 02-07-2009  -  Backup Files Using a Batch File
  3. 02-11-2009  -  Personal FM Radio Station
Written by KludgeGuru in: Server Tips |

Powered by WordPress. Theme: Aeros 2.0 by TheBuckmaker.com.