foo_ir2

foo_ir2 is a simple plugin to handle infrared/serial port remote controlling of foobar2000.

It was made for receivers which send received IR sequences to the serial port in given length chunks. For example, my receiver uses 4 byte chunks.

I love to listen to music in my bed, but I can’t get to sleep while the music is on, so I have to turn it off when needed. :) That’s the reason I need a remote controller to work with my music player.

I tried WinLIRC with the foobar plugin, but I couldn’t get my IR receiver to work with it. Anyway, WinLIRC is a real nightmare to use.

Check out my other foobar2000 plugin, foo_timedisplay!

Download

Current version: v0.1.2
Don’t forget to read installation notes below!

download (mirror2) (26.1 kb, 1731 dls, today: 0)

download src (VC++ 2008) (mirror2) (45.8 kb, 392 dls, today: 0)

Version history:

  • 0.1.2 – command delay now doesn’t affect volume change
  • 0.1.1 – command delay now doesn’t affect seeking
  • 0.1.0 – initial release

Installation and setup

Extract foo_ir2.dll into foobar2000’s components subdirectory, then restart foobar.

If foobar says that the plugin dll can’t be loaded, initialization error blablabla, then you have to install Microsoft Visual C++ 2008 Redistributable Package (x64 version is here).

First, you have to set your IR receiver’s communication settings. You can find the settings panel in the preferences dialog’s (CTRL+P) Tools submenu. If you’re in doubt, leave everything on the default setting (you can click on the Reset Page button to restore everything to it’s default setting).

Code length determines the length of the byte sequence received from the serial port which is associated with an actual command.
Tip: If you set (for example) Play and Pause commands to two different remote controller buttons, but the plugin always does the same action regardless of which button is pressed, you can try to set a bigger code length (or you have to use another remote controller – I’m using our old VCR’s controller, this gives me the best distance, and all of the buttons work)

Startup delay determines the delay in milliseconds to wait after the COM port has been opened (and DTR/RTS lines have been set). This is necessary if your receiver needs an init string – that would be sent out immediately after the port has been opened, and your IR receiver may not have finished powering up and initializing.

Init string is the character sequence that will be sent out after opening the COM port. My receiver needs the characters “IR” to be sent out to start to working.

Command delay is the time in milliseconds to ignore further commands after a command has been received. If this is too low, you may accidentally trigger a command repeatedly.

DTR/RTS lines are sometimes used for powering IR receivers. For example, my receiver gets it’s power from the DTR line, so it has to be pulled up after opening the COM port.

After you’ve finished with the settings, click on the button Enabled. This will open the COM port and the plugin starts receiving.

Teaching the commands

Click on one of the “Learn commands” buttons, then press a button on your remote controller. If the plugin received the command successfully, the command button goes unpressed automatically.

Don’t forget to click on Save all button to save the settings and learned commands!

You can get detailed info about the plugin’s actions in foobar’s console (View menu -> Console). Check this also when you have problems using the plugin.