Bug 9170 - xPL IR Code Broadcast Broken
: xPL IR Code Broadcast Broken
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: xPL
: 7.1
: PC All
: -- normal (vote)
: 7.x
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-15 05:00 UTC by Andy McCallum
Modified: 2009-07-31 10:27 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy McCallum 2008-08-15 05:00:30 UTC
When IR keypress broadcasts are enabled in the xPL Plugin, the following error appears in server.log when a keypress is received:

"Slim::Plugin::xPL::Plugin::xplExecuteCallback (575) Warning: Called without a client:"

The appropriate xPL message is NOT sent on the network.

Other xPL messages are sent and received correctly ie. status messages are broadcast and xPL commands are correctly responded to by SqueezeCenter.

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. 

This was working prior to the transition to v7.x.
Comment 1 Blackketter Dean 2008-08-17 09:41:36 UTC
Andy McCallum: do you have a patch for this?  I don't think we have a way to test the xPL plugin here.
Comment 2 Andy McCallum 2008-08-17 17:55:23 UTC
Dean, 
 
  Unfortunately I haven't been able to work out why SqueezeCenter doesn't pass the correct data to the Plugin. The symptom of not sending the xPL message is caused by the plugin not receiving the required data from SqueezeCenter. The Plugin must be informed of the device receiving the IR data. So I am currently thinking that the bug is in SqueezeCenter not forwarding the data - it does so for other events, and the plugin correctly processes the events.

  A simple test is to enable the xPL PLugin and set it to broadcast IR key presses in the xPL PLugin configuration page. Then use the IR remote on a connected SqueezeBox. The server.log file will show the error.

  Since the xPL protocol side of the plugin is working, I presume fixing the error as logged will solve the problem.
Comment 3 Chris Owens 2008-08-18 09:37:43 UTC
QA to verify this method of reproductions works okay, then pass it to the devs.
Comment 4 Andy McCallum 2008-08-25 01:12:52 UTC
Version 7.1 of SqueezeCenter fixes one of the causes of this bug. This was the problem causing the log message in the original report.

Below is a patch to fully resolve the problem. Just a simple missing line in the xPL Plugin itself.

Could someone please apply this patch to:

server/Slim/Plugin/xPL/Plugin.pm

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;
Comment 5 Andy Grundman 2008-08-25 05:51:31 UTC
Thanks, applied in 7.2 change 22876.

There is still a bug in that you need to restart SC if you change the IR pref.  Also, the logWarning call when there is no $client should be changed to not clutter up the log file.  Actually, the subscription should probably be changed to only subscribe to the things it cares about, currently it gets called for *everything*.
Comment 6 Andy McCallum 2008-08-26 03:06:18 UTC
(In reply to comment #5)
> There is still a bug in that you need to restart SC if you change the IR pref. 

  Agreed. Could you raise a separate bug and I (or someone else, of course) will follow it up?

> Also, the logWarning call when there is no $client should be changed to not
> clutter up the log file.  Actually, the subscription should probably be changed
> to only subscribe to the things it cares about, currently it gets called for
> *everything*.
> 
  Agreed. I did look at this briefly but it does require a little extra thought to ensure we optimally map to the xPL Schema.

  Could you raise a separate bug and I will try to follow it up?


Comment 7 Spies Steven 2008-10-17 14:53:07 UTC
Verified the fix with SqueezeCenter Version: 7.2.1 - 23502

Andy McCallum, feel free to open another bug about having to restart SqueezeCenter for changes to the plugin to take effect.
Comment 8 James Richardson 2008-12-15 12:34:56 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 9 Chris Owens 2009-07-31 10:27:21 UTC
Reduce number of active targets for SC