Page 1 of 1

Airplay not through Airfoil, how to monitor it?

PostPosted: Tue Feb 26, 2019 9:48 am
by new2me07
Heres my use case. I have an old Apple TV connected optically through a semi-smart receiver. The airplay feature on it is garbage and shouldn't have even been marketed as such. Any how with airplay 2 being so awesome and telling Siri where to play music Im looking for a way to turn the receiver on when something is being airplayed to that Apple TV. I can't find an airfoil state that changes when something connects via airplay (airfoil does expose its own states just fine). I checked the dictionary in script editor and there is an active property of airplay devices (boolean) that seems like its what I'd like to watch.

However, my scripting skills suck and I know applescripts will soon die. Is there any way for the iTunes plugin to be updated to support passing the active state of an airplay device as I imagine this has to be a 1st world problem that's rather common; A component based airplay device doesn't fully turn on when selected.

Any insights greatly appreciated!

Re: Airplay not through Airfoil, how to monitor it?

PostPosted: Tue Feb 26, 2019 10:21 am
by rgspb
Is this something the "iTunes Local Control" plugin might do?

Re: Airplay not through Airfoil, how to monitor it?

PostPosted: Tue Feb 26, 2019 12:43 pm
by jay (support)
new2me07 wrote:
However, my scripting skills suck and I know applescripts will soon die.


Not exactly...

new2me07 wrote:
Is there any way for the iTunes plugin to be updated to support passing the active state of an airplay device as I imagine this has to be a 1st world problem that's rather common; A component based airplay device doesn't fully turn on when selected.


Unfortunately, the iTunes plugin is built on reverse-engineered technology which makes adding features pretty much impossible. As suggested, you might want to try the iTunes Local Control plugin which wraps iTunes AppleScript communication in a plugin.

Re: Airplay not through Airfoil, how to monitor it?

PostPosted: Wed Feb 27, 2019 11:10 am
by kmarkley
The iTunes Local Control plugin can query iTunes about current airplay devices (and write them to a variable), but it isn't notified by iTunes when they change. Perhaps you could trigger a query when something starts playing, and then trigger your receiver when the variable changes.