Author Topic: XBMC Commands  (Read 45017 times)

0 Members and 1 Guest are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
XBMC Commands
« on: February 24, 2011, 09:44:11 PM »
Here's a few miscellaneous xbmc commands.  One that I just found today is

XBMC.ExecBuiltin   Container.NextViewMode

comes in handy if you are showing off a nice skin like Aeon MQ2

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Commands
« Reply #1 on: February 24, 2011, 09:56:17 PM »
James, NextViewMode is great, thanks...coooll ;D

My tip
XBMC.ExecBuiltin   Container.PreviousViewMode

« Last Edit: February 24, 2011, 10:07:10 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #2 on: February 25, 2011, 12:15:25 AM »
aha, yes, good point.  Nice to be able to go both ways. :)

stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: XBMC Commands
« Reply #3 on: March 26, 2011, 10:07:09 PM »
    All of these have been confirmed to work with
VoxCommando .884, EventGhost 0.3.7.r1486, and XBMC Dharma (stable) 10.0, on Windows 7, 64 bit.

There are 3 files attached:
  • vc xbmc eventghost - that's the Eventghost file.  Download Eventghost, then click on File, Open, browse to that file.
  • XBMC New Misc playlist - most of the changes listed below.
  • voicecommands_uploaded.xml -completely reworked the categories contained within the xml to my liking.

Regarding the latter two bullet points, save it to your desktop.  Open up VoxCommando, then click on the Edit Menu.

This will launch the Edit Tree Commander.  Drag the playlist onto the left window, and you should get a pop-up saying that it's been succesfully merged.

The below commands are included - to the right of each is the bolded actual command you'll say to launch each command.

XBMC Weather:
Shows XBMC's Weather Page - Command:  Weather

Music:
Find/ Show music from xyz artist....  (not play - just show, so that additional songs can be queued without messing up current songs).  Command:  Find/show Artist blahblah

Show Now Playing Music playlist -  Command:  Now Playing Music
Show recently added music.   Command:  Recently Added Music
Show recently played music.   Command:  Recently Played Music
Show music compilations.   Command:  Compilations
Show music playlists.   Command:  Music Playlists
Show music Add-Ons - Command:  Music Add-Ons
Stop everything playing, clear the playlist - and play currently selected (including no matter how high a level an item it is. So, will play albums if selected.  Need to make sure Auto-Queue is deselected in Music settings).  Command:  Spin It Up
Queue item - Command:  Queue
Play your particular playlist - or your girlfriend's - you'll need to prep it with the immediate below bullet points.  Command - {Your Name/ Girlfriend's Name} Playlist

This next one is awesome!  Love it!  
Add any currently playing mp3 to a playlist for any number of people.  The idea behind this is you can just have music playing, and suddenly realize that you really like a particular song.  Command:   Add {Name}

  • Some requirements for this last - You'll want to go into voicecommands.xml and do a Cntrl + H to replace all "Monica" to whatever your girlfriend's name is.  Then, you'll want to do the same for your name with "Chandler"
  • Then you'll want to a do a cntrl + F in the same file for "m3u" and change those two file's locations and names to where-ever your playlist files are located/named
  • Since XBMC is not particularly good at ordering playlists/ removing items/ etc....you can do that back-end work with Media Monkey.
  • Yes, I know that it's not using relative paths.  I'm exhausted and in no mood to deal with any more research on this.  Go figure it out yourself.

Videos:
Show Now Playing Videos playlist -  Command:  Now Playing Videos
Show Recently Added Episodes playlist - Command:  Recently Added TV
Show Recently Added Movies Playlist - Command:  Recently Added Movies
Show Recently Added Music Videos Playlist - Command:  Recently Added Music Videos
Show video playlists.   Command:  Video Playlists
Show video add-ons.   Command:  Video Add-ons
Browse TV shows by Genre - Command:  Browse TV Genre
Browse Music Genre:  Browse Music Genre
Generate a playlist of random episodes from the TV Genre you specify - and immediately begin to play them.  Command:  Random TV (genre).  (Genre = the actual genre).  So if you want comedy - Random TV Comedy
Generate a playlist of random episodes from the TV show you specify - and immediately begin to play them.  - Command:  Random episode from (show).  So if you want random episodes from Friends - Random episode ofFriends.


Show Recently Aired Episodes that are not watched:  Command:  Recently Unwatched TV

(In order to use the Recently Unwatched TV command you'll want to also do the following:

You'll want to make a new Smart Playlist in XBMC that matches these parameters:


And then adjust the actual location of the playlist in Voxcommando:

In VoxCommando, click on the Edit menu.  This will launch the Edit Tree Commander.  In it, open up "XBMC New Misc group".  Right-click on "Recently Unwatched TV" and click Edit.

In the shown section below, change the path that's currently listed to the path of where your playlist is located.



Streaming Media (ANY QUESTIONS ABOUT THIS ONE, PLEASE GOOGLE UP XBMC FORUMS.....):
Youtube Add-one - Command:  Youtube.
Vimeo Add-one - Command:  Vimeo

To see Pandora.com Alaska Mod - Command:  Pandora
(this one, you'll need to install the XBMC Pandora Alaska Mod .

To see streaming Al Jazeera TV:  Command:  al jazeera
(this one, like above needs a little prep:  Save the txt at this link:  into a notepad .txt document called "aljazeera.strm"

Make sure you save it with the quotes in Notepad, so it's set up as a .strm file, not as a .strm.txt file.  

Grab the path to that file and update the link in the command itself after clicking on Edit in VoxCommando.


General:
Escape key - - Command:  Escape key
Tab key - - Command:  Tab key

To bring up your XBMC favorites - Command:  Favorites

Maximize XBMC - Command:  Maximize XBMC

Change Modes as discussed above by jitterjames et al - Command:  Previous View Mode.

Bring up the context window, as if right-clicking on any listed media.  Command:  Context Menu

Clean Music library - Command:  Clean music.
Clean Video library - Command:  Clean Video.

Play SlideShow - Command:  Play Slideshow
Next Slide - Command:  Next Slide
Previous Slide - Command:  Previous Slide
Stop Slideshow - Command:  Escape Key
Pause Slideshow - Command:  Pause Slide

Next Preset - Command:  Next Preset
Previous  Preset - Command:  Previous Preset

Useful links and tips:

VOXCOMMANDO
  • Very useful overview.  
  • What is the Voxcommando builder?
  • More on voxcommando builder.  
  • To modify your Action Tree, you can replace it - or simply drag any attached .xml file from this forum onto your tree edit window to import and merge it.

  • Command that can be sent via XBMC.Btn.KB  
  • Useful overview of .879 voxcommando commands (currently 875b).
  • VoxCommando.xml is the xml file that contains all of the commands that are edited by the Tree Editor

XBMC

  • Where you can override the default keymap - C:\Users\%USERNAME%\AppData\Roaming\XBMC\userdata\keymaps\keyboard.xml
  • In VoxCommando, you often see xbmc.send action(14), for example. This is using the Action command from the HTTP API interface.  You'll also see SendKey(0xF024) - that's the SendKey command from the same interface = both commands are found here.  More importantly, you can find the action codes hereFor example action(14) = Action_Next_Item
[/i]
[/list]

EVENTGHOST:I am NOT a fan of eventghost's documen-pain-tion.  So let me save you some pain.

  • Eventghost is using Stackless Python 2.6.4  (click on Help/About EventGhost/ System Tab).  There are limitations on what commands are included.  Let me emphasize that - NOT ALL PYTHON COMMANDS WORK IN EVENTGHOST.
  • The quickest way to find out what commands are available, is by clicking on Help/Python Shell/ and on line 4 type in (without the quotes) "eg."  You'll get a pop-up of all of the available commands.
  • As Jitter James' has pointed out....http://www.eventghost.org/docs/short_manual/index.html is your friend.  Read it three times before beginning work on your own Eventghost commands. "
  • Here is where you can find documentation on Eventghost's version of Python.
  • For the love of pete- if you see your eventghost command is italicized - it's broken.  Create a new action, and then delete the old one.  Can't tell you how much time I wasted on that.  :( >:( ???
  • If you're getting compile errors, go open the xml file and copy the particular command you're having a problem with.  Open up EditPlus, and paste the command in.  Look at the bottom bar on the right side- you'll see a "col" with a number next to it.  That number increases as you move to the right, so scroll to the right until you find the character number erroring out in eventghost, and you'll probably find some sort of typo.

All seriousness aside - enjoy the commands - I'm having a blast with them!
[/list]
« Last Edit: April 13, 2011, 02:39:29 AM by stepppedup »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #4 on: March 26, 2011, 10:37:52 PM »
There is already a "show playlist" command.  I'm not exactly sure how it works with audio vs. video.  I assume it works based on whichever is actively queued.

I *thought* there was already a context menu command, but I guess not.  Just need to clone the show info command and change the 'i' to a 'c'

I'm curious to see what you come up with for recently added stuff.  Are you planning on using a smart playlist?

stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: XBMC Commands
« Reply #5 on: March 26, 2011, 10:40:30 PM »
Thanks for the tip on using the show info command as the starter.

For the recently added - those are unique playlists within XBMC, so I'm going to initially try to find those Window ID's/ keyboard shortcut to them.  If not, smart playlist it will have to be.


stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: XBMC Commands
« Reply #6 on: March 27, 2011, 08:00:41 PM »
Do you have any tips on sending a space command to XBMC from voxcommando?

I've tried XBMC.Btn.KB with the following parameters.

 
" "
"^{ }"
^{ }
"{SPACE BAR}"
{SPACE BAR}


Cheers either way!

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Commands
« Reply #7 on: March 27, 2011, 08:07:28 PM »
The Space Bar is used in XBMC for Pause/Unpause, in this case use this, it´s ok .

XBMC.Btn.KB  p (letter p in parameters)
« Last Edit: March 27, 2011, 11:22:26 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: XBMC Commands
« Reply #8 on: March 27, 2011, 08:38:16 PM »
Thanks - but p just pauses it.

If you have a media window (ie, a list of shows/ music open), while music/ shows are playing, then space will open up the Now Playing Window which is a special window in XBMC.  The Now Playing list allows for movement of media items up and down on it.

And to touch on jitterjames' point regarding the default Show Playlist command that comes with voxcommando - this actually shows the playlist  - but stops it as well.!

So, anyone know how to send space - or just bring up the Now playing window?

Cheers either way!


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #9 on: March 27, 2011, 08:45:34 PM »
XBMC.Btn.KB    space

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #10 on: March 27, 2011, 08:59:20 PM »
but I think Wanilton is right, it just pauses, under certain circumstances.  It depends what screen you are on, but certainly if you ware watching a movie, then space will pause it.

it does appear that the stock command for show playlist in VC is not working.  This could be due to poor XBMC documentation, or I may have made an error.  Since I don't use this command I didn't notice.

I think what you want is:
XBMC.ExecBuiltin    ActivateWindow(musicplaylist)

or

XBMC.ExecBuiltin    ActivateWindow(videoplaylist)

another possibility is
XBMC.ExecBuiltin    Action(playlist)

but this will only work if you are on certain screens.  (this one seems to be the same as space)


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #11 on: March 27, 2011, 09:13:23 PM »
for example of other keys you can look in

C:\Program Files (x86)\XBMC\system\keymaps\keyboard.xml

here you can see how the various keys are spelled.

unfortunately I can't figure out how to do modified keys (like shift) using this "XBMC.Btn.KB" method. :'(

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Commands
« Reply #12 on: March 27, 2011, 09:14:12 PM »
James and friends,

The ActiveWindow in XBMC will change in version 11 (codename - eden), which is being developed, the way pointed out by James works in version 10.0 and 10.1, but will undergo changes in 11, change in nomenclature, the function remains the same..

Look here for info about this changes:
item 1.1 in this link http://forum.xbmc.org/showpost.php?p=729257&postcount=1 and more details
here http://forum.xbmc.org/showpost.php?p=721208

Wanilton


« Last Edit: March 27, 2011, 09:27:36 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Commands
« Reply #13 on: March 27, 2011, 09:23:42 PM »
Wanilton, call me crazy, but neither of those 2 links seem to be saying what you are saying.  If they are changing this command, it is not clear to me how it will be changed, but we can deal with it when the time comes.

Aren't you using the beta of Eden now?  Do the activateWindow commands work for you?

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Commands
« Reply #14 on: March 27, 2011, 09:38:36 PM »
James,

My intention is to inform you that there has been a change for those who are using version 11, I'm using a computer to 10.1 and another computer version 11, that to help the Marcos, get the details right in Aeonmq2 skin.

Basically the function is the same, just change the call the ActiveWindow, in version 11, work this way:

Example new command for Tv Show in Eden
ActivateWindow(Videos,TvShowTitles,return)
No more VideoLibrary

For movies in Eden
ActivateWindow(Videos,MovieTitles,return)
Others examples;
ActivateWindow(Videos,Files,return)
ActivateWindow(Videos,Root)
ActivateWindow(Videos,Addons,return)

Music not changed yet



and this way work ok in Eden Version.

Wanilton


« Last Edit: March 27, 2011, 09:45:47 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me