Author Topic: Custom commands / Command editor tree help  (Read 9370 times)

0 Members and 4 Guests are viewing this topic.

jmizzle

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
    • View Profile
Custom commands / Command editor tree help
« on: June 13, 2013, 01:04:29 AM »
Hi I am new to vox..
I want to know if there is a guide for dummies that shows you how to edit voice commands and play around with that command editor tree...
I use xbmc and want vox to show me a list of movies when i say "show me movies with {actor}"
I have followed another post and edited the xsql option and created the 'xbmcmovieactors.xml' file in payloads folder...
But now how do I get it to create/recognize the command?
This is likely to not be my only reason to create commands etc. so i would like to learn how to do it for the future. The wiki confused me and none of the commands I created worked.
Also I want my HTPC to talk to me (tell me the weather, time, ask me questions etc) so I assume I will need to edit the command tree for this as well?
I see on other posts people writing code but where do I input this code into?
Thanks in advance :)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #1 on: June 13, 2013, 02:43:01 AM »
Hi jmizzle and welcome in VoxCommando forum. First what we need is some information of your configuration, basically which Version of Windows, XBMC (Frodo/Eden) and your version of VoxCommando.
You can take also a look in the youtube-voxcommando-channel, there are some helpful video tutorial available. http://www.youtube.com/channel/UC5bR_Jcv6lk3ubiNzdgOIGQ
The basic function of the command builder is explained in our Wiki, please read this first - http://voxcommando.com/mediawiki/index.php?title=Logical_Command_Builder and if you have VC installed with the XBMC commands, take a look in the command tree editor and open the commands to have examples.

Kalle

PS: to put code from the forum in your VC is very easy: select the complete code and drag'n drop it in the VC command tree
« Last Edit: June 13, 2013, 07:51:34 AM by jitterjames »
***********  get excited and make things  **********

jmizzle

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #2 on: June 13, 2013, 02:50:52 AM »
Thanks for the welcome :)
I am running windows 7 64
Latest xbmc Frodo...
Vox commando 1.1 (Or should I revert back to the previous release until this one is stable?)
Amulet remote
OKay I am going through some of the tutorials on the youtube now.
Yes I have it working fine with XBMC... I can play music, movies etc.
I will let you know once I finish with the tutorials.
Thanks.
« Last Edit: June 13, 2013, 03:08:25 AM by jmizzle »

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #3 on: June 13, 2013, 03:03:58 AM »
I want to know if there is a guide for dummies that shows you how to edit voice commands and play around with that command editor tree.
i recommend starting with the tutorials you find on youtube.

I see on other posts people writing code but where do I input this code into?
just copy the code, open your command tree and paste it. this will create a new command.

p.s. welcome  :)


jmizzle

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #4 on: June 18, 2013, 04:40:23 PM »
Ok well i have spent the last few days going through every tutorial I can find.
I have made a bit of progress. I can ask the weather, time, focus webpages or applications, however I am stuck with a few issues.

1. I want to be able to list movies with a particular actor in XBMC. I have created the command, phrase, and payload from XML file, however my Logical Command Builder is blank as I do not know what to put in here. Can someone please help me with this?

2. I want to set a desired volume when I lift the amulet remote and restore volume when I put it down. At the moment it does nothing to the volume when I lift it up and down. It doesnt even register on the history tab on vox. I assume I use the softmute action but what is the command for it?

3. Lastly, I would like to create a command to play a random movie.

Let me know if you want me to create a separate thread for each of my questions and I will.
Thanks for your help :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom commands / Command editor tree help
« Reply #5 on: June 18, 2013, 04:55:27 PM »
Hi jmizzle. I don't mind a single post for these three.

For amulet, you must run a special program amulet usb which comes as part of the VoxCommando extras that you can download from the downloads page.

http://voxcommando.com/downloads.asp

The other questions I will look at when the sun stops shining or I run out of beer.
« Last Edit: June 18, 2013, 05:46:21 PM by jitterjames »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Custom commands / Command editor tree help
« Reply #6 on: June 18, 2013, 05:26:27 PM »
2. I want to set a desired volume when I lift the amulet remote and restore volume when I put it down. At the moment it does nothing to the volume when I lift it up and down. It doesnt even register on the history tab on vox. I assume I use the softmute action but what is the command for it?

To expand slightly on James's message about the Amulet USB tool, see here for some guidance on how that works: http://voxcommando.com/forum/index.php?topic=803.msg6443#msg6443 and http://voxcommando.com/forum/index.php?topic=70.msg2947#msg2947
« Last Edit: June 18, 2013, 05:34:54 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #7 on: June 18, 2013, 05:53:06 PM »
You don't need to download the "VcGrp_amulet events.xml". The events is a part of the "Voxcommando Command Group" which is include in Version 1.1.0. You need to download only the Voxcommando Extras(it contain the "amuletUSB.exe")  ;)
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom commands / Command editor tree help
« Reply #8 on: June 18, 2013, 05:58:53 PM »
1. I want to be able to list movies with a particular actor in XBMC. I have created the command, phrase, and payload from XML file, however my Logical Command Builder is blank as I do not know what to put in here. Can someone please help me with this?

http://voxcommando.com/forum/index.php?topic=1054.msg8883#msg8883

See the link for viewing movies by actor

if you already have the xml then you should just be able to use this command:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="817" name="Find Actor" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>GUI.ActivateWindow&amp;&amp;"window": "video", "parameters": [ "videodb://1/4/{1}" ]</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Find, Search, Show</phrase>
  <phrase>film, films, movie, movies</phrase>
  <phrase>with</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone">XbmcPayloads\xbmcMovieActors.xml</payloadFromXML>
</command>
« Last Edit: June 18, 2013, 06:29:21 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom commands / Command editor tree help
« Reply #9 on: June 18, 2013, 06:26:29 PM »
3. Lastly, I would like to create a command to play a random movie.

For this you should really just create a smart playlist in XBMC and then use VC to open it.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="816" name="Play Five Star Songs" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.Open&amp;&amp;"item": {"file": "special://profile/playlists/video/playlistname.xsp"}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play a random movie</phrase>
</command>

You'll need to change the playlistname.xsp in the action parameter to match the xsp filename that XBMC creates for your smart playlist.  the filename will be the name that you originally assign to the smart playlist when you create it in XBMC, but as one user recently discovered, if you change the name of the smart playlist, the filename will remain the same as when you first created it.

Here's a reference: http://voxcommando.com/forum/index.php?topic=1102.msg9269#msg9269

You can verify which files are there and what they are called by looking in the folder: C:\Users\USERNAME\AppData\Roaming\XBMC\userdata\playlists\video

Here's more info on how to create your smart playlist: http://wiki.xbmc.org/index.php?title=Smart_playlists#Random_movie

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom commands / Command editor tree help
« Reply #10 on: June 18, 2013, 06:32:00 PM »
You don't need to download the "VcGrp_amulet events.xml". The events is a part of the "Voxcommando Command Group" which is include in Version 1.1.0. You need to download only the Voxcommando Extras(it contain the "amuletUSB.exe")  ;)

You are right Kalle.  That is a good point.  Although, it may not be in all of the standard configs.  I think it snuck into the default XBMC configurations, but it is not present in the others, such as iTunes, MediaMonkey, MediaPortal, etc.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #11 on: June 18, 2013, 06:46:57 PM »
You are right Kalle.  That is a good point.  Although, it may not be in all of the standard configs.  I think it snuck into the default XBMC configurations, but it is not present in the others, such as iTunes, MediaMonkey, MediaPortal, etc.
Yes I've checked only the xbmc install  ;)
***********  get excited and make things  **********

jmizzle

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #12 on: June 19, 2013, 01:00:36 AM »
Great thanks so much for all your help guys!
So i basically got everything working now.
I wasnt able to get the xbmc.softmute command working. But the system volume partial mute command worked instead. I entered them in exactly the same. Any idea why the xbmc.softmute command didnt work?
The play movies with actors command worked great (however it does get a little confused with nearly 14000 actors in the payload lol)
I created the random movie playlist command. However I was looking for it to automatically play a movie as soon as I say the command rather than bring up a playlist. Perhaps a command to choose a random value in the xbmcmovieIDs.xml payload??

Oh yeah and is it possible to minimise the Amulet USB app to the tray automatically on computer startup?
« Last Edit: June 19, 2013, 01:02:59 AM by jmizzle »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #13 on: June 19, 2013, 04:22:37 AM »
Quote
Oh yeah and is it possible to minimise the Amulet USB app to the tray automatically on computer startup?
You can start the "amuletUSB.exe" when VC is launching, there is a command action "Launch.Hidden" available which you can trigger with an event. If you take a look in the history window of VC after it is starting, you will see some events that VC has created (calendar icons).
You can drag'n drop one of them on you created launch.hidden command.
A "how to use events" video is on our youtube channel.
I'm not sure, but it is possible xbmc must run in front to use the softmute function, test it with xbmc in fullscreen.
« Last Edit: June 19, 2013, 05:32:38 AM by Kalle »
***********  get excited and make things  **********

jmizzle

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom commands / Command editor tree help
« Reply #14 on: June 19, 2013, 05:33:34 AM »
You can start the "amuletUSB.exe" when VC is launching, there is a command action "Launch.Hidden" available which you can trigger with an event. If you take a look in the history window of VC after it is starting, you will see some events that VC has created (calendar icons).
You can drag'n drop one of them on you created launch.hidden command.
A "how to use events" video is on our youtube channel.

Ok so I have set the launch.hidden command to the VC.Loaded event. When I start vox it comes up in the history as being exectuted but there is an orange box around it and the Amuletusb app doesnt open at all.
I think it might be the format of the path to the amuletusb.exe? In the path parameter for the launch.hidden action I simply put "I:\HTPC\Vox Commando 1.1\AmuletUSB.exe".
Is this correct?