iTunes vs Music

Posted on
Thu Jun 04, 2020 2:56 am
howartp offline
Posts: 4092
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: iTunes vs Music

I have iTunes play the radio every morning, but I use neither of those plugins.

I believe it’s AppleScript that targets iTunes with a playlist command, which just contains the URL of an online radio stream.

Mac Commander plugin kills iTunes at 9am, can’t remember if it launches iTunes or whether the AppleScript does that.


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Jun 06, 2020 8:51 am
Symphonitron offline
Posts: 4
Joined: Jun 02, 2020

Re: iTunes vs Music

jltnol wrote:
I hardly think the plugin is useless as it still works when the Music app is running... :wink:


Useless was a bad choice of words. I actually use both the standard iTunes plugin as well as the iTunes Local plugin. My favorite feature of the latter is the ability to have indigo play a playlist, and ramp up (or down) the volume.


I'm sticking with the word useless for now. My argument: I can't use the app if it keeps disconnecting and staying disconnected every time I shut down the Music app.

So to use it, I have to: launch the Music app, launch the Indigo app, re-establish the connection (API?), and then I can basically toggle on and off the play feature using an Insteon button for example. Isn't it easier for me to just open Music and click Play? Also I can control the Music app pretty well with my Remote app on the iPhone. I can't figure out what the value-add on tying to Insteon is. I was experimenting with the idea of making my Music app play a PARTICULAR song when a particular Insteon button is pressed, but I can't figure out how to do that yet.

I realize there is a whole bunch of things this plugin is supposed to do, and that fixing it to keep up with Apple's changes is ongoing, and I shall monitor that. But at its present state, I'm afraid for me it's useless. Please counter with me if I'm completely wrong - but I need an example scenario that doesn't involve me having to manually reconnect with the app every single time I restart the Music application or the computer.

Thanks --
--Chris

Posted on
Sat Jun 06, 2020 9:00 am
Symphonitron offline
Posts: 4
Joined: Jun 02, 2020

Re: iTunes vs Music

PS: Incidentally, for a mysterious reason, I was playing music today and noticed in Indigo that the server state said "playing." Last I saw it, it was in the state of "unavailable" and stuck there, and I never reconnected it - it restored itself. I wasn't sure why.

So I restarted the Music application and continued to play, but alas, the server state = unavailable again. Stuck there. So what magic caused it to reconnect by itself?

So I tested a theory...

I selected File > Select Database and chose an empty database. After it switched, I selected File > Select Database and chose my main database again. And the server connection restored itself.

Not sure what this does to help me, but thought I'd mention it...

Posted on
Sat Jun 06, 2020 9:05 am
matt (support) offline
Site Admin
User avatar
Posts: 20016
Joined: Jan 27, 2003
Location: Texas

Re: iTunes vs Music

You can also probably just restart the Indigo iTunes plugin via the Plugins menu to get it working again.

I believe Jay has a change that makes the plugin more robust which will be in the next version of Indigo (no ETA on the release though) that will prevent you from having to manually restart the plugin.

Image

Posted on
Sat Jun 06, 2020 10:02 am
rgspb offline
Posts: 195
Joined: Apr 24, 2009
Location: Florida

Re: iTunes vs Music

I’m wondering why you shut down the Music app every time? I just leave it running in the background.

Posted on
Sat Jun 06, 2020 1:13 pm
jay (support) offline
Site Admin
User avatar
Posts: 16264
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iTunes vs Music

rgspb wrote:
I’m wondering why you shut down the Music app every time? I just leave it running in the background.


I'm curious about this also. Granted, it's a workaround, but it seems like a pretty innocuous solution...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Jun 07, 2020 5:02 am
Symphonitron offline
Posts: 4
Joined: Jun 02, 2020

Re: iTunes vs Music

rgspb wrote:
I’m wondering why you shut down the Music app every time? I just leave it running in the background.


That's a fair question. One answer is just memory management. I have plenty of RAM but it does get taxed, my kernal daemon goes into overdrive, and my fan comes on. I have a habit of shutting off applications I don't need right now because I don't want them just idle in the background in the event I'm in the mood to use them. Which, in the case of the Music app, isn't every day.

But that is not a complete answer. I *could* leave it open. I often leave my email open all the time, because I use it constantly. And I only restart the computer when there are updates, which is not even once a week.

Here is the greater context: I wasn't intending to tie my Music app to Insteon so that I could listen to music by pushing a button on a light switch. Generally if I want to listen to music, I'm either already in front of my computer and can just start Music (and choose my own song) anyway, and if I'm not, I have my iPhone to do it.

What I was intending to do was having fun with having certain sounds play when I turn the lights on or off in my room.

I have a fairly large home office with a lot of collections in it (it doubles as a geeky man cave), and when I turn the light on (or off) I have Indigo speak some text. It's not a useful goal, it's just entertainment. So then when I realized that the same action could also (or alternatively) play a tune, I wondered if that tune could be a sound effect? (Hence the reason I was trying to figure out how to play a *particular* track, rather than just any track. I haven't figured out if the plugin can even do that yet natively yet.) Since I don't listen to music that much I keep the Music application shut down until I need it. But I wanted to see if Indigo could play the sound effect when I turned my lights on or off.

In hindsight, if I was able to make that work, it might have meant that Indigo would then have to launch the Music application in order to play that tune. And then I'm back to my memory management obsession again. All for the sake of amusing me when I turn on or off the lights.

So to be honest I hadn't really thought it through. I ran into this obstacle very early in my creative explorations and it shut down my interest in pursuing the idea for now. It's just a bug, and I'm sure the bug will be fixed. In the meantime I've been trying to wrestle with more practical Insteon automation, such as how to turn off an Insteon Keypadlinc button LED in another room only if a whole group of lights are off. (Not for discussion in this thread of course.)

Posted on
Sun Jun 07, 2020 6:25 am
rgspb offline
Posts: 195
Joined: Apr 24, 2009
Location: Florida

Re: iTunes vs Music

If you’re not running Catalina you can use the iTunes Local Control plugin. It will do exactly what you’re talking about!

Posted on
Thu Jun 25, 2020 12:19 pm
jltnol offline
Posts: 482
Joined: Oct 15, 2013

Re: iTunes vs Music

So just a quick update. I decided to move my desktop Mac to Catalina which is where my music library is, and of course kissed iTunes good by. My Indigo server is still running on Mojave. I do find both the iTunes plugin seems to disconnect with the Catalina version of Music... no big surprise really, and I also find Airfoil running on Catalina also has some problems.

The good news is that restarting both of those plugins.... iTunes and Airfoil seems to restore connectivity easily enough.

As I recall, I think the iTunes Plugin is reverse engineered so who knows how long it will work with Music, but at least, for now, I have an easy way to get things connected and working again.

Posted on
Thu Jun 25, 2020 2:25 pm
jay (support) offline
Site Admin
User avatar
Posts: 16264
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iTunes vs Music

jltnol wrote:
As I recall, I think the iTunes Plugin is reverse engineered so who knows how long it will work with Music, but at least, for now, I have an easy way to get things connected and working again.


Correct. I am pretty surprised it works with the Music app at all. I've tried to make it a little more robust in the next Indigo release, and it should be easier for everyone to manually recover when it gets into this state. But, I'm not at all confident that this reverse engineering hack will continue to function moving forward. I'm even less confident after the announcements from WWDC.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jun 26, 2020 8:14 am
jltnol offline
Posts: 482
Joined: Oct 15, 2013

Re: iTunes vs Music

At the risk of sounding like a broken record, if/when connecting and controlling Music is finally broken forever, I hope that someone would take a look at https://swinsian.com. While not free, its well worth the small cost to regain some of the best features from the earlier versions of iTunes. Not sure if it could even work with Indigo, but might be worth taking a look. https://swinsian.com/support/developers/

Posted on
Fri Jun 26, 2020 3:07 pm
jay (support) offline
Site Admin
User avatar
Posts: 16264
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iTunes vs Music

jltnol wrote:
At the risk of sounding like a broken record, if/when connecting and controlling Music is finally broken forever, I hope that someone would take a look at https://swinsian.com. While not free, its well worth the small cost to regain some of the best features from the earlier versions of iTunes. Not sure if it could even work with Indigo, but might be worth taking a look. https://swinsian.com/support/developers/


Their programmatic integration is just for notifications of changes. Nothing to sneeze at, but not really useful for developing a full plugin. They do have AppleScript support though, so you could just use scripts.

I suspect the reticence is that it doesn't support the Apple services - music purchased from iTunes and Apple Music support. At least, that's why I wouldn't be interested.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 1 guest