Denon AVR Plugin

@drift_645 After another look, I don’t think anything besides power can be done for zone 2 status. @amingle Would you mind taking a look and see if I’m missing something?

Thanks Greg! Appreciate your help getting this all done!

Would this section work?

Yes for sure - I’ll circle back to these 2 items as soon as I can. It will probably not be until this weekend.

1 Like

I do not have a multi-zone Denon, so I can’t test anything here. But in all of the documentation I am seeing, the only status check I see is “Z2?”. What is returned when you send that command? Is it just power status, or does it return input status as well?

There’s also “Z2QUICK ?”, which looks to return the status of the Zone 2 Quick Select. That may be of use.

Another option might be to send “Z2SOURCE” on initialization (per the docs: “ZONE2 mode cancel - ZONE2 source is same as MAIN ZONE”), then re-send the desired input command. Then, you end up in a known state.

Thanks for the tip @amingle . I think I got it. @drift_645 try this one. Z2 status starts at line 448. I was not able to get a status for input “SAT/CBL”. Not sure if it’s something with the slash. I coded for two inputs, MPLAY and GAME. You can add more inputs if you wish.
DenonAVR_2021-02-10.plugin (13.1 KB)

That’s strange about SAT/CBL. How are you testing the commands? Are you logging anything to the console to see the return / using a separate utility / etc? I imagine if we can see the full response to Z2? when in SAT/CBL mode, that should show us what we need. I’m sorry I can’t help in testing the Zone 2 commands more.

Ok I found the error - the Denon is “CBL/SAT”. I was working on my Pioneer receiver which was “SAT/CBL” and got them switched around. I woke up this morning with a few ideas and I have everything working. Zone 2 status for power, volume, mute, and input. Input will still have to be handled by coding separately for each input. @drift_645 this begins at line 457. You can just copy and paste and change the text for each input you would like status for.
DenonAVR_2021-02-11.plugin (13.7 KB)

Thanks Greg, you’re awesome.

This works great!

Good work @gregkinney!

I looked through your original plugin and the hrp where you said you had the Input issues.
The basic idea is that you are using the InputSource attribute - both when you click a new Input and send the “SI” command, and when you are doing a “SI” status update for your DataTriggers. I had been using InputSourceCommonName, because I could use the same CommonName across different receivers and not have to change my HRP - just my plugin settings.

With 2 quick plugin changes, it should work just fine:

  1. First, we need to tweak what happens when a button is clicked.
    In onChangeRequest, add:
case "InputSource":

above

case "InputSourceCommonName":

Resulting in:

switch (attribute) {
	case "InputSource":
	case "InputSourceCommonName":
		var fullInputInfo = findfullInputInfo(value);
		if(fullInputInfo.inputsourceDenonProtocolID != null && fullInputInfo.inputsourceDenonProtocolID != '') {
			cmd = "SI" + fullInputInfo.inputsourceDenonProtocolID;
		}
		break;

The findfullInputInfo function is already set to search for either the InputSource (such as MPLAY) or a common name (Kodi), so this is an easy fix.

  1. Second, we need to tweak the status update when an input is changed. In onPoll, under
case "SI":

change

device.InputSource = fullInputInfo.inputsourceDeviceID;

to

device.InputSource = fullInputInfo.inputsourceDenonProtocolID;

Now, your Data Triggers will work as expected.

I know you’ve changed everything around in your current implementation, but at least I can sleep at night knowing what was happening :sleeping:

Haha thanks! I know the feeling. I’ll test that this weekend and let you know how it works out.

I’m trying to utilize this plugin to get more control over my recently purchased Denon 4700H. It looks to me like the commands haven’t changed, but I’m getting the following message in the log when trying to do a PWON command: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine…

I’m able to connect using the built-in Denon integration but not using the plugin. Any ideas?

First, my apologies for the late reply.

That’s strange you are seeing that error.

My first guesses would be that some of the plugin’s settings are not correct for your implementation. Did you update the “Host” and “Port_Socket” for your setup? The defaults are likely not correct for you.

If you are comfortable playing around in the code of the plugin, you could add some logging especially in the onConnect function to see where it is breaking. My assumption is that the “socket.connect()” is not happening successfully.

No problem @amingle I don’t remember exactly what I did. The IP address was correct, but I think it was a problem with my wifi network that was creating the issue and I changed the configuration. Anyway, it is working great now.

OK great, glad you got it sorted. I welcome any suggestions or improvements for the plugin.

I hope this thread is still being monitored. I’ve got the Denon AVR plugin working except for 2 items: the FrontLeftVol (CVFL) and FrontRightVol (CVFR) arereturning a value of NaN. All other speaker channels are acting properly. Thanks for the help.

Can you tell me the attribute you are using for each text box showing “NaN”?

I’m binding the text box to DenonAVR.FrontLeftVol and DenonAVR.FrontRightVol. Thanks for the reply…hope this answers your question.

@Styxman I’m really sorry, I’ve had out of town guests for the last week. Can you post your hrp so I can try it on my Denon?

I have been reading this thread and could not find what to bind a button to accomplish this function:

I want to click a button to toggle though different surround modes.

Any help is greatly appreciated. The post from drift_645 is what I want to do