iTunes + Airplay instead of Sonos?

project_av

(Brian Smith) #1

I have many airplay speakers around my house and a Mac that is on all the time, in addition to phones, etc. Has anyone thought about getting SmartThings to talk to iTunes on a Mac/PC so you can play music over AirPlay? Sonos can be VERY expensive and this might offer an alternative.

I was thinking about looking on the developer site and see if there is anything that might help me figure out how to do it - like how to get SmartThings to communicate with an app on a computer. It seems like that it would need an app installed to act as a bridge between the Hub’s network connection and the Mac/PC’s. I can see someone creating an app that allows you to control a small list of qualified apps. I think iTunes has some external hooks, but I’m not sure.


Starting now.. and need advice
Change AirPlay system when moving between rooms?
StatusThing – mac statusbar app
(Jeff DeWolfe) #2

I think this is a great idea as I have a similar setup and don’t want to “reinvest” in sonos.


(Brian Smith) #3

I think the only way this would work would be to have a small SmartThings app installed on a Mac/PC that works with select apps that have hooks to control them. Maybe the app could be built to use plug-ins so developers could build extensions to it to control other apps…or their own.


(Net Geek) #4

It has been done might look at this story http://blog.smartthings.com/stories/a-robbery-and-a-plan-to-get-even/ …

NG


(Brian Smith) #5

Interesting. Would like it better without as many “intermediaries”, but it looks like it would work. Would just need different scenes for different playlists - like a cocktail party one that plays jazz for example. Now I need to see if you can script which speakers to play through in iTunes.


(Anthony) #6

I just moved into a new house about 2 months ago and put ceiling mount speakers in each room hooked up to their own receiver since I had 3 laying around (alternative to airplay speakers). In the process of moving in I was trying to figure out an alternative to sonos becasue of the price. So I bought 2 additional apple tv’s for each room adding to the 2 I already had. Now I have one apple tv in each room playing the same music from my iMac. $400 investment and I have music throughout my home from one sorce. The only thing is I want to be able to use more then just iTunes to play music, or even use my phone as the sorce instead of running to the office to change a song. Example spotify or pandora.

Doing this through ST’s would be amazing!!!


(Brian Smith) #7

Yep, in addition to two airplay speakers, I have two old airport express devices that I use for speakers in other portions of the house.

The process that was outlined in the blog post was decent -she did a good job. My worry is the number of steps and potential breakdown. I wish we could pull Dropbox out of the equation somehow. Perhaps I’ll take a peek at this over the weekend a bit more with a beer or two and see if I can come up with something smoother. I am a Director of IT…one would think I could contribute to this! :smile:


(Different Computers. So happy with Indigo.) #8

Wow, I would love this. Airplay cost me a grand total of $100 to create whole house audio, mostly because I could repurpose other equipment. But even if I had to buy AEx’es new, it would have only run about $300.

I’ll never go Sonos.


(Ben Goodman) #9

I use Airfoil by Rogue Amoeba ( http://rogueamoeba.com/airfoil/ ). It creates a single virtual airplay speaker that can send the stream to multiple other airplay speakers. It has a remote control app that can control volume and distribution of the music (it can’t do different stream to different rooms yet). It seems that the remote talks to airfoil via AppleScript and I think the rogue amoeba team would be open to integration with smartthings.


(Brian Smith) #10

That is the exact solution we need. Combinations of DropBox/Box/etc and Airfoil on a Mac or PC could create a “Sonos-lite” experience. For example, we could

  • trigger a playlist
  • send a text file to be read aloud (Mac at the moment, need to research PC options)
  • Whatever else we can think of!

I’m looking at their AppleScript options now for the Mac and I’m going to contact them regarding other integration options or pre-canned scripts to work with SmartThings.


(Peter) #11

I have had trouble with Airplay. When it works, it works great, but it has too many cut-outs to be useful. Its too frustrating. I bit the bullet with Sonos and there are zero cut outs of the music. This is using direct cable runs to the Airport expresses. I hear using apple TVs as music devices works better that Airplay speakers or airport expresses. It seems to be a known issue with many people.


(Brian Smith) #12

Rogue Amoeba supports AppleScript. Unfortunately, I’m not an expert at AppleScript. But, they have the functionality to call specific speakers and apps. Anyone else want to take a stab at it? They have sample scripts to expand upon. I’m not at home (where all our speakers are), so I can’t test this until we get home next week. But, I’ll give it a shot.


(Brian Smith) #14

I heard back from RA and they are not releasing their API at this time. AppleScript is the only interface. Now, iOS Homekit might change that perspective from them…but it’ll be a long time before they are on board, which stinks since this has potential to really make a poor man’s Sonos.


(Michael) #15

I have actually been working on a similar project for a while… I’ve successfully written the AppleScripts to control iTunes for the following:

  • Turn various AirPort Expresses speakers on/off
  • Adjust the volume in iTunes
  • Play certain playlists in iTunes

The main part that I haven’t been successful at is controlling this from SmartThings… If anyone has found a way to make this happen boy would I be happy! :smile:

Couple example AppleScripts:

Turn on all inside speakers and set volume to 35%

tell application "iTunes"
set sound volume to 35
set computerSpeaker to (first AirPlay device whose name = “Computer”)
set backyardSpeaker to (first AirPlay device whose name = “Backyard”)
set diningroomSpeaker to (first AirPlay device whose name = “Dining Room”)
set familyroomSpeaker to (first AirPlay device whose name = “Family Room”)
set guestbathroomSpeaker to (first AirPlay device whose name = “Guest Bathroom”)
set kitchenSpeaker to (first AirPlay device whose name = “Kitchen”)
set laundryroomSpeaker to (first AirPlay device whose name = “Laundry Room”)
set martysroomSpeaker to (first AirPlay device whose name = “Marty’s Room”)
set masterbathroomSpeaker to (first AirPlay device whose name = “Master Bathroom”)
set masterbedroomSpeaker to (first AirPlay device whose name = “Master Bedroom”)
set nurserySpeaker to (first AirPlay device whose name = “Nursery”)
set officeSpeaker to (first AirPlay device whose name = “Office”)
set patioSpeaker to (first AirPlay device whose name = “Patio”)
set current AirPlay devices to {diningroomSpeaker, familyroomSpeaker, guestbathroomSpeaker, kitchenSpeaker, laundryroomSpeaker, martysroomSpeaker, masterbathroomSpeaker, masterbedroomSpeaker, nurserySpeaker, officeSpeaker}
set sound volume of AirPlay devices to 35
end tell

Play “Guests” playlist on all inside speakers and set vole to 35%

tell application "iTunes"
set sound volume to 35
set computerSpeaker to (first AirPlay device whose name = “Computer”)
set backyardSpeaker to (first AirPlay device whose name = “Backyard”)
set diningroomSpeaker to (first AirPlay device whose name = “Dining Room”)
set familyroomSpeaker to (first AirPlay device whose name = “Family Room”)
set guestbathroomSpeaker to (first AirPlay device whose name = “Guest Bathroom”)
set kitchenSpeaker to (first AirPlay device whose name = “Kitchen”)
set laundryroomSpeaker to (first AirPlay device whose name = “Laundry Room”)
set martysroomSpeaker to (first AirPlay device whose name = “Marty’s Room”)
set masterbathroomSpeaker to (first AirPlay device whose name = “Master Bathroom”)
set masterbedroomSpeaker to (first AirPlay device whose name = “Master Bedroom”)
set nurserySpeaker to (first AirPlay device whose name = “Nursery”)
set officeSpeaker to (first AirPlay device whose name = “Office”)
set patioSpeaker to (first AirPlay device whose name = “Patio”)
set current AirPlay devices to {diningroomSpeaker, familyroomSpeaker, guestbathroomSpeaker, kitchenSpeaker, laundryroomSpeaker, martysroomSpeaker, masterbathroomSpeaker, masterbedroomSpeaker, nurserySpeaker, officeSpeaker}
set sound volume of AirPlay devices to 35
play playlist "Guests"
end tell


(Brian Smith) #16

Very nice!!! Since there is no way for ST to control the Mac, I think the only way to trigger this is via ifttt -> text fil in drop box (or equivalent) -> Automator folder action on the local mac where the file is copied to. Different files or file contents for each script setup,

This is exactly why I wish Rogue Amoeba would help us out a bit. They have a remote iOS app, which means there is a network API. I really want to eliminate the delay of the ifttt / cloud storage process.


(Convinced ST will never be unbroken…) #17

Check out HAM Bridge.


(Dan) #18

SmartThings will send LAN http requests. I have apache running on a mac connected to a lightpack ambient light controller for my tv. The incoming http request open scripts on the mac turning on/off or changing profiles of the prismatic software controlling the lightpack. I’m thinking HAM Bridge would work fine for this.


(Kyle Hayes) #19

Beat me to it, I was going to suggest a local HTTP server as well that runs scripts on the serving computer. This type of interface would work for PC or Mac assuming you wrote the appropriate scripts for each platform to interact with the downstream software.


(Brice; SmartRulesApp.com) #20

I just stumbled across this thread and it just so happens that I have been building the exact thing you’re looking for. Its almost complete and I hope to submit the Mac app to the App Store in the next week or so. I’ll post a link once its up! The initial version will support play, pause, next, previous, volume, mute, and airplay on/off. Let me know what other features you may like and I’ll work on adding them.


(Michael) #21

Sounds very cool! Can’t wait to try it out.