iPhone Remote app vs iTunes and HouseBot
Posted: Tue Nov 22, 2011 7:09 am
I started playing with iPhones Airplay a while ago and installed the app Remote on my iPhone. I saw I was able to control an iTunes library through my iPhone while playing the music on my PC which is connected to my whole house audio system. Because I dislike iTunes running all the time I started playing with some options to automate stuff.
I took a packet sniffer and found that my iPhone sends packets on ip 224.0.0.251 & port 5353 to connect. A script now intercepts the unique iPhone code from these packets and tests if iTunes is already running. If not, it starts up on my server. If iTunes idles for more than 3 minutes (PlayerState = Stop) than iTunes quits again.
So now I am able to auto start and stop iTunes to get some internet radio going while sitting in the couch. But I also didn't want to get up to switch on the correct zone on my receiver. So I took an mp3 doorbell sound (about 5 seconds) and copied it 5 times naming the copies after my zones (Livingroom, kitchen etc) and tagged the Genre as Control Home. I loaded these 5 tracks into the iTunes database so I can play them through my iPhone. As soon as such a track is played, the script recognises the track and switches on the respective amplifier zone on a loud volume so the iPhone has a wide range of volume control.
In short: Whole house audio now automated using the iPhone, home automation scripts in HouseBot and iTunes on my server PC.
I took a packet sniffer and found that my iPhone sends packets on ip 224.0.0.251 & port 5353 to connect. A script now intercepts the unique iPhone code from these packets and tests if iTunes is already running. If not, it starts up on my server. If iTunes idles for more than 3 minutes (PlayerState = Stop) than iTunes quits again.
So now I am able to auto start and stop iTunes to get some internet radio going while sitting in the couch. But I also didn't want to get up to switch on the correct zone on my receiver. So I took an mp3 doorbell sound (about 5 seconds) and copied it 5 times naming the copies after my zones (Livingroom, kitchen etc) and tagged the Genre as Control Home. I loaded these 5 tracks into the iTunes database so I can play them through my iPhone. As soon as such a track is played, the script recognises the track and switches on the respective amplifier zone on a loud volume so the iPhone has a wide range of volume control.
In short: Whole house audio now automated using the iPhone, home automation scripts in HouseBot and iTunes on my server PC.