There are many ways to integrate iTunes and Indigo Pro; this page will show you how to perform these integrations:
NOTE: If you are using Indigo 5, please use the iTunes plugin which is quite a bit easier.
Indigo comes with an iTunes Sync script which inserts a bunch of different data into Indigo Variables about what iTunes is doing. These can be shown on Control Pages, etc. This functionality is enabled by default in the sample house - check it out! If it's not already in your database, here's how (it's very simple)
TRIGGERS
from the outline view on the leftNew…
buttonIndigo Server Startup
from the Type:
popup (this will cause the actions in this trigger to be executed each time the server starts up)Actions
tabExecute AppleScript
from the Type
popupFile:
radio buttonBackground Tasks
and select iTunes sync.scpt
OK
That's it. Next time you restart the server it will start up the iTunes sync script.
However, there are much more useful things that you can do to enable iTunes control from all over the house using various hardware controllers and Indigo Pro.
Difficulty: Simple
These instructions assume you're setting up a PalmPad remote, but the process would be much the same for any other X10 controller (SlimFire, Maxi controller, etc).
TRIGGERS
from the outline view on the leftNew…
buttonX10/RF Command Received
from the Type:
popupOn
from the popup labeled Received:
Address
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesPlay()
OK
(You've just created the trigger that will start iTunes playing - now, let's create the trigger that will pause iTunes)New…
button againX10/RF Command Received
from the Type:
popupOff
from the popup labeled Received:
Address
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesPause()
OK
That should do it for Play and Pause. When you press the right “On” button on the Palm Pad, iTunes should start playing and it should pause when you press the corresponding “Off” button. NOTE: iTunes should be in a playable state: in other words, a valid playlist should be selected OR the Music Library. At the moment, the iTunes Attachment script (which you use by calling iTunesPlay()) isn't smart enough to first check to see if there is a playable playlist selected.
TRIGGERS
from the outline view on the leftNew…
buttonX10/RF Command Received
from the Type:
popupOn
from the popup labeled Received:
Address
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesVolumeUp(5)
OK
(You've just created the trigger that will increase iTunes volume by 5% each time that button is pressed)New…
button againX10/RF Command Received
from the Type:
popupOff
from the popup labeled Received:
Address
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesVolumeDown(5)
OK
Now, when you press the right “On” button on the Palm Pad, iTunes will increase the volume by 5% and the corresponding “Off” button will decrease the volume by 5%.
See, that wasn't hard at all! Next, we'll discuss getting it to work with an Insteon ControlLinc. It's really not much different.
Difficulty: Simple
The process isn't very different from the PalmPad, but here's the whole thing.
TRIGGERS
from the outline view on the leftNew…
buttonInsteon Command Received
from the Type:
popupOn
from the popup labeled Received:
Device
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesPlay()
OK
(You've just created the trigger that will start iTunes playing - now, let's create the trigger that will pause iTunes)New…
button againInsteon Command Received
from the Type:
popupOff
from the popup labeled Received:
Device
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesPause()
OK
That should do it for Play and Pause. When you press the right “On” button on the ControLinc, iTunes should start playing and it should pause when you press the corresponding “Off” button. NOTE: iTunes should be in a playable state: in other words, a valid playlist should be selected OR the Music Library. At the moment, the iTunes Attachment script (which you use by calling iTunesPlay()) isn't smart enough to first check to see if there is a playable playlist selected.
TRIGGERS
from the outline view on the leftNew…
buttonInsteon Command Received
from the Type:
popupOn
from the popup labeled Received:
Device
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesVolumeUp(5)
OK
(You've just created the trigger that will increase iTunes volume by 5% each time that button is pressed)New…
button againInsteon Command Received
from the Type:
popupOn
from the popup labeled Received:
Device
radio buttonActions
tabExecute AppleScript
from the Type
popupEmbedded:
radio button is checkedEmbedded:
: iTunesVolumeDown(5)
OK
Now, when you press the right “On” button on the ControLinc, iTunes will increase the volume by 5% and the corresponding “Off” button will decrease the volume by 5%.
See, that wasn't hard either! Next, we'll discuss getting it to work with an Insteon KeypadLinc.
KeypadLinc buttons operate inherently differently from other controllers: the buttons, by default, are toggle buttons - which means that they are either on or off as indicated by whether it's lit up or not. We've created a separate How-To that explains how to control those buttons, and specifically how to keep one in sync with the iTunes play state. Read it!