PDA

View Full Version : DenonSerial plugin thread



peterw
2009-08-29, 19:05
For a number of weeks now I've been using a plugin at home that I put together to control my Denon A/V receiver through SqueezeCenter. It's called DenonSerial because the focus is the lower-end "CI" Denon amps that offer RS232 serial ports for control (the more expensive Denon amps have Ethernet ports, and Aesculus/Chris has already written the "Denon AVP Control" plugin for those, http://forums.slimdevices.com/showthread.php?t=60114).

I've put up a web page about the plugin, and would love to hear from any Denon owners who'd be willing to try it out -- whether you have a relatively low-end Denon like I do, or a nicer, network-ready model. Despite its name, DenonSerial CAN control network-enabled Denon amps via their ethernet ports. The web page explains the features & requirements.

http://www.tux.org/~peterw/slim/DenonSerial.html

This plugin isn't quite ready for me to officially release it -- mostly because I've occasionally seen it get confused and stop controlling the amp. I'm working hard on that, as I rely on this plugin myself for daily use. Anyway, since it's not quite ready, you won't find it in my main Extension Downloader repository. See the web page for my test repository location.

Thanks,

Peter

Note: most recently I have been using a Raspberry Pi Model B and an inexpensive USB-serial cable (an old one with a Prolific 2303 chipset) to allow DenonSerial to use TCP to control the Denon, as it is no longer in the same room as my SBS/LMS server. This has worked very well -- more reliable than a Windows 7 Atom-based machine that I also used in this manner for a couple years. The Pi is far smaller, cheaper, and uses far less power than the Atom PC. It's also cheaper than most dedicated serial port network servers. The Pi runs Rasbian Wheezy, using the ser2net package. Here's what my /etc/ser2net.conf looks like -- change "5000" to whatever port you like:


5000:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT

peterw
2009-10-31, 22:15
Old news, new news.

New news: I finally got around to hooking up an XP box to act as a TCP serial port server to make sure the serial port code worked OK. With verison 0.1.27, it didn't, but DenonSerial version 0.1.28 fixes that bug. It should work fine with Denon units that have Ethernet ports and RS232-equipped units with devices like the Sena LS110 (http://pcmicro.com/sena/) providing a TCP/telnet/network interface.

Old news: the "confused and stops controlling" bug has been fixed for a while.

-Peter

TechHome
2010-05-20, 10:56
Hi Peter,

Your Denon serial plugin is very interesting. Much thanks for sharing!

You mention the Sena LS110 to provide RS-232 control when the SB server machine is not located near the controlled Denon receiver. Any chance the Global Cache products, such as the GC-100 would also work?

Doug

peterw
2010-05-20, 11:31
You mention the Sena LS110 to provide RS-232 control when the SB server machine is not located near the controlled Denon receiver. Any chance the Global Cache products, such as the GC-100 would also work?

I hadn't heard of them before, but I think so. Looks like you'd just need to set up the GC-100 to use 9600 bps 8N1 for the serial port and tell DenonSerial to use a host like 10.1.2.3:4999 (port 4999 being the TCP/IP port for the first GC-100 serial port). Please let me know how it goes if you try this. If you ave trouble, please set the Squeezebox Server plugin.DenonSerial logging level to DEBUG and show me what it says when you try changing the Squeezebox volume.

-Peter

TechHome
2010-05-20, 13:34
Please let me know how it goes if you try this. If you ave trouble, please set the Squeezebox Server plugin.DenonSerial logging level to DEBUG and show me what it says when you try changing the Squeezebox volume.

-PeterThanks! At this point, I'm still putting the shopping list together for a multi-zone system. For amplification, the finalists are DRA-697CI, A-9555 and HK-3490. I like the RS-232 in the Denon, the cool running Class-D amplification in the Onkyo and the onboard DACs in the Harman Kardon...

I already have a Niles SVL-6 which goes between the amplified output and the speakers. It allows up to 6-pairs of 8 ohm speakers to be powered by a single amp and presents a 4 ohm load at the amp. An On-Off pushbutton and volume attenuator are provided for each zone. The volume control of the receiver or integrated amp will serve as the master volume control. If I go with the HK or Onkyo, I'll stick with a SB classic and IR Blaster. If I go with the Denon, I plan to use your plugin which will allow me to upgrade to a SB Touch while retaining IR Blaster like control of the receiver.

I'd love to use a SB Touch as the primary source, but receiver control ala IR Blaster is a must. Unfortunately IR Blaster does not currently work w/ the Touch. My hope is that your Denon Serial plugin will at least allow equivalent functionality to IR blaster with the SB Touch to control receiver volume, speaker selection, source selection and on-off.

I uses the excellent IR Blaster plugin for an SB2 and SB classic in different rooms with great success. But, I do more that just turn the receiver on and off. In one room when the SB is powered the receiver is blasted with a standby code - pause - toggle power code - pause - toggle B speakers code - pause - CD input code. When the SB is powered off, the receiver gets toggle B-speakers code - pause - DVD input code - pause - standby code.

In the case of the Onkyo receiver in use, it has a code that puts the receiver in standby if on and leaves it in standby, if not. The other power IR code is a toggle on-off. On SB power-on, by blasting the standby code 1st, I'm able to put the receiver in a known power state (standby), then turn it on. Toggling the B-speakers provides A+B speakers for SB listening. Selecting CD ensures that the SB's output will be the active receiver input.

On SB power-off, the B-speakers are toggled off and input set to DVD to help ensure proper settings for 5.1 TV use with the SageTV extender

Does your Denon Serial plugin similarly allow multiple control events to be associated with power-on and power-off?

In regards to the Global Cache units, my interest is that they are supported by a number of universal remote control apps for the iPhone that could be used to build a seperate, but comprehensive iPhone remote for the DRA-697CI, or for any IR or RS-232 controllable device. In this case, in addition to on-off, volume up-down, I'd like to be able to switch sources, adjust tone controls, select FM presets and control an iPod docked in the companion Denon dock.

Doug

peterw
2010-05-20, 21:17
Does your Denon Serial plugin similarly allow multiple control events to be associated with power-on and power-off?

Currently, no. How user-friendly would you need this to be? Wouold it be acceptable to have text-fields in the web settings for "extra RS232 commands" when the SB is turned on or off where you'd enter things like Z2MUON; SIDVD; MUOFF to mute zone 2, switch the input to DVD, and un-mute the main zone? (These commands are from the Denon RS232 documentation.)

For over a year now I've meant to develop a Touch applet that would let you use a $10 USB-to-serial adapter so Touch itself could relay these commands to the Denon serial port (instead of something like the GC-100 or Sena boxes), but I haven't gotten around to it.

TechHome
2010-05-20, 21:57
Currently, no. How user-friendly would you need this to be? Wouold it be acceptable to have text-fields in the web settings for "extra RS232 commands" when the SB is turned on or off where you'd enter things like Z2MUON; SIDVD; MUOFF to mute zone 2, switch the input to DVD, and un-mute the main zone? (These commands are from the Denon RS232 documentation.)Seems friendly enough to me.


For over a year now I've meant to develop a Touch applet that would let you use a $10 USB-to-serial adapter so Touch itself could relay these commands to the Denon serial port (instead of something like the GC-100 or Sena boxes), but I haven't gotten around to it.This sounds great! I'm amazed at how little interest there seems to be in apps like this and IR Blaster. IMO, the SB receiver would be an ideal unit to hide away in a closet with an integrated amp or receiver but is a non-starter since it has no equivalent functionality to IR blaster. With the requirement to purchase a Global Cache or Sena unit AND a SB Touch, I start to question whether the cost is worth it. Replacing the GC-100 or Sena with the SB Touch plus USB to serial adapter is a big step in the right direction.

peterw
2010-05-21, 18:17
Seems friendly enough to me.

OK, I'll take a look at that.


This sounds great! I'm amazed at how little interest there seems to be in apps like this and IR Blaster. IMO, the SB receiver would be an ideal unit to hide away in a closet with an integrated amp or receiver but is a non-starter since it has no equivalent functionality to IR blaster. With the requirement to purchase a Global Cache or Sena unit AND a SB Touch, I start to question whether the cost is worth it. Replacing the GC-100 or Sena with the SB Touch plus USB to serial adapter is a big step in the right direction.

I think there is a fair amount of interest in these sort of extensions -- Logitech staff have even admitted publicly that omitting IR Blasting capability from Receiver was a mistake. (But I don't know how to reconcile that with Touch repeating the mistake; maybe they're really embarcing Apple's "80%" design mantra.)

I've been looking again at Lua coroutine information, and it really looks like it shouldn't be too hard to make it work, at least for DenonSerial -- I just have to overcome the inertia of having not yet written an applet.

I think it would also be very cool to offer something for Touch that would turn Touch into a replacement for a Sena LS-100 -- that is, something that would act as a TCP-to-serial bridge and not care what sort of RS232 device was connected; unfortunately it looks like that would need to be a standalone application and not merely a Squeezebox applet, due to the design of the Lua network socket APIs. Since Logitech doesn't include the standard Lua interpreter on Touch, it would need to nbe compiled code, and I've never much liked setting up cross-compiling environments (and have enjoyed taking a break from C and C++ code).

Finally, it would be cool to have a 100% applet version of DenonSerial so Touch would retain control over the amp even if using its internal server or MySqueezebox.com. But I haven't been terribly motivated because I don't need those sorts of things myself.

TechHome
2010-05-21, 19:22
Peter,
Please don't do any of this for me. I don't own a SB Touch or an RS-232 equipped Denon. In fact, I'm leaning towards the cheap and easy and will likely purchase an Onkyo TX-8555 ($179 HH Gregg grand opening sale) to use with a SB v3 & IR Blaster and the Niles speaker selector for a budget single source six zone system.

Doug

peterw
2010-05-21, 20:30
Please don't do any of this for me. I don't own a SB Touch or an RS-232 equipped Denon. In fact, I'm leaning towards the cheap and easy and will likely purchase an Onkyo TX-8555 ($179 HH Gregg grand opening sale) to use with a SB v3 & IR Blaster and the Niles speaker selector for a budget single source six zone system.

No sweat. Adding the extra commands was easy; that's now in 0.1.36. Hard to argue with the price of that Onkyo, but, man, I'm so happy with RS232, with being able to precisely set volume levels, with having more assurance that my commands will work the first time. My old mini stereo that uses IR Blaster feels so primitive now. Plus the Audyssey room correction is pretty nice. :-)

SlimChances
2012-01-11, 13:11
Is this plugin or the Denon AVR plugin still supported? I was able to install Denon Serial and configure it but it will only turn my Denon AVR 1912 off; I can not adjust volume or turn the unit on.

edit: Set Squeezebox player volume to 100% in player settings and now able to control Denon reciever volume but still not able to turn unit on with SB remote. I think it may be related to a power saving feature in the receiver.

JamesMcBride
2013-06-19, 06:03
Hi Peter, I was wondering if you are still able to offer advice on this?

I am struggling to get the volume control to work using the DenonSerial plugin with either SoftSqueeze or SqueezeLite. I'd ideally like to use it with SoftSqueeze, as that is what comes installed with Vortexbox.

The first issue I had was that the DenonSerial plugin didn't seem to be enabled on my players because (I assume) they were not advertising the fact that they had a digital output. I managed to work around this by removing "(!$client->hasDigitalOut()) ||" from the settings.pm file.

Now I am able to switch the amps in the various zones on and off using the plugin and it works a dream - the power on and power off comands are very handy to select the source etc.

The problem I'm having is that the plugin doesn't seem to be issuing any volume control commands, presumably because it isn't receiving notifications from the players of the change in volume.

Any pointers or advice would be greatly appreciated as this would finish my installation off perfectly!

James

peterw
2013-06-23, 08:45
Sorry for the delayed reply. 1) are the player settings for audio / volume control set as "fixed at 100%"? 2) under server settings / Logging, set plugin.DenonSerial at DEBUG and then change the volume and see what is logged. Ideally you'd see something like


[13-06-23 11:43:08.3873] Plugins::DenonSerial::Plugin::volumeSBToDenon (317) sbvol 90 -> denon 71.5 -> SB 90
[13-06-23 11:43:08.3876] Plugins::DenonSerial::Plugin::setAmpVolume (357) for Den should set amp volume to 71.5 of 80 (SB volume 90)
[13-06-23 11:43:08.3879] Plugins::DenonSerial::Plugin::enqueue (391) opening control socket to 1.2.3.4:23
[13-06-23 11:43:08.3885] Plugins::DenonSerial::Plugin::enqueue (435) run MV for 00:04:20:11:22:33 at next convenience

JamesMcBride
2013-06-25, 06:46
Hi,
Thank you very much for getting back to me on this.

It seems it was my fault that the volume wasn't working - the bit that I'd removed from the Plugin.pm file which checked for a digital output had just stopped the volume working all together.

In the end I gave up with SoftSqueeze, installed squeezelite which seems to allow you to fix the volume at 100% and re-installed your plugin. It now works, except what I presume is a slight incompatibility with my amp. Looking at the instructions http://www.awe-europe.com/documents/Control%20Docs/Denon/Archive/avr3310_rs232.pdf zones 2 and 3 don't support the .5 increments in volume, so the likes of



[13-06-25 12:56:52.1206] Plugins::DenonSerial::Plugin::volumeSBToDenon (315) sbvol 40 -> denon 38.5 -> SB 40
[13-06-25 12:56:52.1209] Plugins::DenonSerial::Plugin::setAmpVolume (355) for Kitchen should set amp volume to 38.5 of 98 (SB volume 40)
[13-06-25 12:56:52.1212] Plugins::DenonSerial::Plugin::enqueue (381) opening control socket to 192.168.185.68:23
[13-06-25 12:56:52.1217] Plugins::DenonSerial::Plugin::enqueue (425) run MV for 00:04:20:e1:18:3f at next convenience
[13-06-25 12:56:52.1219] Plugins::DenonSerial::Plugin::enqueue (429) indicate that processCommandFromQueue() should run
[13-06-25 12:56:52.7217] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 00:04:20:e1:18:3f , send command Z2385, queue length 1
[13-06-25 12:56:52.7220] Plugins::DenonSerial::Plugin::sendCommand (863) send command: (connection IP, address 192.168.185.68, command Z2385)
[13-06-25 12:56:52.7223] Plugins::DenonSerial::Plugin::sendCommand (911) for 00:04:20:e1:18:3f, indicate we're working on a command, queue length now 1
[13-06-25 12:56:52.7224] Plugins::DenonSerial::Plugin::processCommandFromQu eue (492) not done with queue
[13-06-25 12:56:52.8722] Plugins::DenonSerial::Plugin::processCommandFromQu eue (454) look for response for 00:04:20:e1:18:3f command Z2385
[13-06-25 12:56:52.8723] Plugins::DenonSerial::Plugin::getResponse (525) for 00:04:20:e1:18:3f, indicate we're done with the current command since we're reading responses, queue length now 1
[13-06-25 12:56:55.1428] Plugins::DenonSerial::Plugin::closeTCPSocket (673) closing TCP connection for IP:192.168.185.68


are ignored (noted, I guess, by the lack of response).

But:




[13-06-25 12:56:44.5067] Plugins::DenonSerial::Plugin::volumeSBToDenon (315) sbvol 74 -> denon 72 -> SB 74
[13-06-25 12:56:44.5069] Plugins::DenonSerial::Plugin::setAmpVolume (355) for Kitchen should set amp volume to 72 of 98 (SB volume 74)
[13-06-25 12:56:44.5072] Plugins::DenonSerial::Plugin::enqueue (381) opening control socket to 192.168.185.68:23
[13-06-25 12:56:44.5077] Plugins::DenonSerial::Plugin::enqueue (425) run MV for 00:04:20:e1:18:3f at next convenience
[13-06-25 12:56:44.5079] Plugins::DenonSerial::Plugin::enqueue (429) indicate that processCommandFromQueue() should run
[13-06-25 12:56:45.1078] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 00:04:20:e1:18:3f , send command Z272, queue length 1
[13-06-25 12:56:45.1080] Plugins::DenonSerial::Plugin::sendCommand (863) send command: (connection IP, address 192.168.185.68, command Z272)
[13-06-25 12:56:45.1083] Plugins::DenonSerial::Plugin::sendCommand (911) for 00:04:20:e1:18:3f, indicate we're working on a command, queue length now 1
[13-06-25 12:56:45.1085] Plugins::DenonSerial::Plugin::processCommandFromQu eue (492) not done with queue
[13-06-25 12:56:45.2582] Plugins::DenonSerial::Plugin::processCommandFromQu eue (454) look for response for 00:04:20:e1:18:3f command Z272
[13-06-25 12:56:45.2584] Plugins::DenonSerial::Plugin::getResponse (525) for 00:04:20:e1:18:3f, indicate we're done with the current command since we're reading responses, queue length now 1
[13-06-25 12:56:45.2586] Plugins::DenonSerial::Plugin::getResponse (558) for 00:04:20:e1:18:3f, command "Z272", got response "Z272" from remote host
[13-06-25 12:56:45.5290] Plugins::DenonSerial::Plugin::processResponses (778) for 00:04:20:e1:18:3f, command "Z272", process response "Z272"
[13-06-25 12:56:47.5296] Plugins::DenonSerial::Plugin::closeTCPSocket (673) closing TCP connection for IP:192.168.185.68




works!

I'm guessing now that I need to make a change to the "volumeSBToDenon" function to change the volume to the nearest whole number? any pointers on this would be greatly appreciated!

JamesMcBride
2013-07-03, 01:54
I've managed to work around this for now - modifying this bit in Plugins.pm



sub volumeSBToDenon($$) {
my ($sbVol,$ampMax) = @_;
# amp volume should be in increments of 0.5 between 0 and 98;
my $ampTo = int(2 * (($sbVol / 100 * ($ampMax + 81)) - 1)) / 2;
if ( $ampTo > 98 ) { $ampTo = 98; } # max 98
if ( $ampTo < 0 ) { $ampTo = 99; } # minimum = 99 (weird, I know)
my $sbEquiv = &volumeDenonToSB($ampTo,$ampMax);
$log->debug("sbvol $sbVol -> denon $ampTo -> SB $sbEquiv");
return $ampTo;



to:



sub volumeSBToDenon($$) {
my ($sbVol,$ampMax) = @_;
# amp volume should be in increments of 0.5 between 0 and 98;
my $ampTo = int(($sbVol / 100 * ($ampMax + 81)) - 1);
if ( $ampTo > 98 ) { $ampTo = 98; } # max 98
if ( $ampTo < 0 ) { $ampTo = 99; } # minimum = 99 (weird, I know)
my $sbEquiv = &volumeDenonToSB($ampTo,$ampMax);
$log->debug("sbvol $sbVol -> denon $ampTo -> SB $sbEquiv");
return $ampTo;


Not the best solution because my main zone now doesn't increment in 0.5's, but at least the other zones are controllable :)

peterw
2013-07-28, 09:47
Hi,
zones 2 and 3 don't support the .5 increments in volume, so the likes of



[13-06-25 12:56:52.7217] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 00:04:20:e1:18:3f , send command Z2385, queue length 1


are ignored (noted, I guess, by the lack of response).

Cool, thanks for the info, and I'm sorry I missed that in Denon's documentation. I haven't tested this yet (my server is running code not even pushed to my dev repo), but I think a better change would probably be passing in the zone number and only rounding if it's not zone 1:



--- ./Plugin.pm 2013/07/24 12:50:16 1.3
+++ ./Plugin.pm 2013/07/28 16:46:09
@@ -299,7 +299,8 @@
return &$originalMISdBFunction(@args);
}
my $ampMax = $prefs->client($client)->get('ampMaxVolume');
- my $dVolume = &volumeSBToDenon($volume,$ampMax);
+ my $zone = $prefs->client($client)->get('ampZone');
+ my $dVolume = &volumeSBToDenon($volume,$ampMax,$zone);
# 99 means nothing; MIS needs to see this as a number < -99
if ( $dVolume == 99 ) { return -100; }
# else, subtract 80 (98 = +18 db, 80 = 0 dB, 70 = -10 dB)
@@ -307,10 +308,11 @@
return ($dVolume - 80);
}

-sub volumeSBToDenon($$) {
- my ($sbVol,$ampMax) = @_;
+sub volumeSBToDenon($$$) {
+ my ($sbVol,$ampMax,$zone) = @_;
# amp volume should be in increments of 0.5 between 0 and 98;
my $ampTo = int(2 * (($sbVol / 100 * ($ampMax + 81)) - 1)) / 2;
+ if ( $zone > 1 ) { $ampTo = int($ampTo); } # zones 2+ cannot handle half-decibel changes
if ( $ampTo > 98 ) { $ampTo = 98; } # max 98
if ( $ampTo < 0 ) { $ampTo = 99; } # minimum = 99 (weird, I know)
my $sbEquiv = &volumeDenonToSB($ampTo,$ampMax);
@@ -351,9 +353,10 @@
my ($client,$newvalue) = @_;
my $id = $client->id();
my $ampMax = $prefs->client($client)->get('ampMaxVolume');
+ my $zone = $prefs->client($client)->get('ampZone');
# amp volume: 0 - 99, 80 = 0 dB, 99 = min
# i.e. amp 0 = -80 dB, amp 80 = 0Db, amp 18 = +18 dB ??
- my $ampTo = &volumeSBToDenon($newvalue,$ampMax);
+ my $ampTo = &volumeSBToDenon($newvalue,$ampMax,$zone);
$log->debug("for ".$client->name()." should set amp volume to $ampTo of ".(80 + $ampMax)." (SB volume $newvalue)");
$playerInfo{$id}->{ampVolumeTarget} = $ampTo;
# actually set the amp volume

JamesMcBride
2013-07-31, 05:41
Hi,
That's what I was trying to achieve, but couldn't quite get there! a great help, thank you.

Separately, I'm having another issue, which may be my amp, but I can't be sure.

What seems to happen is the SB Server seems to use up or not disconnect all of the available sessions with the amp, causing it to not accept any more. This then stops the SB from working any more!

Restarting the SBS instantly resolves the issue. But what I can't work out is if this is an issue with the amp or the plugin.

Below is an extract from the log:




[13-07-31 13:31:40.3456] Plugins::DenonSerial::Plugin::sendCommand (863) send command: (connection IP, address 192.168.185.60, command Z2OFF)
[13-07-31 13:31:40.3459] Plugins::DenonSerial::Plugin::sendCommand (911) for 00:04:20:e1:18:3f, indicate we're working on a command, queue length now 1
[13-07-31 13:31:40.3462] Plugins::DenonSerial::Plugin::processCommandFromQu eue (492) not done with queue
[13-07-31 13:31:40.4958] Plugins::DenonSerial::Plugin::processCommandFromQu eue (454) look for response for 00:04:20:e1:18:3f command Z2OFF
[13-07-31 13:31:40.4960] Plugins::DenonSerial::Plugin::getResponse (525) for 00:04:20:e1:18:3f, indicate we're done with the current command since we're reading responses, queue length now 1
[13-07-31 13:31:40.4963] Plugins::DenonSerial::Plugin::getResponse (558) for 00:04:20:e1:18:3f, command "Z2OFF", got response "PWSTANDBY" from remote host
[13-07-31 13:31:40.4966] Plugins::DenonSerial::Plugin::getResponse (558) for 00:04:20:e1:18:3f, command "Z2OFF", got response "Z2OFF" from remote host
[13-07-31 13:31:40.7668] Plugins::DenonSerial::Plugin::processResponses (778) for 00:04:20:e1:18:3f, command "Z2OFF", process response "PWSTANDBY"
[13-07-31 13:31:40.7670] Plugins::DenonSerial::Plugin::processResponses (778) for 00:04:20:e1:18:3f, command "Z2OFF", process response "Z2OFF"
[13-07-31 13:31:42.7673] Plugins::DenonSerial::Plugin::closeTCPSocket (673) closing TCP connection for IP:192.168.185.60
[13-07-31 13:33:39.2257] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1044) scheduling an amp status poll in 5 minutes
[13-07-31 13:33:39.2260] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1048) rescheduling amp status poll
[13-07-31 13:33:39.2263] Plugins::DenonSerial::Plugin::pollAmpStatus (1223) checking amp status for Kitchen
[13-07-31 13:33:39.2266] Plugins::DenonSerial::Plugin::enqueue (381) opening control socket to 192.168.185.60:23
[13-07-31 13:33:39.2271] Plugins::DenonSerial::Plugin::enqueue (425) run Z2? for 00:04:20:e1:18:3f at next convenience
[13-07-31 13:33:39.2274] Plugins::DenonSerial::Plugin::enqueue (429) indicate that processCommandFromQueue() should run
[13-07-31 13:33:39.2277] Plugins::DenonSerial::Plugin::enqueue (419) Z2? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 1
[13-07-31 13:33:39.2280] Plugins::DenonSerial::Plugin::enqueue (425) run PW? for 00:04:20:e1:18:3f at next convenience
[13-07-31 13:33:39.8272] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 00:04:20:e1:18:3f , send command Z2?, queue length 2
[13-07-31 13:33:39.8274] Plugins::DenonSerial::Plugin::sendCommand (860) send command: (connection IP, address 192.168.185.60, command Z2?)
[13-07-31 13:33:39.8277] Plugins::DenonSerial::Plugin::sendCommand (911) for 00:04:20:e1:18:3f, indicate we're working on a command, queue length now 2
[13-07-31 13:33:39.8279] Plugins::DenonSerial::Plugin::processCommandFromQu eue (492) not done with queue
[13-07-31 13:33:39.9776] Plugins::DenonSerial::Plugin::processCommandFromQu eue (454) look for response for 00:04:20:e1:18:3f command Z2?
[13-07-31 13:33:39.9778] Plugins::DenonSerial::Plugin::getResponse (525) for 00:04:20:e1:18:3f, indicate we're done with the current command since we're reading responses, queue length now 2
[13-07-31 13:33:40.2481] Slim::Utils::Scheduler::run_tasks (163) Error: Scheduler task failed: Can't use an undefined value as an ARRAY reference at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 700.
[13-07-31 13:33:42.2488] Plugins::DenonSerial::Plugin::closeTCPSocket (673) closing TCP connection for IP:192.168.185.60
[13-07-31 13:34:03.5011] Plugins::DenonSerial::Plugin::enqueue (381) opening control socket to 192.168.185.60:23
[13-07-31 13:34:03.5018] Plugins::DenonSerial::Plugin::enqueue (425) run MV? for 11:21:16:83:01:72 at next convenience
[13-07-31 13:34:03.5021] Plugins::DenonSerial::Plugin::enqueue (425) run Z3ON for 11:21:16:83:01:72 at next convenience
[13-07-31 13:34:03.5024] Plugins::DenonSerial::Plugin::enqueue (425) run Z3VCR for 11:21:16:83:01:72 at next convenience
[13-07-31 13:34:21.3211] Plugins::DenonSerial::Plugin::enqueue (425) run Z3OFF for 11:21:16:83:01:72 at next convenience
[13-07-31 13:36:22.3927] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1044) scheduling an amp status poll in 5 minutes
[13-07-31 13:36:22.3930] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1048) rescheduling amp status poll
[13-07-31 13:36:22.3934] Plugins::DenonSerial::Plugin::pollAmpStatus (1223) checking amp status for DiningRoom
[13-07-31 13:36:22.3938] Plugins::DenonSerial::Plugin::enqueue (419) MV? for 11:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 6
[13-07-31 13:36:22.3942] Plugins::DenonSerial::Plugin::enqueue (425) run SI? for 11:21:16:83:01:72 at next convenience
[13-07-31 13:36:22.3945] Plugins::DenonSerial::Plugin::enqueue (419) PW? for 11:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 7
[13-07-31 13:38:39.2283] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1044) scheduling an amp status poll in 5 minutes
[13-07-31 13:38:39.2285] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1048) rescheduling amp status poll
[13-07-31 13:38:39.2288] Plugins::DenonSerial::Plugin::pollAmpStatus (1223) checking amp status for Kitchen
[13-07-31 13:38:39.2291] Plugins::DenonSerial::Plugin::enqueue (419) Z2? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 7
[13-07-31 13:38:39.2294] Plugins::DenonSerial::Plugin::enqueue (419) Z2? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 7
[13-07-31 13:38:39.2297] Plugins::DenonSerial::Plugin::enqueue (419) PW? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length

peterw
2013-08-01, 07:07
I have the same trouble occasionally -- the plugin doesn't see the expected response and its queue gets hung. Restarting SBS/LMS fixes it. I've been meaning to add code to detect & clear hung queues, but haven't gotten around to it -- probably because this only happens to me once every 6-8 weeks. That's with TCP connections to a Raspberry Pi acting as a serial port server (as described in my edited first post for this thread). Prior to the Pi, I was using $ software on an Atom nettop running Windows 7. The queue hung noticeably more frequently with that setup. My Denon is an old one that has RS232 but no Ethernet (looks like pretty much all the current CI receivers have Ethernet now) -- so I can't test the native Denon networking interface. I suspect anyone with Ethernet on a Denon would be better off with Chris' AVP Control plugin, as it uses HTTP and is probably much less likely to have such trouble.

I'll certainly post here if/when I get hung queue code that I think should work.

JamesMcBride
2013-08-01, 07:14
Hi,
Thanks for coming back to me again. I've noticed it happening quite regularly on my new amp, which is actually a slightly older model (now got a 4308a and used to have a 3310).

I did try switching to using the serial interface instead, but that seemed to introduce more problems, I think probably because I'm running LMS on Linux.

My problem only seems to occur if I add the other zones in - never seems to happen on the main zone. I suspect it is a problem with the amp.

I will give the AVP control one another go - last time I tried that I didn't have much luck with it, but it might work better with this amp.

Thanks again
James

peterw
2013-08-02, 06:47
Good luck. I just pushed my latest code up to my testing repository (http://www.tux.org/~peterw/slim/slim7/repodata-test.xml) if you want to give it a try -- includes both the full-dB code for zones 2+ and my new code that attempts to detect & clear hung queues (gives the amp 10s to respond to the last sent command before obliterating its queue). Neither of those is really tested (my queue hasn't hung since I added that code). If the hung queue detection tries to do something, you'll see a log entry like "no response seen from amp in at least 10, clearing its items from queue" (yes, I forgot to add "seconds" to that message). Also 0.1.38 has code to deal with garbage characters that I'm now seeing, probably (hopefully) introduced by my Pi+USB serial adapter.

JamesMcBride
2013-08-02, 07:00
Hi,
Thanks for that - Unfortunately I seem to get an error when starting LMS now:

Have I missed something?



[13-08-02 14:56:34.6354] Slim::Utils::PluginManager::_loadPluginCache (564) DenonSerial
[13-08-02 14:56:35.0201] Slim::Utils::Strings::loadStrings (185) Loading string file: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/strings.txt
[13-08-02 14:56:35.3697] Slim::Utils::PluginManager::load (239) Loading plugin: DenonSerial
[13-08-02 14:56:35.3738] Slim::bootstrap::tryModuleLoad (285) Warning: Module [Plugins::DenonSerial::Plugin] failed to load:
Can't locate Net/Wake.pm in @INC (@INC contains: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib /var/lib/squeezeboxserver/cache/InstalledPlugins /usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.14.3/i386-linux-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.14.3/i386-linux-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/i386-linux-thread-multi /usr/share/squeezeboxserver/lib /usr/share/squeezeboxserver/CPAN /usr/share/squeezeboxserver /usr/libexec /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 22.
BEGIN failed--compilation aborted at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 22.
[13-08-02 14:56:35.3748] Slim::Utils::PluginManager::load (295) Error: Couldn't load Plugins::DenonSerial::Plugin
[13-08-02 14:56:35.3750] Slim::Utils::PluginManager::load (329) Adding HTML directory: [/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/HTML]

JamesMcBride
2013-08-02, 07:11
I've commented out line 22 for now and it seems to start :)

JamesMcBride
2013-08-02, 07:21
Unfortunately it still seems to hang though...

I'll have to have a look at it a bit further myself, I think there's got to be something not quite right with the amp:




# tail -f /var/log/squeezeboxserver/server.log | grep Denon
[13-08-02 15:16:47.0503] Plugins::DenonSerial::Plugin::pollAmpStatus (1305) checking amp status for DiningRoom
[13-08-02 15:16:47.0507] Plugins::DenonSerial::Plugin::enqueue (479) MV? for 11:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 4
[13-08-02 15:16:47.0509] Plugins::DenonSerial::Plugin::enqueue (479) SI? for 11:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 4
[13-08-02 15:16:47.0513] Plugins::DenonSerial::Plugin::enqueue (479) PW? for 11:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 4
[13-08-02 15:17:17.7293] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1126) scheduling an amp status poll in 5 minutes
[13-08-02 15:17:17.7295] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1130) rescheduling amp status poll
[13-08-02 15:17:17.7298] Plugins::DenonSerial::Plugin::pollAmpStatus (1305) checking amp status for Bedroom-2
[13-08-02 15:17:17.7301] Plugins::DenonSerial::Plugin::enqueue (485) run Z4? for 02:04:20:e1:18:3f at next convenience
[13-08-02 15:17:17.7304] Plugins::DenonSerial::Plugin::enqueue (479) Z4? for 02:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:17:17.7307] Plugins::DenonSerial::Plugin::enqueue (479) PW? for 02:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6466] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1126) scheduling an amp status poll in 5 minutes
[13-08-02 15:19:28.6468] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1130) rescheduling amp status poll
[13-08-02 15:19:28.6472] Plugins::DenonSerial::Plugin::pollAmpStatus (1305) checking amp status for Lounge
[13-08-02 15:19:28.6474] Plugins::DenonSerial::Plugin::enqueue (479) MV? for 12:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6476] Plugins::DenonSerial::Plugin::enqueue (479) SI? for 12:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6479] Plugins::DenonSerial::Plugin::enqueue (479) PW? for 12:21:16:83:01:72 would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6711] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1126) scheduling an amp status poll in 5 minutes
[13-08-02 15:19:28.6713] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1130) rescheduling amp status poll
[13-08-02 15:19:28.6716] Plugins::DenonSerial::Plugin::pollAmpStatus (1305) checking amp status for Kitchen
[13-08-02 15:19:28.6719] Plugins::DenonSerial::Plugin::enqueue (479) Z2? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6721] Plugins::DenonSerial::Plugin::enqueue (479) Z2? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 5
[13-08-02 15:19:28.6724] Plugins::DenonSerial::Plugin::enqueue (479) PW? for 00:04:20:e1:18:3f would duplicate a command already in the queue; ignoring. queue length 5

JamesMcBride
2013-08-02, 09:01
OK, I think I've discovered that my amp doesn't like to be questioned about it's status whilst it is off.

Once it has been turned off the first query works. Subsequent queries are just ignored, which seems to be what is causing the issue.

I'm going to try to work around it for now by setting the idle query time to 9999, which I hope will fix it.

peterw
2013-08-02, 11:39
Thanks for pointing out the wake module problem -- I had started working on Wake On LAN support, and probably ought to just rip it out since SBS/LMS generally doesn't have rights to forge low-level packets anyway.

I'm disappointed that at 15:17:17 my code isn't detecting the wedged queue.

And that's just crazy behavior from your amp IMO. My old 23xx series amp is perfectly happy to tell me its power, volume, and source input when it's in standby mode. Can DenonSerial turn the amp back on right after turning it off? I could understand not replying if you manually pushed the "hard" power button on the amp, but not when DenonSerial uses the control API to put the amp in soft "standby" mode!

JamesMcBride
2013-08-02, 11:48
It's very strange! I never had this problem with my (lesser) 3310, which did have LAN too.

I've been trying to get Serial working as I'm guessing it might be more reliable, but I'm struggling with that too - the errors I get suggest that it can't use the perl serial plugin, so I got a serial->ethernet converter, but that doesn't work either... I'm guessing that could be a cabling issue though.

Setting the Idle Poll Frequency very high seems to have resolved it, but to get it to work I had to power on and power off each zone, then reboot LMS. Since then it has been fine, powers on and off each zone fine - will see how it goes over night.

PS. The volume control fix works a treat, so thank you very much for that!

JamesMcBride
2013-08-02, 12:05
I think this is what I was getting when trying to use Serial:



[13-07-15 19:02:03.5590] Plugins::DenonSerial::Plugin::turnAmpOn (1158) turning amp on for Lounge
[13-07-15 19:02:03.5594] Plugins::DenonSerial::Plugin::enqueue (425) run PWON for 12:21:16:83:01:72 at next convenience
[13-07-15 19:02:03.5596] Plugins::DenonSerial::Plugin::enqueue (429) indicate that processCommandFromQueue() should run
[13-07-15 19:02:03.5600] Plugins::DenonSerial::Plugin::enqueue (425) run MV? for 12:21:16:83:01:72 at next convenience
[13-07-15 19:02:03.5603] Plugins::DenonSerial::Plugin::enqueue (425) run SIHDP for 12:21:16:83:01:72 at next convenience
[13-07-15 19:02:03.5624] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 12:21:16:83:01:72 , send command PWON, queue length 3
[13-07-15 19:02:03.5627] Plugins::DenonSerial::Plugin::sendCommand (863) send command: (connection serial, address /dev/ttyS0, command PWON)
[13-07-15 19:02:03.5631] Slim::Utils::Scheduler::run_tasks (163) Error: Scheduler task failed: Can't call method "new" on an undefined value at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 896.
[13-07-15 19:08:12.4868] Plugins::DenonSerial::Plugin::turnAmpOff (1128) turning amp off for Bedroom-2
[13-07-15 19:08:12.4875] Plugins::DenonSerial::Plugin::turnAmpOff (1140) leaving amp serial:/dev/ttyS0 on for player 12:21:16:83:01:72
[13-07-15 19:08:12.4878] Plugins::DenonSerial::Plugin::enqueue (425) run Z4OFF for 02:04:20:e1:18:3f at next convenience
[13-07-15 19:15:00.0014] Plugins::DenonSerial::Plugin::enqueue (425) run SIDVD for 12:21:16:83:01:72 at next convenience
[13-07-15 19:16:32.0968] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:16:32.0980] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:16:32.0991] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:16:32.1011] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:17:30.8952] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:17:30.9084] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:17:30.9214] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:17:30.9275] Slim::Control::Request::notify (2085) Error: Failed notify: Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 214.
[13-07-15 19:17:30.9303] Plugins::DenonSerial::Plugin::resetAmpOffTimer (1083) Will turn off amp for 02:04:20:e1:18:3f in 10 minutes if Squeezebox not playing and no activity before then
[13-07-15 19:27:30.9307] Plugins::DenonSerial::Plugin::turnAmpOff (1128) turning amp off for Bedroom-2
[13-07-15 19:27:30.9314] Plugins::DenonSerial::Plugin::enqueue (425) run Z4OFF for 02:04:20:e1:18:3f at next convenience
[13-07-15 19:27:30.9317] Plugins::DenonSerial::Plugin::enqueue (429) indicate that processCommandFromQueue() should run
[13-07-15 19:27:30.9319] Plugins::DenonSerial::Plugin::enqueue (425) run PWSTANDBY for 02:04:20:e1:18:3f at next convenience
[13-07-15 19:27:30.9322] Plugins::DenonSerial::Plugin::processCommandFromQu eue (481) for 02:04:20:e1:18:3f , send command Z4OFF, queue length 2
[13-07-15 19:27:30.9325] Plugins::DenonSerial::Plugin::sendCommand (863) send command: (connection serial, address /dev/ttyS0, command Z4OFF)
[13-07-15 19:27:30.9328] Slim::Utils::Scheduler::run_tasks (163) Error: Scheduler task failed: Can't call method "new" on an undefined value at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 896.
[13-07-15 19:46:18.9948] Plugins::DenonSerial::Plugin::turnAmpOn (1158) turning amp on for Lounge
[13-07-15 19:46:18.9951] Plugins::DenonSerial::Plugin::enqueue (425) run PWON for 12:21:16:83:01:72 at next convenience
[13-07-15 19:46:18.9953] Plugins::DenonSerial::Plugin::enqueue (425) run MV? for 12:21:16:83:01:72 at next convenience
[13-07-15 19:46:18.9956] Plugins::DenonSerial::Plugin::enqueue (425) run SIHDP for 12:21:16:83:01:72 at next convenience
[13-07-15 19:46:42.6088] Plugins::DenonSerial::Plugin::enqueue (425) run SIDVD for 12:21:16:83:01:72 at next convenience
[13-07-15 19:53:09.6034] Plugins::DenonSerial::Plugin::enqueue (425) run Z2? for 12:21:16:83:01:72 at next convenience
[13-07-15 19:53:09.6037] Plugins::DenonSerial::Plugin::enqueue (425) run Z3? for 12:21:16:83:01:72 at next convenience
[13-07-15 19:53:09.6040] Plugins::DenonSerial::Plugin::enqueue (425) run Z4? for 12:21:16:83:01:72 at next convenience

peterw
2013-08-02, 12:44
Undefined subroutine &Slim::Utils::PluginManager::pluginRootDirs

Ugh. What version of LMS is this? I haven't tested anything past about 7.5 (and run older than that myself). Maybe I should be thankful that so little has apparently changed since 7.2/7.3. (IIRC pluginRootDirs is called when DenonSerial looks for its precompiled Device::SerialPort libraries.)

JamesMcBride
2013-08-02, 15:12
Ah I see I'm running 7.7.2 - I figured it was struggling to load the serialport

peterw
2013-08-09, 18:44
Ah I see I'm running 7.7.2 - I figured it was struggling to load the serialport

OK, thanks. I'll have to learn how to pull that code, then.

Meanwhile 0.1.39 is in my test repo, with WOL yanked and slightly better code for detecting stuck queues. On my system it detects hung queues at least daily, but I won't know if it's really working unless I'm able to go a couple months without problems (it's detecting trouble far more often than I actually experienced problems; maybe that should worry me). Still, you might try that with the TCP support until I get the code updated to find its directory and successfully dynamically load the serialport lib.

peterw
2013-08-10, 15:03
Ah I see I'm running 7.7.2 - I figured it was struggling to load the serialport

This should be fixed in 0.1.40, which is now in my test repository. Thanks go to Triode for giving me the line of code I needed.

JamesMcBride
2014-02-11, 03:58
Hi,
Thanks for that, unfortunately I've not got round to trying it yet as I've been using an ethernet->serial converter for now.

An issue I'm having now is with my other AVR, which is an old 3803, which I thought I'd use for my bedroom. Unfortunately this doesn't like being asked the status of Zone 2 - it's just not in the spec for this model. As a result, if I add a player to zone 2, it holds up the queue because the plugin doesn't get a response.

Is there an easy way of telling the plugin not to ask the status for a specific player?

Sorry again to keep asking for things, but if you PM me your paypal address I'm quite willing to donate :)

Thanks
James

peterw
2014-02-13, 15:23
An issue I'm having now is with my other AVR, which is an old 3803, which I thought I'd use for my bedroom. Unfortunately this doesn't like being asked the status of Zone 2 - it's just not in the spec for this model. As a result, if I add a player to zone 2, it holds up the queue because the plugin doesn't get a response.

Is there an easy way of telling the plugin not to ask the status for a specific player?

What command exactly is failing? Is it sending "Z2?" to get the status of zone 2 (source, volume, muting, etc.)?

I'd need to add an option to disable such queries, possibly on a per-Squeezebox/player basis. This means that LMS won't see the Denon volume change if you use the Denon knob, etc., to change that volume, but it sounds like that's unavoidable anyway.

JamesMcBride
2014-02-14, 02:06
What command exactly is failing? Is it sending "Z2?" to get the status of zone 2 (source, volume, muting, etc.)?

I'd need to add an option to disable such queries, possibly on a per-Squeezebox/player basis. This means that LMS won't see the Denon volume change if you use the Denon knob, etc., to change that volume, but it sounds like that's unavoidable anyway.

Hi,
Yes that's it as soon as the Z2? command gets issued and there is no response, the queue starts to build.

In my case, it doesn't matter that LMS isn't updated with the status of the amp because Z2 will only be controlled by LMS, so in theory it shouldn't matter.

I really should try to learn more about this myself, I'd love to be able to add some of my own customisation's to LMS through plugins.

Thanks again
James

peterw
2014-02-22, 06:54
Hi,
Yes that's it as soon as the Z2? command gets issued and there is no response, the queue starts to build.


OK. Sorry I haven't gotten to this yet. I had hoped I could just change the polling logic, so that you could set "idle" and "active" poll values like "-1" to tell the plugin never to bother polling, but only to send required commands, but it looks like that won't suffice. :-( It will need to be a new setting option.

JamesMcBride
2014-02-24, 14:27
OK. Sorry I haven't gotten to this yet. I had hoped I could just change the polling logic, so that you could set "idle" and "active" poll values like "-1" to tell the plugin never to bother polling, but only to send required commands, but it looks like that won't suffice. :-( It will need to be a new setting option.


Ahh, I see! I had sort of tried that by setting it very high (99999999) but that didn't work either. Thank you for looking though.

peterw
2014-02-25, 20:44
James, please try version 0.1.42 from my test repository. It now adds an On/Off setting for amp polling. I've only tested it lightly over here (and only with a player configured for the master zone) but I think the new polling Off setting should give you a way to completely avoid the "Z2?" bug.

JamesMcBride
2014-03-15, 08:37
So sorry for not getting back to you sooner, for some reason I didn't see that you'd replied.

Thank you for that, it seems to have done the trick!

Thanks again
James

Simon_rb
2014-04-01, 15:06
Hi, is there a way of using your plugin to only control the volume and not turn the amp on or off, I use a different addon for that.

Kind Regards
Simon

peterw
2014-04-05, 12:50
Hi, is there a way of using your plugin to only control the volume and not turn the amp on or off, I use a different addon for that.


Yes, it is. You can use DenonSerial to turn the amp on with the Squeezebox, off with the Squeezebox, both, or neither. I also use something else to control amp power, and use DenonSerial primarily for volume control.

Simon_rb
2014-04-05, 13:31
Excellent. I'll just have to get the volume working. I have my touch set to max output via ssh and editing the file.. From memory the volume control keeps jumping to max. Do you know if the volume control has to be set to dB on the amp? Mines set 0 - 99.
Regards
Simon

Simon_rb
2014-04-05, 17:35
Got this working on my amp if I set volume scales to dB. However it does not poll the volume status. If I change my volume on the amp it does not change on the touch. I set the time to 1 minute in the settings and waited a lot longer and the volume on the touch does not get updated to reflect the amps volume..

Simon_rb
2014-04-05, 17:40
This also seems to crash my amp, the only way to get the network commands working again is to unplug my amp from the mains. I get one volume change and after that the amp is unresponsive to network commands until it is unplugged. This plugin doesn't work at all well for me :-(

I am using the latest version in the test repository after the stable 0.1.37 caused the same thing to happen. I have a Denon x2000 amp.

Is it still worked on?

Simon_rb
2014-04-05, 18:15
A snippet of my log if this helps



frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Control/Request.pm line 2268)
frame 1: Slim::Control::Request::renderAsArray (/usr/share/perl5/Slim/Web/Cometd.pm line 948)
frame 2: Slim::Web::Cometd::requestCallback (/usr/share/perl5/Slim/Web/Cometd.pm line 801)
frame 3: Slim::Web::Cometd::__ANON__ (/usr/share/perl5/Slim/Control/Request.pm line 2082)
frame 4: (eval) (/usr/share/perl5/Slim/Control/Request.pm line 2082)
frame 5: Slim::Control::Request::notify (/usr/share/perl5/Slim/Control/Request.pm line 860)
frame 6: Slim::Control::Request::checkNotifications (/usr/sbin/squeezeboxserver line 676)
frame 7: main::idle (/usr/sbin/squeezeboxserver line 645)
frame 8: main::main (/usr/sbin/squeezeboxserver line 1158)

[14-04-06 02:06:15.9394] Plugins::DenonSerial::Plugin::reportOnOurPlayers (1492) Note that Lounge Touch uses us for external volume control
[14-04-06 02:06:16.1253] Slim::Control::Request::renderAsArray (2268) Error: request should set useIxHashes in Slim::Control::Request->new()
[14-04-06 02:06:16.1348] Slim::Control::Request::renderAsArray (2268) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Control/Request.pm line 2268)
frame 1: Slim::Control::Request::renderAsArray (/usr/share/perl5/Slim/Web/Cometd.pm line 948)
frame 2: Slim::Web::Cometd::requestCallback (/usr/share/perl5/Slim/Web/Cometd.pm line 801)
frame 3: Slim::Web::Cometd::__ANON__ (/usr/share/perl5/Slim/Control/Request.pm line 2082)
frame 4: (eval) (/usr/share/perl5/Slim/Control/Request.pm line 2082)
frame 5: Slim::Control::Request::notify (/usr/share/perl5/Slim/Control/Request.pm line 860)
frame 6: Slim::Control::Request::checkNotifications (/usr/sbin/squeezeboxserver line 676)
frame 7: main::idle (/usr/sbin/squeezeboxserver line 645)
frame 8: main::main (/usr/sbin/squeezeboxserver line 1158)

[14-04-06 02:06:18.7257] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1139) scheduling an amp status poll in 1 minutes
[14-04-06 02:06:18.7321] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1143) rescheduling amp status poll
[14-04-06 02:06:18.7394] Plugins::DenonSerial::Plugin::pollAmpStatus (1318) checking amp status for Lounge Touch
[14-04-06 02:06:18.7477] Plugins::DenonSerial::Plugin::enqueue (490) MV? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:06:18.7564] Plugins::DenonSerial::Plugin::enqueue (490) SI? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:06:18.7653] Plugins::DenonSerial::Plugin::enqueue (490) PW? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:06:33.1772] Plugins::DenonSerial::Plugin::enqueue (490) MV? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:06:44.7355] Plugins::DenonSerial::Plugin::volumeSBToDenon (327) sbvol 0 -> denon 99 -> SB 0
[14-04-06 02:06:44.7523] Plugins::DenonSerial::Plugin::setAmpVolume (368) for Lounge Touch should set amp volume to 99 of 70 (SB volume 0)
[14-04-06 02:06:44.7597] Plugins::DenonSerial::Plugin::enqueue (490) MV for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:07:00.9934] Plugins::DenonSerial::Plugin::volumeSBToDenon (327) sbvol 12 -> denon 7.5 -> SB 12
[14-04-06 02:07:01.0064] Plugins::DenonSerial::Plugin::setAmpVolume (368) for Lounge Touch should set amp volume to 7.5 of 70 (SB volume 12)
[14-04-06 02:07:01.0344] Plugins::DenonSerial::Plugin::enqueue (490) MV for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:07:18.7402] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1139) scheduling an amp status poll in 1 minutes
[14-04-06 02:07:18.7584] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1143) rescheduling amp status poll
[14-04-06 02:07:18.7776] Plugins::DenonSerial::Plugin::pollAmpStatus (1318) checking amp status for Lounge Touch
[14-04-06 02:07:18.7929] Plugins::DenonSerial::Plugin::enqueue (490) MV? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:07:18.8026] Plugins::DenonSerial::Plugin::enqueue (490) SI? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:07:18.8124] Plugins::DenonSerial::Plugin::enqueue (490) PW? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:08:18.7566] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1139) scheduling an amp status poll in 1 minutes
[14-04-06 02:08:18.7630] Plugins::DenonSerial::Plugin::rescheduleAmpStatusP oll (1143) rescheduling amp status poll
[14-04-06 02:08:18.7865] Plugins::DenonSerial::Plugin::pollAmpStatus (1318) checking amp status for Lounge Touch
[14-04-06 02:08:18.8064] Plugins::DenonSerial::Plugin::enqueue (490) MV? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:08:18.8292] Plugins::DenonSerial::Plugin::enqueue (490) SI? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4
[14-04-06 02:08:18.8517] Plugins::DenonSerial::Plugin::enqueue (490) PW? for 00:04:20:23:88:36 would duplicate a command already in the queue; ignoring. queue length 4

peterw
2014-04-05, 19:26
This also seems to crash my amp, the only way to get the network commands working again is to unplug my amp from the mains. I get one volume change and after that the amp is unresponsive to network commands until it is unplugged. This plugin doesn't work at all well for me :-(

I am using the latest version in the test repository after the stable 0.1.37 caused the same thing to happen. I have a Denon x2000 amp.

Is it still worked on?

Try setting "ENABLE AMP STATUS POLLING" to "Off" -- another user reported trouble when this plugin used unsupported query commands.

All of my plugins are in development limbo -- I'm still running a relatively old version of LMS myself. I suppose I'll need to move to 7.8 in the next year, to prepare for the likely disappearance of squeezenetwork/mysqueezebox servers. But I've generally only made changes to address bugs I've stumbled on, or that have been reported to me.

Simon_rb
2014-04-05, 19:33
No problem. I shall try that. Will I not get volume polling if I disable polling?

As regards to squeezebox servers eventually shutting down - I think that time will come soon. I don't ever use them now. I have a raspberry pi running Domoticz to control the house, so it is on all the time, this also runs LMS, it's not the quickest, and I don't have any songs on it. It's just something for the radios and touch to talk to and have Spotify on. I have another server running LMS which has my entire collection on and that is booted up as needed.

MadScientist
2014-06-28, 13:09
I just wondered what would be involved to adapt this plugin for volume control of another amp (Meridian 861 in my case)?

robbrad
2014-07-06, 01:40
Could this Pulgin be adapted to provice CEC crontrol over HDMI

My setup is Raspberry Pi as a player - hdmi to Panasonic soundbar

I have already used the command


echo "on 5" | cec-client -s

To power on the soundbar

and


echo "standby 5" | cec-client -s

to power it off

5 being the device number

Happy to donate (small amount) if this was extended to include CEC HDMI control capabilities (there are more commands than just power on and off)

giantpopples
2014-09-09, 18:29
Hi !

I'm trying to install the DenonSerial plugin on a vortexbox running LMS7.8 and it seems to struggle for the serial librairy, it seems that my perl version does not match.

Here is the error I got :


Slim::Control::Request::notify (2084) Error: Failed notify: Can't load '/usr/share/squeezeboxserver/Plugins/DenonSerial/bin/perl5_10/lib32/auto/Device/SerialPort/SerialPort.so' for module Device::SerialPort: /usr/share/squeezeboxserver/Plugins/DenonSerial/bin/perl5_10/lib32/auto/Device/SerialPort/SerialPort.so: undefined symbol: PL_unitcheckav at /usr/lib/perl5/DynaLoader.pm line 190.
at /usr/share/squeezeboxserver/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 211.
Compilation failed in require at /usr/share/squeezeboxserver/Plugins/DenonSerial/lib/Plugins/DenonSerial/Plugin.pm line 211.

Is there a way to compile the serial module from the vortexbox and replace the one packaged in your plugin ? I'm currently using Perl v5.18.2 (as given by perl -v )

I'm trying to get the plugin to work and then modify the commands code to handle my receiver which is not a denon (but it uses a very simple API on serial port, also at 9600bds 8N1).

Thank you very much !!

giantpopples
2014-09-11, 14:02
I got the plugin running just by installing the correct package through my package manager (yum on a vortexbox).

I've messed around a bit, just to understand how the plugin work and I could power on/off my amp (which is not a Denon, I just modified the on and off command sent to the serial port).
So far so good, but to power on my receiver I need to power it on, wait for it to be ready, change the input, so I'll probably look at another solution to power it on/off and use the plugin for the volume part.

Thank you very much for this plugin :)

jimbobvfr400
2014-09-19, 01:44
Just a thought and this is based on using IR based control systems not rs232. A lot of receivers will accept a source command when off/standby. So for example if I press CD on the remote my amp will turn on and be on the CD input. If I use power on with IR my amp also needs a short wait before I can then send the source command.

If there's a source command via the serial control then it might be worth a try.

Thunderig
2014-11-18, 03:45
Hi everybody,

I am trying to use this plugin with a Denon AVR-X1100W. One thing in particular, which would be interesting for me is if I could display the different multi-zones in the reveiver as seperate squeeze devices so that I could select using iPeng's device overview the correct zone setting. Has anyone tried that already or made similar progress in implementing a workaround to quickly change zones?

Thanks in advance

Andy

tdrath
2015-12-31, 09:09
I know this isn't actively maintained, but I've just installed this plugin on my LMS to try out. There doesn't seem to be any way to enable or configure it. Should there be a Settings link on the Plugins page? I am using LMS 7.9 and plugin v0.1.42. Maybe it's incompatible with 7.9? Any suggestions welcome...

peterw
2015-12-31, 13:59
You should see a DenonSerial settings group on each player settings web page. Please let me know if you have trouble - I run LMS 7.8 and have not tried 7.9 yet. It seems likely you may need to compile the Perl serial module code if you're using direct serial and running LMS on something other than Windows - I switched years ago to the TCP connection, using a Raspberry Pi as a serial port server.

tdrath
2016-01-11, 06:08
Ok, it appeared after several restarts of the server, but not sure it will do what I want. I have a Squeezebox Touch connected to the AUXB inout of my Denon. When I press PLAY, I'd like it to switch the Denon's input to AUXB. Other things - like power on and volume control - are nice to have.

Just to explore, I've tried telnetting to the Denon using Putty, but it looks like I can only issue one command at a time before the session locks, so it's difficult to check what happens. I have to close Putty and reopen it to issue another command. Anyone know of any Putty settings which will work correctly?

(Incidentally, this is a Denon RCD-N7, which does work with the Denon command set, even though the top results on Google might have you believe otherwise.)

DJanGo
2016-01-11, 15:44
Just to explore, I've tried telnetting to the Denon using Putty, but it looks like I can only issue one command at a time before the session locks, so it's difficult to check what happens. I have to close Putty and reopen it to issue another command. Anyone know of any Putty settings which will work correctly?

Dont use putty!


PuTTYtel
Plink
nc
telnet

tdrath
2016-01-12, 08:58
Dont use putty!

I'd already tried with the Windows 7 Telnet client, but it has the same symptoms. A Google search showed a number of people experiencing the same issue, but no solutions, which is why I asked here. I hoped that someone might have experienced the same issue and resolved it.

streampunk
2017-11-01, 11:32
Hi everybody,
Is the DenonSerial plugin still supposed to work (I use PCP, latest version, and a Denon AVR-X3000)?
I can install and configure the plugin, but it has no effect (e.g. Power on / off).
Best regards
Martin

MelonMonkey
2017-12-10, 10:59
Hi everybody,
Is the DenonSerial plugin still supposed to work (I use PCP, latest version, and a Denon AVR-X3000)?

I get no response on my Marantz AV7703 with this plugin. Telnet works perfectly fine.

I've tested the plugin Denon AVP/AVR Control by Chris Couper which seems to work, but is missing a number of features, such as the ability to send extra (arbitrary) commands on power ON and OFF (the plugin source is easy to modify/hack, so I've inserted a source select command for now)

http://forums.slimdevices.com/showthread.php?60114-Announce-Denon-AVP-Control-Plugin/page15