Looking for a syntax trick for iTunes

Posted on
Sat Sep 17, 2016 4:44 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Looking for a syntax trick for iTunes

Hi guys,

I'm trying to find a way to get Siri to control iTunes via Indigo. All I'm trying to do is:
1. Use relatively natural language
2. Play and pause the current track on my whole-house iTunes which is connected to Indigo.
I've tried:

An Action Group called "House Music" that Plays or that toggles Play/Pause. I've tried both & both seem unable to work properly, maybe because Siri isn't aware of what's playing. But it allows for me to say "Hey Siri, turn on house music" and have the command activated.

Trouble is I get a lot of
Code: Select all
[9/17/2016, 6:37:12 PM] [Two Dog Hill] House Music: executeAction(false)
[9/17/2016, 6:37:39 PM] [Two Dog Hill] House Music: executeAction(false)

because Homebridge seems to think whatever I'm asking for is already happening.

Does anyone already have something like this working?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Sep 18, 2016 12:31 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Looking for a syntax trick for iTunes

Does it work if you use an app instead of Siri? I tried Siri with one of my actions ("Turn on Enter House") and I see this:

Code: Select all
[9/17/2016, 11:27:56 PM] [Indigo] Enter House: executeAction(true)
[9/17/2016, 11:27:56 PM] [Indigo] Indigo request: http://xxxREDACTEDxxx/actions/Enter%20House.json
[9/17/2016, 11:27:57 PM] [Indigo] Enter House: executeAction(false)


The first line is the action switch getting turned on. The second line is the request to Indigo to execute the action group. The last line is where it turns the switch back off automatically for actions.

Sometimes Siri doesn't like the names of devices. For example, I have "Alarm Disarmed" as an action group, but Siri thinks I'm trying to do something with my phone's alarms if I try to tell her to turn that on.

-Mike

Posted on
Sun Sep 18, 2016 6:44 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Looking for a syntax trick for iTunes

Yeah, things work otherwise. Yes, there's confusion between "play this on my phone" and "activate the whole house audio" if I get too close to the syntax of typical Siri commands.

Seems like Siri doesn't know the state of my iTunes for the house, so refuses to turn on something it thinks is on, or off something that's off.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Sep 18, 2016 9:40 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Looking for a syntax trick for iTunes

If it's an action group, it should always be showing as off to HomeKit. Action groups will turn themselves off one second after you turn it on. You can verify that using a HomeKit app to see its current state.

Posted on
Sun Sep 18, 2016 10:21 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Looking for a syntax trick for iTunes

Good to know about action groups! And it explains why I can't use toggle.

Still searching for a work around. First thing that occurs to me is something like this:

"Siri, turn on home audio"

Virtual device named Home Audio, which has a trigger called Audio Status Monitor which watches the iTunes state so it reflects the player state. That trigger turns Home Audio on or off as appropriate.

Seem like it would work?
Last edited by Different Computers on Sun Sep 18, 2016 10:24 am, edited 1 time in total.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Sep 18, 2016 10:22 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Looking for a syntax trick for iTunes

If you want to track on and off state, create a virtual device in Indigo - you can have on and off be separate action groups, and track on/off state via a variable. That will work just like a switch in HomeKit.

Posted on
Sun Sep 18, 2016 10:37 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Looking for a syntax trick for iTunes

And that did it! Many thanks for the tip. And as a bonus, I understand virtual device status requests a bit better.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests