iTunes + Airplay instead of Sonos?

Submitting updates to Apple and SmartThings today to support AirPlay speaker selection in the SmartApps. I’ll post when they’re available!

By the way, if anyone visiting here has used the app and likes it, if you have a minute, a review on the Mac App Store (https://itunes.apple.com/us/app/obything-music/id919810954?mt=12) helps a lot! Thanks!

3 Likes

@obycode First off great work on the app. I am running it on a 2013 mac mini that sleeps but is always on and looking for network hit. I run Plex so it has to stay on. I was able to get the app to work via ST but notice that even if nothing was playing before I launch say a siren sound, that a song starts playing after the siren runs out. Also I notice that the app shuts down on me quite a bit. While testing I had to go back into my office several times to relaunch. Then all the sounds came through. Thank you for the hard work.

Hi @aaronlopez. Thanks for the feedback. I haven’t seen these issues before, but I’d love to help resolve them. Maybe you could give me some more information so we can investigate…

When a song plays after your sound completes, was the sound one of the selections from the “Notify with Sound” app, or was it from a playlist in iTunes? This may be a silly question, but are you sure you do not have the option set in the SmartApp to play a playlist after the sound?

When you say that the app shuts down, do you mean it crashes and is no longer running, or its running but its not doing anything, or something else?

@obycode The app is no longer running. I have to relaunch the app to see it in the taskbar up top. The song that plays is from my itunes. And I tried the switch on the play a playlist after sound both ways with the same result. Thank you oby.

@aaronlopez - the song playing afterwards should be fixed in the version waiting for approval. I’m not sure about the crash. We can’t reproduce that issue here, but hopefully the update fixes that too. If not, we’ll keep investigating.

Awesome thank you. Does itunes have to be open? Or is my computer not allowed to sleep?

No, iTunes does not have to be opened. ObyThing Music will open it. The Mac can be asleep and it will still work as long as you enable the option in System Preferences -> Energy Saver -> Wake for network access (or Wake for Wi-Fi network access). Let us know if that is not working for you and we’ll look into it.

@aaronlopez, I may have been wrong about being able to wake up the sleeping Mac. It seems that this feature is maybe not working right now. I’ll put it on the list for features to add very soon! Sorry for the mistake.

To everyone who has been waiting for the ability to select an AirPlay device, our Mac update is available now. We are still waiting for the SmartThings parts to be updated, but the device type and apps are available on our GitHub page if you want to try it out in the meantime. Check out this post for more info - http://obything.obycode.com/mac-app-update-is-live/

Excellent! Can’t wait for the update in ST!

me too. been waiting for something like this. didn’t want to reinvest more money for sonos. airplay works well for me…

@obycode I installed the new device type and smartapp in the ide, but I can’t find where to setup airplay devices. I installed the Weather Forecast app and I see where to select them, but it looks like they need to be configured somehow first. Any suggestions?

Thanks!
Jordan

@jthurston422 - So when you’re installing the Weather Forecast app, are you seeing the “Play on these speakers” option, but when you tap it there are no options? If that’s the case, there are two things you can try:
1 - Go to ObyThing Music device in Things and hit the refresh button to make sure it gets the latest. I should add this into the process later so it is automatic.
2 - If there are still no options, double check on your computer that iTunes shows AirPlay options are available. If not, then you will need to fix it there first.

If AirPlay options are showing in iTunes, but still not in the SmartApp’s options, you may need to delete your device and re-create it. Good luck. Let me know how it goes.

@obycode I removed the ObyThing SmartApp, ObyThing DeviceType, and Weather Forecast app from the ide; then added them all back in using the current versions on your GitHub. Then I went to my SmartThings app, installed the ObyThing SmartApp, which created the ObyThing device. I configured both of them, then installed the WeatherForecast app, I see the Play on these speakers, but I still do not see any speaker options. I tried the refresh and that did not work either. And I see 6 airplay options in iTunes. I even tried turning Airplay on via the ObyThing device and re-adding the weather forecast app, but that did not work either. I’m using Mac OS X Yosemite and iTunes 12 if that matters.

Thanks!
Jordan

Oh, I just realized what the problem must be (hopefully). How are you installing the device? Did you copy the ObyThingMusicSmartApp.groovy from our github repo and install it from “My Apps”, or are you using the one available in “SmartThings Labs”? If you use the one available under SmartThings Labs, then it will use the released device type, and not the new one. I should have clarified that. Does this fix the problem?

Hopefully the new device and smart apps will be released officially, then this process will be much smoother.

@obycode I copied all three (device, app, and weather app) from the GitHub repo.

@jthurston422 Please post (or send me) anything that shows up in your log file ( https://graph.api.smartthings.com/ide/logs ) when you do the setup process. I’m not sure why its not working for you, but the logs may help show if the correct version is being used.

By the way, my updates with SmartThings are now “In Review”, so hopefully they will be published soon and this problem will go away.

@obycode here’s what showed up when I just went through the process again (deleted all three things, installed smartapp, configured automatically created device, and installed weather app):

7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Home was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Weather Forecast was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Deleting all scheduled jobs for InstalledSmartApp: 7f68d02d-05e4-468e-ae86-9ff177ccc0ff
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Weather Forecast is attempting to unsubscribe from all events
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: debug Updated with settings: [resumePlaying:true, forecastOptions:[0, 1], triggerModes:[Awake], sonos:ObyThing Music SmartApp]
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Home was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Weather Forecast was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Deleting all scheduled jobs for InstalledSmartApp: 7f68d02d-05e4-468e-ae86-9ff177ccc0ff
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Weather Forecast is attempting to unsubscribe from all events
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: debug Updated with settings: [resumePlaying:true, triggerModes:[Awake], forecastOptions:[0, 1], sonos:ObyThing Music SmartApp]
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Home was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: trace Weather Forecast was provided…creating subscription
7f68d02d-05e4-468e-ae86-9ff177ccc0ff 10:28:36 AM EDT: debug Installed with settings: [resumePlaying:true, triggerModes:[Awake], forecastOptions:[0, 1], sonos:ObyThing Music SmartApp]
87f0165f-c8e7-437a-99b1-5e9995134d43 10:27:28 AM EDT: trace created ObyThing ‘ObyThing Music SmartApp’ with id 0A000104:D995
87f0165f-c8e7-437a-99b1-5e9995134d43 10:27:27 AM EDT: debug Installed ObyThing Music SmartApp with address ‘10.0.1.4:55701’ on hub ‘Home’

If we can’t figure it out, I can just wait until it is published.

Thanks!
Jordan

It looks like there is no communication back from your Mac. You should see something like this after installing:

d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting airplay to on
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting trackDescription info to Shake Your Tailfeather - Nelly, P. Diddy, Murphy Lee
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting trackData to {"station":"Music"}
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting status to paused
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting mute to unmuted
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug setting volume to 100
d4b0128c-911c-49fe-b216-4ced6bac0fcd 10:43:11 AM EDT: debug body = {"status":"paused","volume":"100","mute":"unmuted","playlists":["Home Videos","Some Nights","90’s Music","Christmas","Classical Music","Music Videos","My Top Rated","No Artwork","Recently Added","Recently Played","Top 25 Most Played","Party","Chilling","Classical Radio","Girls","Good Morning","Kids","Lullaby","Party Music","Voice Memos"],"speakers":["Computer","Living Room Apple TV","Outside"],"trackData":{"station":"Music"},"trackDescription":"Shake Your Tailfeather - Nelly, P. Diddy, Murphy Lee","airplay":"on"}

Are the simple commands like play/pause working?

They were yesterday. I’m at work now, so maybe my Mac is asleep or turned off, but it shouldn’t be. I’ll give it another try when I get home tonight.

Thanks for your great support on this! ObyThing has so much potential, I can’t wait to get it working.

1 Like