[SOLVED]iTunes and Keypad buttons

Posted on
Thu Jan 08, 2015 1:46 pm
cwf offline
Posts: 22
Joined: Nov 13, 2007
Location: CT

[SOLVED]iTunes and Keypad buttons

I've read through the how-to and I can get the plug-in to work from Indigo, and I can set a button on the keypad to play/pause or I can have the button illuminate when a change of state happens, but I can't wrap my brain around how to do both.

For example, I'd like a button to light when itunes is playing - regardless how it happens (from AppleTV, remote.app, manually from itunes). When the button is lit, I'd like to be able to press it and stop the music.

When I tried this I set up the trigger to turn on the button and then an action for the keypad button to play/pause. I ended up with a loop. What am I missing?

Posted on
Fri Jan 09, 2015 12:19 pm
jay (support) offline
Site Admin
User avatar
Posts: 16277
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iTunes and Keypad buttons

I think you probably just got into a logic loop. If you think of it in discrete components, then you can break it down. So, first, let's get the buttons in sync with iTunes - these will work regardless of how it started/stopped playing:

  1. Trigger when Device State Changed for your iTunes device when Player Status is Playing Becomes True - turn on the button(s)
  2. Trigger when Device State Changed for your iTunes device when Player Status is Playing Becomes False - turn off the button(s)

So, with just this, you can play/pause iTunes all you want from any controller. Next, you want the KeypadLinc buttons to play/pause. For each button that does this:

  1. Trigger when INSTEON Command Received for your KeypadLinc when On is received from the appropriate button number - start iTunes playing
  2. Trigger when INSTEON Command Received for your KeypadLinc when Off is received from the appropriate button number - pause iTunes

Note that I'm using the INSTEON Command Received trigger - that's because if trigger on Device State Changed, then it's going to fire when your sync triggers above sync the button (when it's NOT initiated by the actual physical button press). Using this trigger guarantees that the only time the trigger will fire is when the actual button is pressed. This may have been the source of your infinite loop.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jan 09, 2015 2:02 pm
cwf offline
Posts: 22
Joined: Nov 13, 2007
Location: CT

Re: iTunes and Keypad buttons (answered)

Thanks! This is exactly what I was doing wrong.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests