iTunes + Airplay instead of Sonos?

Any update @obycode?

Iā€™m just trying to figure out how to enable a clean setup, but running into some issuesā€¦ as it is now, you would have to setup the device from the developersā€™ ā€œMy Devicesā€ page, which Iā€™m trying to avoid so that non-developers could use it too. Iā€™ve got some posts here on the forums asking for help and an email thread going with ST support, so hopefully I can get that figured out soon. If not, I guess I could release the Mac App with special instructions on setting it up. If I do that, would you be interested in trying it out?

Of course I would love to

@obycode I would be willing to try this out as well if you are looking for another beta tester! I currently have a hacked together version of this working by creating a custom music player device type that sends httpget requests to HAM Bridge. HAM Bridge has some applescripts it runs to execute play,pause,previousTrack,nextTrack, & stop commands for iTunes. Iā€™m very interested to see how you have your version working.

Iā€™m still working on this. Having some minor problems with the App Store approval (they didnā€™t like me using the name ā€œMacThingā€). Also, Iā€™m not sure how long SmartThings will take to post my app/device to make it easy for anyone to install from the app. Hopefully weā€™ll have something soon.

Finally got my app finished and approved by Apple. Here is the App Store link - https://itunes.apple.com/us/app/obything-music/id919810954?ls=1&mt=12. Iā€™ll give a promo code for a free download to the first few people that private message me and are willing to try it out, review it and give feedback. Unfortunately, the SmartThings part has still not been approved (it seems like this is going to take a long time) so youā€™ll need to be comfortable with grabbing the code for the SmartApp and DeviceType to install through the developer tools.

Wow, that was quick! Glad there are some interested users. Iā€™ve given away all of the free downloads, but please try it out if youā€™re interested. I would love to hear your feedback. I will be adding more features beyond music in the future. Check out the site here - http://obything.obycode.com

First off - thank you so much for the free promo code! This app is working perfectly. The setup was extremely easy, and will only improve once SmartThings eventually gets it through the approval process.

I did screw up with the setup the first time through, but it was 100% user error. I added the ObyThing Music custom device type, and then tried add a device with the specified device type manually through the ā€œAdd Deviceā€ screen in the IDE instead of having the Smartapp create the device for me. It kept on throwing back errors at me.

Once I had the device created by the smartapp, everything works perfect. I have tested the Mac app on the following:

OSX 10.9.4 - iTunes 11.4
OSX 10.10 Public Beta 3 - iTunes 12

I did notice one thing with the ObyThing Music Smartapp, and this could be a ST limitation or functioning as designed, but when I tried to edit the IP address in the Smartapp to test on the other computer, it did not change the IP address to the existing ObyThing Music device. So even though the Smartapp was showing an IP address of 192.168.1.110:55701, the ObyThing Music device was still controlling iTunes on 192.168.1.120:55701

I do see that the trackdescription is pulled into the logs currently, which is awesome. I also see in Row 4 in the device type code, it is already setup to display that info, just not currently. That will make the iTunes integration just as good as the Sonos integration, if not better.

Question: Would there be any way to pull in the available Airplay devices to select from instead of just enabling/disabling all?

FYI- I also tried the Speak Custom Commands with Sonos smartapp with no intentions of having that work as well. You proved me wrong!

Glad to hear it is working well! I will go through and respond to your comments:

Yes, I was hoping to avoid this difficulty by submitting the app to SmartThings so that the setup would be super easy from the app, but since it seems like they are going to take a while for approval, Iā€™ll work on adding some instructions for installing it the hard way through the developer portal.

I guess this is an issue with my SmartApp / device type. For now, you can just delete the setup SmartApp, which will also delete the associated device, and then set it up like new again. Iā€™ll work on getting the edit functionality to work.

Yes, I thought about including the track info, but that requires communication over the LAN from the Mac back to the hub (right now, we only communicate from hub to Mac) which seems to be very undocumented by SmartThings right now. It is definitely on the list for future improvements.

Yes, this is also on the todo list and I think it should not be too difficult to implement, so this may be the first new feature added.

Thanks a ton for your review and your input! Iā€™ll keep you updated as improvements are added.

2 Likes

Another question. Do you know of a way to call an iTunes Radio station just like you currently have playlists pulled into SmartThings?

I couldnā€™t find any way to call iTunes Radio stations via applescript, and unfortunately the iTunes Radio stations cannot be dumped into playlists like the internet radio stations. Just checking to see if you may have another idea of how to achieve this.

No, unfortunately, Iā€™m still not sure how to do this. Iā€™m really hoping that Apple adds some interface for iTunes Radio in an update, but until then, I canā€™t think of a way to do it.

@obycode , do you have a link to the ObyThing Music SmartApp? I couldnā€™t find it in the shared apps list. Or is it not there yet? Iā€™ve been trying to set something like this up for a while. I some functionality with a few applescripts, but this looks way nicer. I canā€™t wait to try it out! I also think being able to select AirPlay devices would be an excellent feature!

Thanks!
Jordan

Oh yeah. I guess I should include more info. The hope was to have the app improved by SmartThings so this wasnā€™t an issue. For now, you can get the code for a device type, and a SmartApp to perform the setup easily from my github page - https://github.com/obycode/obything. There is also some more info on this site: http://obything.obycode.com. Iā€™m working on getting a setup video and instructions up there as well. Let me know if you have any issues.

I now have the step-by-step instructions, and a demo video available at http://obything.obycode.com/help/.

So I donā€™t know if anything has changed, but I uncommented out Row 4 in the Device Type code

    Row 4 - Disable this for now until we get communication back to hub working
  valueTile("currentSong", "device.trackDescription", inactiveLabel: true, height:1, width:3, decoration: "flat") {
      state "default", label:'${currentValue}', backgroundColor:"#ffffff"
  }

as well as the updateState mapping

  mappings {
      path("/obything/:message") {
          action: [
              GET: "updateState"
          ]
      }
  }

and now the trackdescription is displaying perfectly for the device!

That will work only when you perform some action from the app, but not when the song just changes on its own. What is happening is that when you send a command from the app, ObyThing responds with a bunch of information, including the current track. The missing piece is when the track changes and no commands have been sent, then ObyThing is not able to send that info back to the SmartApp. I would like to have this feature, but I am stuck on some issues with the LAN communication to ST.

@obycode

I just downloaded the app and installed it. Love it! I have a few questions / comments.

  • I only see two playlists listed when going through the ā€œSonos Smart Appā€ trigger process. I have a bunch of playlists in iTunes. How do I get the others to show up?
  • Are you planning on offering a way to control which Airplay speakers to use for a task? Is that possible? For example, I might only want to have music play in the kitchen or master bedroom and not the rest of the house with my other Airplay speakers.
  • Are there plans to expand beyond music? For example, executing an AppleScript or something like that.

Hi Brian, glad to hear you like the app!

That is strange. Try pressing ā€œRefreshā€ in the device and let me know if that resolves the issue.

Yes, I agree this is a much needed feature. Unfortunately, due to limitations in the device tiles that SmartThings supports, there is no good way to add this feature in the device itself. We should be able to make it work via a SmartApp though. This feature will be coming soon.

Yes, this is definitely in the timeline. Eventually, I plan to add the ability to trigger built-in or custom scripts, and even have some mechanism for users to share their scripts. Stay tuned!

Yep, that did it. Very much looking forward to Airplay device selection support. We have speakers and aTVsā€¦so obviously I donā€™t want to use the aTVs for the music! :smile:

Iā€™m also very glad to see that ST prioritized the approval of the SmartApp!

When you get this up and running, consider the following - as Iā€™m sure a lot of people know, the Airplay chipsets that are currently in use pretty much suck. For example, my Philips speakers forget their names every once in a while and revert back to their default name. So, one speaker could have two names. Kinda throws a wrench in things, unfortunately.