VoxCommando

Help and Support (Using VoxCommando) => XBMC (Old board see 'KODI' above) => Topic started by: Casmo on June 13, 2014, 04:36:51 PM

Title: Really easy one
Post by: Casmo on June 13, 2014, 04:36:51 PM
I've tried, really I have but I can't seem to see the wood for the trees.. All I want to do is create an action that plays a specific song. All the play song commands I've looked at involve variables and payloads, I can't seem to strip it back without messing up the syntax.
Title: Re: Really easy one
Post by: nime5ter on June 13, 2014, 04:51:13 PM
You'll need to look up the song ID value for the song that you want to play. You can look it up in the xbmcSongs payload xml file, if you like.

Clone your "Play song {1}" command in your command tree.

In the new clone, revise the command name and phrase to say whatever you want (e.g. "Play my one very special song. You know the one.")

Obviously, you don't need the payload xml file or anything like that if you have one specific song that you want it to play, as the payload xml allows us to use one command to ask for multiple, similar things.

In the macro, replace the payload reference {1} with the id of the specific song that you want XBMC to play.

That should be it, depending on your ultimate goal.
Title: Re: Really easy one
Post by: nime5ter on June 13, 2014, 05:15:51 PM
If you want, you can also get rid of all the actions except the Player.Open action.

You'll just need to replace the playlist item in the Player.Open action with your songid item.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.5-->
<command id="487" name="Play special song" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.Open</param>
      <param>"item": {"songid": yoursongidvaluegoeshere}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play my special song</phrase>
</command>

As I say, it's a question of the ultimate goal. But if you do the first step described in my previous post, it's easier to then compare the syntax between lines and begin eliminating extra bits.
Title: Re: Really easy one
Post by: Casmo on June 13, 2014, 05:27:28 PM
Excellent, thank a lot. Will give it a go just as soon as she relinquishes control of the tv...
Title: Re: Really easy one
Post by: Casmo on June 13, 2014, 06:16:58 PM
Excellent. Now by just saying "giggity" or "business time", the lights turn red and purple, dim and Barry Whites 'Im  Gonna love you just a little more, baby' starts playing.. Oh how I love voxcommando
Title: Re: Really easy one
Post by: SuperKronz on June 13, 2014, 07:06:46 PM
 >:D W00T! >:D
Title: Re: Really easy one
Post by: Casmo on June 13, 2014, 07:55:25 PM
It's more of a presentation piece, let's be honest. As expected, my wife laughed uncontrollably, called me an idiot and went to bed... Ah home automation.

Thanks again nime!
Title: Re: Really easy one
Post by: jitterjames on June 13, 2014, 08:30:06 PM
Excellent. Now by just saying "giggity" or "business time", the lights turn red and purple, dim and Barry Whites 'Im  Gonna love you just a little more, baby' starts playing.. Oh how I love voxcommando

Conditions are perfect!

&feature=kp