View Full Version : xPL IR Code Broken? (Raw and Keys)

2008-08-06, 04:33

The new version of SqueezeCenter (v7.x) is not sending IR (keys or raw) via the xPL plugin.

I have installed SqueezeCenter 7.1 after running the old 6.x series. I have enabled the xPL plugin and also set the IR codes to both. This was working before I moved from 6.x.

Currently (on 7.1), I am seeing xPL broadcasts showing track info and heartbeats. I am also able to send xPL commands that are obeyed by SqueezeCentre. So the xPL Hub setup is working ok. The problem is just the sending of IR key presses. The problem can be traced to the error shown below when SqueezeCentre attempts to broadcast the IR key presses.

The server.log is showing the error:
"Slim::Plugin::xPL::Plugin::xplExecuteCallback (575) Warning: Called without a client: "

Looking in the code, the xPL Plugin has been called without a client set by the notify() code when a IR remote key is pressed.

Does anybody know how to fix this? I have had a brief look, but being new to the codebase I am on a steep learning curve!

This is a really important feature for me. I use the raw IR reception to send commands to other Hi-Fi equipment (eg. the TV and MythTV) and don't need to have a second IR receiver cluttering the installation.

Thanks in advance,

2008-08-13, 13:03
I'll second seeing that - no IR codes sent but status messages are. I've been meaning to log a bug for it, but never found the time (so feel free!). I'm also seeing the same log messages.

Using just the STAT messages works for me for the minute (for my simple power amp on/off usage).

2008-08-23, 18:07
copying my post from the xPL forum:

looks like the perl code for processing the received IR is commented out in the xPL plugin and the handling for plugins is different. there used to be this code in IR.pm:

# Notify the xPL module that an IR code has been received
if (Slim::Utils::Prefs::get('xplsupport')) {
Slim::Control::xPL::processircode($client,$irCode, $irCodeBytes);

but it doesn't appear they use that method to check if xPL is enabled so they removed it from IR.pm

this is an important feature for me as well. my HA system uses IR received by the squeezeboxes to perform tasks like automating other devices...

2008-08-23, 18:51
edit IR.pm in server/Slim/Hardware

# lookup the bytes, if we don't know them no point in continuing
my $code = lookupCodeBytes($client, $irCodeBytes);

# this code passes the ir codes to the xpl plugin if enabled
if ( Slim::Utils::PluginManager->isEnabled('Slim::Plugin::xPL::Plugin') ) {
Slim::Plugin::xPL::Plugin::processircode($client,$ code,$irCodeBytes);

and of course, uncomment the processircode task in server/Slim/Plugin/xPL/Plugin.pm

2008-08-23, 21:20
The server.log is showing the error:
"Slim::Plugin::xPL::Plugin::xplExecuteCallback (575) Warning: Called without a client: "

i think this error is called by the prefset callback when configuring the xPL plugin. the plugin prefs are for the server not for the client, so it will have no client argument in the callback. the xPL plugin won't work unless the preference setting callback is fixed.

i hacked the xPL plugin by setting this:
my $xpl_ir="both";

it works now but for some reason the IR messages are being sent twice per keypress...

2008-08-25, 01:23
Hi all,

Thanks for all the help.

I have fixed the problem in two stages. Firstly, upgrading to Squeezecenter 7.1 will fix the problem of the calling client being passed to the xPL Plugin.

Secondly, a single line is needed to be patched to the plugin.

See my post on bug

Let me know if anybody is still having problems.


Index: Plugin.pm
================================================== =================
--- Plugin.pm (revision 22874)
+++ Plugin.pm (working copy)
@@ -57,6 +57,7 @@
$localip = inet_ntoa((gethostbyname($computername))[4]);

$xpl_interval = $prefs->get('interval');
+ $xpl_ir = $prefs->get('ir');

$xpl_port = 50000;
================================================== =================


2008-08-25, 07:00
Please file a bug with the patch and information attached.



2008-08-26, 04:00
Already done.