Vera (Luup) Control of Denon A/V receiver over serial/ethernet

@dfad1469
Multiple zones are supported, currently the plugin creates four zones for the 3808 because that is what comes back from the 3808 firmware, even though it only supports three. This is easily fixable.

@The-Source
The Denon 3808 pushes out a lot of (all of?) it’s parameters when it starts up. So if the plugin is working properly it should update all the current supported parameters zone volume, zone input etc. It does require a refresh of the UI. I don’t know if this is the plugin or something else as I don’t have enough experience.

I am not running the plugin currently as I don’t really need it and its creation was more of a learning thing for me.

To re-iterate what radarengineer said this does not mean I don’t want it to work properly so will look at the issues and improvements when time allows. I think it fits in the “Perpetual Beta” category.

Three kids under seven and my wife whom is still unsure who I would choose if I was forced to make the choice between her and the computer :wink: Don’t worry I know the answer ;D

Now that UI5 is out this morning it looks like we will need to make sure more changes to this plugin!

I’m hoping to move more of my A/V control to the Vera (Denon, squeezeboxes, and logitech revues) so I will definitely be working on this. I’ve heard that UI5 improves the ability to make custom controls for devices and if so that will help quite a bit.

@zoot1612, @dfad1469, and @guessed:

From the pinned thread at the top of this sub forum it looks like I will be given control of the Denon app on the app store.

I think we started with code from @guessed’s Onkyo plugin and the rest of us have all made changes, so this certainly isn’t “my” code. I am very happy to maintain the app, but just wanted to let you all know I didn’t request ownership of the app. If it is good with you all I will just keep the App up to date with what we have in the svn repository, and if someone else really wants to own it instead that is good with me too.

:slight_smile:

All good with me :slight_smile:

Currently I’m sticking with UI4 so any changes from me will be on that.

Go for it, I don’t have a Denon, so probably not the best idea having me look after it 8)

What I’ve been doing with my other plugins is “merging” the changes that were made for apps.mios.com readiness. This is mostly just the JSON files, but on an occasion or two it involves one or two other files (mostly if you have rev’d frequently, or if you use .lua files)

The Merge has really just been [tt]diff(trunk version, apps.mios.com version)[/tt] and then resolve the differences. For the most part, this involves putting back in the original (unadulterated) [tt]eventList[/tt] section, adding a [tt]SceneGroup[/tt] section, and then a few “[tt]top[/tt]”, “[tt]left[/tt]” (etc) tags before the Display sections.

This should give you a UI4 & UI5 “dual mode” set of plugin files that can be checked back into SVN, then tested. I then re-tag these something like [tt]0.1x-UI5-merge[/tt] … of course, feel free to do whatever, but this is what I’ve done so far.

Haven’t done the Onkyo yet, as I’m working on the more commonly used ones.

Can someone verify that zone 1 & 2 on a Denon 3800 jump from 10 to 99(Min). The protocol document I have says 00 - 99 but some other documents I have seen say 10 - 99.

Thanks

John

@guessed, thank you as always for the help, I will do exactly that!

John, my zone’s 1 goes from 00–99 (on the Display 01 corresponds to -80dB and 99 to 18dB). Zone 2 and 3 is from 10–99 (-70dB to 18dB). So it seems like both the protocol documents and the other documents disagree with my receiver? Also, I have 00 as min and 99 as max (e.g., MV01 is -80dB?).

I tried it out this morning with “Command3808” which is a nice windows program for the Denon. The only problem I have is that I think you can only have one controller (Command3808, the Vera plugin, or an iPod/Android app) connected to the Denon at once.

I’ve been thinking about writing a telnet duplexer that would connect to the Denon and allow multiple connections, and just pass the input and output to and from the Denon and plugin appropriately. I think it would work but just haven’t had the time to try it.

Instead of a telnet duplexer is just checked it with a easier way…
I opened the webinterface of the Denon and Zone2 & Zone3 goes from -70 - +18
The Main zone goes from -80 to +18

So its correct that the main zone and zone2/3 are different.

Cheers for that, I spent a bit of time trying to find out where the code was wrong before getting to this point.

I have made some minor changes to the code one of which was to make it recognise 99 as min which does not sound right from what you are saying. I will have another look tomorrow.

Hi, any tips/help/doc on quickstart setup? I’ve plugged in my receiver’s IP and Mac address but clearly not enough. “Device not ready”.

Running a Vera2 w/UI5 - Receiver is an AVR-2112CI network receiver.

thx
-sk

I don’t think this is plugin related. What firmware version do you have?

Looks like I need to update the FM.

Running Version 1.5.236
Latest Version 1.5.255

Updated FM, reinstalled the Denon plugin, Getting Denon Receiver (AVR) via RS232/Ethernet [33] : Lua Engine Failed to Load

I found the issue, fixed it, and published a new version of the plugin (1.1). Please install this version.

The problem was that the Lua file wasn’t terminated with a newline character.

Worked right away! Added the IP and recognized it. On/Off and volume work. Will explore more now. Thanks.

@mcvflorin, glad to hear the issue was that simple! I was afraid I was going to have to do some major debugging to make this work with UI5 and just have been swamped and not able to look into it.

@santakrooz, please feel free to join us on this thread in brainstorming modifications to the plugin code. Glad to know people are using it!

Im trying to command some things with lua code but Im doing something wrong :wink:
I try to command it on the following way

luup.call_action("urn:schemas-denon-com:device:receiver:1","SetInputTarget","2", 16)

Were 16 is the deviceid of the main zone
When i test to code it says that the command was sent successfully but nothing happens. ???

Looks like a few issues. Call_action takes a [tt]serviceId[/tt], so this is a string described in the [tt]D_…xml[/tt] file, between the relevant [tt][/tt] tag, and it will have [tt]:serviceId:[/tt] in the middle of the string.

The next is that call_action needs the name of the parameter in addition to its value (from memory) so you should look at the samples in the wiki to see how parameters are passed, an then the [tt]S_…xml[/tt] file to see the actual parameter name to use for that action.

so it should look like this

luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","SetInputTarget",{newTargetValue = "Input4"}, 16)

And aften testing… nothing happens.
In the s…xml file i found this

<action><name>SetInputTarget</name><argumentList><argument><name>newTargetValue</name><direction>in</direction></argument></argumentList></action>

Input4 should change it to Net/usb according to the I…xml file

<action><serviceId>urn:micasaverde-com:serviceId:InputSelection1</serviceId><name>Input4</name><run> -- Main picture Input Select - NET/USB denonLib.sendZoneCommand(lul_device, 'SI','NET/USB','Input1') </run></action>

I dont find the wiki much usefull if you dont use standard devices. So if any could adjust the above code to a working one the im will be able to implement it in other scenes

Looking through the Denon implementation, it looks like there’s no code to back the [tt]SetInputTarget[/tt] Action of this serviceId declaration:

[tt]
urn:denon-com:serviceId:Receiver:1
urn:denon-com:serviceId:Receiver1
S_DenonReceiver1.xml
[/tt]

So we’ll have to stick with the common/Micasaverde definitions for changing the input. These are defined in this serviceId declaration:

[tt]
urn:micasaverde-com:service:InputSelection:1
urn:micasaverde-com:serviceId:InputSelection1
S_InputSelection1.xml
[/tt]

This particular serviceId has a bunch of separate, parameter-less, actions that have names like [tt]Input1[/tt], [tt]Input2[/tt], [tt]Input3[/tt], [tt]Input4[/tt], … [tt]Input10[/tt] (etc). The full list that’s been implemented by the Denon can be seen inside of [tt]I_DenonReceiver1.xml[/tt]

So these are simpler to call. Using your original code, and adapting a little:

luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","Input4",{}, 16)