
SiriProxy is a proxy server for Siri, Apple’s assistant application for the iPhone 4S. Using the Internet Sharing functionality in OS X, one is able to share an Ethernet connection with any device that has WiFi on the same network.
This means all network traffic is routed through your Mac. In order to intercept Siri’s commands before they head off to Apple’s servers, you must install dnsmasq, a service that tricks your Mac into thinking the Siri’s server is located on your Mac.
The cool part of this is, you can create custom handlers. Many of you know that, one of my interests is home automation, hence why I developed iHomeTouch. Before SiriProxy I was able to make Siri turn on my lamp by sending a text message, but this process is long winded and rather just a proof of concept.
I’ve written a quick and simple Ruby script to turn on the tree lights. The lights are plugged into an X10 transceiver module. I have iHomeTouch Server running on a computer, which is on the same network as my Mac and iPhone.
It was no easy task getting SiriProxy up and running. I spent day and night overcoming issues because the setup instructions aren’t terribly detailed but with a little help from a friend (MrJaba) I finally had a break through.
The video shows me greeting Siri with “Merry Christmas Siri”. Siri then responds “Merry Christmas Adam, shall I turn the tree lights on?”
If I say yes, Siri then asks:
jingle = ask "How about a Christmas jingle?" jingle.strip!if jingle == "Yes" or jingle == "Yep" or jingle == "Yes please" or jingle == "Yeppers" or jingle == "Yes mate" or jingle == "Why not?" or jingle == "Why not " or jingle == "Why not" then artist = URI.escape("christmas carols") results = JSON.parse(open("http://ws.spotify.com/search/1/track.json?q=#{artist}").read) if (results["tracks"].length > 1) track = results["tracks"][0] say "Playing #{track["name"]} by #{track["artists"][0]["name"]}" `open #{track["href"]}` else say "I could not find anything by #{query}" end end
If I say yes. It will play a Christmas carol (Deck The Halls) using Spotify.
So that's it.
It's been a year since I first released iHomeTouch and I'm hoping to release version 2.0 very soon. It's amazing how far the technology has progressed in just a year!






