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

I am currently writing a Luup plug-in to control Denon receivers.

I know this is something that has been mentioned previously on the forum, but it doesn’t look like anyone actually implemented it:

http://forum.micasaverde.com/index.php?topic=3691.0

On that thread guessed mentioned his plug-in for Onkyo receivers. I took a look at his code and it looks pretty straightforward to do the same thing for a Denon.

I have a AVR-3808ci (which I love by the way!) and so currently I am focusing on supporting that. Assuming I get this working I am quite happy to help with other Denon receivers if anyone else is interested. As guessed mentioned in the thread above the Denon doesn’t have a toggle mute - just a mute on or mute off. I’ll have to play with that a bit.

In fact, there are a ton of things you can do with the Denon serial protocol, so this might take me a while to get fully implemented!

I enjoy picking up new programming languages, and Lua looks pretty straightforward. Should be fun!

One last question, how do you get hosted on code.mios.com’s trac server?

-re

Send a PM to @mcvovidiu, he should be able to set you up.

One last question, how do you get hosted on code.mios.com's trac server?

Hello, send me an email at florin@my.mios.com with your name and the desired username.

Just a quick update to let everyone know I’m still working on this…

There seems to be a quirk with the Denon 3808ci receiver and telnet sessions. I can issue one command (and receive a response) and then the telnet session dies. I have to start a second session to issue another command. Otherwise I have volume up / down / and mute toggle working great.

Moving on from there is simply a matter of populating a list of commands in the Luup files.

-re

I did some work on this basically a straight pull from guessed’s Onkyo Receiver plugin.

I have attached it hopefully to help out a bit.

Fantastic, just what I was after to get my Denon 3311 hooked into my new Vera. Can’t wait to get my hands dirty with a little development to help take this route forward.

Glad to see that other people are interested in this! Work has been pretty crazy recently so I haven’t had too much time to work on this.

I basically started by looking at guessed’s Onkyo plugin as well. I was stalled as I couldn’t figure out how to get my Denon to receive more than one command without restarting the telnet session. It turns out that these receivers are really particular about how the commands are sent. My code was not sending out just “COMMAND\r”. I had to pull up wireshark and look at the packets going out. Haven’t fixed this in Lua yet.

I was able to get pretty far yesterday with Perl. I am doing some experimentation there before I work on Lua. The interface is really terrific though - the receiver will forward any events that occur from the web ui or a remote over the serial link.

A few things to keep in mind:
-Since the protocol doesn’t have a toggle mute it is necessary to poll the mute status first. I have that working in Lua.
-There are a few undocumented commands in the Denon protocol. One such command is “SSFUN ?” <- the space is necessary.

Maybe you guys should email mcvflorin as well to get added to the Trac server?

-re

I think you have gone further then me, mine was fire and forget.

At this point I don’t think I would get a chance to work on this so no point getting access, but I will be following your progress.

Is there any news on the control of denon? On http://www.nicetaco.com/Command3808/ there is a great software that can control every aspect of the 3808 that can be a great insperation.

I had to put this all aside for a couple months but I’m working on it again. Right now I’m trying to work out multiple zones. I might end up splitting it out into three different devices (one for each zone). Any thoughts?

Otherwise, things seem to be working well and I just need to post this.

-re

I would build the Amp’s other Zones as Child devices, but have the Parent device setup to “[tt]handleChildren[/tt]”, so that the events go up to it… and you can then dispatch them out over the Serial|Ethernet connection.

The children will most likely implement many of the services that the parent does (for Volume Control etc), so you’ll have multiple [tt]D_xxxxx.xml[/tt] files, and one [tt]I_xxxxx.xml[/tt] file for the implementation logic.

That sounds like a great way to handle it. As you are well aware I have to figure out making child devices for my other plug in anyway!

-re

I have a 3311 which I can use to help test out your code. I have written a plug-in for my Honeywell Vista Alarm Panel, so I can also help with debug. Have you put any code on the trac site yet? Once you do, I can work with you to get this up and going.

I haven’t put anything up on the Trac site yet, but my login should be active. I’ll see what I can do when I get back from work tonight. I would certainly appreciate any help you could give!

-re

Any chance to get your code up?

Not quite! I did add you to the Denon Project on code.mios.com, but then fixed a bug and started editing the input selection - and now my vera won’t load the new file. I have a typo somewhere but I haven’t had time to fix it.

Input selection is actually something we might need to iterate on a bit. The inputs on the Denon don’t quite match up Vera’s InputSelection1 service. I had a mapping I thought was good for the 3808ci, but it turns out the newer models (such as your 3311) have a lot more inputs and their inputs are slightly different.

I good example, on the Denon 3808 we have TV/CBL and SAT inputs, but on the 3311 we have TV and SAT/CBL.

I did a quick first pass that on a mapping that would work for both, but I had to ignore some of the internet inputs for the 3311. I figure people can tweak it as needed. However, we might want to make the plugin smarter so that you can put the model number into the config and it does the right thing. I would prefer making it easy enough for people to use without touching the code.

Thoughts?

I am not quite sure. I am more of a visual person, so I need to see how your code is organized and exactly how you have things set up to see the best way to move forward.

Maybe it would help if I looked at the RS232/Ethernet protocol. Can we query the device to see what model it is?

Okay, I found the protocol. I need to actually telnet into my receiver to try some of this out. I have a few ideas, but I will experiment on them this evening.

Please note that the Denon is really picky about telnet clients. After each command if you send something besides “\r” the session will lock up. This is certainly not a problem if you roll your own code, but I had a hard time getting my telnet clients to behave nicely.

It am going to be out of town for the weekend and I’m not sure I can get anything posted before then. Haven’t forgotten, just been really busy.

-re

Post it even if its not working. Believe me, I can debug and fix it.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules