We have moved at community.getvera.com

Author Topic: Vera (Luup) Control of Denon A/V receiver over serial/ethernet  (Read 190096 times)

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #15 on: July 20, 2011, 11:20:40 am »
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?

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #16 on: July 20, 2011, 01:45:08 pm »
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?

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #17 on: July 20, 2011, 02:14:12 pm »
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.


Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #18 on: July 20, 2011, 10:01:16 pm »
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

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #19 on: July 20, 2011, 11:21:45 pm »
Post it even if its not working. Believe me, I can debug and fix it.

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #20 on: July 21, 2011, 12:10:13 am »
I would but I don't have access to it right now! If you want take a look at the files posted by zoot1612. I did the same thing as him which is basically start from guessed's onkyo plugin.

The only big issue with zoot's code is he doesn't toggle mute. That is a pretty simple fix which I have made. Otherwise I've just added some more commands.

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #21 on: July 27, 2011, 12:53:59 am »
Okay, so I have played with Zoot's code. I have it working, but I have alot of changes I would like to make. However, I don't want to step on any toes or re-write any code. I also want to check in my work into a revision control system.

guessed has made some more mods to the Onkyo code that I would like to integrate. I would also like to create a generic state template for audio receivers.

So, how should I proceed? radarengineer owns the repository. Can I be added to it? Right now, nothing is set up for it or the wiki.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #22 on: July 27, 2011, 01:19:53 am »
Attach it and we can discuss, we're all evolving our "idea" of what we want to do so it won't be any harm (and I don't think you'll tread on any toes...)

If @radarengineer gives me the ok, I can add you to the code.mios.com SVN.  I have full admin rights there and create spaces (etc) if you want to build out some more core/shared UPnP libs (etc)... although UPnP reg isn't working as it should, if I understand the issues @Ap15e has indicated...

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #23 on: July 27, 2011, 11:50:37 am »
dfad1469, I gave you permissions for the Denon repository last week. I am VERY happy for any and all help! If you have ideas on how to improve things that is terrific. Go ahead and check in anything you want. I have also been looking at guessed's code and I would like to incorporate those changes as well.

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #24 on: July 28, 2011, 02:01:40 am »
I can't find the repository. When I go to code.mios.com its not listed on the dashboard. Where is it?

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #25 on: July 28, 2011, 11:59:16 pm »
I think you should be able to see it now?

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #26 on: July 29, 2011, 12:04:33 am »
I got a confirmation PM from him this evening.

I added a bunch of extra settings to your Trac space, along with enabling his account, but it's not setup as "public" just yet so the auth'd folks have to login first.

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #27 on: August 11, 2011, 09:21:20 am »
@dfad1469

Have you had any more luck messing with this? I have been going through the Sompy Plugin Walkthrough to learn more about controlling child devices:

http://wiki.micasaverde.com/index.php/Luup_Somfy_Walkthrough

This probably isn't too much effort, but I just haven't had a chance to flush out all the code yet.

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #28 on: August 11, 2011, 12:47:13 pm »
Funny you should mention that. I am taking a bit of time off from work starting today and I had just opened the text editor to work on it. Hopefully, I will post something in the next day or two.

I have the code to create child devices and have created a zone device. I have started to divide the code up among the zone and receiver states.

I have also written the code to receive updates from the receiver. I have about 2 hours more of work to get this to a releasable state.


Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #29 on: August 11, 2011, 10:02:37 pm »
That is terrific! It sounds like you have been really working hard on this. Do you have code to handle the mute toggle yet? I can post that portion of my code or add it to what you have once it is up. I suppose if you check for mute status when you first connect to the Denon you don't have to query on each mute request....

I have been swamped at work for the past few weeks and so I haven't had a chance to really touch this.