Home
My Update Blog
Wiring Closet
Main Controller
RS485 Network
Touchscreens
Plantation Shutters
Lighting & Devices
Audio System
Climate Control
iPhone Detection
Links
Contact Me
Custom Nodes
Multi-Purpose Node
Servo Controller Node
IR Occupancy Counting
Bed Occupancy Node
Old Townhouse
Old Macros and Events
Old Wiring and Design
Old Lighting and Devices
Old Audio Componets
Old Security System
Old iPhone Web Interface




Washington, NC Real Estate - A cool site with real estate information in Washington, Bath, and Belhaven, North Carolina.

Greenville, NC Real Estate - Another real estate site with information for Greenville and Winterville, NC.

Morehead City, NC Real Estate - Another real estate site with information for Atlantic Beach and Emerald Isle, NC.

Jacksonville, NC Real Estate - A real estate site with information for Jacksonville, NC and Richlands, NC and homes for sale.

Audio Componets

- Speaker Relay System Detail

I decided that one of my most important requirements in a home automation system for me was the ability to have music play throughout the house in every room. I decided I would install one speaker in each room of the house (including the master bathroom) for a total of 5 mono speakers. The speakers I choose were cheap ceiling speakers that I found on eBay, I think they ended up costing me about $10 a pair.

 


Lautsenn 5-1/4" 2-Way Ceiling Speakers - 8 Ohms (30 watts)

Speaker installed in the kitchen ceiling
 



The speakers are all connected to a Sima SSW-4 Speaker Selector so that I can turn them on and off in different zones when people are sleeping. Click here for information on the computer controlled speaker selector I created for MisterHouse. The speakers selector lets you control up to 4 sets of speakers. Since I have 5 speakers in my setup, I combined my master bedroom and master bathroom into one zone since they are so close to each other anyway.

 


Sima SSW-4 Speaker Selector in my wiring closet (Update: now mounted here)

 
The audio out from my sound card on my main controller is fed into a small amplifier that is then fed into the Sima SS-4. This allows MisterHouse to pump speech throughout the house to inform me of the house status and different announcements.

Music Player
I have gone back and forth with how I handle music for the house, but I think I have finally found the ultimate solution. With my previous setup, I wrote my own module in MisterHouse that ran a Process_Item that controlled the Linux mp3 player "mplayer". I used my main controller as a music library and stored all of my music that was played locally. Then MisterHouse controlled the mplayer by sending basic commands such as play, stop, next, previous, volume up/down, etc using a simple file pipe. This in theory was a great idea, but it had several drawbacks:

  • For some reason, the Process_Item would randomly cause MisterHouse to completely freeze up. This didn't happen very often, maybe once every couple of days, but it was still very annoying to have to restart the main controller. I tried to do some debugging to see if I could track down what the error was, but from what I could tell, it was very random and always happened immediately upon executing the fork() command in the Process_Item Perl module.
  • The volume for the music player was constantly having to be adjusted because the speech output was always the same volume.
  • It was very annoying having to rebuild the MP3 database every time I added a new song to my music library. Not to mention I had to download the song on my normal Windows PC and transfer it over to the main controller.

So the solution to all of this came a few weeks ago when I bought a Mac-Mini for my family room. I had gotten away from playing my music on the house speakers because of the problems I mentioned above and instead was using iTunes on the Mac-Mini to play music over my Bose speakers. I have an iPhone that I use over my wireless network that can control iTunes remotely around the house using a simple application. It then hit me that if I were to pipe the output from the Mac-Mini into the microphone port on the main controller running MisterHouse, I could write some code to control the music remotely via TCP just like my iPhone did. Then the both the speech from MisterHouse and the music from the Mac-Mini would be mixed together and pumped over the house speakers.

Now, the whole reason I bought the Mac-Mini was so that it could be hooked up to my LCD tv in the family room and used as another computer, so playing the Mac-Mini upstairs was not an option. Instead I purchased an Apple AirPort Express with AirTunes adapter. This little device connects to your wireless network anywhere in your house and allows any iTunes player to output the music currently playing to the speaker out adapter on the AirPort Express. This means that the Mac-Mini would be able to play music on the Bose speakers in the family room and the AirPort Express which would be plugged in upstairs in the wiring closet. The speaker out on the AirPort Express would then be plugged into the microphone port on my main controller. The music is completely in-sync between the Bose speakers and the house speakers and you can't tell it's coming from two different sources whatsoever.
 

Once this was all setup, I wrote a MisterHouse Perl script that made iTunes think MisterHouse was just another iPhone remote. This enabled MisterHouse to be able to get real time music status updates from iTunes which in turn is used to trigger different events. For example, when MistserHouse speaks a phrase, I have iTunes turn down the music volume in the house to 15% while MisterHouse speaks, then when it is finished, the volume is restored to it's original level. Of course this only happens if the music was playing in the house to begin with.


Example of MisterHouse muting iTunes when speaking


Other iPhone remotes can be used just like normal and when there is a status change like stopping, continuing to the next song, or pausing the music, MisterHouse is updated. This is great because my friends can still control the music in the house when they are visiting and it doesn't disrupt MisterHouse at all. You can also control the music using the iPhone web interface that I wrote as well.
 


© Jon Scott 2012 -- All Rights Reserved.