View Full Version : Remote mapping for LastFM

2006-11-02, 10:00
I'm using a OneForAll remote which I program with JP1. This remote has thumbs up and down buttons which would be ideal for LastFM love/ban functions.

I've seen the thread at http://forums.slimdevices.com/showthread.php?p=86590
which explains how to modify the .map and .ir files, but I want to assign the functions to particular buttons rather than a long key press on the arrow buttons.

My problem is that the .ir file lists 8 digit hex codes for each function, eg:

0 = 76899867
1 = 7689f00f
2 = 768908f7

But the JP1 software lists 2 digit hex codes like:

0 67
1 0F
2 F7

JP1 does not specify what the rest of the hex code is (eg768998). I'm able to assign any 2 part hex code to any button, but I have no way to assign the other 6 hex digits.

Any thoughts on how I should define the rest of the hex function code ?

2006-11-02, 11:59
if you set it to anything that slim is not using and go to telnet and turn listen on it will tell you the full code you need as an unknownir

if you then edit the config for this hex code you should be ok

slimserver does not decode all ir streams so you may need to try a few

hope that helps - if you need more info give me a shout

2006-11-02, 13:46
Got it working - it seems that the hex codes in the .ir file all start with 7689. The last 4 hex digits always add up to FF, eg:

76899867 - 98+67=FF
7689f00f - f0+0f=FF
768908f7 - 08+f7=FF

So, with that in mind I set up 3 new entries in the .ir file:

skip = 7689c43b
thumbs_up = 768924db
thumbs_down = 7689a45b

with 3b, db, 5b corresponding to the codes programmed into my universal remote.

And in the custom.map file I added the entry:

# LastFM skp/love/ban
skip = modefunction_PLUGIN.LastFM::Plugin->lastfm_skip
thumbs_up = modefunction_PLUGIN.LastFM::Plugin->lastfm_love
thumbs_down = modefunction_PLUGIN.LastFM::Plugin->lastfm_ban

And it works - I can now use those TiVo buttons for LastFM.