INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Flirc open source IR receiver - use your existing remote to control MediaCenter  (Read 6812 times)

JohnWalker

  • Recent member
  • *
  • Posts: 22

Bob asked me to provide details of using a Flirc USB infra-red receiver to control MediaCenter under Linux. This little gadget allows you to use an existing remote to pause playback remotely when using MediaCenter on a Linux box - and you can set-up other functions too, if you want. I've also been able to test Flirc on Windows. The makers say it works with Macintoshes too, but Apple probably preferred that you used something they made themselves from a solid billet of fake unobtainiumTM and charged too much for. (Sorry, Mac fans, I can't help myself.)

Go to www.flirc.tv and buy one of the USB infra-red receivers - they are $18.95 in the US. As usual, the UK price is higher, but Maplin's offer them at £24.95. The dongle comes with a 'Flirc' application - in Ubuntu, you install this with the usual 'sudo apt-get install flirc' command,  or from the Ubuntu software centre. You'll obviously need to consider line-of-sight between your listening position and the USB port - a USB hub on your desktop would be one way. The application detects and tells you if the dongle is present or not.

The most important button is 'Play', which you will probably want to set-up to send a Ctrl-P key press. In the Flirc application, select 'full keyboard' from the 'Controllers' menu item. A pretty graphic of a full keyboard appears - you select the key that you want, then press the corresponding button on the remote that you want to use. Play/Pause is Ctrl-P, you can also change volume (Ctrl-+ or Ctrl--; Ctrl-M for Mute) or jump tracks using Ctrl-L for Previous and Ctrl-N for Next.

Remote commands are received by whichever application is in focus. I was puzzled for a time when Firefox was in focus to see the font size increasing instead of the volume changing in MediaCenter!
Logged

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249

Good writeup.  Amazon has them in stock.
Logged
Fedora 40 x86_64 Xfce

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587

From a quick fish, FLIRC appears to be not much more than a USB IR dongle and a fancy configuration application. Mapping buttons as you like isn't a hard job if you know how to ferret around on the command line a little (Any standard reciever will take commands from any remote, they just ignore those they don't understand)

If I recall, Media Center will accept most commands on Linux same as Windows, so you may be better off following this if you already have an IR remote & reciever:
http://marklodato.github.io/2013/10/24/how-to-use-lirc.html

Change the LICRC configuration file to the Media Center command line, so it looks like this (For example):
Code: [Select]
begin
    button = KEY_STOP
    prog = irexec
    config = /usr/bin/mediacenter20 /Stop
    repeat = 1
end

http://wiki.JRiver.com/index.php/The_Command_Line

This also means that your commands are application independent.
I don't know whether it'll work with the FLIRC dongle as I don't have one here, but if you've got a USB reciever with appropriate Linux drivers you should be fine.

-Leezer-
Logged

aoqw76

  • Galactic Citizen
  • ****
  • Posts: 257

£20 + £2 postage from http://thepihut.com/ (dedicated to raspberry pi)
Logged
xubuntu lts 14.04 32 bit, running mc22.0.36 as anything later doesn't work properly over vnc. using linux mc22 as media server to windows mc22 last version / jremote on ipad.
I am the owner / sole admin for www.cyrusunofficial.co.uk ("fan" site for Cyrus Audio hifi)

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249

It looks like none of the /command options have been implemented yet.  I.E.  /usr/bin/mediacenter20 /Play just tries to open another mediacenter instance.
Logged
Fedora 40 x86_64 Xfce

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249

It also looks like you can't send keystrokes to MC using xdotool either.
Logged
Fedora 40 x86_64 Xfce

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587

It looks like none of the /command options have been implemented yet.  I.E.  /usr/bin/mediacenter20 /Play just tries to open another mediacenter instance.

Pity :(
Going by the tail end of this thread it seemed that MC would accept most of the Windows commands:
http://yabb.jriver.com/interact/index.php?topic=87953.0

I'll try and do some testing, including the library switch one that Bob posted there and see what I come up with.
I'm a tad surprised that XDO tool isn't finding it, but MC is doing some funky rendering stuff that may be throwing it off. Are you sure you've pointed it at the right window?

-Leezer-
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978

I would prefer to use the IR remote that already works with my HTPC, standard RC-6 MCE remote. It works with Windows/MC out of the box. It can work under Linux with some hassle, I had it working with XBMC for instance.

When Theater View comes to Linux it's on my ToDo list to figure out how this works once again.
Logged
Pages: [1]   Go Up