We have moved at community.getvera.com

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

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #30 on: August 28, 2011, 09:08:28 am »
Hi all
Had a play with the Denon  3800 plugin I have sitting here thought it would be good time to get access to the repository. Who can do that for me?

Cheers

John

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 #31 on: August 28, 2011, 04:41:47 pm »
John,
I've created you a code.mios.com account, and sent you a PM with the details of that. 

@radarengineer and @dfad1469 are both approvers/admin for that code.mios.com space, so they should be able to add your account.

Offline dfad1469

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #32 on: August 29, 2011, 10:31:22 am »
I have given you read/write access.

I have some code, but nothing working. I keep getting pulled away for work.

Good luck. I have AVR Control Protocol Spec if you need it.

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #33 on: August 29, 2011, 11:43:09 pm »
@radarengineer / @dfad1469

Is there any code loaded onto TRAC yet? Currently I can't see anything when logged in.

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #34 on: August 30, 2011, 07:08:18 am »
@zoot1612

Currently there's nothing in this project's repository.

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #35 on: August 30, 2011, 09:52:59 am »
Hi all
Uploaded code, very rough but something to start from if anyone wants to play.

regards

John

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #36 on: August 30, 2011, 12:36:04 pm »
That is terrific! I have quite a bit of new code to add that just needs to be tested a bit more, but I'm out of town for a week or so.

The big thing we need to get going is child devices for extra zones and then handling inputs for the newer denons. They have a *lot* of inputs!

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #37 on: September 13, 2011, 08:48:56 pm »
By any chance has anyone discovered a command that returns the zone names from a Denon AVR. I have searched high and low but no luck.

By the way in that process I discovered the command for getting the model number "SYMO". Also my code has changed substantially but have not uploaded to TRAC as I want to get it to a certain point.

Currently it supports.
Automatic naming of main zone (courtesy of SYMO)
Automatic creation of children (Currently for 3808).
Handling of basic messages from all zones e.g. volume, source and power (needs some tweaking.)

My next focus will be handling of basic commands sent to all zones, but due to my lack of understanding of LUA, LUUP and all the other bits and pieces it is a slow process.


Cheers

John

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #38 on: September 13, 2011, 10:53:09 pm »
John,

I don't know a command to get that info, but I do know a hack that will return it over the network link. If you load this page: http://<denonip>/ZONERENAME/f_zonerename.asp

Then in addition to returning the page the Denon will print out the following to the telnet interface:

R1MAIN ZONE       
R2ZONE2           
R3ZONE3           
R4               
LSOFF

Where the text after R1-R3 is the name of the zones. Not perfect... but as much as I could figure out. So basically we just need to issue an http get in Vera to pull the zone names.

I don't know if you have a copy of Command3808 (http://www.nicetaco.com/Command3808/Current/) but there are some other unlisted commands available in that program if you watch the log. There was a post in the CharmedQuark forums that listed a lot of them (http://www.charmedquark.com/vb_forum/showthread.php?t=5598&page=9):

SSFUN ? - Source names
SSSPC ? - info about speaker settings
SSSOD ? - Source status
PSCHN ? - speaker channel info ??

SSINFAISSIG ? - audio input signal (analog, pcm, etc.)
-- 01 = analog
-- 03 = dolby digital

SSTPN ? - preset info (tuner)
SSXPN ? - preset info (XM)

I didn't realize anyone else was working on this. I've been meaning to get back to this plugin but have been busy with other things and didn't think anyone else was all that interested. I'm very eager to help though now that I know there is that interest. I think I could pretty easily patch up sending commands to the different zones once you post your code, I do that for my mochad plugin.

Rick

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #39 on: September 14, 2011, 01:51:45 am »
Rick
Will try to upload tonight if I can get it into decent enough state.

Hopefully I am not reinventing the wheel.

John

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #40 on: September 14, 2011, 10:29:21 pm »

I am having computer issues at home as was unable to upload files to TRAC so I am attaching the latest iteration here. If someone can upload it that would be great.

This has only been tested via an IP link so not sure how it will go with a serial connection.

Please note this is a work in progress and still requires a lot of error trapping to be put in place etc.

To use with a IP link.

  • Upload all the attached files to your Vera
  • Create device with the following information
          device_file    D_DenonReceiver1.xml
          impl_file        I_DenonReceiver1.xml
          IP                e.g. 192.168.0.96
  • restart

Notes: -
Tail light guarantee
Mileage may vary (sometimes start up fails but I have not found where the issue is yet, just try restarting.)
Any constructive criticism welcome  ;)

Cheers

John

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #41 on: September 15, 2011, 09:20:16 am »
Fixed my issue and have uploaded to TRAC, please feel free to fix :)

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #42 on: September 15, 2011, 09:49:32 am »
Thanks John!

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #43 on: September 15, 2011, 08:58:54 pm »
Just got a chance to sit down and load your new code. I haven't played with it too much but you have clearly put a lot of work into this, really good stuff!

I am getting a Z4 child device created which is weird... do you see this too? It isn't really a bug in your code, my Denon returns Z4 even though I have a 3808ci and it only have 3 zones.

I think it makes sense to build a lookup table instead of looping through all devices for "findZone". I'll make that pretty small change.

Is there anything else you can think off? I'll try to go through myself. It might be nice to add a drop down to the front of the device with input, something like the drop downs on the Thermostat devices. I could probably add that pretty easily. I also might look into a new icon to replace the lightbulb?

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
« Reply #44 on: September 16, 2011, 03:14:26 am »
The zones are created from what comes back from the AVR. For whatever reason there are four zones in the software so currently (because I am lazy) it just builds all the child devices based on the info feed back from the wget (@radarengineer Thanks for that)

A look up table would be great (cut down on overhead) and a new icon also.

Other things that I would like to do is have the inputs named in the UI as setup in AVR by user. There is a table created for this but because the UI relies on the static json file so I don't know if this is possible. Also ZMON & ZMOFF have not been implemented as I am not sure how to add a second switch to the same device.

Other things you have mentioned in the past also like creating inputs based on model would be good but again had a quick look and couldn't see an easy way of implementing this.

By the way did it parse the Model number and the zone names correctly?






« Last Edit: September 16, 2011, 04:19:58 am by zoot1612 »