[HOW TO][Linux][Live] Map Addons to your remote
#1
yeah yeah I know there are about 20 different button mapping threads going on, but with Dharma's new Addons I haven't found a solid source of info and have spend countless hours researching to find my answer.

so you want to map a button to open YouTube, GrooveShark, Apple Movie Trailers. etc etc you came to the right place


there might be a better way, but I find this just plain works.


  1. first off add what you want to me mapped to your Favorites , using your context menu.

    now we are going to use command line to finish off the rest this guide assumes you are using Linux or Live. if you are on a Windoz box I can't help you but you might find some useful info in here


  2. Code:
    cat ~/.xbmc/userdata/favourites.xml

    you will see all your favorites looking line this

    Code:
    <favourite name="You Tube Beta" thumb="/home/xbmc/.xbmc/addons/plugin.video.youtube.beta/icon.png">ActivateWindow(10024,plugin://plugin.video.youtube.beta/)</favourite>

  3. what we are insterted in is the part between <favorite name =XXXXX> and </favorite> which happens to be ActivateWindow(10024,plugin://plugin.video.youtube.beta/)
    copy that part of the code you will be pasting it in a minute.

    from this link here in the wiki it says to use ActivateWindow like so ActivateWindow(Settings)

    in my .xbmc/userdata/keymaps/remote.xml file for my blue , red, green, yellow buttons my activate window looks like this

    XBMC.ActivateWindow(VideoLibrary,MovieTitles)

    and that works just fine, I am not sure if the XBMC. is required or not, its not in the wiki as such, but in my remote.xml file its there and working so I used it.

    ok back on topic.

    open your remote.xml file.

  4. Code:
    sudo nano ~/.xbmc/userdata/keymaps/remote.xml

    find the button you want to use (blue,red,green,yellow) etc and paste in the contents you copied from. save the file and exit
    should look like
    <blue>XBMC.ActivateWindow(10024,plugin://plugin.video.youtube.beta/)</blue>

    restart xbmc

  5. Code:
    killall xinit
you should have a working button mapped to your addon


for any remote button help please see the following links.
Global Keyboard

Activate Window settings

List of Built In Functions

step by step to LIRC and configure your remote

Hide / show Watched for Movies and Tv Shows


-=Jason=-
Reply
#2
It works. Well played that man :-)

It's a little tacky needing to add the add-on to your favourites to find out what the ActivateWindow argument needs to be, but it works.

JR
Reply
#3
I wish there was a better way, but I couldn't find one and spend a couple days looking asking around and not getting an answer to my question.

for now this works and gets the job done.

I just hope more people see this thread and it doesn't get lost several pages back its useful info for those who want better control with a remote.
maybe a mod can move this thread to the: tips, tricks, how to's section


-=Jason=-
Reply
#4
just figured i'd throw this out there.

say I want to update my Tv shows only and not movies? reason being Sickbeard auto scrapes and renamed and movies my Tv shows where I have to use ember to scrape my Movies.

I don't want unscraped movies getting added to my library.

Quote:using wiki link here:http://wiki.xbmc.org/?title=List_of_Built_In_Functions
UpdateLibrary(database,[path])
[INDENT]Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
[/INDENT]

would I do it like so. UpdateLibrary(video,\\Tower\Tv.Shows)

if working the same could be applied to Movies as well
-=Jason=-
Reply
#5
Flomaster Wrote:would I do it like so. UpdateLibrary(video,\\Tower\Tv.Shows)

if working the same could be applied to Movies as well
-=Jason=-

Don't know, but try it and see. If you turn on debug logging the xbmc.log will tell you exactly what happened.

JR
Reply
#6
im at work now so it will have to wait until I get home.

I have debugging on all the time in my default using advancedsettings.xml IMHO that should be the default logging I don't like having that OSD on my screen I've yet to have a situation where it helped with a debugging.

-=Jason=-
Reply
#7
this is no longer working Sad

I end up with this

cat ~/.xbmc/userdata/favourites.xml
Code:
<favourites>
    <favourite name="YouTube" thumb="/home/xbmc/.xbmc/addons/plugin.video.youtube/icon.png">ActivateWindow(10025,&quot;plugin://plugin.video.youtube/&quot;)</favourite>
    <favourite name="GrooveShark" thumb="/home/xbmc/.xbmc/addons/script.audio.grooveshark/icon.png">RunScript(&quot;script.audio.grooveshark&quot;)</favourite>
</favourites>

I think the &Quot is messing things up

-=jason=-
Reply
#8
you could ask to move this to the how to section... bookmarked for posterity, when Im more awake.
Reply
#9
X3lectric Wrote:you could ask to move this to the how to section... bookmarked for posterity, when Im more awake.

well it was working great, but I have since moved to another state, up graded my version of XBMC, etc etc. and notices that my Youtube and GRooveshark remoted mapped buttons weren't working.

I had them mapped to blue, red, green, and yellow

-=Jason=-
Reply
#10
mmm thats odd... perhaps when you upgraded caused it, since I believe by default those button will open movies music programs and someother i dont know but its something of that sort.

Still, I think this deserves to be on the how-to section.

One thing is sure moving state, didnt cause this. Wink
Reply
#11
X3lectric Wrote:mmm thats odd... perhaps when you upgraded caused it, since I believe by default those button will open movies music programs and someother i dont know but its something of that sort.

Still, I think this deserves to be on the how-to section.

One thing is sure moving state, didnt cause this. Wink

oh I know, but the fact I had to unpack everything and dial it all back in. IE hooking up cabling, networking , etc etc kinda set it and forget it, but once you move you kinda need to get back into things again.

for example is the code from when I started this thread is 2010

Code:
<favourite name="You Tube Beta" thumb="/home/xbmc/.xbmc/addons/plugin.video.youtube.beta/icon.png">ActivateWindow(10024,plugin://plugin.video.youtube.beta/)</favourite>

here is the code from today after I have upgraded my xbmc
Code:
<favourites>
    <favourite name="YouTube" thumb="/home/xbmc/.xbmc/addons/plugin.video.youtube/icon.png">ActivateWindow(10025,&quot;plugin://plugin.video.youtube/&quot;)</favourite>
    <favourite name="GrooveShark" thumb="/home/xbmc/.xbmc/addons/script.audio.grooveshark/icon.png">RunScript(&quot;script.audio.grooveshark&quot;)</favourite>
</favourites>

before I didn't have "&quot" inside when I did a

Code:
cat ~/.xbmc/userdata/favourites.xml

-=Jason=-
Reply
#12
a lot changed, addons wise specially from dharma to bleeding edge (dependeds what your running)... Suggest my friend is a quick trip to irc channel when thers peeps there for a chat...

Im of now man nealry 60 hours no sleep... I see blue and red spots now. groovy.
Reply
#13
Flomaster Wrote:this is no longer working Sad

I end up with this

cat ~/.xbmc/userdata/favourites.xml
Code:
<favourites>
    <favourite name="YouTube" thumb="/home/xbmc/.xbmc/addons/plugin.video.youtube/icon.png">ActivateWindow(10025,&quot;plugin://plugin.video.youtube/&quot;)</favourite>
    <favourite name="GrooveShark" thumb="/home/xbmc/.xbmc/addons/script.audio.grooveshark/icon.png">RunScript(&quot;script.audio.grooveshark&quot;)</favourite>
</favourites>

I think the &Quot is messing things up

-=jason=-

What is no longer working? The remote button action?

&quot: is just the standard encoding for the " character. Just replace &quot; by " or it could probably be omitted altogether.

JR
Reply
#14
Folks - Does favorites support setting a favorite into the addon's navigation tree? For example Icefilms requires me to navigate icefilms > movies > popular to get to the list of movies I want to see in popular. Is there a way to setup a favorite to popular in icefilms menu directly? that would be very useful..
Reply
#15
well I got this working again on my Eden Beta3 install.

I use Xbmcfeak xbmcbuntu beta 3 and my monster cable ALV300 remote is set up as MCE REMOTE so it just works out of the box basically. but to customize the buttons to my liking I need to add my own remote.xml file and Lircmap.xml file


so copy these files...

from /usr/share/xbmc/system/Lircmap.xml to /.xbmc/userdata/Lircmap.xml
from /usr/share/xbmc/system/keymaps/remote.xml to /.xbmc/userdata/keymaps/remote.xml

in the Lircmap.xml file find the button you want to map and make any changes, <obc123> if the command isnt already there.

in the remote.xml file you will link the two together.

example my remote sends this command KEY_TV on my "TV" button

Code:
that button in Lircmap.xml looks like this <mytv>KEY_TV</mytv>
in remote.xml it looks like this <mytv>XBMC.ActivateWindow(Videos,TvShowTitles)</mytv>

here is my youtube one.
Code:
Lircmap.xml = <obc111>KEY_RADIO</obc111>
remote.xml = <universalremote>
                 <obc111>ActivateWindow(10025,&quot;plugin://plugin.video.youtube/&quot;,return)</obc111>
               </universalremote>


because I want it to take me to Tv shows Titles when its pressed.

I have this working on youtube, video addons, and several others. just by making them favorites and coping the location.


so happy to have a remote I can use that doesn't require clicking through from the home page for every action.

some more wiki info that aided in getting this working
keymap.xml wiki
Window Id's
Opening Windows and Diaglogs

so if your remote works, and irw shows the buttons are sending a signal you can certainly tailor the remote to your liking.



-=Jason=-
Reply

Logout Mark Read Team Forum Stats Members Help
[HOW TO][Linux][Live] Map Addons to your remote0