The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Denon AV Plugin => Topic started by: radarengineer on March 06, 2011, 07:52:47 pm

Title: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 06, 2011, 07:52:47 pm
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: strangely on March 06, 2011, 10:38:38 pm
Send a PM to @mcvovidiu, he should be able to set you up.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcvflorin on March 07, 2011, 05:29:16 am
Quote
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 10, 2011, 12:57:28 am
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 21, 2011, 02:43:42 am
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.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: MikeT on March 21, 2011, 07:08:15 pm
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 21, 2011, 09:11:01 pm
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 22, 2011, 03:01:26 am
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: xtrex on May 18, 2011, 09:43:37 am
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on July 18, 2011, 11:13:03 pm
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on July 18, 2011, 11:50:34 pm
I would build the Amp's other Zones as Child devices, but have the Parent device setup to "handleChildren", 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 D_xxxxx.xml files, and one I_xxxxx.xml file for the implementation logic.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on July 19, 2011, 12:59:22 am
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 on July 19, 2011, 01:05:06 am
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.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on July 19, 2011, 09:28:42 am
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 on July 20, 2011, 10:34:43 am
Any chance to get your code up?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 on July 20, 2011, 11:21:45 pm
Post it even if its not working. Believe me, I can debug and fix it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed 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...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on July 28, 2011, 11:59:16 pm
I think you should be able to see it now?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcvflorin on August 30, 2011, 07:08:18 am
@zoot1612

Currently there's nothing in this project's repository.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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.

          device_file    D_DenonReceiver1.xml
          impl_file        I_DenonReceiver1.xml
          IP                e.g. 192.168.0.96

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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 15, 2011, 09:20:16 am
Fixed my issue and have uploaded to TRAC, please feel free to fix :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on September 15, 2011, 09:49:32 am
Thanks John!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer 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?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 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?






Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on September 16, 2011, 12:21:20 pm
John,

Made quite a bit of changes, hope you don't mind! Just a few things I've picked up from other people here on the forum.

I moved the lua code into a seperate lua file that gets loaded from the implementation file,  incorporated a couple of helper log function that @guessed recommended using, added a lookup table for child devices, and the moved some of the code that was run for any zone command into a common function.

I also changed some of the "if () then x=a else x=b end" to the Lua ternary function:

http://lua-users.org/wiki/TernaryOperator

Again, hope you don't mind any of those. If you do lets talk about what to back out, and otherwise, I'll be trying to figure out how to change the picture and maybe the zone labels in the json.

I wonder if it is possible to change the json to be a symbolic link to a file in /tmp/. That way we could generate a new json when we run receiver startup, and since it would be in /tmp/ it wouldn't wear about the vera's flash memory...

Thanks!

EDIT: Here is some really good info from @futzle on modifying icons: http://wiki.micasaverde.com/index.php/Luup_plugin_icons
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 16, 2011, 09:52:26 pm
@radarengineer
No really happy about any improvements and help as I am still learning, anyway if I didn't want it improved I shouldn't have shared it  ;)

Thanks for the links will be looking to improve my knowledge.

All the json stuff is still a bit of a mystery to me, I've been standing on the shoulders of giants (thanks to all the help I have had from the people on this forum) with generous amounts of cut and paste.

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on September 18, 2011, 03:14:51 pm
A few comments:


btw, much cleaner in the separate L_DenonReceiver1.xml file.  I think I'll go split Onkyo code out similarly..
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on September 18, 2011, 04:22:42 pm
@guessed, as always, thank you for the recommendations!

I just made those changes and checked them into svn. I did find that any function called by incoming couldn't be local. Vera would complain about a calling a nil function. But I made local all functions that didn't return errors.

The other advantage to breaking out the Lua code is that the line numbers are correct when Vera complains!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 18, 2011, 07:54:59 pm
Code: [Select]
Correct the <protocol> tag in D_DenonReceiver1.xml to "cr", instead of "cf"
Why did it work at all ;)

@radarengineer
Is there anything else I can help out on?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on September 18, 2011, 08:21:01 pm
Two good questions! I think @guessed told me before that the protocol in the I_DenonReceiver1.xml file takes precedent over the device file.

As far what to do next... I suppose it would be good if we looked at setting the surround processing mode? That shouldn't be to hard, although I'm not sure how necessary it is. I'm hoping that with UI5 we have more space to put device options on the main page.

Do you have any ideas for needed features?  ???

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on September 18, 2011, 09:10:14 pm
The mysteries of MiOS...  8)

There was a point where one of the MCV lads (@mcvflorin, I think) indicated that the Implementation version was effectively an override of the Device declaration version.  A little validation in the MCV framework code would never go astray...

For the others, yes, I forgot to mention that anything directly called by the MiOS stuff needs to be "public" (or whatever non-Local is called).  These are called directly by MiOS, so things like <startup> and call_timer/call_delay blocks are like that.  

Everything else should be fine though, since their ACTION blocks/wrappers are code-gen'd into your namespace.  They will need to be sequenced correctly based upon calls made within the L_ file (ie. declare before use)

eg. setVolume after sendZoneCommand, then the latter can be made local (etc)
eg. sendZoneCommand after denon3800ReceiverSend, etc, etc

It's been a while though, so I could be wrong...

... oops, forgot that anything you actually intend to call within the L_xxx.xml file also needs to be public, but presumably that's a narrow interface anyhow.

Code: [Select]
Correct the <protocol> tag in D_DenonReceiver1.xml to "cr", instead of "cf"
Why did it work at all ;)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 18, 2011, 09:23:45 pm
So does that mean it does not need to be in the device file at all?

No idea regarding needed features it was more for the learning part then anything for me.

When I get a chance will look at the surround implementation but I am with you on the necessity of it.

Maybe if someone else uses the plugin they can put forward some ideas.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on September 18, 2011, 09:35:18 pm
So does that mean it does not need to be in the device file at all?

Probably. 

I just got into the habit of putting it in both, and making the same value.  I've been bitten a few times by "bad" values [that I put in there] so that's why I notice when the values are out of whack...  For me, and likely for a few others, it's been discovery (trial and error style)... eventually settling on patterns that work reliably... or at least appear to  8)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 04, 2011, 10:04:21 am
Well i also added the code to my Vera and my Denon 3808 is showing in me Vera webinterface.

I also can add it to a scene but i can only change the on/off state of it. Is this still under development or do i have to code lua for my wishes ;) (not that i can do that, but i could learn ;) )
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 06, 2011, 09:56:40 pm
Can you tell me exactly what you want and if I get my sh*t together I might have a look.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 07, 2011, 09:42:21 am
@The-Source, I was just messing around (I'm not sure about zoot1612) when writing this plugin and don't use it much myself. That doesn't mean I don't want it to work, it is just that we basically hit a point where the basics worked and there wasn't any requests, so we stopped.

You should be able to change more than just on/off. Do all the other controls (accessed when you click the wrench in the upper right hand corner of the device) work? I think with UI5 (coming out this week?) we should have a lot more control over the UI element for the receiver, and I think we can make some good improvements.

To second zoot1612, tell us what you are trying to do and we can see what we need to do to get you going.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 07, 2011, 12:48:01 pm
When i click on the wrench i can select the different inputs so that work.
Here is my list of things i noticed..

1: The current volume setting of the zone 2 isn't updated when i power-on then zone (my receiver only has 3 zones but 4 are showing (not that i really bother ;) ) only after pressing the refresh button it changes :?
2: When using i a scene, you can only select on/off
    I would like to be able to select input as well (and when possible a volume lvl)
3: There is no value visible of the current volume (all zones) like -38 using the slider could result is neighborhood harassment :P

4: i dont know if this is plugin related, but i use homebuddy for control with my Android phone and the denon isn't showing in the device list. But i must say, the W.O.L plugin (also from code.mios.com) isn't also so i think that its a general plugin thing..
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dfad1469 on December 08, 2011, 01:22:19 am
@The-Source

I was working real part time on this app. I have some answers to your questions:

1) I am pretty sure that multiple zones aren't supported. I had some mods to add this, but they were real buggy and the code got too stale for me to debug it. Is this a feature you would like?
2) This should be pretty easy to add....I think.
3) This is something that would be easier to wait and see how easy that would be in UI5. UI4 is a real pain to do stuff like that.
4) Homebuddy only recognizes stuff that the author puts in. He is currently re-writing his source, so I don't think he will add stuff. He also won't open up his code base (I asked him) so you can't add in either. Sorry, but this one is out.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 08, 2011, 12:46:44 pm
Well i did a greater loop at the volume update/ zone thing but when i manually refresh the vera interface then its updated correctly. So i think that there is now auto-update/ auto-poll within the plugin so that vera knows the current value?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 08, 2011, 06:47:12 pm
@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 ;) Don't worry I know the answer ;D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 09, 2011, 12:14:46 pm
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 12, 2011, 10:38:21 pm
@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.

:)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 12, 2011, 11:05:20 pm
All good with me  :)

Currently I'm sticking with UI4 so any changes from me will be on that.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on December 13, 2011, 01:04:17 am
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 diff(trunk version, apps.mios.com version) and then resolve the differences.  For the most part, this involves putting back in the original (unadulterated) eventList section, adding a SceneGroup section, and then a few "top", "left" (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 0.1x-UI5-merge ....  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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 13, 2011, 07:15:56 am
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 13, 2011, 09:20:35 am
@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.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 13, 2011, 09:32:42 am
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 13, 2011, 11:15:55 am
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on December 22, 2011, 04:32:38 pm
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcvflorin on December 23, 2011, 04:55:54 am
I don't think this is plugin related. What firmware version do you have?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on December 23, 2011, 12:46:19 pm
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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on December 23, 2011, 01:18:27 pm
Updated FM, reinstalled the Denon plugin, Getting Denon Receiver (AVR) via RS232/Ethernet [33] : Lua Engine Failed to Load
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcvflorin on December 23, 2011, 01:52:23 pm
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.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on December 23, 2011, 02:19:35 pm
I found the issue, fixed it, and published a new version of the plugin (1.1). Please install this version.

Worked right away! Added the IP and recognized it. On/Off and volume work. Will explore more now. Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 23, 2011, 11:42:03 pm
@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!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 25, 2011, 09:23:26 am
Im trying to command some things with lua code but Im doing something wrong ;)
I try to command it on the following way
Code: [Select]
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.  ???
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on December 25, 2011, 10:11:45 am
Looks like a few issues.  Call_action takes a serviceId, so this is a string described in the D_....xml file, between the relevant <serviceId> tag, and it will have :serviceId: 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 S_....xml file to see the actual parameter name to use for that action.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 26, 2011, 08:00:31 am
so it should look like this
Code: [Select]
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
Code: [Select]
<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
Code: [Select]
<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
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on December 26, 2011, 08:42:33 am
Looking through the Denon implementation, it looks like there's no code to back the SetInputTarget Action of this serviceId declaration:

    <service>
        <serviceType>urn:denon-com:serviceId:Receiver:1</serviceType>
        <serviceId>urn:denon-com:serviceId:Receiver1</serviceId>
        <SCPDURL>S_DenonReceiver1.xml</SCPDURL>
    </service>


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

    <service>
        <serviceType>urn:micasaverde-com:service:InputSelection:1</serviceType>
        <serviceId>urn:micasaverde-com:serviceId:InputSelection1</serviceId>
        <SCPDURL>S_InputSelection1.xml</SCPDURL>
    </service>


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

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

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

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 26, 2011, 10:11:15 am
Thats works fine.

Looked like i was close to the correct code.. Atleast is now easier for me to understand the code and how it must be read the xml files and use lua to in my scenes

Code: [Select]
luup.call_action("urn:denon-com:serviceId:Receiver1","SetVolumeTarget",{newTargetValue = "30"}, 16)
Does the volume set to specific level :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 26, 2011, 10:35:58 am
It looks like the plugin needs a little work. I have a Denon 3808ci, and I seem to remember that the Micasaverde definition has enough inputs to (just) cover the inputs on my receiver, but briefly looking at the newer Denon manuals I don't think there are nearly enough inputs (The newer Denon's seem have to inputs for all sorts of internet streaming services too).

I'm certainly happy to change the code if I can figure out what the correct behavior should be. Any kick in the right direction is also appreciated. I would also really like to improve on the device GUI element in the UI5 dashboard and make more controls accessible from there, and if possible, have the sources named correctly. The plugin "knows" the right names, I just don't think there is anyway to update the display code with that information.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 27, 2011, 11:40:19 pm
So the next questions is how does one get access to the app store to edit a plugin? My current MIOS account does not work.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 28, 2011, 01:18:34 pm
@zoot1612, what plugin are you trying to edit? I think mcv gave me control of the denon plugin and so you might not be able to edit it. If you commit changes to svn and send me a pm I am happy to add them to the plugin and request approval from mcv.

That whole thing is a little involved of course... but I hope the added convenience for non-technical end users makes it worth it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 28, 2011, 04:21:59 pm
Well after a hard day of work i just did some code making/ debugging for my homecomming scene.
First is was only a
Code: [Select]
return luup.is_night()

Now its a bit "changed"
Because calling other scenes from within a other scene is not really working in the way i want. I did remove my small pure code scene and merge it in 1.
The result:
Code: [Select]
if luup.is_night() then
luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget", {newTargetValue = "100"}, 11)
luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget", {newTargetValue = "45"}, 4)

end
luup.call_action("urn:micasaverde-com:serviceId:DiscretePower1","On",{},16)
luup.sleep(2000)
luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","Input4",{}, 16)
luup.sleep(200)
luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","Input5",{}, 16)
luup.sleep(2000)
luup.call_action("urn:denon-com:serviceId:Receiver1","SetVolumeTarget",{newTargetValue = "39"}, 16)
In short
When its dark outside it turn on 2 lights.
Afther that statement it turns on my Denon, waits 2 seconds (needed to powerup the denon)
Changes the input to something else then the tuner...
Short wait which is also needed ;)
Turn (back) to tuner input. 1
And finally turn up the volume a bit ;)

1: When the receiver is allready on Tuner input and you send this command it switches band between AM/ FM
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 28, 2011, 09:44:37 pm
@radarengineer

Can a UI5 branch of the Denon plugin be created in SVN using the code from the app store?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 01, 2012, 03:44:38 pm
Worked right away! Added the IP and recognized it. On/Off and volume work. Will explore more now. Thanks.

On/Off, Volume, and a few of the inputs work -  However, the inputs seem to be fixed to a different model so it only works on a few inputs that match my 2112ci. Is there anything to edit to match up the inputs to this model?

Works on 2112ci:
on/off
displays correct current input name
mute/unmuite
vol up/down
dvd
net/usb
tuner
cd
v.aux
ipod (switches to net usb should switch to dock I think)

doesn't work:
sat/cbl (sat)
game1
game2
dock
bd
tv

doesn't apply:
boxee
phono
xm
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 01, 2012, 03:48:08 pm
@santakrooz, please feel free to join us on this thread in brainstorming modifications to the plugin code. Glad to know people are using it!

Will do. Happy to try/test/hack anything. Seems that it would be good to have a denon model file with preset cmds appropriate for different Denon models. My 2112ci has a different set of inputs for example.

Is there any documentation on Denon's network API?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on January 02, 2012, 04:14:00 pm
Search for Command3808 on google for a codebase which is also used in this plugin. The L_DenonReceiver1.lua is basicly the source of command3808 transformed into a "vera file"
If you need some documentation search for AVR-3808CISerialProtocol and you should and up with a pdf which has also a version number on the end of it like "AVR-3808CISerialProtocol_Ver5.2.0a" In this document are all the telnet commands and responses...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 02, 2012, 05:42:56 pm
Search for Command3808 on google for a codebase which is also used in this plugin. The L_DenonReceiver1.lua is basicly the source of command3808 transformed into a "vera file"
If you need some documentation search for AVR-3808CISerialProtocol and you should and up with a pdf which has also a version number on the end of it like "AVR-3808CISerialProtocol_Ver5.2.0a" In this document are all the telnet commands and responses...

Interestingly, while the vera plugin works but just doesn't have the right inputs/etc to match a different model than 3808 (ie 2112 or 1912 etc) the Command3808 program won't communicate with my 2112ci at all. However, snooping around the 2112ci Webui I was able to dig up the javascript that it uses to configure the UI for each specific model. See attachment txt

below is where it sets up the input list based on which model its trying to configure the UI for:

   //  Sourceアイコンの追加
   if( selectSource == "NET/USB" ) {
      selectSource = data.getValue("NetFuncSelect");
      if( selectSource == "IPOD DIRECT" || selectSource == "USB DIRECT" ) {
         selectSource = "USB/IPOD";
      }
   }
   if((parseInt( data.getValue( "ModelId" ) ) == 1) || // 19XX
      (parseInt( data.getValue( "ModelId" ) ) == 2)) { // 21XX
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "DOCK"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT/CBL" , "TV" , "GAME" , "GAME2" , "V.AUX"], selectSource, false);
      
   }else if(parseInt( data.getValue( "ModelId" ) ) == 3){ // 23XX
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD"  , "DOCK"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT/CBL" , "TV" , "GAME", "GAME2" , "DVR" , "V.AUX"], selectSource, false);
      
   }else if(parseInt( data.getValue( "ModelId" ) ) == 4){ // 33XX
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "PHONO" , "DOCK"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT/CBL" , "TV" , "GAME", "GAME2" , "DVR" , "V.AUX"], selectSource, false);
      
   }else if(parseInt( data.getValue( "ModelId" ) ) == 5){ // NR160X
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "M-XPORT"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT" , "TV" , "GAME"], selectSource, false);
      
   }else if(parseInt( data.getValue( "ModelId" ) ) == 6){ // SR500X
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "M-XPORT" ], selectSource, false);
//      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT" , "TV" , "VCR" , "GAME" , "AUX"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT" , "TV" , "VCR" , "GAME" , "AUX1"], selectSource, false);      
      
   }else if(parseInt( data.getValue( "ModelId" ) ) == 7){ // SR600X
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "PHONO", "M-XPORT" ], selectSource, false);
//      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT" , "TV" , "VCR" , "GAME" , "AUX", "AUX2"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT" , "TV" , "VCR" , "GAME" , "AUX1", "AUX2"], selectSource, false);
   }
   
   var list;
   if (data.getValue("SalesArea") == "0") {   // USA
      list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Pandora" , "Napster" , "Rhapsody" ];
   }else if(data.getValue("SalesArea") == "1") {   // EUR
      if(data.getValue("LastfmDisplay") == "TRUE") {   // Last FM Display
         list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Last. fm" , "Napster" ];
      }else{
         list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Napster" ];
      }
   } else {
      list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" ];
   }
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 02, 2012, 10:14:07 pm
Cool thing. I also located the 2112/1912 protocol documentation http://www.procinema.hu/dokumentumok/denon-avr-1912-protokoll.pdf. It's very similar to the 3808 infact it looks like the same protocol, with differences for the delta in features/inputs/zones. If we can get the specs on variety of Denon models then it would be great to let the user select the model and offer the appropriate cmds based on the model.

Would be happy to hack the plugin. How (and where) do I d/l the plug-in for editing, then reinstall?

Thx
SK
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 02, 2012, 11:31:15 pm
@santakrooz
I think currently Radarengineer is the only one with access to the UI5 code so you have to do as you have suggested (edit and upload).

Also If you did not name your device it should be named with model plus main zone e.g. AVR-3808EUR - Lounge so no need to ask the user, it should be able to be done automatically.

@santakrooz
Can you look at the javascript code for data.getValue? I would like to see how the information for ModelId and SalesArea is been retrieved.

cheers

Zoot



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on January 03, 2012, 12:34:57 am
@santakrooz and @zoot1612, I will be uploading the code to svn soon.

One of the big issues with zones that was mentioned earlier in this thread is how to handle new receivers with more inputs than are supported in urn:micasaverde-com:serviceId:InputSelection1. I think we can add a SetInputTarget in urn:denon-com:serviceId:Receiver1 that supports more inputs.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 03, 2012, 12:59:19 am
@radarengineer
Easy to add more inputs the only issue is naming them in UI. Do you know if this is possible in UI5?

zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 03, 2012, 11:28:00 am
Can you look at the javascript code for data.getValue? I would like to see how the information for ModelId and SalesArea is been retrieved.

with data.getvalue function ie:

if((parseInt( data.getValue( "ModelId" ) ) == 1) || // 19XX
      (parseInt( data.getValue( "ModelId" ) ) == 2)) { // 21XX
      appendSource($("#funcPlayer .RFuncIcon"), del, source, rename, ["BD" , "DVD" , "CD" , "DOCK"], selectSource, false);
      appendSource($("#funcVideo .RFuncIcon"), del, source, rename, ["SAT/CBL" , "TV" , "GAME" , "GAME2" , "V.AUX"], selectSource, false);

and

if (data.getValue("SalesArea") == "0") {   // USA
      list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Pandora" , "Napster" , "Rhapsody" ];
   }else if(data.getValue("SalesArea") == "1") {   // EUR
      if(data.getValue("LastfmDisplay") == "TRUE") {   // Last FM Display
         list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Last. fm" , "Napster" ];
      }else{
         list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" , "Napster" ];
      }
   } else {
      list = ["NET/USB", "Favorites", "Internet Radio" , "Media Server", "USB/iPod"  , "Flickr" ];
   }
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 05, 2012, 08:05:53 pm
So decided to take the plunge and install UI5 all went OK but now the Denon plugin is only partially working.

It looks like the feedback from the following via Telnet is occurring after the create children command therefore children are never created as table is empty.
Code: [Select]
local getZoneNames = 'http://' .. ipAddress .. '/ZONERENAME/r_zonerename.asp'
 log(string.format ("(receiverStartup) ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort)))
--get zone names
log("(receiverStartup) force AVR to send zone names" .. getZoneNames)
status, response = luup.inet.wget(getZoneNames)
I have tried a few different combinations but have not been able to get the commands coming in before the create child function is called.

I am assuming I can use intercept somehow so that the startup waits for the table to be populated but unsure how to implement, any help would be appreciated.



Thanks

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on January 05, 2012, 10:10:41 pm
All - I put the code from apps.mios.com onto a tag called "initial-UI5" on the svn server.

Just starting to look at the changes guess suggested here:

http://forum.micasaverde.com/index.php/topic,5863.msg55856.html#msg55856

Once that is done I would like to commit the merged code to trunk and make a tag called "0.1-UI5-merge" as guessed has done with his plugins.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 06, 2012, 01:56:47 am
I would like to suggest the get zone names via Ethernet part of the plugin be removed. This is for two reasons, one I can't get it to work reliably in UI5 from a timing point of view and the replacement covers off connections for both with serial and Ethernet.

The replacement would be a table as follows: -
Code: [Select]
local receiverDetails = {
["AVR-3808EUR"]={ zones={3}, inputs={"TV/CBL","HDP","DVD","NET/USB","TUNER,CD","PHONO","SAT","VCR","DVR","V.AUX","XM","IPOD"} },
["AVR-2???????"]={ zones={2}, inputs={"TV/CBL","HDP","DVD","NET/USB","TUNER,CD","PHONO","SAT","VCR","DVR","V.AUX","XM","IPOD"} },
}

The table will cover off the zones and inputs by using feedback from "SYMO" which in my case returns "AVR-3808EUR". This also means that to add another device all that needs to be done is add another entry in the receiverDetails table (if they support the command).

I have already implemented but not tested just want the get feedback on whether you would prefer this or the existing method.

Please note this does not get around the naming of buttons in UI

I have attached the as yet tested implementation so you can see what I have done.

regards

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on January 08, 2012, 11:00:59 am
Zoot, for now that sounds good to me. Once we figure out how to get the naming of buttons working in the UI I will probably try to chase down getting zone names from ethernet further.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 09, 2012, 10:00:49 pm
Zoot, for now that sounds good to me. Once we figure out how to get the naming of buttons working in the UI I will probably try to chase down getting zone names from ethernet further.

Let me know if I can help in anyway. Test etc. I have a new AVR-2112CI

SK
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 10, 2012, 07:41:48 pm
@santakrooz

Can you provide the string from the receiver when sending the "SYMO" command?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 10, 2012, 09:36:50 pm
@santakrooz
Can you provide the string from the receiver when sending the "SYMO" command?

Sure. How do I send it? Telnet?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 10, 2012, 11:07:18 pm
Yes

Or you could try replacing "L_DenonReceiver1.lua" with the attached and it should pick it up.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 11, 2012, 03:24:37 am
Yes

Or you could try replacing "L_DenonReceiver1.lua" with the attached and it should pick it up.

I've got Putty and my receiver's IP address. Can you tell me how to send the symo cmd?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 11, 2012, 03:58:32 am
Change connection type to TELNET (port 23), put in IP address and open connection.

Type in
Code: [Select]
SYMOand hit enter.

I have never really got the receivers to work properly with Telnet clients, you have to get it right first time or you have to drop the connection and try again. Also you need to ensure nothing else is connected to port 23 on the receiver.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 11, 2012, 12:02:54 pm
Change connection type to TELNET (port 23), put in IP address and open connection.
I have never really got the receivers to work properly with Telnet clients, you have to get it right first time or you have to drop the connection and try again. Also you need to ensure nothing else is connected to port 23 on the receiver.

Weird. It's refusing the Telnet connection immediately before I can type anything. Wonder if there is a port or telnet enable in Denon the settings somewhere.

Tried Absolute Telnet as well and get

Connecting to 192.168.1.100:23
   attempting 192.168.1.100:23...     Failed: Connection Refused
Connect to 192.168.1.100 failed.  Winsock Error: Connection Refused

 I can connect to it in Putty via HTTP fine though. So if there is an http version of the cmd I can try that.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on January 11, 2012, 09:53:01 pm
santakrooz,
Weird. It's refusing the Telnet connection immediately before I can type anything. Wonder if there is a port or telnet enable in Denon the settings somewhere.

Is the Vera denon plugin currently connected to the receiver? Because Denons only support one telnet connection at a time. You might have to temporarily change the ip in the denon plugin config to something invalid to force it to disconnect.

Zoot is right about it not being really happy with telnet clients... I think the issue is the denon only wants a "\r" (carriage return) and not a "\r\n" or "\n" which is what I think the telnet clients add. At any rate with putty or absolute telnet you will get one command and then you have to disconnect and reconnect. But you should be able to get that one command in!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 11, 2012, 10:05:10 pm
>> Is the Vera denon plugin currently connected to the receiver?

Could be. I'll remove it and see. thx

Update: That was it. Thanks Radar. Worked immediately.

Zoot: The SYMO cmd returns AVR-2112USA
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 11, 2012, 10:22:04 pm
Zoot is right about it not being really happy with telnet clients... I think the issue is the denon only wants a "\r" (carriage return) and not a "\r\n" or "\n" which is what I think the telnet clients add. At any rate with putty or absolute telnet you will get one command and then you have to disconnect and reconnect. But you should be able to get that one command in!

Thx Radar. Changing the terminal emulation (absolute telnet) so Enter sends CR instead of CR/LF fixed it so it keeps the connection and I can send as many commands as needed. I also turned local echo on, and host CR = CR/LF so that the display looks right. It works pretty well actually.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 15, 2012, 09:04:44 pm
Hi all
I have attached a different version of the plugin below.

This is different in that it gets the input names from the receiver and populates as required. I have also changed to startup so it should now cater for serial/IP connection equally.

At the end I think I overcomplicated the whole thing so need to pull back for awhile  :)

regards

zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 15, 2012, 09:20:16 pm
By the way if you want a device to appear in the "AV Gear" tab in UI5

Code: [Select]
luup.attr_set("category_num","15",k)
cheers

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 15, 2012, 10:35:55 pm
I have attached a different version of the plugin below.

Awesome Zoot. I'll try it out. How do you install the app? UI5 seems quite different than UI4 in this regard. Appears to only allow install apps from the appstore. -m
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 15, 2012, 10:54:30 pm
Go to tab "APPS"
sub tab "Develop Apps"
Choose menu item "Luup Files" and upload files as per UI4

regards

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 15, 2012, 11:27:42 pm
Thx Zoot. Got it installed. It configured up and recognized the model name (AVR-2112USA) in adv settings. Vol up/dn, power, mute all work. But the inputs are remaining generic ie input1, input2, etc thru input25 - are these supposed to customize to the 2112?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 15, 2012, 11:57:28 pm
@santakrooz
No, I have made the plugin generic as I don't know what the input names are going to be. The plugin should map the inputs to input1 -> input? (?depends on model).

The actual inputs are based on "urn:micasaverde-com:serviceId:InputSelection1" so don't necessarily match the Denon inputs.

If you want to you can edit the json file to reflect your inputs as per example below: -

Code: [Select]
{
"ControlType": "button",
"Label": {
"lang_tag": "DiscreteinputPC",
"text": "Input3" <------------------------------------------------------------------- Change this to what text is to be displayed on button in interface.
},
"Display": {
"Service": "urn:micasaverde-com:serviceId:InputSelection1",
"Variable": "Input",
"Value": "HDP", <------------------------------------------------------------------- Change this to match input variable, in this case if "Input = HDP" then button is highlighted.
"Top": 70,
"Left": 210,
"Width": 50,
"Height": 20
},

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 16, 2012, 12:15:51 am
No, I have made the plugin generic as I don't know what the input names are going to be. The plugin should map the inputs to input1 -> input? (?depends on model).

I'm a little confused then, I thought it was getting the inputs from the receiver. Do you mean that it's getting the input names dynamically from the receiver but the UI is not dynamic?

>>This is different in that it gets the input names from the receiver and populates as required.

If so, maybe we can put together a list of them from the various model API docs.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 16, 2012, 12:25:18 am
@santakrooz
Yes
Variables within plugin are dynamic and UI static as per: -

http://forum.micasaverde.com/index.php/topic,9007.msg58855.html#msg58855 (http://forum.micasaverde.com/index.php/topic,9007.msg58855.html#msg58855)

I don't know how to if there is a solution so decided on generic for now. The only solution I can think of at the moment is a json file for each receiver and that would up to each individual user.

Cheers

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 21, 2012, 04:43:03 pm
Thanks Zoot. Attached is a screensnip of my mios setup. It's working well. I only changed the Label:Text properties. I didn't change the Display:Values to match. It's not automatic, but it look/works fine. I will probably try to remove the extra buttons from the display.

I'm curious what would editing the Display:Values do? Since it works as is?

-sk
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 22, 2012, 06:32:04 am
The 'Input' variable is tied to the table containing the actual input names e.g. CD, Tuner, Game1 etc. if the Display:Value matches the Input variable  then the chosen input button should change colour to the darker blue (Same as the On button in your screen shot).

cheers

Zoot

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Ap15e on January 22, 2012, 09:54:12 am
Quote
I don't know how to if there is a solution so decided on generic for now. The only solution I can think of at the moment is a json file for each receiver and that would up to each individual user.

You could rewrite the json file from within your plugin and then restart LuaUPnP.  :)

Joking aside, dynamic labels for buttons should be implemented by MCV.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: santakrooz on January 22, 2012, 02:36:32 pm
then the chosen input button should change colour to the darker blue (Same as the On button in your screen shot).

Thx again. Updated it, see attached.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: PurdueGuy on January 24, 2012, 05:46:52 pm
By the way if you want a device to appear in the "AV Gear" tab in UI5

Code: [Select]
luup.attr_set("category_num","15",k)
cheers

Zoot
Thank you!  This was bugging me and I was about to post a question.
One thing to note for newbies, replace "k" with the device number (Wrench -> Settings tab -> Device #).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on January 28, 2012, 05:15:12 pm
Do you think it would be worthwhile to have a script that generated a JSON from the labels stored on the receiver?

I could throw together a quick perl script (or Java, etc?) program for that. You would have to run it on a host computer while the Vera was not connected to the Denon.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Ap15e on January 28, 2012, 05:51:16 pm
Why not rewriting the static json file from within the Luup plugin?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on January 29, 2012, 08:39:52 am
When i do
Code: [Select]
local inputDenon = luup.variable_get("urn:micasaverde-com:serviceId:InputSelection1", 16)
The code doesn't accept "Input" before the ,16 which in my logic would be needed  ???

The test luup code accepts the command but when i want to check inputDenon in a if statement is cant get a working value. When testing my receiver is on the Tuner/ Input5 but checking on those names dont give me a good equation.
I hope its even possible to receive the current input, i think it is because in the the startup code its all being received.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: guessed on January 29, 2012, 01:09:47 pm
@The-Source,
The variable they're setting is Input and it lives in the ServiceId urn:micasaverde-com:serviceId:InputSelection1.

You could retrieve this value using:

Code: [Select]
    local inputDenon = luup.variable_get("urn:micasaverde-com:serviceId:InputSelection1", "Input", 16)

you mentioned that you tried that but the code "doesn't accept ... before the ,16...".  You may need to clarify what you mean by that, and what you observed when you tried this.

For reference you can see it being set on this callback in their code:
    http://code.mios.com/trac/mios_denon-receiver-control/browser/trunk/L_DenonReceiver1.lua#L157


@zoot1612, @radarengineer,
By convention, you probably should avoid having your plugin set StateVariables back against a ServiceId you don't own (like the AV ones here).  Consider using a custom ServiceId to contain the Denon-specific stateVariables, to avoid any stateVariable naming, or general upgrade, conflicts in future releases...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on January 29, 2012, 01:58:49 pm
Well shoot me then, because after copying your line it does work ???
I already noticed that Lua is case sensitive ( Starting with If doesn't must be if ;) )

I think is didn't had the space after the ,  but i dont know for sure.
For the people interested in what i do with it.. (the code is checked every 2 minutes with a scene timer)
Code: [Select]
local statusDenon = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 16)
local inputDenon = luup.variable_get("urn:micasaverde-com:serviceId:InputSelection1", "Input", 16)

if (statusDenon == "0") then
  luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1","Watts",5,16)
else
  if inputDenon == "TUNER" then
    luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1","Watts",112,16)
  end
  if inputDenon == "HDP" then
    luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1","Watts",280,16)
  end
  if inputDenon == "TV/CBL" then
    luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1","Watts",285,16)
  end
end

The standby usage is a guess but I will hook up a meter when i have time. Why the HDP & TV/CBL have a higher wattage is because i know my tv is also turned on then and i took that wattage also in consideration ;)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on February 01, 2012, 09:01:40 pm
@The-Source, thanks for sharing your scene code, always nice to see what people are doing with the Vera.

Denon claims 0.3w in standby, a user in avsforum reported 1.8w. The thought there was that Denon was reporting power without an active network link. I've been meaning to hook up my kill-a-watt to the Denon again but like you haven't had the time. Would be interested in your number if you do get a chance.

@guessed, thanks for keeping us honest with the ServiceIds. Once my life outside vera clears up a bit I will try do that and other housekeeping on this code.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 01, 2012, 10:33:49 pm
@radarengineer
And I still haven't uploaded my changes as I am still not sure if this is a better way to go. Have you had a look at the code?

http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628 (http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on February 02, 2012, 02:39:37 pm
2 Days ago i upgraded from UI4 to UI5 and the denon plugin of UI4 did offcourse not work. And i deleted device with id 16 (the id of UI4) but after installing the new plugin from the apps section i did get the main zone working. But the 'child zones' arent visible. The new device id is 41 so its really the new plugin and control of the main zone works fine.

(my previous wattage registration also works again, so its only the child zone)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 02, 2012, 07:05:18 pm
@The-Source
Try the plugin here: -
http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628 (http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628)

It is substantially different so if you don't like it re-install from app store

<edit>
The reason the child devices are not been created is that the routine for forcing the receiver to send zones via Telnet is not behaving the same as it does in UI4 so it is down to a timing issue. The disconnect between sending a http request and receiving data on telnet made it difficult to resolve so I threw the whole lot out and went back to creating zones based on model.

Besides actually working this has the benefit of also theoretically working for serial connected receivers.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on February 07, 2012, 11:13:04 pm
@zoot1612, I think we should probably go ahead and update the plugin to your code. I don't have any better ideas!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 15, 2012, 10:44:56 pm
@Ap15e

Quote
Why not rewriting the static json file from within the Luup plugin?

Are there any of code examples of this floating around the forum or in a plugin?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Ap15e on February 16, 2012, 09:48:27 am
http://forum.micasaverde.com/index.php/topic,5709.0.html - a Luup plugin that creates a static json file. After writing your static json file to the filesystem, you would have to invoke the UPnP action Reload.

BTW, you could use multiline quotes (http://lua-users.org/wiki/StringsTutorial) to make the parts of your source code that would write the static jason file more readable/maintainable.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on February 18, 2012, 10:31:03 pm
 @zoot1612, I just uploaded a new version of this plugin to the trunk.

I used a call to luup.call_delay (with a 10 second delay) to fix the timing issue. Unfortanetly, I need to go back and tweak it a bit to make it work right with serially attached receivers.

I also made some major changes to the function to handle incoming data. I hope you don't mind; I think it is a little easier to read / modify but I know that is probably up for debate!

EDIT: I also added a 'test.lua' file in the repository that can be used to test some of the functionality of the plugin by running it with a lua installation on a PC.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 22, 2012, 01:23:38 am
@radarengineer

You won't get any flack from me regarding code changes, I'm a newbie at this stuff.

Regarding serial connection it is not the timing so much it is the fact that your require a http session to push out the variables on the serial/ethernet connection. So it will not work for serial only connected receivers unless someone finds the code for getting the zone info out of the receiver.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on February 22, 2012, 11:18:07 am
@zoot1612, I need to go back and add a fall back for serially connected receivers.

Also, I am thinking it might be a good idea to split off zone 1 into a separate device. I still need to play around a bit with that, but when I turn off zone 1 I get a 'ZMOFF' instead of a 'MUOFF'. I could add 'ZMON/ZMOFF' as aliases of 'MUON/MUOFF', but how the Denon really seems to work is that MUON is on if *any* of the zones are on (Z1-Z3) and then MUOFF turns off all zones. To really get this behavior right I think you need to have an extra device.

This would be nice for things such as a 'goodnight scene' where you would want to turn off everything but you don't care what zone are on.

Any thoughts on that change?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 22, 2012, 10:55:47 pm
yes, that was one of the shortcomings of my original implementation. But I was lazy and couldn't decide how to tackle it.

This sounds like a good solution just create a binary switch for main zone and zone 1 only responds to ZM not MU.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 04, 2012, 03:24:54 pm
I finally finished writing a telnet proxy program to use with the Denon. This lets you connect multiple clients to a receiver at once.

I wanted to be able to use the Vera plugin, Command3808, Eventghost's Denon plugin, and an Android Denon utility at the same time. I used Python Twisted and I've only tested it under Windows, but I plan on daemonizing it and sticking it on a Pogoplug.

Is anyone else interested? If so I'll try to clean it up a bit to share.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on March 04, 2012, 04:20:54 pm
If I understand correctly a pc must run continuous to let the proxy work?
I did use the AVR-remote app for android alot but since my vera was hooked to my Denon it didn't work anymore.
I think im going to give it a try next weekend.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on March 20, 2012, 05:19:23 pm
It appears that the startup lua is broken when using the newest firmware. The message box says that it failures to startup the lua.
I have uninstalled the plugin using the apps section and reinstalled it... no sollution.
Restored my settings from before upgrade... still startup failure.
The i downloaded al te latest files from code.mios.com uploaded them but still the same error..
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 20, 2012, 08:10:15 pm
@The-Source, I upgraded last night and it looks like I have this error as well. Unfortunately, I'll probably not get a chance to look into it much myself until this weekend.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: PurdueGuy on March 20, 2012, 08:15:34 pm
My bad....I always figured I broke something when I started getting errors, so I moved away from the plugin to direct Pronto codes via SQBlaster.  Maybe I can go back to the plugin later on.  Let me know if I can help somehow.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 21, 2012, 07:15:54 am
Not running the plugin at the moment but it could have something to do with this issue:-

http://forum.micasaverde.com/index.php/topic,5863.msg61742.html#msg61742 (http://forum.micasaverde.com/index.php/topic,5863.msg61742.html#msg61742)

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 23, 2012, 02:02:34 pm
All, I just uploaded a new version to SVN. I moved the main zone to a separate device. As we discussed earlier on this thread I think this was a good idea because the Denon distinguishes between turning off Z1 and turning off the Denon completely. That is, you can have Z1 off but Z2 or Z3 on. I still need to fix the json for the Main Denon zone as well as add support for *actually* turning off the entire receiver. Any help in that effort will be appreciated, otherwise I'll work on improving this as I have time. Once that is all taken care off (and any other bugs you all find) I'll publish a new plugin.

To install this I had to ssh into my vera and remove all the Denon plugin related files from /etc/cmh-ludl. This could have just been because I had uploaded some files earlier when there were still some bugs in how compression was handled.

Anyway, after removing all the files, making the changes I've uploaded to svn, and reinstalling it works for me.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on March 23, 2012, 05:42:03 pm
Ok, it isn't working fine anymore! But I think I have an idea of what is happening. I added a bit of code to see if a connection to the Denon was already open before we call luup.io.open(). Sure enough, it looks like it is!

So what I am finding is that my Denon is working great initially, and then when a reload happens and the receiverStartup function is called again, it seems like Vera is trying to reopen the connection to the Denon. The Denon only will accept one telnet session at a time, and so I think this reopen fails.

I am not sure how to handle this. I can skip opening a connection if one is already open I suppose? Any ideas?

Code: [Select]
01 06/17/10 10:56:32.612 luup_log:74: Denon AVR plugin: (receiverStartup) Vera already has opened a connection! <0x402>
01 06/17/10 10:56:32.614 luup_log:74: Denon AVR plugin: (receiverStartup) ipAddress=192.168.1.120, ipPort=23 <0x402>
01 06/17/10 10:56:32.864 IOPort::Connect connect -1 192.168.1.120:23 <0x580e>
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on April 06, 2012, 11:33:29 am
For anyone interested in using multiple programs to control their Denon at the same time (e.g, Command3808 on Windows, various smart phone applications), I cleaned up my Denon multiplexing code and put it on the net:

https://github.com/naething/denon_multiplexer

Basically this lets you set up a pogoplug (or similar) as a virtual Denon receiver. The difference is it allows multiple clients, and in addition there is a debugging port that I open up. You can telnet to that debugging port and then watch the traffic that the various clients and the Denon sent each other.

You could run this on another Linux distro or a windows machine as well with a little modification, I'm happy to help out in that respect. Ideally you want a machine that is on all the time with nothing else running on port 23 or port 80 (so no existing telnet or web servers). There are two parts:

1. denon_telnet - this is a Python twisted program that connects to the Denon on port 23 and then allows multiple clients to connect to the denon

2. denon_http - this is just a simple daemon that opens an ssh tunnel from local port 80 (on the host computer) to port 80 on the Denon. This is needed because many denon programs (such as this plugin) expect the Denon webserver to have the same ip as the Denon telnet port.

This seems to have cleared up my problems with Lua failures. Unfortunately, I know not everyone will want to set this up so I would still like to figure out a way to handle that issue.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on April 09, 2012, 08:15:49 pm
I just pushed a bunch of changes to the Denon repository. I seperated the JSON and device files for the denon itself and the denon zones. I also added dashboard on/off buttons for the Denon device and on/fff and volume for the zones.

The dashboard buttons were mostly implemented already, but there were some issues with the existing JSON that prevented their display. I need to re-add most of the control buttons back into the zone json file. Right now it is very incomplete as I pulled everything except for the on/off, volume, and source names to make it easier to work with. I'm still sorting through all the JSON options but made a lot of progress this weekend.

I also want to start adding additional functionality (for instance, the ability to type in AM/FM radio stations). Other ideas are welcome!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dinossaur0 on May 18, 2012, 07:44:48 am
Ten pages of comments about the Denon plugin and I could no figure out HOW use it ! :(

Could anyone post a link to the last version and a step-by-step instructions about how to install?

I download http://forum.micasaverde.com/index.php?action=dlattach;topic=5863.0;attach=4231 and using UI4 MIOS Developers/Luup Files/Upload Files with "Restart Luup after upload" on. But nothing happens. I expect some device would appears and things continues from there. But this does not happens.

Maybe using “Create device” ? But what fill to DeviceType and Internal ID ??

Thanks in advance...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lennier on August 05, 2012, 04:26:17 am
Sorry to ask such a basic question but I can't seem to find anything definitive in the recent pages of this thread nor the trac source: is this plugin still UI4 compatible or is it now UI5 only?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on August 12, 2012, 03:06:03 am
@lennier, I think the plugin should still be UI4 compatible. When I was editing it I tried to follow @guessed's suggestions for preserving compatibility. Unfortanetly, I have no way of testing this as I don't have UI4 anymore.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: bfulton01 on September 23, 2012, 08:00:18 am
Sorry I am also new.  I noticed the dates on the Denon app are 1/2012 but there are some references in this post to changes in the code more recent regarding how to setup zones, but my UI does not show any zone control.  Using Denon AVR 3311ci and UI5.

 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on September 23, 2012, 01:14:42 pm
@bfulton01, the newest code has not been checked in to the app store. You can grab it from here:

http://code.mios.com/trac/mios_denon-receiver-control/changeset/28/trunk?old_path=%2F&format=zip
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: bucko on September 24, 2012, 01:02:03 am
Wow! Great news. I have a 2805 I would love to control as well. I'll also be picking up a 3808. This pug in will be a great addition.
Keep up the good work.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: alangraph on October 09, 2012, 06:59:00 pm
I am also having problem to manualy install this app. I uplad the files from the zip file but i don't know who to create the Denon device so it works.
Please hel[p.

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: thetonyg on December 06, 2012, 12:07:58 am
Hi!
I suppose this post is for radarengineer, or whoever is currently working on this plugin :)  The version on the app store allowed me to change source and volume levels on my AVR1912s, but as noted earlier, it seems like the buttons to do this are missing from the version on code.mios.com.  Is this mostly cosmetic and is it still being actively worked?

Thank you for the effort you've put in to this plugin so far!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 06, 2012, 11:56:27 pm
@thetonyg, I think it should be mostly cosmetic. I am definitely still working on the plugin, I haven't been very active for a few months due to other obligations but I'm trying to pick back up on my MiOS coding.

The newer control code should be solid, but I do need to rework the layout code and add more buttons. All the actions for scenes should be working. I am very interested in bug reports / suggestions.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: thetonyg on December 08, 2012, 12:24:33 pm
radarengineer - awesome!  I'd be happy to provide some feedback.  I'm still getting everything setup in my Vera and migrated from Homeseer (along with starting a new job) so it might be a few weeks :) 

Why do jobs always have to get in the way of our hobbies? :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: strangely on December 08, 2012, 12:31:45 pm
Well if your job didn't, then you'd likely have no money to spend on your hobby :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on December 08, 2012, 03:05:39 pm
Very true! But still disappointing that I have a big stack of fun gadgets sitting in my office that are waiting to be integrated with Vera, but no time!

Json (which defines the interface / buttons) is pretty much the only part of MiOS coding I haven't figured out yet. Mostly as I just haven't had the time to really dig into it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: thetonyg on December 29, 2012, 07:14:11 pm
Well if your job didn't, then you'd likely have no money to spend on your hobby :)

Hah!  True!

Well, I spent some time over the last few weeks messing around with Vera, and the latest Denon code from code.mios.com.   I also spent a little time inside the API docs I could find for a Denon 3808 just for fun.

I made a few changes to my local copy of the code, which does the following:
* Receivers that have been named through the menu on the receiver now inherit that name and show up in Vera that way (instead of just the model number -- receivers that do not support naming will behave the way they used to)
* The regex for the source names was broken on my stock AVR-1912 (specifically, the NET/USB source and V.AUX source).  I fixed it on mine and it parses out the stock AVR-1912 sources as well as sources with spaces in the names now.
* Added support for digesting and saving the following to the device variables: individual channel volume levels, maximum volume (was previously statically defined at the top of the lua), audio source for a given input, and audio codec for a given input.

Nothing really happens with those device variables, but now the Denon plugin doesn't toss as many unhandled return log messages as it used to for me.  Previously I'd get a storm of unhandled returns whenever the volume changed or the source changed. 

I'll spend a few minutes tonight looking at the json side, I know a little about it but not how Vera is using it to define what gets displayed where.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: thetonyg on December 29, 2012, 09:32:00 pm
I would like to suggest the get zone names via Ethernet part of the plugin be removed. This is for two reasons, one I can't get it to work reliably in UI5 from a timing point of view and the replacement covers off connections for both with serial and Ethernet.

The replacement would be a table as follows: -
Code: [Select]
local receiverDetails = {
["AVR-3808EUR"]={ zones={3}, inputs={"TV/CBL","HDP","DVD","NET/USB","TUNER,CD","PHONO","SAT","VCR","DVR","V.AUX","XM","IPOD"} },
["AVR-2???????"]={ zones={2}, inputs={"TV/CBL","HDP","DVD","NET/USB","TUNER,CD","PHONO","SAT","VCR","DVR","V.AUX","XM","IPOD"} },
}

The table will cover off the zones and inputs by using feedback from "SYMO" which in my case returns "AVR-3808EUR". This also means that to add another device all that needs to be done is add another entry in the receiverDetails table (if they support the command).

I have already implemented but not tested just want the get feedback on whether you would prefer this or the existing method.

Please note this does not get around the naming of buttons in UI

I have attached the as yet tested implementation so you can see what I have done.

regards

Zoot

Howdy!  I'm having issues with getting zone names over ethernet too.  The workaround I see in the code (hitting the f_zonerename.asp file via wget) does not trigger the R? commands with the zone names on my AVR-1912.  They do come through if I try to rename zones through the menu using my remote though, so I know the output is there, I just don't know how to get it to reliably output the zone info. 

Would this prevent the plugin from creating the children for each zone?  I currently only get a single ON/OFF for the receiver itself in Vera.

Edit: I guess it's r_zonerename.asp, but that immediately redirects to f_zonerename.asp on the AVR-1912, hence my confusion.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: CapitalB on January 15, 2013, 10:33:59 pm
Hi Newbie here i have had my box 24 hours so very very new to this i have install the Denon app but i have a problem with a couple of the buttons being labeled differently and not controlling the unit correctly my control has sat/cbl not tv/cbl and does not function i have the avr1912 please tell me how i can edit and which file i need to edit and how to get to it..

Sorry to be so thick but this is going to be my starting point .

Any help would be much appreciated.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on January 27, 2013, 01:45:58 pm
I seem to have been struggling with similar issues as described here in another thread...
http://forum.micasaverde.com/index.php/topic,12786.msg100053.html#msg100053
 (http://forum.micasaverde.com/index.php/topic,12786.msg100053.html#msg100053)
Specifically, I've been trying (and finally succeeded) to get this going over a serial connection to an AVR-2307, and found a few unexpected features in the code.  Will try to merge some of the updates here with mine.  Will be happy to share the effort, but what's the best way to cooperate constructively on this without diverging?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 28, 2013, 10:20:54 am
@akbooer
Yes this is a known issue see: -
http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628 (http://forum.micasaverde.com/index.php/topic,5863.msg59628.html#msg59628)

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: radarengineer on February 22, 2013, 05:39:59 pm
So it looks like we now have four copies of the code floating around:

1) The app store version
2) Zoot's mod
3) Akbooer's serial version
4) Whatever is currently in svn

I think the svn version is based on Zoot's last version with some tweaks because I had a few issues with that. I will try to grab all the files and see where we stand. It would be really nice to have a version that supported all of the receivers (serial and ethernet). Unfortunately, I don't think any of us are in a situation to test everything.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: eickst on March 04, 2013, 12:28:26 am
Ok, so I installed this plugin from the store, had some issues so I tried some of the other code laying around and that made it worse.  SO I started over, I have the store version installed, I can turn the denon on/off, control the volume, mute/unmute, and the only tuner button that works is the TUNER one.

I also cannot set anything other than the power within any scenes. 

What do I need to do to be able to have a scene control the mute/unmute and/or source selection.

I have an AVR1713.

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dj2020 on April 08, 2013, 06:49:37 pm
I just wanted to let you guys know that this plugin works for the Marantz SR7005.  Thanks to radarengineer and all the other contributors.  I plan on using this to turn on my receiver, select source to Internet Radio, play at a volume level of 50 when my Ademco alarm is armed and motion is detected at the front door/porch when I'm not at home.  Now I just need to get a motion detector!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Robjsewell on August 16, 2013, 02:52:19 am
Hi all, do we have any progress on better Denon control yet? Can't find it by searching... I use the AVR-3312. Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on August 17, 2013, 02:02:47 pm
For anyone interested in using multiple programs to control their Denon at the same time (e.g, Command3808 on Windows, various smart phone applications), I cleaned up my Denon multiplexing code and put it on the net:

https://github.com/naething/denon_multiplexer

Basically this lets you set up a pogoplug (or similar) as a virtual Denon receiver. The difference is it allows multiple clients, and in addition there is a debugging port that I open up. You can telnet to that debugging port and then watch the traffic that the various clients and the Denon sent each other.

You could run this on another Linux distro or a windows machine as well with a little modification, I'm happy to help out in that respect.

...and more text...

Any chance this could be made as a package for Synology DSM 4.2 / 4.3 ? My Synology is on 24*7 so that would be nice. Since I am for the moment thinking of how to solve the "Marantz only accepts ONE connection at a time over ethernet" and I have about 4 devices that needs contact...

Or another solution might be to let Vera take the control, and send all commands thru Vera and this plugin - but then I need to add a number of buttons like "favorit radio channel" and so on - would that be doable ?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on August 19, 2013, 02:38:39 pm
I kind of found another way to solve my challenge:

I send the telnet command to my Marantz receiver "blind":

Code: [Select]
local socket = require("socket")
host = "192.168.1.143"
c = assert(socket.connect(host, 23))
c:send("SITUNER\r")
c:close()

It will turn on my Marantz, and select Tuner as input. Which is exactly what I need - to get my stereo to wake me up. And as far as I can tell for now: It does not seem to upset my iRule installation - so sending telnet commands just works. So the "one connection at a time" might only be for feedback ?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet SETUP how ??
Post by: jolly1 on November 04, 2013, 01:03:32 pm
Hi,
   Just started with Vera. Currently gradually updating from HomeVison and Girder 5. Going thro the apps was glad to see a Denon amp. I have Denon A11 amp and 3910 DVD.
These are controlled via serial links and lua from girder.

I have a 4 port to ethernet to serial.

How do I setup this app. In the Advance setup I set ip to 192.168.0.22 but does not connect. Do I require to tell the setup up which port the Denon is connected to.

When setting up the Denon in Girder I think the A11 (UK) was similar to to 3805 or 3808.

Have read thro the post but can't find anything on setting up or I more likely I did not recognise it

So far looks like I shall eventually transfer all control to veralite and shutdown pc and homevison
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on November 05, 2013, 06:49:00 pm
I've just replaced my Denon AVR-2307 and serial interface with an AVR-X2000 and Ethernet. The plugin sort of works, but is flakey.  So definitely time for another look at this plugin.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jolly1 on November 06, 2013, 05:31:26 am
Hi was the only setup you carried out to enter the IP address in this field in advanced settings ?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on November 06, 2013, 07:00:39 pm
Hi was the only setup you carried out to enter the IP address in this field in advanced settings ?
Yes, it was.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: sjolshagen on December 03, 2013, 08:58:19 pm
I've just replaced my Denon AVR-2307 and serial interface with an AVR-X2000 and Ethernet. The plugin sort of works, but is flakey.  So definitely time for another look at this plugin.

@akbooer,

Have you had a chance to take a look at this plugin yet?

I just installed an AVR-X?000 and am starting to think about how to best integrate with Vera.

Ideally, I'd like a power-on of the receiver or a change to a different source (i.e. from an audio source to a video source would lead to dimmed lights in the room, etc) although I've not looked into how to listen for and identify that the AVR is firing off an event, if it actually does that can possibly be trapped by a plugin and result in an event firing on the Vera. (Hoping that the PROTOCOL manual will cover it in a manner I can comprehend!)

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jolly1 on December 04, 2013, 06:08:08 am
HI installed the plugin, setup the ethernet to serial ES-E-1004-M it's a four port ethernet to serial, so setup IP address as 192.168.1.44:2041  port number required to direct to correct port.
Set as Raw TCP Server
Baud 9600, Databit 8, Flow Type NONE, Stopbit 1

I have a Denon A11, it's the UK version of I think 5805. Not all of the commands from the plugin worked. Changed the plugin commands to match the A11. Changed the json file button decriptions to match the A11.

It has been running well with not problems so far
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on December 04, 2013, 07:48:15 am
@akbooer,

Have you had a chance to take a look at this plugin yet?

All I've done so far is to use the plugin to turn on/off and change volume and inputs, so the basic functionality is there for the X2000.  I have noted that there are some error messages - unrecognised commands, etc. - but that doesn't seem to be a problem. 

I need to get back to this sometime, but other things in hand right now.  It really needs a complete re-write to integrate various versions and tidy things up.  Quite a big job.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: sjolshagen on December 06, 2013, 05:18:57 am
I think the svn version is based on Zoot's last version with some tweaks because I had a few issues with that. I will try to grab all the files and see where we stand. It would be really nice to have a version that supported all of the receivers (serial and ethernet). Unfortunately, I don't think any of us are in a situation to test everything.

Anybody know whether the model numbers indicate supersets of functionality or if it appears to be more "random" than that? (I'm sure they have a plan at Denon, but they may not communicate it).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jolly1 on December 06, 2013, 06:39:05 am
Hi
  Attached is a lau file which was created by a user on Girder 5 home automation. I controlled a Denon amplifier for years, utilising the file. It contains a fair amount of info and commands for various amps denon amps.
As stated this is work by members of the Girder community

I managed to modify the Denon Amp plugin to control an A11

Hopefully it maybe of some use on control of Denon Amps.

I also have another file which I cobbled together to control a Denon DVD



 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on December 10, 2013, 06:39:01 am
Could this information be included in the already existing plugin?
I have installed the Denon plugin, but somethimes it fails to start. So I can rely on it to work.
I am not sure how to handle the luup file that is shown above...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jolly1 on December 10, 2013, 06:49:49 am
Hi Haavard,
                 Then DenonReciever.lua I posted, was for info on commands that Denon utilise. Using the commands, I managed to modify the plugin to control  the A11 amp.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: amiles on December 21, 2013, 04:20:45 am
I have the avr 1912 and when I turn on the amp I need to reset vera to get the lua startup working. Once it's started and the amp is on I can control my amp via Vera and voice commands thru my phone. However if I turn off the amp after a period of time vera gives lua startup error and I lose control of the amp.
Can anyone shed some light as to how I get this lua to work
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: amiles on December 24, 2013, 03:09:04 am
I have installed the Denon plugin. From MIOS it works and can turn on and off the unit. I am now trying to use Tasker and Autovoice to issue voice commands. So far it can turn on and off via voice commands. I cannot get it to change from TV Input to NET/USB or vice Versa via a scene using MIOS interface or via voice commands. The one thing I really want to d is issue voice commands for volume. So far can get it to go up or down but only in 0.5dB increments so as you can imagine its very slow. What is needed is setvolumeTarget and a value to be issued but when you go into the Advanced scene and select the Denon receiver you can see a command SetVolTarget but you cannot set it to say 3 or 5 or whatever you desire. IS there a way this plugin can be updated to allow for this?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fric on December 24, 2013, 05:32:39 pm
Hello,

To set a specific volume use this luup code on a scene:

luup.call_action("urn:denon-com:serviceId:Receiver1","SetVolumeTarget",{newTargetValue = "60"}, 19)

I have 3 different scenes, a set low, medium and high volume with the value set to 20, 40 and 60 respectively.


I also have a scene to set the volume up. I simply call 10 time the luup code to bump up the volume and I have an increment 10 times 0.5 dB. With this every time I run scene I have 5 dB increment in the volume.


You can use this code:

luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)

You can also do a volume down with the same logic.


And yes... I also have that problem that you mentioned.  I have a z wave powerplug that gives power to my denon amp and when I turn it on Vera cannot communicate with denon.

It can be fixed with this line in the scene luup code:

luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "Reload", {}, 0)


It has to be the last one, because nothing else in your scene will run after this line,  and you have to wait for 2 minutes until you can send new commands to your Vera.


Happy Christmas!


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: amiles on December 26, 2013, 02:35:44 am
Thanks for this. Will give it a try.
I have got over the problem of being able to turn on the device. I do not use a zwave power plug.
All I did was assign a static IP address to the Denon and make sure that wake up on LAN is turned on. The downside is you use power to keep the amp in this state but it's the same as having your TV on standby. I then set the IP address in the vera plugin to the static address and now the device powers on and off when commanded to do so....

I will now attempt your luup commands for volume..
I have not done much with luup, can you tell me what 19 represents? I am guessing device ID
Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on December 26, 2013, 03:06:19 am
I have not done much with luup, can you tell me what 19 represents? I am guessing device ID
Yes, that's the device ID.  Make sure you use your actual one!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: The-Source on December 26, 2013, 11:21:26 am
Hello,

To set a specific volume use this luup code on a scene:

luup.call_action("urn:denon-com:serviceId:Receiver1","SetVolumeTarget",{newTargetValue = "60"}, 19)

I have 3 different scenes, a set low, medium and high volume with the value set to 20, 40 and 60 respectively.


I also have a scene to set the volume up. I simply call 10 time the luup code to bump up the volume and I have an increment 10 times 0.5 dB. With this every time I run scene I have 5 dB increment in the volume.


You can use this code:

luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)

You can also do a volume down with the same logic.


And yes... I also have that problem that you mentioned.  I have a z wave powerplug that gives power to my denon amp and when I turn it on Vera cannot communicate with denon.

It can be fixed with this line in the scene luup code:

luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "Reload", {}, 0)


It has to be the last one, because nothing else in your scene will run after this line,  and you have to wait for 2 minutes until you can send new commands to your Vera.


Happy Christmas!
Why not do a request volume first and the add or remove the amount you want and then set the volume, works a lot quiter and faster ;)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: amiles on December 26, 2013, 11:47:07 am
Hello,

To set a specific volume use this luup code on a scene:

luup.call_action("urn:denon-com:serviceId:Receiver1","SetVolumeTarget",{newTargetValue = "60"}, 19)

I have 3 different scenes, a set low, medium and high volume with the value set to 20, 40 and 60 respectively.


I also have a scene to set the volume up. I simply call 10 time the luup code to bump up the volume and I have an increment 10 times 0.5 dB. With this every time I run scene I have 5 dB increment in the volume.


You can use this code:

luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)
luup.call_action("urn:micasaverde-com:serviceId:Volume1","Down",{}, 19)

You can also do a volume down with the same logic.


And yes... I also have that problem that you mentioned.  I have a z wave powerplug that gives power to my denon amp and when I turn it on Vera cannot communicate with denon.

It can be fixed with this line in the scene luup code:

luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "Reload", {}, 0)


It has to be the last one, because nothing else in your scene will run after this line,  and you have to wait for 2 minutes until you can send new commands to your Vera.


Happy Christmas!

Thankyou very very much. This is exactly what i required .....this forum hosts a lot of talent!!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fric on December 26, 2013, 02:10:13 pm
Why not do a request volume first and the add or remove the amount you want and then set the volume, works a lot quiter and faster ;)

It is a nice ideia,  but I like the analog volume increasing effect, it is more soft for your ears :-)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 30, 2013, 09:27:59 pm
Hi all
Attached is a very early beta for the updated Denon plugin. Do not use unless you are comfortable with fixing broken system as I have very limited testing abilities currently so a lot may be broken.

If you are willing to test:-
1. Download and unzip.
2. Upload to vera.
3. create device.
4. restart.

EDIT: Please be aware this will overwrite your static json file so if you have made any local changes they will be lost.

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fric on December 31, 2013, 04:24:49 am
What Did you changed?

Thanks

Sent from my bq Aquaris 5 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 31, 2013, 05:02:13 am
@Fric
Should now work with both serial and ethernet.
Initial auto generated static JSON file.
Ability to add zones manually.

Lots of small changes that may have added other bugs.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: benr on December 31, 2013, 05:46:52 am
Oh man, I just found this thread so ill have to read through it all, but once I have my doorbell integrated into my Z-Wave network I would LOVE to have the system be able to lower the volume or mute my Denon 4311 in the living room if it is on! That would be awesome!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fric on December 31, 2013, 06:56:41 am
@Fric
Should now work with both serial and ethernet.
Initial auto generated static JSON file.
Ability to add zones manually.

Lots of small changes that may have added other bugs.

Wow!!! That is really great!

I will try it this weekend, but please tell me something:

Thanks a lot and happy new year :D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 31, 2013, 07:40:40 am
@Fric
Quote
   
  • With this will i be able to turn on/off zone 2 and set it to a specific input?
  • Did you fix the inputs like game1 and game2?

Should be able to turn off any zone individually. Not sure what you mean by game1 and game2?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 31, 2013, 08:07:18 am
With this plugin the following is possible: -

Volume change with fade: -
Code: [Select]
http://IPADDRESS:49451/data_request?id=lu_action&output_format=xml&DeviceNum=DEVICENUMBERHERE&serviceId=urn:denon-com:serviceId:Receiver1&action=SetVolumeTarget&newTargetValue=20&fade=1
Volume change in db with fade: -
Code: [Select]
http://IPADDRESS:49451/data_request?id=lu_action&output_format=xml&DeviceNum=DEVICENUMBERHERE&serviceId=urn:denon-com:serviceId:Receiver1&action=SetVolumeTarget&newTargetValue=20&fade=1&db=1
Volume change: -
Code: [Select]
http://IPADDRESS:49451/data_request?id=lu_action&output_format=xml&DeviceNum=DEVICENUMBERHERE&serviceId=urn:denon-com:serviceId:Receiver1&action=SetVolumeTarget&newTargetValue=20
Input selection: -
Code: [Select]
http:///IPADDRESS:49451/data_request?id=lu_action&output_format=xml&DeviceNum=DEVICENUMBERHERE&serviceId=urn:denon-com:serviceId:Receiver1&action=Input3
Valid input selection input1 to input20
DEVICENUMBERHERE = Device number for Parent (main) or children (zones)



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: garrettwp on December 31, 2013, 11:34:58 am
Zoot1612,

Have you considered converting the plugin to use much of the standard service types that Vera already offers? This assures better compatibility with 3rd party apps.
AVTransport: urn:upnp-org:serviceId:AVTransport
MediaNavigation1: urn:micasaverde-com:serviceId:MediaNavigation1
RenderingControl: urn:upnp-org:serviceId:RenderingControl
Volume1: urn:micasaverde-com:serviceId:Volume1
InputSelection1: urn:micasaverde-com:serviceId:InputSelection1

- Garrett
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 31, 2013, 01:56:23 pm
@garretwp
Certainly following where possible. The first three you mention have no implementation in the plugin currently. Volume1: urn:micasaverde-com:serviceId:Volume1 and InputSelection1: urn:micasaverde-com:serviceId:InputSelection1 were used but I removed them to be able to create the build at runtime static json file.

This is something I will revisit when time permits.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: benr on January 01, 2014, 11:32:54 pm
Hey guys I am seeing "Lua Startup Failure Lua Failure" in red under the control and I cant control either of my Denon receivers.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 02, 2014, 08:14:29 am
@benr
Any log details so I can get an idea where it is going wrong?

Also have attached update here: -

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080

zoot1612
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 02, 2014, 11:53:09 am
I am getting an error when I try to run the plugin.
AVR-3312EUR[278] : Startup Lua Failed.

I used to get this error before "sometimes" as well. But was hoping this would fix it. Any ideas?

regards.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: benr on January 02, 2014, 12:53:45 pm
@benr
Any log details so I can get an idea where it is going wrong?

Also have attached update here: -

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080

zoot1612
Clicking the Wrench and going to the Logs tab doesnt show any logs. Is there somewhere else I should be looking for them? Sorry Im new to all of this.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 02, 2014, 07:41:44 pm
@benr/haavard

You will need to ssh into the Vera and watch the log.
Instructions here: -
http://wiki.micasaverde.com/index.php/Logon_Vera_SSH

to watch the log: -
Code: [Select]
tail -f /var/log/cmh/LuaUPnP.log
There are a few things I also need to look at my end. Will update once complete.

Cheers

Zoot1612
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 03, 2014, 02:52:48 am
See attached log file.
Thank you for looking at this.
It would be really useful to be able to control my amp from vera.
And most of all to be able to detect changes done on the amp.
If the amp is set to a specific input etc...

This message is displayed in the vera display:
AVR Receiver : Communications error

the denon amp device has a red dot and the text Lua Startup Failure
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fric on January 03, 2014, 03:40:44 am
See attached log file.
Thank you for looking at this.
It would be really useful to be able to control my amp from vera.
And most of all to be able to detect changes done on the amp.
If the amp is set to a specific input etc...

This message is displayed in the vera display:
AVR Receiver : Communications error

the denon amp device has a red dot and the text Lua Startup Failure

What model is your denon?
Does it allow Ethernet Control?
And Did you changed the denon ip address?
And do you have the option that allow control even in standby Mode?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 03, 2014, 04:30:29 am
Hi,
I feel quite stupid now :)
I removed the device yesterday when it was not working, and when I put it in again today I forgot to set in the ip.
So I guess this answers all the questions...
But I have a avr3312 with ethernet control (I use the denon iphone app and web interface). I can turn the avr on when it is in standby.

see the new log
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: sjolshagen on January 03, 2014, 05:41:03 am
Hi,
I feel quite stupid now :)
I removed the device yesterday when it was not working, and when I put it in again today I forgot to set in the ip.
So I guess this answers all the questions...
But I have a avr3312 with ethernet control (I use the denon iphone app and web interface). I can turn the avr on when it is in standby.

see the new log

Cause of the startup failure is during the Zone creation (createZones).
Code: [Select]
01 01/03/14 10:25:38.916 LuaInterface::CallFunction_Startup-1 device 278 function receiverStartup failed [string "--[[ ..."]:972: attempt to index field '?' (a nil value) <0x2c29b680>
01 01/03/14 10:25:38.916 LuImplementation::StartLua running startup code for 278 I_DenonReceiver1.xml failed <0x2c29b680>

Code: [Select]
        local zones = tonumber(MODEL[detected_model].zones)

        local zone_num = luup.variable_get(DEN_DID, "Zones", avr_rec_dev) or ""
        if (zone_num == "" or zone_num == "0") then
                luup.variable_set(DEN_DID, "Zones",  "0", avr_rec_dev)
        else
                zones = tonumber(zone_num)
                assert(zones >= 2)
        end

Haven't spent much time with the plugin, but the only line of code that seems like it _could_ be at the source of the error is the definition of the zones variable? I only say that because its the only variable that doesn't have an obvious default (see http://lua-users.org/lists/lua-l/2009-04/msg00370.html (http://lua-users.org/lists/lua-l/2009-04/msg00370.html)) yet is tested against.

So I'm guessing that the plugin needs to test MODEL[detected_model].zones for nil and set it to a reasonable value.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 03, 2014, 05:52:22 am
Since I am quite new to luup coding I am not able put your advice into action :)
But what you write seams reasonable. I am not using any other zones than the main zone on my avr, so I dont actually need secondary zone control.

 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 04, 2014, 08:05:57 am
@haavard
New version here: -


http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080
 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)
Cheers

Zoot1612
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 04, 2014, 02:04:37 pm
@haavard
New version here: -


http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080
 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)
Cheers

Zoot1612

Hi,
Thank you for your new version.
However I am not able to get it to work.
The status in vera UI is: Denon amp[279] : Lua Engine Failed to Load
See attached log file for more details.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 04, 2014, 07:29:55 pm
@haavard
Sorry did not test and had syntax error.

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080

I have tested new version by creating new device and it works on my system. So give it another try and see how you go.

Please note I will be changing this substantially going forward for example upnp changes where possible to fit the standards that are already in place and also the way the static json file is generated as I never took into account more than one receiver per Vera.

regards

Zoot1612
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 05, 2014, 08:30:13 am
@haavard
Sorry did not test and had syntax error.

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080

I have tested new version by creating new device and it works on my system. So give it another try and see how you go.

Please note I will be changing this substantially going forward for example upnp changes where possible to fit the standards that are already in place and also the way the static json file is generated as I never took into account more than one receiver per Vera.

regards

Zoot1612

Interesting development :). And thank you for working on this plugin.
The plugin now seams more stable. It installs without any errors. Great!
But user UI in the vera UI has disappeared, and it is only an icon with a gear.
It also seams that the possibility to define triggers related to the denon device has disappeared. This is the biggest issue for me... I can see the input in the advanced tab in the Vera UI.
Do you need a log file to see details?

regrads
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 05, 2014, 05:57:09 pm
@haavard
Yes log details would be great.

Is there any thing under the settings tab?

Also you can try resetting the plugin so it rebuilds the json file again. In the Advanced tab reset the 'setup' to 0 and restart.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 06, 2014, 04:02:00 am
@haavard
Yes log details would be great.

Is there any thing under the settings tab?

Also you can try resetting the plugin so it rebuilds the json file again. In the Advanced tab reset the 'setup' to 0 and restart.

Cheers
Hi,
See attached log file. The log is saved after I run a reset of the plugin, and followed by a normal reload of the luup.
Resetting the plugin did not help. In the settings tab I can only put in the IP address. The status in the advanced tab is updating when I change input or turn the device off.

Can this have something to do with the zones? I guess I only use 1 zone (Main zone).

regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 06, 2014, 05:03:05 am
@haavard
Looks like the implementation file is missing, did you include it when creating device?

May pay to delete and start from scratch. From what I can see there is no issue except not being able to parse the static json file. Can you download it and run it through http://jsonlint.com/ (http://jsonlint.com/) or attach it on a post and I will have a look.

As the json file is created at first run and I have only being able to test it on my system there could be issues.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 06, 2014, 06:56:58 am
@Zoot1612

Here is the json file for the denon plugin.
I tried it in the validate site. And it did not validate...
I had as you noticed also failed to add the implementation file, but it did not solve the problem.

I have now tried to install the Denon plugin from the vera app store. When I tried to verify the json file after installing that version it was ok. I then uninstalled the app store version. Uploaded your files, and created the device.
Vera reloaded and the device changed to the way it should for a few seconds. The vera then started working again, and the device turned back into a gear. When I now tried to verify the json file it responded "Parse error on line 571".

Thanks again for your effort!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 06, 2014, 07:22:52 pm
@haavard

update : -

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)

Changes: -
Input table iterate from pairs to ipairs for creation of static json file.
Changed the way last item is detected in input table for creation of static json file.
Changed manual zone creation to CSV instead of numeric.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 07, 2014, 03:00:37 am
@Zoot1612

Good morning
Unfortunately that update did not work either.

Let me summarize what I do to try to make it work.

I have deleted the created AVR-3312EUR device. Then I install the denon plugin from apps.mios.com. I then get the user interface as shown om attachment. When I run the D_DenonReceiver1.json file through the verifyer you provided it gives a Valid JSON. A small thing I have noticed is that the device is called "AVR-3312EUR -", but when I use your files it is without the "-".

I now uninstall the plugin. And upload your files via the vera UI. Then I create a device as shown on picture, and hit reload. For the first time the plugin now loads the correct UI, but I get AVR-3312EUR[278] : Startup Lua Failed. Running the D_DenonReceiver1.json through the verifyer gives a Valid JSON. See attached log from a normal reload.

Since I don't know how to program this plugin, I hope this makes it a bit more clear what I do to try to make it work.
Please let me know if you need anything from me.

regrads
H?vard
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 07, 2014, 05:01:25 am
@haavard
I appreciate your patience  :)

update : -

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)

Changes 0.27: -
Check if manual entry zones are nil.

Changes 0.26: -
Input table iterate from pairs to ipairs for creation of static json file.
Changed the way last item is detected in input table for creation of static json file.
Changed manual zone creation to CSV instead of numeric.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 07, 2014, 05:32:47 am
@Zoot1612

And I appreciate your effort on making it work!

There is now some changes.
A device called Denon AVR Zone:0 has been created.
But the status seams to be stuck at "AVR-3312EUR[279] : Running Lua Startup"

Attached is image and log for reload.

regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 07, 2014, 05:57:28 am
aargh :)


update : -

http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 07, 2014, 06:54:54 am
First time I tried to run it i got this message:

Denon AV[284] : Startup Lua Failed
And the zone 0 did not get created.

But then I hit reload again and then it returned no errors. Tried with several reloads, and no errors.
Success!
I saved the log in case you want to check details.
One thing I noticed is that the zone 0 is gone again. But I don't know what I should have done with that anyway...
Now I can start to play around with it :)

thanks for your help so far :)

regads
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 07, 2014, 07:16:03 am
Good
Not sure why it failed first time see how it goes from this point.

No such thing as zone 0 that was my mistake.

As I don't know what zones your model is capable of you will have to input manually.

In the advanced tab there is a "zones" variable you can put the zones you want created in here as a comma delimited list e.g. 2,3. If you can tell me what zones this particular model do I will add it to the table.


Code: [Select]
local MODEL = {
['3808'] = {zones = "2,3"},
['2106'] = {zones = "2"},
['2307'] = {zones = "1"},
['2803'] = {zones = "1"},
['2805'] = {zones = "2"},
['2807'] = {zones = "2"},
['3803'] = {zones = "1"},
['3805'] = {zones = "1,2"},
['3806'] = {zones = "2,3"},
['4306'] = {zones = "2,3"},
['4802'] = {zones = "1"},
['4806'] = {zones = "2,3"},
['5803'] = {zones = "1,2"},
['5805'] = {zones = "2,3,4"},
        ['3312']= {zones = "?,?,?"},
}

Title: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 07, 2014, 07:41:57 am
hmm
I noticed something from your advanced tab.
If you see on my attachment it doesn't look like the power status is updating.
This is taken when the avr is On according to the icon on the dashboard

________________
I have played a bit more with it and when I turn on the amp (not via vera) the device icon in vera is updated instant. But the variabel info in the advanced tab is not.
------------------------
Edit2:
I think it can have been a mcv remote problem. That it did not update when I was not directly connected...?
It updated partly when I refreshed the page in Crome...
Besides that, my denon has 2 secondary zones. But I don't use any of them.

regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 07, 2014, 08:11:33 am
maybe a weird question. but the forum OP is called over serial/ethernet. so, the plugin decides if it commands the receiver over ip or rs232?

i want to try and read your plugin to eventually make or let make a plugin for my sony str-da5600es. i do have a lot of rs232 command documentation, but like to proceed with the IP control. the receiver seems to be seemlessly integrated with control4 over Zigbee and there are third parties which can remotely control the receiver both over serial and ethernet.

so it can't be too difficult, maybe i can even use your plugin in some way if the commands of vera are interchangable. just maybe replace the bits and bytes of the rs232/ip commands of sony.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 07, 2014, 05:24:09 pm
@haavard
The "Power Status" variable is for main power while the status variable is for zone power (In my case ZM, Z2 & Z3). Currently the "Power Status" variable is not implemented correctly/completely and should be ignored. I am currently trying to figure out the best way to approach this.

@fabstar81
If you use "luup.io.open" the code covers both serial and ip connectivity. Here is some boiler plate code (that I am using, others may have different better implementations: -

Code: [Select]
local function connectionType()
local ip = luup.devices[lul_device].ip or ""
if (ip == "") then
log("connectionType: Running on Serial.")
else
local ipAddress, port = ip:match("^([^:]+):?(%d-)$")
if (ipAddress and ipAddress ~= "") then
if (not port or port == "") then
        port = 23
      else
        port = tonumber(port, 10)
      end
log("connectionType: ipAddress = "..(ipAddress or "nil")..", port = "..(port or "nil")..".")
    luup.io.open(lul_device, ipAddress, port)

if( luup.io.is_connected(lul_device)==false ) then
return false
end

end
    return true
end
end

If you require any other help let me know and I will see what I can do.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 08, 2014, 03:53:58 am
let me first try and make contact over SSH to the receiver? what is the first step?
i know the ip address, and it seems to be port 6001 that the receiver listens to for commands.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 08, 2014, 05:56:46 am
@fabstar81
Are you sure that is the correct port. That port is used for X11 so is probably not the correct port.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 08, 2014, 06:03:37 am
http://www.roomieremote.com/forums/topic/sony-str-da4600es-receiver-ip-control/

Here is a guy who claims he had this thing working over port 6001 for his STR-DA5600es. so i'm just guessing.

on http://files.remotecentral.com/library/22-1/sony/index.html i found lots of rs232 documentation.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 08, 2014, 06:18:37 am
Certainly looks possible and yes you should be able to leverage some of the code. You may want to start a new thread and see if someone else possibly started.

If I get a chance I will have another look but currently don't have much time.

First step would be to use a Telnet client (Putty comes to mind) and connect to ip port and try to communicate that way first.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 08, 2014, 06:34:52 am
thanks zoot! i started my own thread: http://forum.micasaverde.com/index.php/topic,22234.0.html

hopefully this will result eventually in a nice additional plugin for sony receivers!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 09, 2014, 04:51:38 am
does anyone know where to find the xml's in the vera using winSCP?
i'd like to download the denon files to read them and use them.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: garrettwp on January 09, 2014, 06:30:54 am
The are located in /etc/cmh-ludl. A word of caution, they are compressed using the lzo compression. You are better to download the files from the Vera web interface located under Apps -> Develop Apps -> Luup files.

- Garrett
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 09, 2014, 07:14:15 am
I did that but in chrome I just get text files. Won't download them to my pc. Maybe another browser will help...

Sent from my LT26i using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: garrettwp on January 09, 2014, 09:57:54 am
Did you click on the download link next to each file? Chrome is my default browser and have no problem downloading the files.

- Garrett
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fabstar81 on January 09, 2014, 09:58:43 am
Yeah i used chrome actually. Will try with another browser

Sent from my LT26i using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 09, 2014, 10:18:59 pm
Hi all
Update here: -
http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)

Version = 0.35

Updates: -

Please note if you have used this plugin you may need to change the 'Setup' under the advanced TAB back to '0' so plugin updates static JSON file again.

Again this is very beta so use at your own risk.

I can only test a single receiver so if you have a different receiver or multiple receivers please feedback any issues.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 10, 2014, 03:48:56 am
Hi all
Update here: -
http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)

Version = 0.35

Updates: -
  • Static JSON file now created with name of receiver. Plugin should now handle two different model receivers attached to one Vera.
  • Device file created with name of receiver.
  • Auto creation of zones if model number is listed in table.
  • Auto naming of zones if available.
  • Removed JSON buttons for main power on/off need to revisit this.
  • Lots of other small changes.

Please note if you have used this plugin you may need to change the 'Setup' under the advanced TAB back to '0' so plugin updates static JSON file again.

Again this is very beta so use at your own risk.

I can only test a single receiver so if you have a different receiver or multiple receivers please feedback any issues.

Hi,
The plugin is stable on my AVR.
However I am no longer able to turn the AVR off from the device in the UI.
I have to go to settings and select main off to get my AVR to turn off.
There is also no response on the off button in the settings tab.

regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 10, 2014, 05:07:41 am
@haavard
Known issue looking at it now.

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 10, 2014, 05:56:58 am
Hi all

Version = 0.36

Update here: -
http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080 (http://forum.micasaverde.com/index.php/topic,5863.msg146080.html#msg146080)

Please note if you have used this plugin you may need to change the 'Setup' under the advanced TAB back to '0' so plugin updates static JSON file again.

Updates:-
Fixed On/Off/Standby (still needs work)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 15, 2014, 04:14:15 am
Hi,
Today when I tried logged in to vera there was a error in the "display"
Communication error. And the Denon device was red with lua failed to load.
See attached log file for a reload with this error.

When I turned the Denon on manually and hit the reload, the plugin started normally.
I think this is the kind of long time instability issues I have experienced before with the std. Denon plugin.
-------------------------
The same thing happened again today.
Seams like it times out or something?

regrads
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 20, 2014, 01:11:52 am
@haavard
I think this is a Denon issue nothing to do with the plugin. I have had it happen to me in the past where I have had to completely turn off the receiver and back on again. It has only happened when I have thrown a lot of garbage at it to suse out commands.

Also possible to get if you have other devices that are accessing the Telnet port of the receiver.

I will look into it but there is nothing in the log to give any real pointers it just points to a communications error.

regards

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on January 20, 2014, 01:31:56 am
@zoot1612

I see. I am using the denon iphone app from time to time. But I have not noticed that this happens at the same time.
Thanks for your faultfinding.

regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: aechelon on January 28, 2014, 12:24:24 am
Hi Zoot,

Model 3313ci has 2 auxiliary zones.  To control all three successfully I set the Zones parameter to 2,3.  It would be great if you could add 3313ci to the models variable.

TIA!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 30, 2014, 12:24:11 am
@theitalianguy
Will be in the next release.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on January 30, 2014, 11:31:26 am
Sorry for what i'm sure is obvious to most of you... but once I unzip the files, how to I set this up?  Upload via LUUP (i'm guessing), then create a device somehow?

Thanks...

EDIT.... think i figured out how to make a device... 

When i restarted, it failed to load LUUP. Per this thread, i reloaded again, and I've had no errors sense.  However, i have no control in my "control" tab (see attached). 

I've also gone into "advanced" and changed 'setup' to 0.  It's always back at 1 when i go back into device.

thoughts?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on January 31, 2014, 02:32:26 am
@zoot1612

my Denon model "AVR-4520USA" (a/k/a 4520) has a main zone plus 3 additional zones. could you please add to the list when you have a chance? Thanks!

i see the zone names in the log but not on the devices when manually put "2,3" (i am not using zone 4 at the moment) into Zones on the advanced tab:

50
Code: [Select]
01/30/14 23:33:52.590 luup_log:288: AVRReceiverPlugin::(handleResponse) data received SYMOAVR-4520USA <0x2c06f680>
50 01/30/14 23:33:52.591 luup_log:288: AVRReceiverPlugin::(handleResponse) Data:MOAVR-4520USA Type:SY Zone:288 <0x2c06f680>
50 01/30/14 23:33:52.591 luup_log:288: AVRReceiverPlugin::(processMessage) Data:MOAVR-4520USA Type:SY Zone:288 <0x2c06f680>
50 01/30/14 23:33:52.592 luup_log:288: AVRReceiverPlugin::(createZones) Starting <0x2c06f680>
01 01/30/14 23:33:52.592 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:1 Zone name:Theater. <0x2c06f680>
01 01/30/14 23:33:52.593 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:2 Zone name:Whole Home. <0x2c06f680>
01 01/30/14 23:33:52.593 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:3 Zone name:Patio. <0x2c06f680>
01 01/30/14 23:33:52.594 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:4 Zone name:ZONE4. <0x2c06f680>
01 01/30/14 23:33:52.594 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:1 Zone name:Theater. <0x2c06f680>
01 01/30/14 23:33:52.595 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:2 Zone name:Whole Home. <0x2c06f680>
01 01/30/14 23:33:52.595 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:3 Zone name:Patio. <0x2c06f680>
01 01/30/14 23:33:52.595 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:4 Zone name:ZONE4. <0x2c06f680>
01 01/30/14 23:33:52.596 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:2 Zone name:AVR-4520USA_R2. <0x2c06f680>
01 01/30/14 23:33:52.597 luup_log:288: AVRReceiverPlugin::(createZone) Zone number:3 Zone name:AVR-4520USA_R3. <0x2c06f680>


also, i notice this in my log in case it is important:

Code: [Select]
01 01/30/14 23:32:53.197 Device_LuaUPnP::CreateService 288 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b30f000>
01 01/30/14 23:32:53.197 Device_LuaUPnP::CreateServices removing incomplete service from 288 <0x2b30f000>
01 01/30/14 23:32:53.224 Device_LuaUPnP::CreateService 289 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b30f000>
01 01/30/14 23:32:53.224 Device_LuaUPnP::CreateServices removing incomplete service from 289 <0x2b30f000>
01 01/30/14 23:32:53.226 Device_LuaUPnP::CreateService 290 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b30f000>
01 01/30/14 23:32:53.226 Device_LuaUPnP::CreateServices removing incomplete service from 290 <0x2b30f000>
01 01/30/14 23:32:53.228 Device_LuaUPnP::CreateService 291 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b30f000>
01 01/30/14 23:32:53.228 Device_LuaUPnP::CreateServices removing incomplete service from 291 <0x2b30f000>
01 01/30/14 23:32:53.230 Device_LuaUPnP::CreateService 292 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b30f000>
01 01/30/14 23:32:53.230 Device_LuaUPnP::CreateServices removing incomplete service from 292 <0x2b30f000>
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 31, 2014, 07:50:29 am
@mda
Try attached update. As for your second question I have been changing a lot so you may get some spurious data but I am not getting that so one of the files may not have uploaded properly.

@tomgru
Does not look right possibly an issue with the json file but not enough info to go on, first thing is to try the new attached plugin and go from there. Note that the setup should be set to "1" after successful setup. If you can please send me the messages in the log that your A/V receiver is sending back to the plugin (I have no idea if the X2000 response to all the commands specially the undocumented ones)

example response from AVR3808EU from undocumented RR?
Code: [Select]
01 01/31/14 20:40:01.301 luup_log:84: AVRReceiverPlugin::(AVRReceiverSend) command sent RR?. <0x2b707680>
50 01/31/14 20:40:01.313 luup_log:84: AVRReceiverPlugin::(handleResponse) data received R1Lounge           <0x2b707680>
50 01/31/14 20:40:01.314 luup_log:84: AVRReceiverPlugin::(handleResponse) Data:R1Lounge           Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.314 luup_log:84: AVRReceiverPlugin::(processMessage) Data:R1Lounge           Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.724 luup_log:84: AVRReceiverPlugin::(handleResponse) data received R2                 <0x2b707680>
50 01/31/14 20:40:01.724 luup_log:84: AVRReceiverPlugin::(handleResponse) Data:R2                 Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.725 luup_log:84: AVRReceiverPlugin::(processMessage) Data:R2                 Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.735 luup_log:84: AVRReceiverPlugin::(handleResponse) data received R3                 <0x2b707680>
50 01/31/14 20:40:01.735 luup_log:84: AVRReceiverPlugin::(handleResponse) Data:R3                 Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.735 luup_log:84: AVRReceiverPlugin::(processMessage) Data:R3                 Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.745 luup_log:84: AVRReceiverPlugin::(handleResponse) data received R4                 <0x2b707680>
50 01/31/14 20:40:01.746 luup_log:84: AVRReceiverPlugin::(handleResponse) Data:R4                 Type:RR Zone:84 <0x2b707680>
50 01/31/14 20:40:01.746 luup_log:84: AVRReceiverPlugin::(processMessage) Data:R4                 Type:RR Zone:84 <0x2b707680>


Please ensure all files in zip are uploaded.



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on January 31, 2014, 11:42:10 am

@tomgru
Does not look right possibly an issue with the json file but not enough info to go on, first thing is to try the new attached plugin and go from there. Note that the setup should be set to "1" after successful setup. If you can please send me the messages in the log that your A/V receiver is sending back to the plugin (I have no idea if the X2000 response to all the commands specially the undocumented ones)

example response from AVR3808EU from undocumented RR?

Got excited... new zip file had more files than the .36 release (7 vs. 4 files).  thought that might be it... (maybe I did something wrong first time?).

Uploaded all the files... created new device (previously deleted old one), and loaded.  Lua failure first time through... reloaded again, and no failure.  But still same problem... no controls under settings tab.

Attached is a log file.  I've never done that before... so i'm not sure how/what to parse out what you need.  I also changed the setup back to 0 and reloaded.... all in the log file.  Hope that helps!

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on January 31, 2014, 02:00:04 pm
@zoot1612 thanks, i installed .42.

the device does not show the controls or device status and the zone child devices are not being created. the message

   Denon Receiver (AVR) via RS232/Ethernet
   [292] : Running Lua Startup

remains in the message area at the top of UI5 after very luup reload.

i then re-uploaded the files just in case there was corruption when uploading, but that did not help. I deleted the device and created a new one with device file D_DenonReceiver1.xml and implementation file I_DenonReceiver1.xml and my denon's IP address set. i reloaded luup twice.

here are screen shots of the device creation and the advanced tab of the device and here is the log grep'ed to 'Receiver'

Code: [Select]
09 01/31/14 10:51:57.127 JobHandler_LuaUPnP::Run device 293 Denon Receiver (AVR) via RS232/Ethernet  room 0 type urn:schemas-denon-com:device:receiver:1 id  parent 0/0x11b5c08 upnp: 0 <0x2ac3b000>
50 01/31/14 10:52:13.408 luup_log:293: AVRReceiverPlugin::connectionType: ipAddress = 192.168.1.14, port = 23. <0x2b56f680>
01 01/31/14 10:52:13.911 luup_log:293: AVRReceiverPlugin::(AVRReceiverSend) command sent PW?. <0x2b56f680>
50 01/31/14 10:52:13.928 luup_log:293: AVRReceiverPlugin::(handleResponse) data received PWSTANDBY <0x2b56f680>
50 01/31/14 10:52:13.929 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:STANDBY Type:PW Zone:293 <0x2b56f680>
50 01/31/14 10:52:13.930 luup_log:293: AVRReceiverPlugin::(processMessage) Data:STANDBY Type:PW Zone:293 <0x2b56f680>
50 01/31/14 10:52:13.930 luup_log:293: AVRReceiverPlugin::Power status change Power: STANDBY <0x2b56f680>
01 01/31/14 10:52:13.931 luup_log:293: AVRReceiverPlugin::setMasterPower:Device:293 <0x2b56f680>
06 01/31/14 10:52:13.931 Device_Variable::m_szValue_set device: 293 service: urn:denon-com:serviceId:Receiver1 variable: PowerStatus was: EMPTY now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2b56f680>
50 01/31/14 10:52:13.933 luup_log:293: AVRReceiverPlugin::(response) data received PW STANDBY Power status change <0x2b56f680>
01 01/31/14 10:52:14.334 luup_log:293: AVRReceiverPlugin::(AVRReceiverSend) command sent RR?. <0x2b56f680>
50 01/31/14 10:52:14.385 luup_log:293: AVRReceiverPlugin::(handleResponse) data received R1Theater    <0x2b56f680>
50 01/31/14 10:52:14.385 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:R1Theater    Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.386 luup_log:293: AVRReceiverPlugin::(processMessage) Data:R1Theater    Type:RR Zone:293 <0x2b56f680>
01 01/31/14 10:52:14.788 luup_log:293: AVRReceiverPlugin::(AVRReceiverSend) command sent SSFUN ?. <0x2b56f680>
50 01/31/14 10:52:14.790 luup_log:293: AVRReceiverPlugin::(handleResponse) data received R2Whole Home <0x2b56f680>
50 01/31/14 10:52:14.790 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:R2Whole Home Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.791 luup_log:293: AVRReceiverPlugin::(processMessage) Data:R2Whole Home Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.800 luup_log:293: AVRReceiverPlugin::(handleResponse) data received R3Patio      <0x2b56f680>
50 01/31/14 10:52:14.801 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:R3Patio      Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.801 luup_log:293: AVRReceiverPlugin::(processMessage) Data:R3Patio      Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.811 luup_log:293: AVRReceiverPlugin::(handleResponse) data received R4ZONE4      <0x2b56f680>
50 01/31/14 10:52:14.811 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:R4ZONE4      Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.812 luup_log:293: AVRReceiverPlugin::(processMessage) Data:R4ZONE4      Type:RR Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.821 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNDVD Apple TV     <0x2b56f680>
50 01/31/14 10:52:14.822 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNDVD Apple TV     Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.822 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNDVD Apple TV     Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:14.823 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:DVD:source name:Apple TV    : <0x2b56f680>
01 01/31/14 10:52:14.823 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 1 Source name: DVD <0x2b56f680>
01 01/31/14 10:52:15.225 luup_log:293: AVRReceiverPlugin::(AVRReceiverSend) command sent SYMO. <0x2b56f680>
50 01/31/14 10:52:15.229 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNBD Blu-ray      <0x2b56f680>
50 01/31/14 10:52:15.229 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNBD Blu-ray      Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.230 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNBD Blu-ray      Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.230 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:BD:source name:Blu-ray     : <0x2b56f680>
01 01/31/14 10:52:15.230 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 2 Source name: BD <0x2b56f680>
50 01/31/14 10:52:15.239 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNTV TV AUDIO     <0x2b56f680>
50 01/31/14 10:52:15.240 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNTV TV AUDIO     Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.240 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNTV TV AUDIO     Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.241 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:TV:source name:TV AUDIO    : <0x2b56f680>
01 01/31/14 10:52:15.241 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 3 Source name: TV <0x2b56f680>
50 01/31/14 10:52:15.250 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNSAT/CBL Dish         <0x2b56f680>
50 01/31/14 10:52:15.251 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNSAT/CBL Dish         Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.251 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNSAT/CBL Dish         Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.251 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:SAT/CBL:source name:Dish        : <0x2b56f680>
01 01/31/14 10:52:15.252 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 4 Source name: SAT/CBL <0x2b56f680>
50 01/31/14 10:52:15.261 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNMPLAY              <0x2b56f680>
50 01/31/14 10:52:15.262 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNMPLAY              Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.262 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNMPLAY              Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.262 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:MPLAY:source name:            : <0x2b56f680>
01 01/31/14 10:52:15.263 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 5 Source name: MPLAY <0x2b56f680>
50 01/31/14 10:52:15.271 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNGAME Xbox         <0x2b56f680>
50 01/31/14 10:52:15.272 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNGAME Xbox         Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.272 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNGAME Xbox         Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.273 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:GAME:source name:Xbox        : <0x2b56f680>
01 01/31/14 10:52:15.273 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 6 Source name: GAME <0x2b56f680>
50 01/31/14 10:52:15.282 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNAUX1 Wii          <0x2b56f680>
50 01/31/14 10:52:15.283 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNAUX1 Wii          Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.283 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNAUX1 Wii          Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.283 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:AUX1:source name:Wii         : <0x2b56f680>
01 01/31/14 10:52:15.284 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 7 Source name: AUX1 <0x2b56f680>
50 01/31/14 10:52:15.293 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNCD CD           <0x2b56f680>
50 01/31/14 10:52:15.293 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNCD CD           Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.294 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNCD CD           Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.294 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:CD:source name:CD          : <0x2b56f680>
01 01/31/14 10:52:15.295 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 8 Source name: CD <0x2b56f680>
50 01/31/14 10:52:15.303 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNAUX2 Cameras      <0x2b56f680>
50 01/31/14 10:52:15.304 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNAUX2 Cameras      Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.304 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNAUX2 Cameras      Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.305 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:AUX2:source name:Cameras     : <0x2b56f680>
01 01/31/14 10:52:15.305 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 9 Source name: AUX2 <0x2b56f680>
50 01/31/14 10:52:15.314 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SSFUNPHONO PHONO        <0x2b56f680>
50 01/31/14 10:52:15.315 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:FUNPHONO PHONO        Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.315 luup_log:293: AVRReceiverPlugin::(processMessage) Data:FUNPHONO PHONO        Type:SS Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.315 luup_log:293: AVRReceiverPlugin::(handlerFunction) data received SS source:PHONO:source name:PHONO       : <0x2b56f680>
01 01/31/14 10:52:15.316 luup_log:293: AVRReceiverPlugin::SETUP function name Length of table: 10 Source name: PHONO <0x2b56f680>
50 01/31/14 10:52:15.335 luup_log:293: AVRReceiverPlugin::(handleResponse) data received SYMOAVR-4520USA <0x2b56f680>
50 01/31/14 10:52:15.336 luup_log:293: AVRReceiverPlugin::(handleResponse) Data:MOAVR-4520USA Type:SY Zone:293 <0x2b56f680>
50 01/31/14 10:52:15.336 luup_log:293: AVRReceiverPlugin::(processMessage) Data:MOAVR-4520USA Type:SY Zone:293 <0x2b56f680>
01 01/31/14 10:52:15.748 luup_log:293: AVRReceiverPlugin::(AVRReceiverSend) command sent SSTPN ?. <0

thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 31, 2014, 09:24:15 pm
@mda
Plugin is stalling at tuner presets. Does this model have AM/FM tuner onboard?

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 31, 2014, 09:34:38 pm
@tomgru
Try setting "setup" to "0" again. Then watch the log with: -
Code: [Select]
tail -f /var/log/cmh/LuaUPnP.log
You should see something like this (with your model where AVR-3808EUR is in my log: -

Code: [Select]
01 02/01/14 10:13:16.205 luup_log:84: AVRReceiverPlugin::Static json file /etc/cmh-ludl/D_AVR-3808EUR1.json exists, decompress. <0x2c06f680>
01 02/01/14 10:13:16.282 luup_log:84: AVRReceiverPlugin::Creating/Opening static json file /etc/cmh-ludl/D_AVR-3808EUR1.json. <0x2c06f680>
01 02/01/14 10:13:16.309 luup_log:84: AVRReceiverPlugin::Device file template /etc/cmh-ludl/D_DenonReceiver1.xml exists, decompress. <0x2c06f680>
01 02/01/14 10:13:16.379 luup_log:84: AVRReceiverPlugin::Device file /etc/cmh-ludl/D_AVR-3808EUR1.xml exists, decompress. <0x2c06f680>
01 02/01/14 10:13:16.448 luup_log:84: AVRReceiverPlugin::Copying /etc/cmh-ludl/D_DenonReceiver1.xml to /etc/cmh-ludl/D_AVR-3808EUR1.xml <0x2c06f680>

The Vera will restart two or three times well it updates files. Once it has stabilised then check and see if UI has updated.

If not then go here: -

Code: [Select]
cd /etc/cmh-ludl/
and remove static json file and device file that contain your model name , command below with my model.
Code: [Select]
rm D_AVR-3808EUR1.*
Go to beginning and try changing setup to 0 again.

If this does not work then send me logs with details and i will have another look.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on January 31, 2014, 09:48:27 pm
@zoot1612 yep it has am/fm/hd tuner (and spotify, internet radio, pandora, etc). Would it help to send you a verbose log?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 01, 2014, 04:47:15 am
@mda
No I think the issue is that the 4520 does not support the command (The command is undocumented).

Anyway attached is a update with those commands removed. I will put this feature on the back burner for now.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 01, 2014, 01:07:52 pm
OK... tried all that... thanks for the explicit instructions BTW!  Still no go.  attached is the log file (that I think I now do correctly :-) )

a side note.  when I opened U15 today, there was a communications error for the Denon... so on a whim I turned it on... then reloaded Vera and the error went away.  Not sure if that helps at all. 

P.S.  Not sure why my log file is so big?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 01, 2014, 08:31:45 pm
@tomgru

Can you download and post your D_AVR-X2000USA1.json and D_AVR-X2000USA1.xml files ? I think there may be an issue with the json file but will need to have a look.

cheers

John

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 01, 2014, 11:07:56 pm
@tomgru

Can you download and post your D_AVR-X2000USA1.json and D_AVR-X2000USA1.xml files ? I think there may be an issue with the json file but will need to have a look.

cheers

John

You bet.

er.... can you tell me how?   :o
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on February 02, 2014, 01:00:12 am
@ zoot1612  thanks, the device setup completes now and i tested some basic controls. i will test more completely in the next couple days. Questions:

1. should it automatically name the child devices based on the zone names retrieved? (screen shot attached showing it does not). Not important for me, but in case it is supposed to do that and it not happening causes other issues i wanted to let you know.

2. is there a way i can select Spotify on the denon zones 2 and/or 3? is there a way to tell it to start playing a specific spotify playlist?

3. is there a way i select internet radio ("iradio" in the protocol, not pandora) and tell it to play a particular station on zones 2 and/or 3?

4. is there a way to turn All Zone Stereo on/off?

5. If there were a generic way to send any command that are part of the ethernet protocol to the denon via Lua (e.g.: to do #2, 3, 4 above) that would cover everything! Here is the protocol helpful http://www.awe-europe.com/documents/Control%20Docs/Denon/AVR4520_PROTOCOL_V01.pdf

4. i see a few "unhandled messages" that look like they might be odd in the log, attached in case you want to give a look.

thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 02, 2014, 03:11:38 am
@tomgru

Under "Apps" tab "Develop Apps" right click "download" to download the required file.

Cheers

John

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on February 02, 2014, 03:15:39 am

OK... tried all that... thanks for the explicit instructions BTW!  Still no go.  attached is the log file (that I think I now do correctly :-) )

a side note.  when I opened U15 today, there was a communications error for the Denon... so on a whim I turned it on... then reloaded Vera and the error went away.  Not sure if that helps at all. 

P.S.  Not sure why my log file is so big?

I also have this com error from time to time. I have not seen a reason for why this happens. It disappears after avr restart and lua restart for me as also...

Regards
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 02, 2014, 03:33:55 am
@mda

Quote
1. should it automatically name the child devices based on the zone names retrieved? (screen shot attached showing it does not). Not important for me, but in case it is supposed to do that and it not happening causes other issues i wanted to let you know.

Yes it should  :) thanks.

Quote
2. is there a way i can select Spotify on the denon zones 2 and/or 3? is there a way to tell it to start playing a specific spotify playlist?

For the first part oyes, via UI  or via advance tab (see attachment) . With the command you need to know what input Spotify is mapped to. For the second part No.

The big caveate here is that I do not have spotify so cannot be 100% sure.

Quote
3. is there a way i select internet radio ("iradio" in the protocol, not pandora) and tell it to play a particular station on zones 2 and/or 3?

No and I cannot be sure there will be as I do not that functionality.

Quote
4. is there a way to turn All Zone Stereo on/off?

Do you mean is there a way to change from Stereo to Mono  or other? Currently answer is no.

Quote
5. If there were a generic way to send any command that are part of the ethernet protocol to the denon via Lua (e.g.: to do #2, 3, 4 above) that would cover everything! Here is the protocol helpful http://www.awe-europe.com/documents/Control%20Docs/Denon/AVR4520_PROTOCOL_V01.pdf
.

No, but there is no reason why this cannot be added. I will have a look when time permits :)

Quote
6. i see a few "unhandled messages" that look like they might be odd in the log, attached in case you want to give a look.

Lots of unhandled messages as I have only scratched the surface :) Thanks any input is useful.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on February 02, 2014, 03:56:06 am
thanks. All Zone Stereo plays the same source through all zones. it is nothing special, just another command which i could send if there were a generic "send command" capability:

Code: [Select]
?All Zone Stereo ON? Control      NZST ON<CR>
?All Zone Stereo OFF? Control     MNZST OFF<CR>

Does the following stuff from the bottom of the implementation file suggest the ability to send a generic command is there somewhere? (sorry for the dumb question, i do not know anything about plug-in development or how i would test that-- but happy to do so with a point in the right direction). Thanks!

Code: [Select]
    <action>
    <serviceId>urn:denon-com:serviceId:Receiver1</serviceId>
    <name>Command</name>
    <run>
        sendCommand(lul_device, lul_settings.newTargetValue)
    </run>
    </action>
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 02, 2014, 08:22:01 am
@mda

OK Minimal testing but this should now work: -

Example
http://IPADDRESS/port_3480/data_request?id=lu_action&DeviceNum=DEVICENUMBER&serviceId=urn:denon-com:serviceId:Receiver1&action=SendCommand&Command=PW?

Edit Using attached update.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 02, 2014, 11:17:46 am
@tomgru

Can you download and post your D_AVR-X2000USA1.json and D_AVR-X2000USA1.xml files ? I think there may be an issue with the json file but will need to have a look.

cheers

John

thanks for instructions.  Here you go.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on February 02, 2014, 11:50:34 pm
@zoot1612 Thank you! i tested a bit and it seems to be working. i will test more in the next few days. separately when i returned to vera this evening to install this i noticed a "communication error" for the denon in UI5 and the device said "startup lua failure" (i think). I think my log had rotated out so could not find anything related in it. I will monitor it and see if it happens again with this new update. Thanks again.

.44 still does not auto-name the child devices based on the zone names (not sure it should, but in case you wanted me to test that too i wanted to let you know).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: cedricm on February 03, 2014, 05:48:04 am
Hi there,

If anybody is interested, I've provided a simple & short LUUP scene-based alternative to this plugin here (http://forum.micasaverde.com/index.php/topic,22950.0.html).

It doesn't keep a permanent connection to the AVR nor provides pretty buttons for all functions of the AVR, but allows building scenes that "does the job" (e.g., "Turn AVR ON if currently OFF, set volume to xx and switch to favorite station x").
No plugin required.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 08:04:16 am
All
New version attached.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 03, 2014, 10:00:43 am
All
New version attached.

Cheers

John

Thanks John.  Did you look at my files, and/or should I try this anyway?

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 10:27:43 am
@tomgru
Yes, wasn't very clear was it :) Please give it a try I am hoping I fixed your issues.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mda on February 03, 2014, 02:17:43 pm
... separately when i returned to vera this evening to install this i noticed a "communication error" for the denon in UI5 and the device said "startup lua failure"...

same communications error with .44, trying with .441

EDIT: yep, same communication err with .441. i wonder if my setup just can not handle the plug-in needing a persistent connection (since i have several iPads around the house that also use the denon app and Roomie to control the AVR) and i need to just use cedricm's luup code instead?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 05:35:10 pm
@mda

There are a couple of solutions for this with @cedricm probably  the easiest to implement.

In no particular order and none tried by me: -

Note that 2-4 come back to the original plugin.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 03, 2014, 05:46:12 pm
Hi John.... i may be doing something wrong, but this seems to have made it worse.  I don't see any LUA actually running when i reload now, and there are very few settings available in the advanced tab of the device.  Attached is how i should be making the device, correct?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 08:05:13 pm
@tomgru
Yes that is all you require.

Do you get anything in the log with that ip address?

Try pulling the plug on the Vera and on the AVR, otherwise ???????
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 03, 2014, 09:09:06 pm
@tomgru
Yes that is all you require.

Do you get anything in the log with that ip address?

Try pulling the plug on the Vera and on the AVR, otherwise ???????

yep.  I set it up as static.  My phone app still works fine, and I can log in directly from browser. 

One think I noted under the Luup files was that the two receiver specific files are there, presumably from an earlier attempt.  Is this ok?   My uneducated guess is that these get overwritten when you go through the process again?

OK... so I turned the receiver ON and went through all the steps again.... and this time it saw the device AND AND AND the second zone (device).  So I'm guessing that the receiver MUST be on to recognize it when the device is created. 

At first, the device had an ON/OFF slider in the UI... then it disappeared.  I reset setup to 0 and reloaded... both zones there, but no control.  Attached is the log file when I reset it, as well as the two files you requested earlier.

Don't give up on me!   :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 10:58:22 pm
@tomgru
There is a backslash in the JSON file that is currently not catered for.

If you change this DTV\XBO to this DTV/XBO on your receiver it should bypass this bug for now.

I will fix but need to look at how to do so.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 03, 2014, 11:07:37 pm
sure.... what's the easiest way to do this?   :)

EDIT:  Should have just thought about it for a minute. Changed the input name directly on the receiver through the web interface, changed setup back to 0 and reloaded. 

Works!!!!!  I'll play around with it and let you know what I find.  Nice job debugging...!!!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 03, 2014, 11:47:37 pm
@tomgru
Try uploading this to the VERA. Tried to escape the backslash but can't test.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 03, 2014, 11:51:53 pm
@tomgru
Try uploading this to the VERA. Tried to escape the backslash but can't test.

You want me to change the backslash back and retry?

FYI... I now have control buttons for both zones, but any button (like on/off) I try gives me a device not ready dialog. Interestingly though...  if I turn on/off from my remote, the status updates instantly in the device, so it's at least communicating.  Changing inputs, volume, mute, etc, from the remote, all register for zone one immediately in the device.  Zone two shows on/off status, but nothing else (inputs, volume).

Hope that helps. 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 04, 2014, 12:07:16 am
@tomgru

No I will test once I am in a position to do so now.

Yes have noticed that in the past, even though the plugin fails the link stays up and communication still take place. Is there any indication that the plugin failed to start?

Also if you changed the receiver end e.g. the backslash you will need run the setup again (change setup to "1") and save
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 04, 2014, 12:49:53 am
No indication the script failed...  and yep, reran setup after setting value back to 0.  Tried it a couple of times.  That's what I did when I changed the backslash.

I just tried deleting and recreating the device ... and it now seems to work.  Zone two seems to be a little flakey... i'll try to test more tomorrow and see what happens, but general control is now there for both zones!

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 04, 2014, 12:58:53 am
@tomgru
Probably should have asked this earlier, are you running UI5?

Things to check: -
In the advanced tab is device_file pointing to D_YOURDEVICE1.xml?
Does D_YOURDEVICE1.xml and D_YOURDEVICE1.json exist in /etc/cmh-ludl?
Under advanced tab is version at 0.442?
Do you have a tuner tab and does it contain anything?
Do you have a volume/Input tab and does it contain anything?

Can you send your latest xml/json device files I will see if I can create a dummy device to track down the issue.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 04, 2014, 01:10:38 am
I just used your earlier JSON (with the backslash escaped) and here is what I get on my AVR.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 04, 2014, 11:39:14 am
@tomgru
Probably should have asked this earlier, are you running UI5?

Things to check: -
In the advanced tab is device_file pointing to D_YOURDEVICE1.xml?
Does D_YOURDEVICE1.xml and D_YOURDEVICE1.json exist in /etc/cmh-ludl?
Under advanced tab is version at 0.442?
Do you have a tuner tab and does it contain anything?
Do you have a volume/Input tab and does it contain anything?

Can you send your latest xml/json device files I will see if I can create a dummy device to track down the issue.

1.  Yes, running U15.
2.  Sorry... still learning SSH.  Not sure what command shows me what's in a directory.  (and can't seem to find a list of commands anywhere)
3.  Yes, device_file pointing to:  D_AVR-X2000USA1.xml
4.  Nope, version is at .441
5.  I do have a Tuner tab, but there is nothing under it except for a blue "Tuner" title bar.
6.  My Volume/Inputs tab does contain all the right (I think) selections now... and looks like your image. 

Files attached. 


Side note... volume increments via slider really small... so turning receiver down from U15 is really slow.  even if you move the slide all the way to the left.  It only increments a small amount. 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 04, 2014, 01:02:24 pm
Any chance my Marantz NR1602EUR could be included. Has 2 zones. As far as I can say - with the exception of zones and iradio input - it seems to work.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 04, 2014, 02:19:05 pm
Hmm I also seem to have a minor problem changing input thru this command:

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

It does not matter if I input:

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

Absolutely nothing happens - what am I doing wrong here?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 04, 2014, 05:40:38 pm
@Bamsefar
Due to dynamically creating the static JSON file I have changed this. At some point I want to get back to the standard inputs but until I figure out the best way to map the standard inputs the following is the correct command: -

Code: [Select]
luup.call_action("urn:denon-com:serviceId:Receiver1","Input6",{}, 172)
You will have to work out which input is mapped to "TV"

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 04, 2014, 06:26:42 pm
@tomgru
Quote
Side note... volume increments via slider really small... so turning receiver down from U15 is really slow.  even if you move the slide all the way to the left.  It only increments a small amount. 

Will have a look at my implementation and see what I can do.

Quote
5.  I do have a Tuner tab, but there is nothing under it except for a blue "Tuner" title bar.
That should work just plain old javascript J_AVRReceiver1.js put this on the back burner for now.

Quote
Sorry... still learning SSH.  Not sure what command shows me what's in a directory.  (and can't seem to find a list of commands anywhere)

Vera use linux base for their OS with other gnu/proprietary/(put license type here) on top of that. So 'cd' and 'ls' etc will get you where you want to go.


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 04, 2014, 09:15:13 pm
Vera use linux base for their OS with other gnu/proprietary/(put license type here) on top of that. So 'cd' and 'ls' etc will get you where you want to go.

Thanks.  Yes, both files exist. 

No problem on the tuner part from my end... I rarely listen to the radio these days  :)

You did mention version 0.442... yet I only see 0.441 posted.  Might have missed it somewhere.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 05, 2014, 04:51:09 am
@tomgru
Don't bother will be an update for other fixes soon.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 05, 2014, 04:41:20 pm
qzoot1612: aaa - sorry for not reading correct - I should have noticed, but I didn't - and yet I have read it :-( Anyway large thanks.

Btw any idea for implementing internet radio, iradio input, and stored stations?
And while I am at it: Any thought on downloading the stored stations (analog and internet radio) to use on the keys (do observer that analog and internet has there own memory postitions, A1 is available on both...)?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 05, 2014, 05:58:24 pm
@Bamsefar
Quote
Btw any idea for implementing internet radio, iradio input, and stored stations?
And while I am at it: Any thought on downloading the stored stations (analog and internet radio) to use on the keys (do observer that analog and internet has there own memory postitions, A1 is available on both...)?

Might give internet radio a go. iradio I don't have and I tend to stick with what I can test locally  :)

keys? sorry you lost me there. Do you mean via some sort of remote? With the current implementation you can send a command as follows to go to a preset (or any other command).

Code: [Select]
luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="STATION"}, DEVICENUMBER)
STATION = command to go to a preset example "TPANA1" (analog tuner preset no#.1)

Also there is a tuner tab but it currently implements a undocumented command which does not seem to work across all models so I have stopped work on it for now (Currently I know it works on my 3808). This tab uses javascript and command as above so very simple implementation

Main focus for now: -
bugs.
move volume and inputs back to standard micasaverde implementations (The implementation files need to change for this).
Surround.

If you want something implemented let me know and I will try if it is simple enough, but get in soon I will be changing focus otherwise a divorce may ensue :)



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 06, 2014, 11:41:36 am
@zoot1612

Well iradio = internet radio so same same, it just says iradio in the status field when I connect over your plugin. I normaly do this today:

Code: [Select]
local socket = require("socket")
host = "xxx.yyy.zzz.www"
c = assert(socket.connect(host, 23))
c:send("SIIRADIO\r")
luup.sleep(10000)
c:send("MV34\r")
luup.sleep(2000)
c:send("NSB10\r")
c:close()

Gives me Internet Radio (IRADIO) with poweron, MV = MasterVolume = 34 and station stored in B4 position (do remember internet radio has it own memory). Do also observe that Internet Radio is under NET/USB - not that it matters when one sends SIIRADIO - but good to know maybe?

When I refer to "KEYS" I referencing the keys under the tuner tab, the presets tuner keys. I think one can retrieve the stored station name from the receiver and that would be a nice touch?

Which takes me to a bug, for me at least, the "Volume +/-" button under the wrench does nothing on my Marantz. And the slider +/- works but in revers (+ lowers the volume). Is maybe not the way I thought it would react.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 06, 2014, 11:48:12 am
Oh and since you have feedback, how about showing the volume in numbers? Also would be nice to set the increment of volume adjustment? 2.5dB instead of 0.5dB...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tiwas on February 06, 2014, 11:30:14 pm
Is it possible to get a quick intro on the first post or something? I wanted to set it up without messing too much with variables not meant to be touched and I get a red line under the app saying "Lua Startup Failure Missing port"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 08, 2014, 08:48:50 am
Just changed my script above since I just figured out that I used the worng preset command...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 08, 2014, 08:06:33 pm
@tiwas
With this version you should not need to set port so would say you are using one of the other plugins that is out there. Go back a bit in this thread and you should find the plugin attached.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 10, 2014, 07:33:51 am
Updated plugin attached. No major changes as I am trying to get the volumes sorted out. This is not complete as yet but hopefully this removes some bugs.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on February 14, 2014, 03:38:23 am
@zoot1612

God to see that the plugin is updated.
I haven't been playing so much with the denon plugin lately.
But when I tried to install the 0.443 version I get a error.
Denon[316] : Lua Engine Failed to Load.

See attached log file.


 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tiwas on February 15, 2014, 01:18:14 am
Where can I see the version installed, and how do I know if a plugin has been automatically updated?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 15, 2014, 11:02:06 am
@zoot1612

God to see that the plugin is updated.
I haven't been playing so much with the denon plugin lately.
But when I tried to install the 0.443 version I get a error.
Denon[316] : Lua Engine Failed to Load.

I have the same error and problem.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 16, 2014, 06:09:41 am
Sorry all having some trouble with volume code. I know there is a regression in 0.443 will get  to it ASAP.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 17, 2014, 12:04:51 am
All
Attached update.

Changes listed in notes in zip file.

Edit: Hopefully will start uploading changes to the MIOS SVN for next release. I am currently in a (perpetual) state of disarray.

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: haavard on February 17, 2014, 01:06:14 am
It is working again. Thanks for the update!
Is there a way to remove unwanted zones?
I am not using sone 2 and 3.

regrads
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 17, 2014, 02:21:33 am
Question: Do I need to remove my devices before uploading the 444 files since You now have included my Marantz 1602 in the startup?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 17, 2014, 06:24:15 am
@haavard
Short answer is no they are auto created currently with no way to skip, this is something I can add but will not happen quickly.

@Bamsefar
In the advanced tab just change the value of setup to '0' and restart.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Bamsefar on February 18, 2014, 12:44:33 pm
Very Happy!!!

Works great!

I have one question, or two actually:

1) The volume number seems is what? Example: Currently the App reports "50" however my display says "-30dB" - same same but is the number you get for the app from the 0 to 100 scale where "0 dB" is 80?

2) Sirius is nice - however I would prefer a tab for internet radio as mentioned before since Sirius is not available here in Sweden :-)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 19, 2014, 03:49:40 am
@Bamsefar
Yes trying to get my head around how to implement volume  :) Currently it is percentage but am going to change it to dB (next update)

Sirius only happened as it is a mirror of AM/FM tuner so easy to implement. I don't have it here either (Australia).

Once I have the volume side sorted I will go on with enhancements.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on March 08, 2014, 02:24:25 pm
Hey Zoot.

woke up this morning to Lua Failure... been running 441 for awhile just fine.  Tried cycling receiver, and didn't work.  Figured I was a few versions down, so id' just upload the new files and reload (setup value to 0).

Still lua failure.  and weirdly, the advanced tab still says i'm running 441.  thoughts?

EDIT:  Nevermind.  A reboot of vera and the Denon and it's all working.  and Icons too!  Woot!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zscholz on March 11, 2014, 12:36:31 pm
@Zoot -

Is there any way to identify the receiver as something that can be controlled via a "phone" vera app?  I'm using AutHomationHD on android - status gets reported and updated, but no way to control anything. Even volume controls would be useful.

Thanks for all the work you have done here - big upgrades over the past many months which is nice to see!

Sent from my Nexus 5 using Tapatalk
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: garrettwp on March 11, 2014, 12:59:52 pm
@Zoot -

Is there any way to identify the receiver as something that can be controlled via a "phone" vera app?  I'm using AutHomationHD on android - status gets reported and updated, but no way to control anything. Even volume controls would be useful.

Thanks for all the work you have done here - big upgrades over the past many months which is nice to see!

Sent from my Nexus 5 using Tapatalk

This is because the developer of the phone app would need to add support for the plugin. In my case AutHomationHD would require me to support the plugin. I have asked the developer of the plugin to try and use the standard service types to allow easier integration into the app as well as others. This has not been done and will be put low on my list for support.

- Garrett
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zscholz on March 11, 2014, 01:02:21 pm
Thanks Garrett - BTW - excellent app!!  Zoot - I'm sure this isn't a trivial task, so thanks for considering it...

Sent from my Nexus 5 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 11, 2014, 09:28:27 pm
@zscholz
It is on my todo list, the issue is that there is a trade off on handling multiple receiver types especially with inputs.

My goal is to eventually use  some of the services advertised by AVTransport and RenderingControl http://forum.micasaverde.com/index.php/topic,17991.0.html (http://forum.micasaverde.com/index.php/topic,17991.0.html) but have not had a chance to look at this as I currently don't have the time.

@garrettwp
I have take your advice onboard and will eventually get there  :)

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tibbar on March 21, 2014, 11:04:31 pm
Thanks for the app. I've just installed it and trying it now.
My Denon is AVR-3312ci. Volume"+" and "-" works, On Off works, mute- unmute works, some of the inputs are wrong and not working. I just thought would let you know.
Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tibbar on March 24, 2014, 01:38:53 am
Actually after installing v0.444 and changing auto configure to 1 in advanced settings everything including Zones 2 and 3 looks good.
Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on March 26, 2014, 07:09:16 pm
zoot...

about once every few days, i get a "Lua startup failure" for the plugin.  Powering the receiver on/off and reloading Vera clears it.... but i'm hoping that i can stop that soon :-).

i'm running .444.  Any ideas?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: sjolshagen on March 26, 2014, 08:53:15 pm
@tomgru,

I would recommend grabbing the LuaUPnP.log file. The file is located in the /var/log/cmh/ directory as a text file via SSH/SCP (or WinSCP), or you can use your browser (see the wiki article at for details http://wiki.mios.com/index.php/Logs (http://wiki.mios.com/index.php/Logs)) to view the log file as it's being written.

You'd want to look for error messages in the log related to the plugin ID of your Denon plugin. If you post the message here, it'll be easier for people to troubleshoot & update the plugin to fix the issue(s) causing the restart error(s).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 31, 2014, 12:24:15 am
@tomgru
I will have a look and see. It is possible that the plugin is sending a command that the Denon doesn't like and it is breaking the Telnet implementation.

It would be a matter of narrowing down what the command that is sent to do the breaking.

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Theboob on March 31, 2014, 03:35:53 pm
Note that I've developed PC apps and IOS apps for the Denon 3808. After heavy usage (testing of the app over the network) , I've seen the 3808 require a restart occasionally as it quits responding. So don't be surprized if that's all it is. I'm not exactly sure what confuses it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: madwad0 on April 03, 2014, 10:46:39 am
Thank you for all the hard that has been done on this plugin!

I have a AVR-X4000 and I have been having problems getting the plugin to start.  It hangs during Lua startup:

"AVR-X4000USA_MAINZONE:Running Lua startup"

I have got the official plugin working fine.
Deleted the device.
Deleted all plugin related files on my Vera
I uploaded version .444
Created the device:
     Upnp Device Filename: D_DenonReceiver1.xml
     Upnp Implementation Filename: I_DenonReceiver1.xml
Reloaded.

The device showed up and gave me a "Lua failed to start"
I modified the .lua file to include a line for the X4000 with the zones:
Code: [Select]
['4000'] = {zones = "2,3"},Re-Uploaded the .lua file
Turned the receiver off and reloaded Vera
The two sub-zones (2 and 3) populated as their own devices and then lua startup froze on:

"AVR-X4000USA_MAINZONE:Running Lua startup"

Any ideas as to what is going wrong?

   Thank you


-Thank you - I solved it.  I think I have the same problem that @mda had where it hung on the tuner.  Refer to this post: http://forum.micasaverde.com/index.php/topic,5863.msg154518.html#msg154518
I reverted to version .43 and the main zone populated right away.  I then added "2,3" to the "zones" field under "advanced", reloaded and the sub-zone child devices populated.  There is only one bug where the zone devices do not update the receiver input selection but I will work on that next.  Now it is more functional than the default plugin - Yay!

  Thank you!

     


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: aaron999888 on April 04, 2014, 01:52:19 am
I am just learning how to use my Vera3 with various devices.
I noticed the Denon Plugin and have been reading thru the 22 pages of posts.

I have gleaned that i'll need a serial to ethernet converter and of course need to install the plugin via the vera app store.

I have an AVR-3805 and it looks like this reciever is supported by this plug in as far as I can tell.

Would anyone be so kind as to reply with a brief, "How To"?, starting with a recommendation (if necessary) for a serial to ethernet converter and how to install it......
Thx in advance.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on April 08, 2014, 12:25:57 am
@aaron999888
I have not had any experience with the serial side of things for the Denon plugin as I am using Ethernet exclusively. For serial to Ethernet converters I am using a Wiznet125 that works well on another device that I have connected to the Vera.

Wiznet serial Ethernet converters have are configured using a windows program which was fairly straight forward to setup. See here http://wiki.micasaverde.com/index.php/Serial_Supported_Hardware (http://wiki.micasaverde.com/index.php/Serial_Supported_Hardware)

On the Vera end you just need to create a device. See here http://wiki.micasaverde.com/index.php/Install_LUUP_Plugins (http://wiki.micasaverde.com/index.php/Install_LUUP_Plugins) This is for UI4 but should give you the idea.

Once you have done this you just need to supply the ip address and port that the Wiznet is set to.

This is very high level if you want something more detailed I can supply some screenshots etc.

Cheers

John

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dzmiller on April 24, 2014, 01:47:26 pm
I have this plugin connected to my Denon AVR-X1000 over IP.  All it took was the ip address at port 23. But unfortunately most of the settings/controls don't map to the newer (2013 forward) receivers. Power and volume work.
Port 23 has always been the discovery port for Denon over ethernet, I believe.
Is Vera not directly supporting the itach adapters from Global Cache? These seems to be the prefered devices of most the home AV people. The newest one that can be switched from serial to IR with just a cable swap is particularly cool. They even have a POE version. POE seems particularly slick for devices out of a cabinet.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: garrettwp on April 24, 2014, 04:34:34 pm
iTach devices are supported by Vera. You would use the GC100 plugin. I believe the new iTech devices (Flex) are still a little hit or miss for support.

- Garrett
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 06, 2014, 02:00:06 pm
@tomgru
I will have a look and see. It is possible that the plugin is sending a command that the Denon doesn't like and it is breaking the Telnet implementation.

It would be a matter of narrowing down what the command that is sent to do the breaking.

Cheers

Hey Zoot.  I haven't had much time to look into this, but it's still happening.  Just turning on/off the denon seems to fix it, but it seems to be happening more frequently now.  Let me know what you want me to check and how... and I'll try to get the info to you!

Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 06, 2014, 11:41:41 pm
@tomgru

Attached an updated version, I have removed unsupported commands.

let me know if this is more stable.

Cheers


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on July 07, 2014, 11:34:19 pm
HI Zoot, I'm getting:

Denon Receiver (AVR) via RS232/Ethernet[32] : Startup Lua Failed

Do you have any tips?

Thank you!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 07, 2014, 11:54:40 pm
@Marciorschneider

What receiver do you have and have you used the plugin before?

Try a complete power shutdown on your receiver first.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on July 08, 2014, 05:23:06 pm
@Marciorschneider

What receiver do you have and have you used the plugin before?

Try a complete power shutdown on your receiver first.

My receiver is a 3313CI. I've tried the original plugin and previous versions of yours. I rebooted the receiver, but the error still persists.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 08, 2014, 07:59:55 pm
@Marciorschneider


You can also try setting the "setup" variable to "0" in the advanced tab and restarting.

Sorry I can't help more if you attach logs I may be able to narrow it down if it is a plugin fault.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on July 08, 2014, 10:59:58 pm
Hi Zoot, I've found the problem  :)

This was the cause:

01   07/08/14 23:12:15.848   LuaInterface::CallFunction_Startup-1 device 32 function receiverStartup failed [string "local version = "0.445"..."]:644: attempt to concatenate global 'VERSION' (a nil value) <0x2b6d1680>
01   07/08/14 23:12:15.849   LuImplementation::StartLua running startup code for 32 I_DenonReceiver1.xml failed <0x2b6d1680>

Fixed it changing the first line on file L_DenonReceiver1.lua from:

local version = "0.445"

to:

local VERSION = "0.445"

Thank you for your plugin, it is really great!

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 08, 2014, 11:14:23 pm
Hi Zoot, I've found the problem  :)

This was the cause:

01   07/08/14 23:12:15.848   LuaInterface::CallFunction_Startup-1 device 32 function receiverStartup failed [string "local version = "0.445"..."]:644: attempt to concatenate global 'VERSION' (a nil value) <0x2b6d1680>
01   07/08/14 23:12:15.849   LuImplementation::StartLua running startup code for 32 I_DenonReceiver1.xml failed <0x2b6d1680>

Fixed it changing the first line on file L_DenonReceiver1.lua from:

local version = "0.445"

to:

local VERSION = "0.445"

Thank you for your plugin, it is really great!

Good to know--I've been having the same issue.

Zoot, two questions for you. Is it possible to add support for a second zone? Also, I've tried to rename the device, but it never seems to stick and always defaults to the model number when reloaded.  We have a second receiver of the same make and I've had trouble getting this added to vera.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 08, 2014, 11:22:20 pm
I've tried this now multiple times with the new files, and now it won't load at all.  Same lua failure.  I tried powering on/off the Denon... nope.  Tried reuploading files... nope.  Set setup to zero on advanced tab.. nope. (still says "0" if that helps).

I don't have the same network option you talk about.  There is an option to turn off/on IP control when in standby. I have that as "always on". 

don't see any port conflicts.

Again, as before, ironically, under the advanced tab, even after uploading new files, still says i'm on 0.44.

lastly, your zip had a couple of BAK files.  Assume we were to NOT upload those?

let me know how you want log files, and i'll pass along.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on July 09, 2014, 12:10:00 am
I've tried this now multiple times with the new files, and now it won't load at all.  Same lua failure.  I tried powering on/off the Denon... nope.  Tried reuploading files... nope.  Set setup to zero on advanced tab.. nope. (still says "0" if that helps).

I don't have the same network option you talk about.  There is an option to turn off/on IP control when in standby. I have that as "always on". 

don't see any port conflicts.

Again, as before, ironically, under the advanced tab, even after uploading new files, still says i'm on 0.44.

lastly, your zip had a couple of BAK files.  Assume we were to NOT upload those?

let me know how you want log files, and i'll pass along.

Try this modified version, attached:
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 09, 2014, 02:00:54 am
@Marciorschneider
Sorry about that, I have uploaded this version here: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip)

Hopefully this cures a few of the issues.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 09, 2014, 02:10:35 am
@tb001
Zones are supported already, unless I misunderstand your question. There is a table of supported devices at the beginning of "L_DenonReceiver1.lua" check there first to see if your device is in the list.

The naming is an issue as it was not a scenario I took into account. I will have a look and see what I can do.
edit: If you name your main zone on each device (on the AVR itself) differently then it should work as the zone is part of the name.
e.g. AVR-3808EUR_Lounge
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 09, 2014, 10:37:44 am
@Marciorschneider
Sorry about that, I have uploaded this version here: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip)

Hopefully this cures a few of the issues.

Loads now!!!!! great.

I'll report back if I still see the intermittent problem.  Thanks guys!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 16, 2014, 11:21:33 am
@Marciorschneider
Sorry about that, I have uploaded this version here: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/29/branches/UI5Update?old_path=%2F&format=zip)

Hopefully this cures a few of the issues.

Loads now!!!!! great.

I'll report back if I still see the intermittent problem.  Thanks guys!

Update.  this didn't seem to fix the problem.   :o

If it helps... I think it's when I turn the denon on/off from another source, other than Vera.  So, if I use the denon remote to run it, it seems to get out of sync with the plugin.  Oddly, when I turn it on/off again from the remote, and reload Vera, all is fine.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 17, 2014, 03:05:31 am
@tomgru

On my AVR it seems to be fairly stable with the plugin, I have not done any hard resets on it for some time and the plugin does not do any thing really esoteric.

Also it should not get out of sync as any changes should be picked up as they are broadcast on the Telnet port (not sure about rs232 but assume it is the same). We certainly use the Denon remote in tandem with no issues.

Have you tried deleting the device and creating again?

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 18, 2014, 03:56:40 pm
@tb001
Zones are supported already, unless I misunderstand your question. There is a table of supported devices at the beginning of "L_DenonReceiver1.lua" check there first to see if your device is in the list.

The naming is an issue as it was not a scenario I took into account. I will have a look and see what I can do.
edit: If you name your main zone on each device (on the AVR itself) differently then it should work as the zone is part of the name.
e.g. AVR-3808EUR_Lounge

Zoot, thanks for the advice on naming. Just getting back to this now. For some reason I'm not seeing the list of supported devices--when I try to view the "L_DenonReceiver1.lua" in the Apps>Develop App> Luup Files section, I'm getting an error. I can view the other Denon files. Is this the place I should be looking? We have one AVR1713 and one AVR1913. They seemed to name ok, but now I think that this may be coming from the AVR itself.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 20, 2014, 08:36:56 pm
@tb001

Quote
when I try to view the "L_DenonReceiver1.lua" in the Apps>Develop App> Luup Files section, I'm getting an error. I can view the other Denon files. Is this the place I should be looking?

Yes, this is the correct place, but you need to right click on the download link.

Currently this is the list: -
Code: [Select]
['1000'] = {zones = "2"},
['2000'] = {zones = "2"},
['2106'] = {zones = "2"},
['2307'] = {zones = "1"},
['2803'] = {zones = "1"},
['2805'] = {zones = "2"},
['2807'] = {zones = "2"},
['3312'] = {zones = "2,3"},
['3313'] = {zones = "2,3"},
['3803'] = {zones = "1"},
['3805'] = {zones = "1,2"},
['3806'] = {zones = "2,3"},
['3808'] = {zones = "2,3"},
['4000'] = {zones = "2,3"},
['4306'] = {zones = "2,3"},
['4520'] = {zones = "2,3,4"},
['4802'] = {zones = "1"},
['4806'] = {zones = "2,3"},
['5803'] = {zones = "1,2"},
['5805'] = {zones = "2,3,4"}

If you let me know what zones the AVR1713 & 1913 use I will update the list.

Quote
They seemed to name ok, but now I think that this may be coming from the AVR itself.
That is correct all zone naming is automatically created from the AVR itself.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 21, 2014, 10:56:18 am
@tb001

Quote
Yes, this is the correct place, but you need to right click on the download link.

Currently this is the list: -
Code: [Select]
['1000'] = {zones = "2"},
['2000'] = {zones = "2"},
['2106'] = {zones = "2"},
['2307'] = {zones = "1"},
['2803'] = {zones = "1"},
['2805'] = {zones = "2"},
['2807'] = {zones = "2"},
['3312'] = {zones = "2,3"},
['3313'] = {zones = "2,3"},
['3803'] = {zones = "1"},
['3805'] = {zones = "1,2"},
['3806'] = {zones = "2,3"},
['3808'] = {zones = "2,3"},
['4000'] = {zones = "2,3"},
['4306'] = {zones = "2,3"},
['4520'] = {zones = "2,3,4"},
['4802'] = {zones = "1"},
['4806'] = {zones = "2,3"},
['5803'] = {zones = "1,2"},
['5805'] = {zones = "2,3,4"}

If you let me know what zones the AVR1713 & 1913 use I will update the list.


Thanks Zoot--I'm on a mac, so I forget right-click is even an option! If it's easy to add them, that would be great! They both use zones 1&2, with the 1913 zone two being powered (not sure if that matters).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 21, 2014, 06:32:26 pm
@tb001
Done http://code.mios.com/trac/mios_denon-receiver-control/changeset/31/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/31/branches/UI5Update?old_path=%2F&format=zip)

['1713'] = {zones = "2"}
['1913'] = {zones = "2"}

Quote
They both use zones 1&2
The assumption is that zone 1 is the main zone which is handled differently.

For best results I recommend deleting devices and starting from scratch.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 21, 2014, 07:06:13 pm
Great, thanks!! Will try it tonight
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 24, 2014, 07:47:10 pm


Have you tried deleting the device and creating again?

Cheers

Back from travel... had to reset again.  so happy to try this.  Just delete the device, or the files as well? 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 24, 2014, 09:38:30 pm
@tomgru
Everything and start from scratch, to be honest I don't think it will help  :( but worth a try.

Do you have logs from when this occurs, does it happen at a particular time, Is there another program accessing the port on the Denon? Sorry just running out of ideas on how to help.

regards

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on July 29, 2014, 09:16:54 pm
Hi all, I am new to this thread and I am trying to figure out how to get my Denon AVR-1913 to work with my Vera 3 - I installed the plugin from the app store and it added my receiver as a device, but the status shows a red light and says "Lua Startup Failure Missing port". When I try to send a command to the receiver, it tells me "Device not ready". I tried reading through this thread to see if anyone had a similar problem, but I haven't been able to find much of anything. Please let me know if you can help. Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 29, 2014, 10:41:14 pm
Hi all, I am new to this thread and I am trying to figure out how to get my Denon AVR-1913 to work with my Vera 3 - I installed the plugin from the app store and it added my receiver as a device, but the status shows a red light and says "Lua Startup Failure Missing port". When I try to send a command to the receiver, it tells me "Device not ready". I tried reading through this thread to see if anyone had a similar problem, but I haven't been able to find much of anything. Please let me know if you can help. Thanks!

Did you go back and add the IP address of the denon? If I recall correctly, that was the error I saw when I didn't put in the IP address. It was either that or not downloading the upnp app first. Also, make sure you have the latest files if they aren't in the App Store yet--otherwise you'll be missing the second zone on the 1913
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on July 29, 2014, 11:14:56 pm
Hi all, I am new to this thread and I am trying to figure out how to get my Denon AVR-1913 to work with my Vera 3 - I installed the plugin from the app store and it added my receiver as a device, but the status shows a red light and says "Lua Startup Failure Missing port". When I try to send a command to the receiver, it tells me "Device not ready". I tried reading through this thread to see if anyone had a similar problem, but I haven't been able to find much of anything. Please let me know if you can help. Thanks!

Did you go back and add the IP address of the denon? If I recall correctly, that was the error I saw when I didn't put in the IP address. It was either that or not downloading the upnp app first. Also, make sure you have the latest files if they aren't in the App Store yet--otherwise you'll be missing the second zone on the 1913
That seemed to do the trick! Now the issue I have is that is doesn't look like any of my Android apps really give me any useful control of it - does anyone have a recommendation? I normally use Authomation HD.

Where can I get the latest files? Are they in this thread somewhere?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 29, 2014, 11:22:35 pm
No help with the android, but hopefully others will chime in. I'm on iPhone and haven't played around with the controller too much. Ultimately I'd like to use this to set up scenes to start avr in different zones, on certain sonos stations or associate with tv, etc... so I can push a button in my app and set a scene.

The additional files are in this thread--posted within the last few weeks, so should be easy to find. I asked about the 1913 and zoot was kind enough to add zone two support within a day or two. Just great! I haven't installed files yet, so not sure how to update easily. I'm still relatively new to vera, so seems like the basics take me forever to figure out!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on July 29, 2014, 11:27:17 pm
No help with the android, but hopefully others will chime in. I'm on iPhone and haven't played around with the controller too much. Ultimately I'd like to use this to set up scenes to start avr in different zones, on certain sonos stations or associate with tv, etc... so I can push a button in my app and set a scene.

The additional files are in this thread--posted within the last few weeks, so should be easy to find. I asked about the 1913 and zoot was kind enough to add zone two support within a day or two. Just great! I haven't installed files yet, so not sure how to update easily. I'm still relatively new to vera, so seems like the basics take me forever to figure out!

It sounds like you and I are very much in the same boat - I am still a new user too. I am trying to set up scenes so that I can turn on my receiver and set it to a specific input, but I'm not sure that is possible - the only options I see are power toggle.

Is .45 the version I want?
http://forum.micasaverde.com/index.php/topic,5863.msg183340.html#msg183340
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 30, 2014, 07:19:59 am
No help with the android, but hopefully others will chime in. I'm on iPhone and haven't played around with the controller too much. Ultimately I'd like to use this to set up scenes to start avr in different zones, on certain sonos stations or associate with tv, etc... so I can push a button in my app and set a scene.

The additional files are in this thread--posted within the last few weeks, so should be easy to find. I asked about the 1913 and zoot was kind enough to add zone two support within a day or two. Just great! I haven't installed files yet, so not sure how to update easily. I'm still relatively new to vera, so seems like the basics take me forever to figure out!

It sounds like you and I are very much in the same boat - I am still a new user too. I am trying to set up scenes so that I can turn on my receiver and set it to a specific input, but I'm not sure that is possible - the only options I see are power toggle.

Is .45 the version I want?
http://forum.micasaverde.com/index.php/topic,5863.msg183340.html#msg183340

Don't think that's the one. This was the link zoot gave:

http://code.mios.com/trac/mios_denon-receiver-control/changeset/31/branches/UI5Update?old_path=%2F&format=zip

I'm pretty sure there are ways to access the inputs, etc... in scenes, but I haven't gotten there yet :) Not sure if  this is in the 'advanced' section or if you need to do it in luup. On the list, but first I need to get things stable with the basics (door locks, lights, etc...) or I'm in danger of my SO shutting down the whole project!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on July 30, 2014, 06:26:34 pm
No help with the android, but hopefully others will chime in. I'm on iPhone and haven't played around with the controller too much. Ultimately I'd like to use this to set up scenes to start avr in different zones, on certain sonos stations or associate with tv, etc... so I can push a button in my app and set a scene.

The additional files are in this thread--posted within the last few weeks, so should be easy to find. I asked about the 1913 and zoot was kind enough to add zone two support within a day or two. Just great! I haven't installed files yet, so not sure how to update easily. I'm still relatively new to vera, so seems like the basics take me forever to figure out!

It sounds like you and I are very much in the same boat - I am still a new user too. I am trying to set up scenes so that I can turn on my receiver and set it to a specific input, but I'm not sure that is possible - the only options I see are power toggle.

Is .45 the version I want?
http://forum.micasaverde.com/index.php/topic,5863.msg183340.html#msg183340

Don't think that's the one. This was the link zoot gave:

http://code.mios.com/trac/mios_denon-receiver-control/changeset/31/branches/UI5Update?old_path=%2F&format=zip

I'm pretty sure there are ways to access the inputs, etc... in scenes, but I haven't gotten there yet :) Not sure if  this is in the 'advanced' section or if you need to do it in luup. On the list, but first I need to get things stable with the basics (door locks, lights, etc...) or I'm in danger of my SO shutting down the whole project!

Awesome, thanks! One more question - how do I go about installing this file?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 30, 2014, 08:19:19 pm
Ha, good question! :) I'm not sure--I tried removing the old files and just uploading the files in the folder, but no luck and haven't had the time to dig around and figure it out yet. I'm sure it's one of those things that are old hat to experienced users! If I'm remembering correctly, I wasn't sure what to do with the startup file, so figured that was most likely the issue. Hopefully someone with more experience can chime in here.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on July 30, 2014, 09:52:28 pm

Quote
Don't think that's the one. This was the link zoot gave:

http://code.mios.com/trac/mios_denon-receiver-control/changeset/31/branches/UI5Update?old_path=%2F&format=zip

I'm pretty sure there are ways to access the inputs, etc... in scenes, but I haven't gotten there yet :) Not sure if  this is in the 'advanced' section or if you need to do it in luup. On the list, but first I need to get things stable with the basics (door locks, lights, etc...) or I'm in danger of my SO shutting down the whole project!

What needs to be done to update the plugin on the repository? Maybe I can help.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 31, 2014, 12:00:54 am
@tp546
For Ethernet connected devices.

Go to: -
tab       "APPS"
subtab "Develop Apps"
click on "Luup files"

Browse to to the location of the downloaded and unzipped files to upload, you need to do this for each file you want to upload.

Click to "GO" button.

click on "Create device" and fill in the following info: -
Upnp Device Filename = D_DenonReceiver1.xml
Upnp Implementation Filename = I_DenonReceiver1.xml
Ip Address = <IPADDRESSOFRECEIVER>

Click on "Create device"

Click on "Reload"


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 31, 2014, 12:23:04 am
@Marciorschneider

Quote
What needs to be done to update the plugin on the repository? Maybe I can help.

The actual plugin in the store does not belong to me, also there are few different versions around so I am not sure how this can be fixed to the satisfaction of everybody.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 31, 2014, 12:27:07 am
@tb001
Try setting "Setup" to 0 under the "Advanced" tab in the device and restarting.
http://forum.micasaverde.com/index.php/topic,5863.msg154481.html#msg154481 (http://forum.micasaverde.com/index.php/topic,5863.msg154481.html#msg154481)

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on July 31, 2014, 05:51:23 am
OK, I just tried again--deleted the previous app, uploaded the files and created the device as you described for tp546. Not seeing a second zone yet. Went to the 'advanced' tab of the device and don't see 'setup' listed--is this where I should be looking? I swear, vera makes me feel like a total dolt on a regular basis!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dzmiller on July 31, 2014, 09:11:23 am
@Marciorschneider

Quote
What needs to be done to update the plugin on the repository? Maybe I can help.

The actual plugin in the store does not belong to me, also there are few different versions around so I am not sure how this can be fixed to the satisfaction of everybody.

Can you just publish it under a new name, like Denon II. The existing plugin is old and should be viewed as depreciated.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 31, 2014, 07:17:10 pm
@tb001
Sounds like the Vera is not able to access the receiver, make sure that no other devices are accessing port on receiver, also check your logs.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on July 31, 2014, 07:18:59 pm
@tb001
Sounds like the Vera is not able to access the receiver, make sure that no other devices are accessing port on receiver, also check your logs.

Cheers
Zoot... how can i check that port issue?  The web interface to my denon says it's on port 00000.  I have nothing setup specifically for the denon on my router, other than a static iP.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on July 31, 2014, 07:29:20 pm
If you are connecting via Ethernet the Denon uses port 23 by default (not changeable). Only one device can be connected to this port at a time. If you have other devices than a new connection will fail.

To see if you can access the port use something like Telnet or Putty

Example Telnet
Code: [Select]
telnet 192.168.0.33 23
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on August 02, 2014, 11:16:01 am
@tp546
For Ethernet connected devices.

Go to: -
tab       "APPS"
subtab "Develop Apps"
click on "Luup files"

Browse to to the location of the downloaded and unzipped files to upload, you need to do this for each file you want to upload.

Click to "GO" button.

click on "Create device" and fill in the following info: -
Upnp Device Filename = D_DenonReceiver1.xml
Upnp Implementation Filename = I_DenonReceiver1.xml
Ip Address = <IPADDRESSOFRECEIVER>

Click on "Create device"

Click on "Reload"

Thanks Zoot - I tried that but now it is telling me "Lua Startup Failure Missing Port" - this had happened with the other plugin when I didn't have the IP address in there but I have it in so I'm not sure what to do to fix this. Any ideas?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on August 02, 2014, 02:24:39 pm
@tb001
Sounds like the Vera is not able to access the receiver, make sure that no other devices are accessing port on receiver, also check your logs.

Cheers

Ok, I'm confused--I'm having no trouble controlling the other inputs on the receiver through vera--just don't see anything for zone 2 or any tab labelled 'setup' in the advanced section. Does that make sense? Am I missing something?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on August 02, 2014, 03:41:00 pm
@tp546
For Ethernet connected devices.

Go to: -
tab       "APPS"
subtab "Develop Apps"
click on "Luup files"

Browse to to the location of the downloaded and unzipped files to upload, you need to do this for each file you want to upload.

Click to "GO" button.

click on "Create device" and fill in the following info: -
Upnp Device Filename = D_DenonReceiver1.xml
Upnp Implementation Filename = I_DenonReceiver1.xml
Ip Address = <IPADDRESSOFRECEIVER>

Click on "Create device"

Click on "Reload"

Thanks Zoot - I tried that but now it is telling me "Lua Startup Failure Missing Port" - this had happened with the other plugin when I didn't have the IP address in there but I have it in so I'm not sure what to do to fix this. Any ideas?

I got it fixed - for some reason there was an http:// in my IP address so that was the problem. This doesn't seem to be any different from the Denon app I downloaded through Vera though. How can I do more than turn it on/off in a scene?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 02, 2014, 04:48:37 pm
Quote

I got it fixed - for some reason there was an http:// in my IP address so that was the problem. This doesn't seem to be any different from the Denon app I downloaded through Vera though. How can I do more than turn it on/off in a scene?

You could use any denon Telnet protocol command. For example, play memory 1 on main zone:

luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="ZMFAVORITE1"},32)

Change 32 to your device ID.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on August 02, 2014, 06:59:11 pm
Quote

I got it fixed - for some reason there was an http:// in my IP address so that was the problem. This doesn't seem to be any different from the Denon app I downloaded through Vera though. How can I do more than turn it on/off in a scene?

You could use any denon Telnet protocol command. For example, play memory 1 on main zone:

luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="ZMFAVORITE1"},32)

Change 32 to your device ID.

Okay great, thanks for the help. I assume I would put this in the text box in the LUUP tab? Is there a list of the available commands somewhere?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 02, 2014, 08:34:41 pm
Quote

I got it fixed - for some reason there was an http:// in my IP address so that was the problem. This doesn't seem to be any different from the Denon app I downloaded through Vera though. How can I do more than turn it on/off in a scene?

You could use any denon Telnet protocol command. For example, play memory 1 on main zone:

luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="ZMFAVORITE1"},32)

Change 32 to your device ID.

Okay great, thanks for the help. I assume I would put this in the text box in the LUUP tab? Is there a list of the available commands somewhere?

yes, you put this in the text box for LUUP code. If you prefer you could go to the advanced tab and pick a device and a method(SendCommand in this case), it's the same thing.

Here I found a document for 3313CI telnet protocol, should be similar with all new models: https://www.domotiga.nl/attachments/download/718/AVR3313CI_PROTOCOL_V01.pdf




Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on August 02, 2014, 09:32:50 pm
Quote

I got it fixed - for some reason there was an http:// in my IP address so that was the problem. This doesn't seem to be any different from the Denon app I downloaded through Vera though. How can I do more than turn it on/off in a scene?

You could use any denon Telnet protocol command. For example, play memory 1 on main zone:

luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="ZMFAVORITE1"},32)

Change 32 to your device ID.

Okay great, thanks for the help. I assume I would put this in the text box in the LUUP tab? Is there a list of the available commands somewhere?

yes, you put this in the text box for LUUP code. If you prefer you could go to the advanced tab and pick a device and a method(SendCommand in this case), it's the same thing.

Here I found a document for 3313CI telnet protocol, should be similar with all new models: https://www.domotiga.nl/attachments/download/718/AVR3313CI_PROTOCOL_V01.pdf

Awesome, thanks! I just ran into a new problem - for some reason I am getting a "Startup Lua failed" message for my receiver now. I didn't change any settings though.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 02, 2014, 09:42:42 pm
Quote

Awesome, thanks! I just ran into a new problem - for some reason I am getting a "Startup Lua failed" message for my receiver now. I didn't change any settings though.

Do you have the latest version (446)? Previous one had this problem.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tp546 on August 02, 2014, 11:19:46 pm
Quote

Awesome, thanks! I just ran into a new problem - for some reason I am getting a "Startup Lua failed" message for my receiver now. I didn't change any settings though.

Do you have the latest version (446)? Previous one had this problem.

Not sure how to check that, but I downloaded the one from this post:
http://forum.micasaverde.com/index.php/topic,5863.msg186168.html#msg186168
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 03, 2014, 11:29:45 pm
The javascript upload with a html extension on that upload.

I had updated but using previous link will result in the wrong plugin being downloaded. Use the following as this will always result in latest: -

http://code.mios.com/trac/mios_denon-receiver-control/browser/branches/UI5Update (http://code.mios.com/trac/mios_denon-receiver-control/browser/branches/UI5Update)

link to zip file can be found at the bottom of the page.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: daved on August 04, 2014, 11:55:48 pm
Anyone having trouble renaming their device? I am trying to change it to "receiver" then saving. However, upon reload it sticks for a few seconds then changes back to "AVR-1913USA_MAIN ZONE"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: pls90 on August 05, 2014, 03:36:06 pm
Yup. Same here. I have a avr-3311. Changed the name, did the vera dance, old name popped up again. Not that bad though.
The only thing I miss a BD source. I tried all sources available but none switched to BD.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 05, 2014, 06:49:13 pm
@daved @pls90
Zone naming is automatically derived from the receiver itself, changing it there should change it on the Vera. The actual model will still remain.

This is not a bug it is a feature :)

@pls90
On the Volume/Inputs tab the inputs should be named as per the naming on the receiver as this information is created when device is first created. So if you have named a input as "BD" then it should show up as "BD". If it doesn't try resetting the plugin by setting "Setup" to "0" in the advanced tab. If this doesn't work you may need to post the log so we can look at it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 05, 2014, 09:05:48 pm
Yup. Same here. I have a avr-3311. Changed the name, did the vera dance, old name popped up again. Not that bad though.
The only thing I miss a BD source. I tried all sources available but none switched to BD.

You can use luup code like this in a scene:

luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="SIBD"},32)

Change 32 to your device ID.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 05, 2014, 09:45:55 pm
Hi Zoot, I've found a bug on S_DenonReceiver1.xml. The line 90 should be "<name>Command</name>" and not "<name>newCommand</name>". With this correction is possible to use the  "SendCommand" action on "advanced" scene programming. Could you please update it?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 06, 2014, 01:14:51 am
@Marciorschneider

Done.

Also
Added source view on advanced tab so that it is easier to translate into scene creation, see attached.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: pls90 on August 06, 2014, 02:02:23 am
No setup under advanced tab. I added a state variable setup, set it to 0. still don't see me edited source names.  I realized you had a newer version of the plugin. Can't ssh into my vera right now. Wonder why that is. I have a ticket with mcv regarding my fibaro rollershutter module so i don't want to disable / reenable tech support to get a new pw. I will have to wait until your changes will be available through standard plugin download. Thank you for this great plugin!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Marciorschneider on August 06, 2014, 08:39:16 am
No setup under advanced tab. I added a state variable setup, set it to 0. still don't see me edited source names.  I realized you had a newer version of the plugin. Can't ssh into my vera right now. Wonder why that is. I have a ticket with mcv regarding my fibaro rollershutter module so i don't want to disable / reenable tech support to get a new pw. I will have to wait until your changes will be available through standard plugin download. Thank you for this great plugin!

You could just upload the files. Go to apps ->develop apps -> luup files and upload it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: pls90 on August 07, 2014, 01:51:09 am
after removing the old version of the plugin and uploading the files via apps ->develop apps -> luup files I got it to work.
thank you for helping me out!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zscholz on August 07, 2014, 09:58:59 pm
Deleted
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: pls90 on August 08, 2014, 02:35:04 pm
The plugin runs perfectly now. The only issue I have is that the irule Android app I use to control my home cinema stopped working with the denon amp. This is not the fault of the plugin, but a limitation of the denon allowing only one connection at a time. Is there a way to "release" the amp from the vera plugin control to free it to connect to irule?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 09, 2014, 12:21:43 am
@pls90
Short answer is no, this way the plugin knows the correct status at any given time.

There are mentions in this thread about other methods, one is via a proxy
 http://forum.micasaverde.com/index.php/topic,5863.msg69458/topicseen.html#msg69458 (http://forum.micasaverde.com/index.php/topic,5863.msg69458/topicseen.html#msg69458)
another is a plugin that connects sends a command and disconnects.
http://forum.micasaverde.com/index.php/topic,5863.msg123294.html#msg123294 (http://forum.micasaverde.com/index.php/topic,5863.msg123294.html#msg123294)
or
http://forum.micasaverde.com/index.php/topic,5863.msg154953.html#msg154953

Edit: Another way may be to connect to the rs232 port via a serial to ethernet box and this way you can get the best of both worlds. This is an assumption on my part I have never tried it.

Cheers

Zoot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: pls90 on August 10, 2014, 03:08:47 am
@zoot
Thank you for pointing me in the right direction! I am now using the "denon dimmer" together with irule without any problems!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ALcALoIDe on August 21, 2014, 09:21:35 am
Hello guys.

I have a Denon 4806CI that has an ethernet port and I can play music through my computer. Will this plugin work with my Denon? I see only the new ones commented here in the forum...

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dzmiller on August 21, 2014, 09:49:21 am
Hello guys.

I have a Denon 4806CI that has an ethernet port and I can play music through my computer. Will this plugin work with my Denon? I see only the new ones commented here in the forum...

Thanks

I doubt it.
You could try the older plugin that is downloadable from the app store. The updated plugin that discussed recently in this thread I believe is designed for receivers made in the last couple of years.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on August 29, 2014, 11:52:52 am
Hey Zoot.... i'm still having the same problem.  Won't reload after what seems like a random occurrence. If I start/stop my Denon, then reload, all is fine.  Just happened in last 10 minutes.  Here is the recent log (best that I can save it )
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 30, 2014, 04:04:48 am
@tomgru

Quote
AVRReceiverPlugin::connectionType: ipAddress = 192.168.1.174, port = 23.
IOPort::Connect connect -1 192.168.1.174:23

All I can see is that the Vera cannot make a connection to the receiver, which is the first thing it does. I don't think (someone else may have a different view) that this is the fault of the plugin. It is more likely something in the network itself or the Vera/Controller.


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 01, 2014, 02:29:11 pm
Hi,

I'm integrating my asterix (voip) within Vera, and I'm trying to mute TV/Receiver when a call gets in (will post a how-to once I achieve it).   For now,  I've created one simple scene in Vera,  within only the  'Advanced' tab on it (screenshot):

Once I trigger the scene,  the IR plugin is sending the Mute key to TV as it should,  however my Denon does not mute in any case.  If I replace the 'Mute' by 'Off' and re-try the scene,  receiver does power off .  Also, if I press the 'Mute' button at the plugin screen my receiver does mute.

Can it be something wrong with the plugin handling a remote-scene-call to its Mute method, or so? 

Thanks
Ricardo
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: daved on September 02, 2014, 01:30:11 pm
@zoot
Thank you for pointing me in the right direction! I am now using the "denon dimmer" together with irule without any problems!
Also sent you a PM, but could you expand on this a bit more? I'm having the same problem (Vera + iRule).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: daved on September 02, 2014, 01:34:04 pm
@daved @pls90
Zone naming is automatically derived from the receiver itself, changing it there should change it on the Vera. The actual model will still remain.

This is not a bug it is a feature :)

Hmm, okay. In the future it might be good to have a manual override for users that want to change the name.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 04, 2014, 04:54:33 pm
Zoot.  I've been having some trouble with my log files.  can you check this one and see if there is anything new in there that might help?

First log is not connected.

Second log is turning Denon on/off, then reloading Vera (now connects).

thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 04, 2014, 09:00:34 pm
@tomgru
Is it this?

Denon by default has power saving mode enabled which turns off power to the Network interface thus will not allow the device to wake up from Standby.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 04, 2014, 09:25:08 pm
@tomgru
Is it this?

Denon by default has power saving mode enabled which turns off power to the Network interface thus will not allow the device to wake up from Standby.

MIne is in "IP Control",... and I have it set to always on. 

what's weird is that my web interface, and my Phone (windows) and tablet (Android) always connect.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: MountainAutomator on September 04, 2014, 10:29:10 pm
Thanks for the plugin!

I setup the telnet proxy connected to my AVR 3312ci running on my beaglebone black.  I'm using port 80 for other purposes and just wanted to know what I'm missing by setting it up that way.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 12:10:06 am
@tomgru
Can you turn power savings off and see how it goes? Interesting that other control devices work, what model do you have?

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 12:14:03 am
@MountainAutomator
None that I can think of if proxy updates control devices. In fact this is a better option.

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 05, 2014, 12:35:57 am
@tomgru
Can you turn power savings off and see how it goes? Interesting that other control devices work, what model do you have?

Sent from my Nexus 7 using Tapatalk

i have an AVR-X2000.

Well, that was definitely worth a try.  I guess it's not surprising that changing that setting made my other devices unable to communicate to the denon if it was in standby, but doesn't help us much.

In the network settings on the web client, Proxy is unchecked, and there is nothing in the 'port' box.  I checked the other clients... and they only asked for IP for setup. 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 12:51:10 am
Power saving off should allow connectivity when in standby. I will have a look at the manual online when i get a chance.


Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 05, 2014, 01:22:48 am
Power saving off should allow connectivity when in standby. I will have a look at the manual online when i get a chance.


Sent from my Nexus 7 using Tapatalk

I did the same... couldn't find a thing more  :'(
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 03:50:43 am
@rvendrame
Will have a look, it sounds like the plugin.

Sent from my Nexus 7 using Tapatalk

Note: there were some changes in the later version where I moved to upnp render for mute etc so you may need to update your scene.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 04:08:56 am
@tomgru
"Always On" is correct for the X2000 according to the protocol document, so that's not it.
It may be the same as others on this forum with more than one control device. You may need to look at one of the alternatives.

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 05, 2014, 07:54:11 am
@rvendrame
Will have a look, it sounds like the plugin.

Sent from my Nexus 7 using Tapatalk

Note: there were some changes in the later version where I moved to upnp render for mute etc so you may need to update your scene.

@Zoot, thank you.   I'm using version 1.1 of Denon plugin.  Let me know if there is anything I can do from here to trace it.    Thx.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 08:51:23 am
@rvendrame
Try this one: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/45/branches/UI5Update?old_path=%2F&format=zip

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 05, 2014, 09:31:47 am
@rvendrame
Try this one: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/45/branches/UI5Update?old_path=%2F&format=zip

@Zoot,  not sure if I did it in the right way (I uploaded the files all together at Apps -> Develop Apps -> Luup files.   After that I got 'Lua startup failed' at the device and 'AVR Receiver:  Communications error' at the top.

I double checked the IP and mac of the Receiver, they are correct.  Is there any other parameter to check?   The device Icon changed, as well as  the layout of volume/inputs,  so I think  I do have a new version there...

Thx

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 05, 2014, 11:38:11 am
I will need to update the plugin with your model which is a E300. Can you tell me the number of zones and how they are numbered.

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 05, 2014, 12:00:24 pm
I will need to update the plugin with your model which is a E300. Can you tell me the number of zones and how they are numbered.

Sent from my Nexus 7 using Tapatalk

Zoot,  the AVR-E300 has extra zone,  just the mains (5.1). 

http://ca.denon.com/ca/Product/Pages/Product-Detail.aspx?Catid=3d9614d1-8000-4106-ab91-8192242cab83&SubId=40b5820d-83c2-4e93-9909-60aae60e0bdd&ProductId=2e1b6f9f-2ca3-417b-83d7-6aceff564a94

Thanks!
rvendrame
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 05, 2014, 12:02:02 pm
Sorry,  typo:   Zoot,  the AVR-E300 has no extra zone,  just the mains (5.1). 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 05, 2014, 12:10:19 pm
@tomgru
"Always On" is correct for the X2000 according to the protocol document, so that's not it.
It may be the same as others on this forum with more than one control device. You may need to look at one of the alternatives.

Sent from my Nexus 7 using Tapatalk

 :'(
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 06, 2014, 03:00:36 am
@rvendrame
Updated version uploaded.
http://code.mios.com/trac/mios_denon-receiver-control/changeset/47/branches/UI5Update?old_path=%2F&format=zip

This has not been fully tested ad I am not running Ui5

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 06, 2014, 09:24:38 am
@rvendrame
Updated version uploaded.
http://code.mios.com/trac/mios_denon-receiver-control/changeset/47/branches/UI5Update?old_path=%2F&format=zip

This has not been fully tested ad I am not running Ui5

Sent from my Nexus 7 using Tapatalk

@zoot,  now I get a forever "Denon Receiver (AVR) via RS232/Ethernet [34] : Running Lua Startup" ...

I zipped the results of "cat LuaUPnP.log | grep AVR" from my Vera,  in case you are interested  ;-)

Thx!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 06, 2014, 01:29:19 pm
OK
Looks like it might be stalling at RR which is an undocumented command for zone names. I have bypassed this for the 300 so try the update.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/52/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/52/branches/UI5Update?old_path=%2F&format=zip)

This is the problem with trying to support so many different AVR's.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 06, 2014, 01:38:51 pm
I'm just trying this again after spending some time on other components of my network. When I upload the files, and create a device, now I'm getting the error message 'start-up lua failed'. I thought there were changes in some of the newer files which may have caused this, but even trying to go back to the older files, I'm seeing the same message.

In looking at my luup directory, it looks like I have extra denon files (they are duplicates of the other files, but with .xml.html at the end). I'm assuming I screwed something up with one of these old downloads--could this cause the behavior I'm seeing? If not, any other suggestions would be appreciated.

ETA, interestingly, while I don't seem to have any control over the receiver (get an error whenever I try to use the controls), it is accurately reflecting the receiver status, volume, etc...
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 06, 2014, 10:37:12 pm
@ tb001
Which UI are you using?

Regarding the html file the extension was added by windows to a javascript file and I uploaded it without realising. It can be deleted but does not influence system either way.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 07, 2014, 09:53:46 am
OK
Looks like it might be stalling at RR which is an undocumented command for zone names. I have bypassed this for the 300 so try the update.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/52/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/52/branches/UI5Update?old_path=%2F&format=zip)

This is the problem with trying to support so many different AVR's.

Hi Zoot,  I think we are almost there.  I'm still receiving "Device not ready" when pressing any button at the plugin (e.g. Power on or volume up).  However, if I change the volume directly in the receiver,  the corresponding volume slider changes correctly at the plugin.

"AVR-E300USA - [34] : Running Lua Startup" still appearing constantly at top of page.  Checking your notes (yes I read the notes :-) )

Try powering off receiver then back on again.  >>> This made the plugin start showing volume changes from the receiver

Check that no other clients are connected to port already.  >>> I don't think so,  however at setup-> net & wi-fi -> Troubleshoot network , I found this:

=== SSH_TUNNELS: ===
Found 1 ssh sessions running
Remote Control Tunnels are running

Check "Network Option: Standby Mode Power Saving" is set to off.  >>>  At the E300 this is called "IP control -> Always on"

Serial connection details:-  >>> Not my case

Ethernet connection details:-
     Communication system: A half duplex
    speed: 10Mbps/100Mbps    >>>  My switch is gigabit, but both Vera and Receiver are 10 or 100Mbps
    port: TCP port 23 (telnet)

Under the "Advanced" tab set the "Setup" to "0" then restart the luup engine.  >>> Could not find the "Setup" variable!

More logs...   Is it my impression or pluging is trying to power  zone 34?  (34 is the device id BTW)


AVRReceiverPlugin::handleResponse: Data:ON Type:PW Zone:34 <0x2b489680>
If there is any any other troubleshoot action, just let me know.

Thx a lot
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 08, 2014, 08:59:01 am
@rvendrame @tb001

New release here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip)

There are still outstanding issues with the multitude of different AVR's and what is supported. I have hopefully covered off what I can but may need to drop some of the unsupported commands later.

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jjwalker on September 08, 2014, 11:29:14 am
I've been following the Yamaha/Denon threads for a while trying to decide which receiver to purchase.   I really only need to control on /off and volume.   Would love to have a slider for volume.   Has anyone gotten the volume/slider working correctly yet?   Or am I able to create a virtual dimmer device and group it with volume?   I'm using Imperihome and AuthomationHD,  so I would probably need to create a device or scene so it'll show up in those apps.
Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 08, 2014, 11:53:12 am
@rvendrame @tb001

New release here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip)

There are still outstanding issues with the multitude of different AVR's and what is supported. I have hopefully covered off what I can but may need to drop some of the unsupported commands later.

Cheers

Zoot, very close.   Plugin is starting ok here,  and most of the controls are working! 

Only Volume Slider,  Mute,  Unmute  are not working ("Invalid Service").     Sad, as 'Mute' is the one I wanted ...   Please note that + Volume and - Volume ARE working.

And two 'cosmetics':
   - "MEDIA PLAYER" label is bigger than its button, so text is going out of its button boundaries...
   - Device name was set as `AVR_` instead previously 'AVR_300_USA'   (I renamed it anyway, so just cosmetic)

All the rest is fine for me!
Thanks a lot!
Ricardo
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 08, 2014, 12:38:00 pm
@rvendrame @tb001

New release here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/55/branches/UI5Update?old_path=%2F&format=zip)

There are still outstanding issues with the multitude of different AVR's and what is supported. I have hopefully covered off what I can but may need to drop some of the unsupported commands later.

Cheers

A bit of progress here, but I'm stuck in "running lua startup" mode. Any thoughts? I've tried deleting and re-doing the device, but doesn't seem to have made the difference.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 08, 2014, 10:55:38 pm
@tb001
Can you please feedback your logs and also what UI you are running?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 08, 2014, 11:24:25 pm
@rvendrame
There is a setting under the advanced tab called "setup" set this to 0 then restart luup engine.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 09, 2014, 08:02:09 am
@rvendrame
There is a setting under the advanced tab called "setup" set this to 0 then restart luup engine.

@zoot
Same behavior after that.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 09, 2014, 09:16:07 am
Thanks zoot! I'm on UI5. I've copied below what look to be the relevant bits from the log file (and probably a few non-relevant ones...). For some reason I'm not able to attach a doc for upload, so let me know if there's something else I should be looking for.



03   09/09/14 5:43:17.038   UserData::LoadUserData BuildVersion: *1.5.622* SvnVersion: *7546* Model: 31 Sercomm NA900 flush: 0 changed: 0 resync: 8864 syncdevice:1 <0x2b537000>
01   09/09/14 5:43:18.324   Device_LuaUPnP::CreateService 205 service type/url don't match for urn:micasaverde-com:serviceId:Volume1 <0x2b537000>
01   09/09/14 5:43:18.324   Device_LuaUPnP::CreateServices removing incomplete service from 205 <0x2b537000>
02   09/09/14 5:43:18.341   JobHandler_LuaUPnP::m_sMissingFile_set /etc/cmh-lu//S_DLNARenderingControl1.xml <0x2b537000>
01   09/09/14 5:43:18.342   Device_LuaUPnP::CreateService can't load /etc/cmh-lu//S_DLNARenderingControl1.xml for 205/Denon Receiver (AVR) via RS232/Ethernet <0x2b537000>
01   09/09/14 5:43:18.342   Device_LuaUPnP::CreateServices removing incomplete service from 205 <0x2b537000>
01   09/09/14 5:43:18.372   UPnPAction_Send::ParseState can't find name <0x2b537000>
01   09/09/14 5:43:18.391   UPnPAction_Send::ParseState can't find name <0x2b537000>
01   09/09/14 5:43:18.450   UPnPAction_Send::ParseState can't find name <0x2b537000>



09   09/09/14 5:43:27.259   JobHandler_LuaUPnP::Run device 205 Denon Receiver (AVR) via RS232/Ethernet room 0 type urn:schemas-denon-com:device:receiver:1 id ZM parent 0/0xaf2dc0 upnp: 0 <0x2b537000>



50   09/09/14 5:43:52.386   luup_log:205: AVRReceiverPlugin:::AVR Plugin version 0.75. <0x2be6b680>
50   09/09/14 5:43:52.409   luup_log:205: AVRReceiverPlugin::connectionType: ipAddress = 10.0.1.25, port = 23. __LEAK__ this:106496 start:3530752 to 0x1820000 <0x2be6b680>
06   09/09/14 5:43:52.510   Device_Variable::m_szValue_set device: 205 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 0 now: 0 #hooks: 0 upnp: 0 v:0xb0b6c8/NONE duplicate:1 <0x2be6b680>
06   09/09/14 5:43:52.510   Device_Variable::m_szValue_set device: 205 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 0 now: 0 #hooks: 0 upnp: 0 v:0xafe298/NONE duplicate:1 <0x2be6b680>
01   09/09/14 5:43:52.861   luup_log:205: AVRReceiverPlugin::AVRReceiverSend: command sent SSFUN ?. <0x2be6b680>
01   09/09/14 5:43:52.873   luup_log:205: AVRReceiverPlugin::processInterceptedMessage: result:SS command:SS. <0x2be6b680>
50   09/09/14 5:43:52.873   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNDVD DVD          <0x2be6b680>
50   09/09/14 5:43:52.873   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNDVD DVD          Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:52.874   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNDVD DVD          Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:52.874   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:DVD:source name:DVD: <0x2be6b680>
01   09/09/14 5:43:52.875   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 1 Source name: DVD <0x2be6b680>
06   09/09/14 5:43:53.006   Device_Variable::m_szValue_set device: 182 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 100.00 now: 100.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.008   Device_Variable::m_szValue_set device: 183 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 100.00 now: 100.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.009   Device_Variable::m_szValue_set device: 184 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.014   Device_Variable::m_szValue_set device: 185 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 25.00 now: 25.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.031   Device_Variable::m_szValue_set device: 186 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 50.00 now: 50.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.032   Device_Variable::m_szValue_set device: 187 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.034   Device_Variable::m_szValue_set device: 188 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.035   Device_Variable::m_szValue_set device: 189 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.037   Device_Variable::m_szValue_set device: 190 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.038   Device_Variable::m_szValue_set device: 191 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.042   Device_Variable::m_szValue_set device: 192 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.044   Device_Variable::m_szValue_set device: 193 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.050   Device_Variable::m_szValue_set device: 194 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.052   Device_Variable::m_szValue_set device: 195 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.054   Device_Variable::m_szValue_set device: 196 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0.00 now: 0.00 #hooks: 0 upnp: 0 v:0xd558d0/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.055   Device_Variable::m_szValue_set device: 197 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 0 now: 0 #hooks: 0 upnp: 0 v:0xafe298/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.057   Device_Variable::m_szValue_set device: 198 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 0 now: 0 #hooks: 0 upnp: 0 v:0xafe298/NONE duplicate:1 <0x310ac680>
06   09/09/14 5:43:53.059   Device_Variable::m_szValue_set device: 204 service: urn:micasaverde-com:serviceId:SecuritySensor1 variable: Tripped was: 1 now: 1 #hooks: 1 upnp: 0 v:0xb21350/NONE duplicate:0 <0x310ac680>
07   09/09/14 5:43:53.059   Event::Evaluate 24 test scene test is false repeat 0/-1 <0x310ac680>
06   09/09/14 5:43:53.063   Device_Variable::m_szValue_set device: 204 service: urn:micasaverde-com:serviceId:SecuritySensor1 variable: LastTrip was: 1410265924 now: 1410266633 #hooks: 0 upnp: 0 v:0xb21370/NONE duplicate:0 <0x310ac680>
01   09/09/14 5:43:53.226   luup_log:205: AVRReceiverPlugin::AVRReceiverSend: command sent SYMO. <0x2be6b680>
01   09/09/14 5:43:53.234   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.235   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNBD Blu-ray      <0x2be6b680>
50   09/09/14 5:43:53.235   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNBD Blu-ray      Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.235   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNBD Blu-ray      Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.236   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:BD:source name:Blu-ray: <0x2be6b680>
01   09/09/14 5:43:53.236   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 2 Source name: BD <0x2be6b680>
01   09/09/14 5:43:53.251   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.252   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNTV TV AUDIO     <0x2be6b680>
50   09/09/14 5:43:53.253   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNTV TV AUDIO     Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.253   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNTV TV AUDIO     Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.253   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:TV:source name:TV AUDIO: <0x2be6b680>
01   09/09/14 5:43:53.254   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 3 Source name: TV <0x2be6b680>
01   09/09/14 5:43:53.271   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.271   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNSAT/CBL CBL/SAT      <0x2be6b680>
50   09/09/14 5:43:53.272   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNSAT/CBL CBL/SAT      Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.273   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNSAT/CBL CBL/SAT      Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.273   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:SAT/CBL:source name:CBL/SAT: <0x2be6b680>
01   09/09/14 5:43:53.273   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 4 Source name: SAT/CBL <0x2be6b680>
01   09/09/14 5:43:53.281   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.282   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNMPLAY MEDIA PLAYER <0x2be6b680>
50   09/09/14 5:43:53.282   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNMPLAY MEDIA PLAYER Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.282   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNMPLAY MEDIA PLAYER Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.283   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:MPLAY:source name:MEDIA PLAYER: <0x2be6b680>
01   09/09/14 5:43:53.283   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 5 Source name: MPLAY <0x2be6b680>
01   09/09/14 5:43:53.292   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.293   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNGAME GAME         <0x2be6b680>
50   09/09/14 5:43:53.293   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNGAME GAME         Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.294   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNGAME GAME         Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.294   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:GAME:source name:GAME: <0x2be6b680>
01   09/09/14 5:43:53.295   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 6 Source name: GAME <0x2be6b680>
01   09/09/14 5:43:53.303   luup_log:205: AVRReceiverPlugin::processInterceptedMessage:(command ~= result)  result:SS command:SY. <0x2be6b680>
50   09/09/14 5:43:53.303   luup_log:205: AVRReceiverPlugin::handleResponse: data received SSFUNAUX1 AUX          <0x2be6b680>
50   09/09/14 5:43:53.304   luup_log:205: AVRReceiverPlugin::handleResponse: Data:FUNAUX1 AUX          Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.304   luup_log:205: AVRReceiverPlugin::processMessage: Data:FUNAUX1 AUX          Type:SS Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.305   luup_log:205: AVRReceiverPlugin::handlerFunction: data received SS source:AUX1:source name:AUX: <0x2be6b680>
01   09/09/14 5:43:53.305   luup_log:205: AVRReceiverPlugin::SETUP function name: Length of table: 7 Source name: AUX1 <0x2be6b680>
01   09/09/14 5:43:53.313   luup_log:205: AVRReceiverPlugin::processInterceptedMessage: result:SY command:SY. <0x2be6b680>
50   09/09/14 5:43:53.314   luup_log:205: AVRReceiverPlugin::handleResponse: data received SYMOAVR-1713USA <0x2be6b680>
50   09/09/14 5:43:53.314   luup_log:205: AVRReceiverPlugin::handleResponse: Data:MOAVR-1713USA Type:SY Zone:205 <0x2be6b680>
50   09/09/14 5:43:53.314   luup_log:205: AVRReceiverPlugin::processMessage: Data:MOAVR-1713USA Type:SY Zone:205 <0x2be6b680>
01   09/09/14 5:43:54.772   luup_log:205: AVRReceiverPlugin::AVRReceiverSend: command sent RR?. <0x2be6b680>
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 09, 2014, 09:54:41 am
Please note that S_DLNARenderingControl1.xml is now a dependency.

As the plugin I am working on is not in the store you will have to install this yourself.


http://forum.micasaverde.com/index.php/topic,16905.0.html (http://forum.micasaverde.com/index.php/topic,16905.0.html)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 09, 2014, 10:10:47 am
Please note that S_DLNARenderingControl1.xml is now a dependency.

As the plugin I am working on is not in the store you will have to install this yourself.


http://forum.micasaverde.com/index.php/topic,16905.0.html (http://forum.micasaverde.com/index.php/topic,16905.0.html)

Ah crud, sorry--not sure how I missed that. Is the DNLA app in the app store the correct one?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 09, 2014, 10:44:08 am
@tb001
Yes it is the right one. Currently only using a very small subset of it.

Although your issue looks like a undocumented command that does not work on the AVR-1713USA so that was your problem I have updated the release in the usual place but ymmv.

Anyway try again.

I though I was being smart with the auto naming etc it has really come back and bitten me. doh.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 09, 2014, 11:10:46 am
Please note that S_DLNARenderingControl1.xml is now a dependency.

As the plugin I am working on is not in the store you will have to install this yourself.


http://forum.micasaverde.com/index.php/topic,16905.0.html (http://forum.micasaverde.com/index.php/topic,16905.0.html)

@Zoot,  I was missing the DLNA plugin too,  sorry about that.  All buttons are working fine now,  however I'm still not able to mute the receiver in a Scene (at the advanced tab).  I see much more commands there now, like 'SetMute', but they have many parameters, I don't know what to fill in.

Thank you so much!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 09, 2014, 12:41:09 pm
@tb001
Yes it is the right one. Currently only using a very small subset of it.

Although your issue looks like a undocumented command that does not work on the AVR-1713USA so that was your problem I have updated the release in the usual place but ymmv.

Anyway try again.

I though I was being smart with the auto naming etc it has really come back and bitten me. doh.

Cheers

John

OK, tried again, with DLNA installed and new denon files. Deleted and recreated the device, but still getting stuck in the 'running lua startup'.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 10, 2014, 12:26:22 am
@tb001
Try using the attached file and feed back the logs.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 10, 2014, 02:09:24 am
@rvendrame
Only requires DesiredMute to be set, either to 1 for mute or 0 for Unmute
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on September 10, 2014, 11:05:09 am
@rvendrame
Only requires DesiredMute to be set, either to 1 for mute or 0 for Unmute

@Zoot,  thank you so much,  now my scene now works!

Ricardo
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 10, 2014, 09:53:10 pm
@tb001
Try using the attached file and feed back the logs.

Cheers

John

Looks like that did the trick!! Thank you :) Haven't double checked the buttons yet, but nothing is failing and it is registering current status of the receiver. I had to reload several times, as it looked like lua kept restarting, but eventually settled down.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 11, 2014, 12:17:17 am
Have uploaded an update which basically removes the undocumented RR command. This has no real impact except that any naming you have created within the Denon itself will not be used. Once plugin is installed renaming zones etc can be done manually and should stick.

My goal has been to make the plugin self configure  as much as possible so it just works, sadly this was never going to work.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 11, 2014, 10:06:24 pm
Have uploaded an update which basically removes the undocumented RR command. This has no real impact except that any naming you have created within the Denon itself will not be used. Once plugin is installed renaming zones etc can be done manually and should stick.

My goal has been to make the plugin self configure  as much as possible so it just works, sadly this was never going to work.

From what I can tell, looks like everything is working, with the exception of zone 2 volume control. Is this just controlled through zone 1?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 13, 2014, 12:08:11 am
@tb001
If every thing is set up OK you should end up with a main zone and how ever many zones as set by the  table in plugin (see below for list). For the 1713 you should end up with a second device with id Z2. This is treated as a separately to the main so volume/mute/inputs affect this device/zone only.

If the volume for that device/zone is not working check the log and see what command is actually been sent to see if it lines up.


Code: [Select]
local MODEL = {
    ['300'] = {},
    ['1000'] = {zones = "2"},
    ['1713'] = {zones = "2"},
    ['1913'] = {zones = "2"},
    ['2000'] = {zones = "2"},
    ['2106'] = {zones = "2"},
    ['2307'] = {zones = "1"},
    ['2803'] = {zones = "1"},
    ['2805'] = {zones = "2"},
    ['2807'] = {zones = "2"},
    ['3312'] = {zones = "2,3"},
    ['3313'] = {zones = "2,3"},
    ['3803'] = {zones = "1"},
    ['3805'] = {zones = "1,2"},
    ['3806'] = {zones = "2,3"},
    ['3808'] = {zones = "2,3"},{zoneAutoName},
    ['4000'] = {zones = "2,3"},
    ['4306'] = {zones = "2,3"},
    ['4520'] = {zones = "2,3,4"},
    ['4802'] = {zones = "1"},
    ['4806'] = {zones = "2,3"},
    ['5803'] = {zones = "1,2"},
    ['5805'] = {zones = "2,3,4"}
}
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 13, 2014, 07:15:23 pm
@tb001
If every thing is set up OK you should end up with a main zone and how ever many zones as set by the  table in plugin (see below for list). For the 1713 you should end up with a second device with id Z2. This is treated as a separately to the main so volume/mute/inputs affect this device/zone only.

If the volume for that device/zone is not working check the log and see what command is actually been sent to see if it lines up.


Code: [Select]
local MODEL = {
    ['300'] = {},
    ['1000'] = {zones = "2"},
    ['1713'] = {zones = "2"},
    ['1913'] = {zones = "2"},
    ['2000'] = {zones = "2"},
    ['2106'] = {zones = "2"},
    ['2307'] = {zones = "1"},
    ['2803'] = {zones = "1"},
    ['2805'] = {zones = "2"},
    ['2807'] = {zones = "2"},
    ['3312'] = {zones = "2,3"},
    ['3313'] = {zones = "2,3"},
    ['3803'] = {zones = "1"},
    ['3805'] = {zones = "1,2"},
    ['3806'] = {zones = "2,3"},
    ['3808'] = {zones = "2,3"},{zoneAutoName},
    ['4000'] = {zones = "2,3"},
    ['4306'] = {zones = "2,3"},
    ['4520'] = {zones = "2,3,4"},
    ['4802'] = {zones = "1"},
    ['4806'] = {zones = "2,3"},
    ['5803'] = {zones = "1,2"},
    ['5805'] = {zones = "2,3,4"}
}


Thanks for your help! Here are the logs when I try to increase volume of zone 2:

08   09/13/14 16:11:48.559   JobHandler_LuaUPnP::HandleActionRequest device: 210 service: urn:upnp-org:serviceId:RenderingControl1 action: SetVolume <0x32722680>
08   09/13/14 16:11:48.560   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=210 <0x32722680>
08   09/13/14 16:11:48.560   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:RenderingControl1 <0x32722680>
08   09/13/14 16:11:48.560   JobHandler_LuaUPnP::HandleActionRequest argument action=SetVolume <0x32722680>
08   09/13/14 16:11:48.560   JobHandler_LuaUPnP::HandleActionRequest argument DesiredVolume=20 <0x32722680>
08   09/13/14 16:11:48.561   JobHandler_LuaUPnP::HandleActionRequest argument rand=0.5732251179870218 <0x32722680>
50   09/13/14 16:11:48.561   luup_log:209: AVRReceiverPlugin::Trying to find zone for device: 210 <0x32722680>
01   09/13/14 16:11:48.562   luup_log:209: AVRReceiverPlugin::DeviceID: 210, Parent:209, Zone: Z2 <0x32722680>
01   09/13/14 16:11:48.563   luup_log:209: AVRReceiverPlugin::AVRReceiverSend: command sent Z220. <0x32722680>

Let me know if you need more--this seemed like the most relevant piece.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 13, 2014, 08:53:57 pm
Looks like the zone is wrong for the 1713 in the table. Can you adjust the volume for that zone manually via ir or other  and send the vera log.

Hopefully this makes sense☺

Sent from my Nexus 7 using Tapatalk

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: huveu on September 16, 2014, 09:22:36 am
Installed this yesterday to control my Denon AVR-X3000. I had to add the following line since that model was not included.

Code: [Select]
['3000'] = {zones = "2"},
I haven't played around with it too much, so I'll report back in a few days.

Thanks for working on this plugin!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 16, 2014, 11:57:14 am
Looks like the zone is wrong for the 1713 in the table. Can you adjust the volume for that zone manually via ir or other  and send the vera log.

Hopefully this makes sense☺

Sent from my Nexus 7 using Tapatalk

Makes sense, but unfortunately I think we're out of luck. We're having trouble with our remote, so we don't have any way to adjust the zone 2 volume via IR. The volume control for the second zone also disappeared in the denon app with one of the updates, so no way to control it there. I've tried another app which theoretically should have worked and this shows the volume control for zone 2, but doesn't actually work. Emailed tech support for Denon, but haven't heard back.

Now you see why I've been so persistent with vera! :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on September 16, 2014, 10:27:17 pm
The updated version looks awesome!! Forgive me it may be listed on this thread but does this app have zone 2 support?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 17, 2014, 10:54:47 pm
@tb001
Looked up the protocol document for the 1713 and Z2 is correct.

To ensure every thing is OK with plugin I suggest you delete device and download latest version and re-create.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 17, 2014, 11:02:12 pm
@Fred S
If device is in the list zone should be created http://forum.micasaverde.com/index.php/topic,5863.msg193082.html#msg193082 (http://forum.micasaverde.com/index.php/topic,5863.msg193082.html#msg193082). If it is not please let me know device model and what zones are required.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on September 18, 2014, 11:26:46 am
@tb001
Looked up the protocol document for the 1713 and Z2 is correct.

To ensure every thing is OK with plugin I suggest you delete device and download latest version and re-create.

Thanks zoot, I'll try that. Starting to wonder if maybe something is wrong with our denon! We have a 1913 as well, which I haven't tried to setup--maybe I'll try that one first and see how it goes.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on September 19, 2014, 08:41:21 pm
@ Zoot. I don't believe it is. My model is the Denon AVR-E400
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 19, 2014, 09:35:35 pm
@Fred S
Done.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on September 19, 2014, 10:42:51 pm
@ Zoot, is there something I should download?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 20, 2014, 05:24:44 am

Download this: -
http://code.mios.com/trac/mios_denon-receiver-control/changeset/62/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/62/branches/UI5Update?old_path=%2F&format=zip)

Quote
Please note that S_DLNARenderingControl1.xml is now a dependency.

As the plugin I am working on is not in the store you will have to install this yourself.


http://forum.micasaverde.com/index.php/topic,16905.0.html
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on September 20, 2014, 11:16:42 am
Zoot, I see now that I have another control which controls Zone 2. Unfortunately now that volume does not work. It says "invalid service"

Also one of the things I'd like to do is create a scene to play music. Is it possible to do that with Luup code?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dbeck52 on September 21, 2014, 12:05:30 pm
@zoot 1612

I an using ui7 and have downloaded the newest posted files for my denon avr 2112ci.  It is working for zone one for the first time since I've been trying to install.  I have a problem though, I don't get zone 2 for this receiver.  Is there some other file I need to download?  Thank You for your work with this app.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 21, 2014, 10:26:46 pm
@Fred S

Quote
Please note that S_DLNARenderingControl1.xml is now a dependency.

As the plugin I am working on is not in the store you will have to install this yourself.


http://forum.micasaverde.com/index.php/topic,16905.0.html
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 21, 2014, 10:44:25 pm
@dbeck52
AVR needs to be added to table. Download latest and in advanced tab change "Setup" to "0". Please note I have no way of testing UI7.

Cheers




Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on September 23, 2014, 05:44:00 pm
Works great! Thanks.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on September 26, 2014, 01:21:50 pm
@zoot1612, I am using UI7 and have both a 2112ci and a 2113ci (which I don't see listed in the table of zones from the latest download).  Anyway, in the 'volume/inputs' tab (in UI7) I can turn on/off the receivers, etc, but when it comes to creating a scene where I just want to turn a receiver on or off (or anything else) those options aren't available.  There is a 'standby/on and volume slider'.  I can slide the volume, but the standby and on buttons can't be selected.

@dbeck52, since you have a 2112 and using UI7, can you give any insight if you have a scene working where you can turn on or off the receiver?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: banjeman on September 27, 2014, 05:54:25 pm
After reading the majority of this thread..I have a question.  Is the denon plugin in App download the latest it says V1.1, yet it appears there is another location to get files.  When I go there the version in the Notes is like 0.6.  Can someone explain if I should use the plugin found in Vera or the links that zoot1612 refers to during the later stages of this thread.

The below is where i went as I have UI7, but not sure if these are the files I should be using.
http://code.mios.com/trac/mios_denon-receiver-control/browser/branches/UI7

UPDATE:  Fixed it good enough for my liking.  I ended up keeping the Vera plug-in and just made changes to the D_DenonReceiver1.json file and I_DenonReceiver1.xml

Just in case anyone was wondering what I was doing, the command input buttons didn't match my receiver so by adjusting the above files I was able to make it match my receiver better, so I could change all my important inputs (I have a 2112CI)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: banjeman on September 28, 2014, 12:06:37 pm
@rsmed1- not sure if this will help, but I had issues with scene control with the plugin downloaded within vera (V1.1).  what I did to fix it is copy the scenes and events section found in the D_DenonRecevier1.json found here http://code.mios.com/trac/mios_denon-receiver-control/browser/branches/UI5Update.  I then downloaded the same named file I had in vera and pasted over the scenes and events section., saved the file and uploaded it back to Vera  After that the on/off worked in scene creation.  I really didn't look for differences, so might have been a coincidence.

I am still trying to find the value that will allow Vera to see it as an AV device, mine shows up as other device.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dbeck52 on September 29, 2014, 04:20:19 pm
@rsmed1
I set up a scene just to test functionality, and I was able to turn on the receiver with a manual scene, to a desired input and volume.  I used the files posted for use with ui5, and as you know I am using ui7 (1.7.374).  I was actually looking for more control with the android app for my use, but the vera app doesn't have any control at all.  It only shows a light with no functions at all.  Since Denon only allows one connection at a time, I likely will revert back to another method for my use.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on September 30, 2014, 10:41:26 am
@tomgru
"Always On" is correct for the X2000 according to the protocol document, so that's not it.
It may be the same as others on this forum with more than one control device. You may need to look at one of the alternatives.

Sent from my Nexus 7 using Tapatalk

Hi Zoot... me again.... Problem still exists; sporadic, but there.

I have other apps that seem to work consistently, both on Android and Windows, so I thought i'd reach out to one of those developers and see if he had any ideas.  You have probably already though of this, so I hope I don't offend if so.  (as an aside, the plugin is currently working as i'm writing this, so I haven't tried to 'ping' it per the other dev's idea to test).  Does this provide any new insight at all?

Regarding your other problem, could be a network problem although just as possible could be the way the other app is talking to the Denon receiver. A lot of software connect to Denon by using telnet commands and in my experience you have to be very careful with how this is done on Denon receivers as certain things can trip them up which means you have to switch it off and back on like you said.
The next time the unit loses connection don't switch it off but go to your computer and type at a command prompt ?ping 192.168.0.1? (replace 192.168.0.1 with your receiver ip address) then press enter. You should get a response if the network adaptor in the Denon is responding.
Ask the other developer if communication method for the app uses port 23 (telnet)


Edit:  It's been about a week until I finally lost connection.  I tried pinging the IP address of the Denon, and got 4 good responses, even though the plugin still cannot connect.  Hoping this provides some insight Zoot!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on October 10, 2014, 12:55:29 am
@tomgru

Looks like something to do with the network. I will have a look when I get a chance and see what happens under different scenarios and try to come up with a solution (if there is one).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on October 10, 2014, 12:59:52 am
@rsmed1 @banjeman @dbeck52
UI7 for the plugin is currently broken. I started out developing then dropped back to UI5 as UI7 still has some way to go to be useable in my opinion.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on October 25, 2014, 11:20:27 am
I wanted to create a scene to play music. I'm was able to do that by creating a scene to turn on Zone 2 of my Denon and provided that my Denon was set to Pandora or Internet radio when I last used it, it works. My question is am I able to specify a media source somehow in Luup code? What about a volume setting?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on October 26, 2014, 09:44:21 pm
@Fred S
Both volume and input are available under the advanced tab in UI5.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on November 02, 2014, 09:34:11 am
@Zoot. I do see what you are talking about. Thank you. I'm still learning LUUP and my programming skills are still not up to par. Would you mind showing me an example? I'm sure once I see it written out I can take it from there.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 02, 2014, 06:51:57 pm
@Fred S
No need to use LUUP.

Attached is the advanced tab showing what is required.

To match input to AVR name you will need to look at the "Volume/Inputs" tab in the device then using that info map as per the following: -
for Input1   --> Input10 use "urn:micasaverde-com:serviceId:InputSelection1"
for Input11 --> Input20 use "urn:denon-com:serviceId:Receiver1"

for volume use "urn:upnp-org:serviceId:RenderingControl1"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 02, 2014, 07:49:09 pm
@tomgru

Looks like something to do with the network. I will have a look when I get a chance and see what happens under different scenarios and try to come up with a solution (if there is one).

No real pressure... just curious if you have looked into this?   ;D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 03, 2014, 08:14:52 pm
@tomgru
No progress, family commitments have not given any time for development.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 03, 2014, 09:06:25 pm
@tomgru
No progress, family commitments have not given any time for development.

Your priorities are good  :D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 04, 2014, 12:04:44 am
@tomgru
I have uploaded a new file give it a try. All it does is add a luup.is_connected == false check and try's to reconnect if it is. This default for this check is every five minutes.

I don't know if it will fix your issue but needed to be added anyway.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip)

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 04, 2014, 12:24:14 am
@tomgru
I have uploaded a new file give it a try. All it does is add a luup.is_connected == false check and try's to reconnect if it is. This default for this check is every five minutes.

I don't know if it will fix your issue but needed to be added anyway.

Cheers

I'll give it a try.  WHere can I find the trial?   :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 04, 2014, 12:40:57 am
Oops

http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 04, 2014, 10:43:18 am
Oops

http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip)

Thanks... i'll give it a try and report back.

Hey... one thing I have noticed is that this happens less than when I had a vera lite (upgraded recently to a Vera 3).  My guess is that this has something to do with less automatic reloads (they were very frequent before and why I upgraded).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on November 04, 2014, 11:05:23 pm
@Zoot. Ok if i'm reading this correctly all I should have to do is create a scene and enter the following under the LUUP section. I was hoping it would turn on the receiver, switch it to input 5 and set the target volume to 40%. I'm assuming I did something terribly wrong as its not working.

luup.call_action("urn:schemas-denon-com:device:receiver:1", "SetTarget", {newTargetValue = "1"}, 81)
luup.call_action("urn:schemas-denon-com:device:receiver:1","Input5",{}, 81)
luup.call_action("urn:schemas-denon-com:device:receiver:1", "SetVolumeTarget", {newTargetValue = "40"}, 81)



@Fred S
No need to use LUUP.

Attached is the advanced tab showing what is required.

To match input to AVR name you will need to look at the "Volume/Inputs" tab in the device then using that info map as per the following: -
for Input1   --> Input10 use "urn:micasaverde-com:serviceId:InputSelection1"
for Input11 --> Input20 use "urn:denon-com:serviceId:Receiver1"

for volume use "urn:upnp-org:serviceId:RenderingControl1"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 05, 2014, 07:38:38 am
@Fred S
If you use the advanced tab instead of the luup tab it would be simpler. See attached.

If you are going to use luup then something like this should do it:

Code: [Select]
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 81)
luup.sleep(1000)
luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","Input5",{}, 81)
luup.sleep(5000)
luup.call_action("urn:upnp-org:serviceId:RenderingControl1", "SetVolume", {DesiredVolume = "40"}, 81)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on November 05, 2014, 03:09:59 pm
@ Zoot. Ok I got everything to work.. thank you. The last bit is the input. Since I'm using Pandora (which is an integrated option of the denon receiver), I get Source: Input Unknown. Is there any way to map the Pandora input to a source?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 05, 2014, 05:33:02 pm
@Fred S
Pandora should still map to an input.

for Input1   --> Input10 use "urn:micasaverde-com:serviceId:InputSelection1"
for Input11 --> Input20 use "urn:denon-com:serviceId:Receiver1"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on November 05, 2014, 10:07:34 pm
@ Zoot My apologies, I know you mentioned the following before but I'm not quite understanding where I should be putting this. Am I placing this verbatim in the LUUP section or is there some sort of table I should be updating? Sorry for being so dense.

for Input1   --> Input10 use "urn:micasaverde-com:serviceId:InputSelection1"
for Input11 --> Input20 use "urn:denon-com:serviceId:Receiver1"
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 06, 2014, 12:39:54 am
if the input is 10 or lower use: -

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:InputSelection1","Input5",{}, 81)
If input is in the range of 10 - 20 then use: -

Code: [Select]
luup.call_action("urn:denon-com:serviceId:Receiver1","Input11",{}, 81)
As I don't know what input Pandora is on I can't really help you.

And the questions of why did I do this, it is to do with standardisation (well partial standardisation anyway).

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 07, 2014, 12:16:40 am
Oops

http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/65/branches/UI5Update?old_path=%2F&format=zip)

Thanks... i'll give it a try and report back.

Hey... one thing I have noticed is that this happens less than when I had a vera lite (upgraded recently to a Vera 3).  My guess is that this has something to do with less automatic reloads (they were very frequent before and why I upgraded).

This happened again tonight.  weirdly, I just noticed I lost my zone2 device.  any idea how that happened, and how to get it back?  :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 07, 2014, 05:12:23 am
@tomgru

try update, previous change failed.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/66/branches/UI5Update?old_path=%2F&format=zip

To get zone 2 back you will need to change "Setup" in the "Advanced" tab o your parent device to "0". Not sure why it disappeared though.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 11, 2014, 11:13:57 am
@tomgru

try update, previous change failed.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/66/branches/UI5Update?old_path=%2F&format=zip

To get zone 2 back you will need to change "Setup" in the "Advanced" tab o your parent device to "0". Not sure why it disappeared though.

funny... tried that (changing setup) before... didn't work. Just stuck at 0 now.

Reloaded files... set to 0... still doesn't work, and no second zone.  Funny... says Lua failed, and obviously doesn't control my Denon.  However, when I turn on my receiver with the remote, the status changes in Vera... so it is communicating. 

EDIT.  I decided to go back to scratch.  WinSCP'd in... and deleted all 7 files.  Then I reloaded them.  I can see them all but the createJSON.lua file (Does that matter?).

Then I do the following:

click on "Create device" and fill in the following info: -
Upnp Device Filename = D_DenonReceiver1.xml
Upnp Implementation Filename = I_DenonReceiver1.xml
Ip Address = <IPADDRESSOFRECEIVER>

Click on "Create device"

Click on "Reload"

What may have been 7 reloads... and the device is there!  But still only one zone?
and still getting Startup Lua Failed.

EDIT2:

I noticed that there was nothing in the zone field... so I changed that to "1" and reloaded.  new zone showed up... but starting lua just hung on the device. Deleted the device and changed field back to blank... reloaded again.

Now I seem to have another zone... but still lua failure.



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 11, 2014, 08:52:01 pm
@tomgru
What is the AVR model you are using?

Try updated version, I changed some of the functions to local only and this has broken create static json lua file.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 11, 2014, 10:40:24 pm
@tomgru
What is the AVR model you are using?

Try updated version, I changed some of the functions to local only and this has broken create static json lua file.

http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip)

that did it!  Fingers crossed on the random connection issues.

Thanks.  As always, appreciate the effort here!  I couldn't program my way out of a paper sack!   :P
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 16, 2014, 07:37:20 pm
@tomgru

Quote
I couldn't program my way out of a paper sack!

That pretty much would describe me to  :) I usually hack things together until they work.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: hiimsimon on November 25, 2014, 01:40:11 am
Sorry kind of a noob to all of this. Trying to get my Denon X2100W to connect to the Vera UI7 but no luck. It keeps saying it won't connect. I've entered in a static IP address on the unit and in the advanced setting but to no avail. It's asking for a port, but how can i specify it? Using a : after the IP? Not sure what port it operates on either.

Any help would be great.

Simon
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 26, 2014, 03:00:03 am
@hiimsimon

Quote
Trying to get my Denon X2100W to connect to the Vera UI7 but no luck. It keeps saying it won't connect. I've entered in a static IP address on the unit and in the advanced setting but to no avail. It's asking for a port, but how can i specify it? Using a : after the IP? Not sure what port it operates on either.

What version are you using, is it from the app store?

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: hiimsimon on November 26, 2014, 12:51:12 pm
Yes it is from the App store. Denon Receiver Control Plugin: App id:1138 Current Version:1.1

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 26, 2014, 07:33:44 pm
@hiimsimon

I don't support the app store version. You can get latest plugin from here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/67/branches/UI5Update?old_path=%2F&format=zip)

This requires more stuffing around to set up but you may have better luck.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: hiimsimon on November 26, 2014, 10:41:57 pm
okay got it. How do I load this? LOL sorry. and will it work with UI7?

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ronluna on November 27, 2014, 03:57:59 pm
Wondering why  Vera lose connection within 2 or 3 days of no interaction with the AVR-X3000 receiver. Vera returns:

AVR Receiver : Communications error

I keep updating the files zoot1612 posts but none of the updates seems to solve the problem and the only way to get the connection establish again is by rebooting the receiver.

Am I the only one experiencing this behavior?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 27, 2014, 11:11:00 pm
@hiimsimon
Sorry probably not compatible, I am still running UI-5.

@ronluna
There is a problem with the AVR Telnet implementation if what I heard is correct. The same happens to me but never been able to pin it down. I am looking at getting a rs232 to Ethernet adapter and connect to the serial port on the AVR (when I get a chance) and see how that goes. Currently I don't recommend this plugin or the Denon AVR receiver if you want rock solid connectivity.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ronluna on November 29, 2014, 02:32:12 am
thanks for your answer zoot1612...

even though you have put so much effort into this plugin your honest opinion shocked me... :o

Which Receiver/plugin would you recommend?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 01, 2014, 07:23:13 am
@ronluna
Dont have opinion on other AVR's and the if you ask the question will be probably get a thousand and one different answers as everyone has slightly different requirements and tastes.

I am hoping I have better luck with connection to the serial interface via a rs232 ethernet adapter. Hopefully this will not have the downside that the Ethernet connectivity has.


Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 08, 2015, 01:01:30 am
The updated plugin is awesome!!!!
Another (very good) reason to stay on UI5.

I have to admit, I had a heck of a time getting this plugin to work, until I read on a post that I had to install the DLNA media plugin first.  Then, it worked like a charm!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on January 08, 2015, 10:35:18 am
Wondering why  Vera lose connection within 2 or 3 days of no interaction with the AVR-X3000 receiver. Vera returns:

AVR Receiver : Communications error

I keep updating the files zoot1612 posts but none of the updates seems to solve the problem and the only way to get the connection establish again is by rebooting the receiver.

Am I the only one experiencing this behavior?

Just fyi... this is the same problem I'm still having.  Moving to vera3 seemed to help, so its clearly tied to restarts in some way.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 11, 2015, 05:24:43 pm
@zoot1612.
I have 2 Denon Receivers (different models) and hence have installed 2 instances of your plugin.
When I install the first instance, everything works fine.  The input buttons on the device controller match the input labels of my receiver.
When I install the second instance for my second receiver. The input button labels for the both my first and second receiver take on the labels from the second install.  I've tried manually modifying the static JSON config file D_modelXXX.JSON for the first receiver and uploaded it, but it doesn't take effect.  How do I get unique input labels for the two receivers?

If it makes any difference, one of my receivers is a Marantz 1603, made by Denon.  I notice that the model name is not the same as the format of my Denon Receiver.  My Denon Receiver name is AVR-1913USA.  My Marantz Receiver name is NR1603USA. 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 11, 2015, 07:24:47 pm
@kyb2012
I have updated plugin with the 1603 and is waiting approval in app store. If you want to manually load download files from here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/72/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/72/branches/UI5Update?old_path=%2F&format=zip)

To get device to rebuild you will need to change Setup under the Advanced tab in parent device to "0".
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on January 12, 2015, 10:20:17 am
@kyb2012
I have updated plugin with the 1603 and is waiting approval in app store. If you want to manually load download files from here: -

http://code.mios.com/trac/mios_denon-receiver-control/changeset/72/branches/UI5Update?old_path=%2F&format=zip (http://code.mios.com/trac/mios_denon-receiver-control/changeset/72/branches/UI5Update?old_path=%2F&format=zip)

To get device to rebuild you will need to change Setup under the Advanced tab in parent device to "0".

Thanks zoot!  do you document your changes anywhere?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 12, 2015, 10:44:09 am
Thanks @Zoot1612.  I see that you added the 1603 model# to the model list in the L_DenonReceiver1.lua code.  (Thx)  I uploaded all the new files and re-created my device.  It did create the devices - (1 for each zone) - but there's still an issue.  Both of my receivers seem to be getting the input button labels from a single file and I can't maintain them separately.  Not a big deal and thanks for trying.  All the functionality, including switching inputs works.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 12, 2015, 06:05:46 pm
@kyb2012
Did you reset?

Quote
To get device to rebuild you will need to change Setup under the Advanced tab in parent device to "0".
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 12, 2015, 10:45:55 pm
Hi @zoot1612.  Yes, I tried reset and when that didn't work, I deleted and recreated the device for my receivers. Same issue, that the input labels for both my receivers take on the input labels from the last receiver created. 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 12, 2015, 11:32:49 pm
@kyb2012
Can you reset both to "0" and post your logs. I don't have a second receiver so I can't test here. Also have a look and see if the json files for each device are being created in "/etc/ludl"

Also check that the correct device_file is created (again in "/etc/ludl") and used, you should have as device files something like D_AVR-1913USA1.xml and D_NR1603USA1.xml in the device_file field under the advanced tab.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 13, 2015, 10:39:20 pm
Hi.  I reset both my receivers to "0" and reloaded and captured log (attached.)
I checked the advanced tab for both receivers and the device_file parameter looks correct and is specific for each receiver: D_NR1603USA1.xml (for the Marantz 1603) and D_AVR-1913USA1.xml (for Denon 1913).
I logged into vera and in the /etc/cmh-ludl directory, I see corresponding files for both the 1603 and 1913 receivers.
In the log file, device 185 is the Marantz receiver and device 186 is the Denon receiver.  In the log file, I see the correct input source names for device 185 being set at the beginning in response to the SSFUN command.  And further down, I see the SSFUN command for device 186 (Denon) come back with correct input source names. 
But the input labels on both devices are set to the last ones received for device 186 (Denon) receiver.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 14, 2015, 02:00:05 am
@kyb2012
It is associated with this, will see if there are solutions.
 http://bugs.micasaverde.com/view.php?id=1501 (http://bugs.micasaverde.com/view.php?id=1501)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: kyb2012 on January 14, 2015, 10:53:03 pm
This is exactly the issue.  Thanks for looking into this for me.  I don't think I'll go to the extreme of hacking the files and making it a different device type.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mr leaver on January 28, 2015, 02:31:15 am
Is it possible to play a mp3 file on the AVR-X3100W ?
I'd like to play a mp3 on USB when alarm system is triggered
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcalistair on January 29, 2015, 01:56:06 pm
Hi,

I have a Marantz SR7007 and I installed the latest version  of Denon Receiver Control Plugin (1.21).
It recognizes my SR7007, and reads 99% of the data, but the only buttons that work are " + Volume"  and " - Volume"
Not the slider, and none of the other buttons.
See attached:
- up_down_works.png
- app_error.png

I attached some screenshots of the SR7007 own webinterface:
- main_screen.png
- detail_screen.png

Any clue?

Thanks in advance!


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 29, 2015, 06:26:46 pm
@mcalistair
Latest version requires DLNA Media Controller plugin - Common library for UPnP AV.

I have started updating the wiki http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) but have not had time to look at how the dependencies can be done automatically.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 29, 2015, 06:29:44 pm
@rpleever
You can certainly turn system on, set input and volume but not looked at the actual mp3 file side of things. When I get a chance I will look at if it is possible and if not I will look at adding functionality if it is not to hard.

Cheers

John
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcalistair on January 30, 2015, 01:41:05 am
@mcalistair
Latest version requires DLNA Media Controller plugin - Common library for UPnP AV.

I have started updating the wiki http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) but have not had time to look at how the dependencies can be done automatically.

Thanks, indeed this worked!  ;D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcalistair on January 30, 2015, 02:46:49 am
one additional question and a feature request:

1. Question... Can I easily adjust a file (if so where) so that volume slider is not  taking steps of 10% but 1% ?

2. Feature request... Can you add a mute/unmute button(s) to the main device screen so that in can "easy" be used in Automation/Scenes?

Cheers and thanks for your effort and quick responses.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 31, 2015, 09:27:06 pm
@mcalistair

Quote
1. Question... Can I easily adjust a file (if so where) so that volume slider is not  taking steps of 10% but 1% ?
My understanding is that the 10% is hard coded in the UI so it would not be easy without hacking Vera code. You can convert the slider to a vertical slider. The vertical slider does increment by 1 but is hard coded with oF/oC. So you gain on one hand but lose on the other.

Quote
2. Feature request... Can you add a mute/unmute button(s) to the main device screen so that in can "easy" be used in Automation/Scenes?
This is something that fits into the map so yes it is something I will do. In the meantime you can use the advanced tab under automation to set mute in scenes. You need to use service urn:upnp-org:serviceId:RenderingControl1 (See attached)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mcalistair on February 01, 2015, 10:33:28 am
@zoot1612

Thanks for the ideas and feedback...

I'm having some Vera3 stability issues since a few days so I had to revert back to a backup.
Will check this out later again...
Not sure if the stability issues are due to Denon + DNLA app OR Vera native IP Camera Config.

Thanks anyway!

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: marshallz on February 01, 2015, 11:54:38 am
Ok, I have now completed a reading of ALL 35 pages of this thread so far. I have learned quite a bit (thank you to all of the great folks here), but there are still some things that I don't understand.

Some background: I am running Vera UI5 and controlling a Denon AVR-1912. The plugin works great.

Currently I am trying to write a Tasker profile (using AutoVera) that will turn on my receiver, set the input to tuner, and then tune to the station that I want. I am trying to select the station frequency using the "Send Command" feature within the AutoVera plugin for Tasker. What I don't understand is the format of the command that I need to input here. For testing purposes I am just using the PWON command that is documented in the Denon AVR control protocol for the 1912. The document describes this command as: PWON<CR> : system PoWer ON. I have tried inputing PWON<CR>, PWON, PWON\r, "PWON", "PWON<CR>", "PWON\r", and any other thing that I can think of. Soooo, what am I missing here? Is there another way to enter in the command?

Currently the I can turn on the receiver through AutoVera by simply changing the state of the power switch to "on". That is not what I am trying to accomplish. I am trying to figure out how to send a command  to the receiver via the send command. I am just using PWON as a test example. Can anyone help guide me through my ignorance?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 01, 2015, 09:54:12 pm
@marshallz
The plugin itself requires the command only with no special characters. I have not had any thing to do with AutoVera so can't help much on that front.

You could try creating a scene (see attached) then attach that to AutoVera (I don't understand the full scope of what you are trying to achieve so this may not fit your requirements)

Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: marshallz on February 02, 2015, 09:22:42 am
@marshallz
The plugin itself requires the command only with no special characters. I have not had any thing to do with AutoVera so can't help much on that front.

You could try creating a scene (see attached) then attach that to AutoVera (I don't understand the full scope of what you are trying to achieve so this may not fit your requirements)

Cheers

The only thing that I was trying to achieve was to be able to send a command ( any command ) to the receiver via the Send Command in AutoVera when the Denon receiver is the device I am controlling. Apparently it isn't working correctly (at least for me).  But that is ok as you are correct, I can just create a scene  in UI5 and then call that from within Tasker / AutoVera. Thanks for the help!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 02, 2015, 05:35:06 pm
@marshallz
If you can send the relevant log section I can have a look and fix it if it is a plugin issue.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: marshallz on February 04, 2015, 09:25:13 am
Sorry for the delay - there is no plugin issue. it is simply a user / operator issue! I went back and tried again and most of the 3 or 4 codes that I tried to send went through as they were supposed to. I did try one that I couldn't get to work (TFAN104500 - tune the radio to 104.5 mhz) but that was probably just me messing something up again....
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on February 08, 2015, 06:05:32 pm
Hello Zoot,

After the auto-upgrade to 1.21, I started to receive the "Denon Receiver (AVR) via RS232/Ethernet[137] : Startup Lua Failed",  and can't control my AVR-300 from Vera anymore ("Device not ready" popup).

Important to mention:  If I change the volume, or switch the input ( both via denon remote),  the plugin controls get updated properly.

I tried to delete + re-install -- no lucky. I don't have the 'Setup' parameter under 'Advanced' tab.

Anything else that I can do to troubleshoot?
Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 08, 2015, 06:54:59 pm
@rvendrame
Can you send me the log, specifically the part just before the restart that relates to the AVR.

@rvendrame
I think I have found the problem but it may take a while to upload.

For now you can change line 728 in the L_DenonReceiver1.lua file and give that a try.

Code: [Select]
local zones = MODEL[modelNumber].zonesto
Code: [Select]
local zones = MODEL[modelNumber].zones or ""


Cheers

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rvendrame on February 09, 2015, 08:37:54 am
@rvendrame
I think I have found the problem but it may take a while to upload.

For now you can change line 728 in the L_DenonReceiver1.lua file and give that a try.

Code: [Select]
local zones = MODEL[modelNumber].zonesto
Code: [Select]
local zones = MODEL[modelNumber].zones or ""

Bingo!  Right into the spot, zoot!
Thank you!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Mai Pensato on February 10, 2015, 05:54:12 pm
@zoot1612:  I have exactly the same problem as rvendrame since the auto upgrade to 1.21.   I have a Denon AV3310.

I want to try your solution but I don't know how to get access to the L_DenonReceiver1.lua  file and change line 728.
Can you describe it step by step please ?

Thanks in advance.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 11, 2015, 01:05:26 am
@Mai Pensato
From UI5
click on APPS tab
click on Develop Apps sub tab
click on menu Luup files

You should get a list of luup current files.
find L_DenonReceiver1.lua and right click download link and save file as L_DenonReceiver1.lua locally.

Open with a text editor and change line 728, save as same file name and then go back to web browser to where the file was downloaded

On the right side of the page click on the first Browse button then using file dialog navigate to the file you have edited and double click. This should close dialog.

Click the Restart Luup after upload radio button and click GO.

That should be it.

Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 13, 2015, 09:54:52 pm
Hoping someone can help...wondering if this plugin is working in UI7?  I have read through almost all of this thread and tried the suggestions I have seen.  I have done the following:
1.  Loaded the UnUp plugin
2.  Loaded the Denon Plugin
3.  Added the local IP address (under Advanced -> IP)
4.  After that I see all the buttons turn green, the volume shows correctly, etc...  Basically, all of the settings showing are correct down to the setting my Denon is currently set at.  Problem is NONE of the buttons work.
5.  I tried rebooting my Vera Edge and then more errors occurred.  The blue bar at the top just seemed to keep running, and running, and running...the Luup code, backup, etc...  When I clicked on any of the buttons after that is says "device is not ready" and gives me an error.  I also noticed it added another instance of my Denon device.

Any ideas of how to fix?  In order to stop the looping I had to uninstall the Denon plugin.

Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 17, 2015, 09:24:15 pm
Which receiver model?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 17, 2015, 09:26:57 pm
Denon - 1913
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 17, 2015, 09:30:15 pm
My 4000 is not working very well with UI7.  He is going to look more into UI7 when he has the cycles.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 18, 2015, 01:03:34 am
@asggold

Try the latest here: -
http://code.mios.com/trac/mios_denon-receiver-control/browser/branches/UI5Update

It is a long way from finished but it may improve on the experience.


Cheers
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 19, 2015, 07:04:54 am
@asggold
Please post  your results. The changelog makes it look promising.

@zoot

Thank you for a little UI7 attention.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 19, 2015, 08:20:00 pm
@zoot

Thanks.  I will give it a try to see how the changes work.

@fusion600

Traveling currently but will update and post results this weekend.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 19, 2015, 08:45:14 pm
@Zoot

I tried the latest but had some new problems. I did a save as from the link, and the createJSON.lua file wouldn't create any devices.

I made some changes to it and it seems to be working great (as designed)

For me, it does not populate Children's IP's, and the Buttons in the for each zone are not labelled correctly. the functionality matches the log file, but the buttons don't. Also the log makes entries for 9 inputs and the UI has 11, no mention of Phono in the logs, but it works correctly.  Zone 12 does nothing.

Formatting looks Great on UI7, oh yeah, I didn't get any "tabs" for Tuner, Sirius etc.  That is on the newest UI7 and a AVR-X4000USA receiver.

I attached my updated createJSON.lua. (Summary was an end in the wrong place)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 19, 2015, 09:31:15 pm
@fusion600
Quote
I made some changes to it and it seems to be working great (as designed)

Will have a look, but have probably changes things locally aready.

Quote
For me, it does not populate Children's IP's

IP addresses are not required in the Children devices (Zones) as communication is handled at the parent.

Quote
and the Buttons in the for each zone are not labelled correctly. the functionality matches the log file, but the buttons don't.

Can you provide more info or a screen shot of what you mean please?

Quote
Also the log makes entries for 9 inputs and the UI has 11, no mention of Phono in the logs, but it works correctly.  Zone 12 does nothing.

Can you provide more info or a screen shot of what you mean please?

Quote
Formatting looks Great on UI7, oh yeah, I didn't get any "tabs" for Tuner, Sirius etc.  That is on the newest UI7 and a AVR-X4000USA receiver.

Tuner and Sirius tabs are currently disabled in both UI5 and UI7 as I need to revisit implementation.

Thanks for the feedback.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 19, 2015, 10:41:23 pm
@fusion600
Quote
I made some changes to it and it seems to be working great (as designed)

Will have a look, but have probably changes things locally aready.

Quote
For me, it does not populate Children's IP's

IP addresses are not required in the Children devices (Zones) as communication is handled at the parent.

Quote
and the Buttons in the for each zone are not labelled correctly. the functionality matches the log file, but the buttons don't.

Can you provide more info or a screen shot of what you mean please?

Quote
Also the log makes entries for 9 inputs and the UI has 11, no mention of Phono in the logs, but it works correctly.  Zone 12 does nothing.

Can you provide more info or a screen shot of what you mean please?

Quote
Formatting looks Great on UI7, oh yeah, I didn't get any "tabs" for Tuner, Sirius etc.  That is on the newest UI7 and a AVR-X4000USA receiver.

Tuner and Sirius tabs are currently disabled in both UI5 and UI7 as I need to revisit implementation.

Thanks for the feedback.

Attached are log snippet and screenshots.  Volume Slider always decreases volume as well.  All the same problems I mentioned in the PM.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 19, 2015, 11:29:36 pm
@fusion600
Volume slider is a known bug in firmware so will have to wait for Micasaverde for that fix.

The rest I will look at over the weekend, not sure what is going on as my json file is auto generated OK. This is the problem with supporting multiple Receivers when you can only test on one.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 20, 2015, 09:12:43 am
Thanks for all your efforts.  I can appreciate that you are trying to dynamically support countless receivers with countless configurations.  In addition to try and support the UI5/UI7 challenge.  Your UI7 check worked perfect by the way!

I am attaching a document specific to the AVR-X4000USA receiver as it points out some things unique to the North American line of the AVR-X models.  Such as HDRADIO replacing TUNER.

If it would be easier for you I would be more than happy to try and create  files specific to my receiver on UI7, if you could tell me which files are necessary, along with any relationships and considerations I must adhere to.

Cheers Mate!!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 20, 2015, 05:07:03 pm
@fusion600
@zoot1612

Well, I tried to download all the updated files but still can't get it to work.  Not sure what I am doing wrong but NOTHING seems to work right with this plugin.  I am new to this.  So, here is what I did:
1.  I already had the UPnP plug-in added.  So, I installed the Denon Receiver Control Plugin.
2.  I then downloaded all the files from the link @zoot1612 posted for me. (I downloaded by clicking on the link of each of the 11 files and choosing to download in original format).  Saved all of them to my Mac.
3.  I then uploaded all the files to the Vera by going into the Develop Apps section in UI7 and dragging all 11 files into the Upload section for the Luup files.
4.  I was still seeing connection issues and realized I forgot to go into the device and add my internal IP address under Advanced.
5.  Still, nothing was working (was not even seeing any buttons like I did last time).  So, I downloaded the updated .lua file that @fusion600 posted yesterday and uploaded to my Vera the same way.
6.  Still nothing!  So, I tried rebooting the Vera.  Unfortunately, that did not make a difference either.

Any help would be appreciated since I must be doing something wrong.  Not sure why this seems to be so complicated.

Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 20, 2015, 05:31:45 pm
Don't get frustrated.....

Here is what I would try.

Uninstall the Denon Plug-in by clicking apps, My Apps, open Denon and click Uninstall.

After that,

Re-Upload all of Zoots files except createJSON.lua.  Then Upload the createJSON.lua from my post.

Next go to Create App and enter
D-DenonReceiver1.xml in Upnp Device Filename
I_DenonReceiver1.xml in Upnp Implementation Filename
Your receiver IP under IP
then click Create Device

Then go to Serial Port configuration and restart Luup.

It will restart 3 or so times takes a bit of time, then you should be good to go.

Go to
1.  I already had the UPnP plug-in added.  So, I installed the Denon Receiver Control Plugin.
2.  I then downloaded all the files from the link @zoot1612 posted for me. (I downloaded by clicking on the link of each of the 11 files and choosing to download in original format).  Saved all of them to my Mac.
3.  I then uploaded all the files to the Vera by going into the Develop Apps section in UI7 and dragging all 11 files into the Upload section for the Luup files.
4.  I was still seeing connection issues and realized I forgot to go into the device and add my internal IP address under Advanced.
5.  Still, nothing was working (was not even seeing any buttons like I did last time).  So, I downloaded the updated .lua file that @fusion600 posted yesterday and uploaded to my Vera the same way.
6.  Still nothing!  So, I tried rebooting the Vera.  Unfortunately, that did not make a difference either.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 20, 2015, 05:59:41 pm
@fusion600

I tried the directions you listed but still nothing.  I did find one error in something you wrote but fixed that (I think in one place you put a dash that shied have been an underscore) but didn't make a difference.  Here is the strange thing...It seems to do everything correctly but there are no buttons for the Denon.  The first time I loaded this a couple weeks ago all of the buttons were there, they just didn't work.  Now, no buttons at all.  Also, it keeps adding partitions seems like every time the Luup restarts.  There was a partition called AVR-1913USA_main.  That is the one that should have the buttons.  When I open it or on the device page it is blank.  When I restarted Luup and/or reboot the Vera I now have AVR-1913USA_main AND AVR-1913USA_2.  Neither has any of the buttons.

Something weird is going on and I can't figure out what.  Maybe I need to remove and reinstall the UPnP plug-in also to start from scratch with the Denon?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 20, 2015, 06:21:28 pm
Quick update...

I found an error with one of my files I downloaded.  For some reason it had a .txt extension.  So, I removed that to make sure it was .json.  Anyway, once I uploaded and restarted Luup I could see the buttons.  I also think I understand why the additional partition seems to show.  One is Main and one is Zone 2 (my best guess since they seem to do the same thing otherwise).  Now that I could get the buttons I see there are too many errors to really get to work but some things do work.

For example:
None of the button labels are correct.  They do change the inputs but not to the one which is on the label.
The only buttons that show up on the main UI7 page are "Unmute" and "Mute".  So, you can't even turn on and off without going into the device itself.

Anyway, I will try to play around with it some more and see what I can find out but thanks again for all your help.  If there is anything I can do to help test, please let me know.

Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 20, 2015, 07:17:05 pm
Glad you got it going, I wish I could do more but this is out of my realm right now.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on February 20, 2015, 09:18:05 pm
Hey Zoot.

I haven't used his much lately... but I rarely get the errors like we discussed in the past.  Powering the Denon on and off, then reloading vera always makes the Lua error disappear.

Today... I decided to try to use it, and found that although it seems to load fine, if I click on the volume or an input (e.g.), I get an Invalid Service dialog pop up.

What's weird is that if I change volume with the actual denon remote, I corresponds in the plugin showing the increase.

Advanced tab says i'm on v0.80

EDIT:

I installed 1.25 from the Marketplace today for kicks.  in updated the devices (to the newer look) for both my main and second zone (Denon 2000).  But also created a 3rd device that kept having a LUA failure.  What was weird is that the updated two devices worked great.

I tried resetting the setup to '0' on the existing main device, reloaded, and the 3rd (phantom ?) device was still there.  So I just deleted it.  It went through the "uninstalling the plugin" routine...

And after... the phantom new device was gone, and the existing two (that were updated) were still there, and seem to work.

go figure :-)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 20, 2015, 10:41:46 pm
@fusion600

Thank you so much for your help.  At least I feel like I accomplished something in getting this to the current point.  Unfortunately, I don't understand the coding enough to do anything further from here yet.

@zoot1612

One other note/request I wanted to ask...Even with the buttons being wrong and not everything working, at least it is somewhat usable to turn on and off (to a point).  That is what I was hoping you might be able to look at:
1.  Seems odd for the main buttons on the device would be Unmute and Mute with the volume slider.  Even if all you could fix was changing those main buttons to "Main On" and "Standby" (still with the volume slider, even if it doesn't work for now).  Just being able to turn off/on from the Vera app would be great.
2.  When in the Vera iOS app, there seems to be an On/Off switch but you can't get into any other of the main buttons.  The 2 questions for the iOS app would be:  Why can't you get into the main buttons? AND Why does the on/off switch control mute, not power?

Again, many thanks and really appreciate your help.  As I mentioned before, anything I can do to help with testing on UI7 or anything else around the plug-in, please let me know.  Always happy to help.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: asggold on February 21, 2015, 08:28:14 am
One other item I thought I would mention which I ran into this morning....

When looking at my Vera UI7 page on-line it was showing the Denon main controller as not being connected (had the red bar and the red house with the sad face).  However, the Mute/Unmute as well as the volume buttons all worked.

Anyway, just thought that was odd since Vera does not seem to be getting the feedback from the unit but is still pushing controls to the unit.

Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 21, 2015, 08:35:48 pm
New beta check post here:-
http://forum.micasaverde.com/index.php/topic,30501.msg217606.html#msg217606 (http://forum.micasaverde.com/index.php/topic,30501.msg217606.html#msg217606)

Please note there are no installation details at this point so approach with care. I will update instructions here http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) when time allows.

No real changes except a continuous exercise towards getting the plugin working across UI5 and UI7. I have tested that installation works on both UI5 and UI7 but again due to the fact that it is generating json files for lots of different models at initial startup there are going to be problems.

Also note that the volume slider does not work in UI7 in the volume/inputs TAB this is a firmware issue not a plugin issue.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 22, 2015, 07:35:59 am
Great improvement on UI7.  Had some download errors using Chrome.  Files were coming down in HTML rather than xml......took me a bit to get it going.

Children present proper buttons on dashboard, Main does not.

Still a problem with buttons/labels for Main zone.  Children are fine.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on February 22, 2015, 08:39:03 am
UPDATE:

I changed setup to 0 and restarted engine, now showing up on Main zone as well!!!

The new buttons need some fine tuning as they are not all parallel, but they are there!

Good Job!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: txam92 on February 22, 2015, 03:09:53 pm
Newbie Question:   I have a Denon 3808 and a Vera Lite on UI5.   I downloaded the DLNA app as well as the latest files from Zoot (I originally installed the Denon app from the store but removed it).    I created the Denon in "Create Device" with the IP address and can see it in the "Devices" tab.  I can turn on the receiver and change the input successfully so I'm very happy I got that far.  Thanks for the excellent work!!

My question is how I would go about remotely changing the tuner to a different radio station or preset?  I don't see a button for it, but I did some snooping around in some of the XML and LUA files and noticed there seems to be some logic in there for that.  Any tips on how to do this would be appreciated.



Thanks!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on February 25, 2015, 10:27:04 pm
@txam92

If remote control using a button currently there is no implementation.

But you can do the following: -
Code: [Select]
luup.call_action("urn:denon-com:serviceId:Receiver1","SendCommand",{Command="<COMMAND>"},<DEVICE_NUMBER>)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: txam92 on February 26, 2015, 08:35:39 pm
Thanks Zoot!  I was able to use Test Luup code to send a command to the receiver to change presets (up, down or go to a specific preset).  For some reason the tuner doesn't do anything when I ask it to tune to a particular frequency, but I'll figure it out.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 09, 2015, 03:57:56 pm
I have this app installed on UI5 and it seems to mostly be working great.  The only issue that I have is that after I enter the IP address and it goes through its configuration (add the second zone), I lose a couple of input options.  At the same time, the input names are configured to be the actual names that I programmed into the receiver.  What I am specifically losing that I want is the "NET/USB" option.  Is there any way to get that to show up?  I have an AVR-E400.  Thanks for your help!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 09, 2015, 07:09:48 pm
@lingerba
Can you supply logging data?
http://wiki.micasaverde.com/index.php/Luup_Debugging (http://wiki.micasaverde.com/index.php/Luup_Debugging)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 09, 2015, 07:38:21 pm
@lingerba
Can you supply logging data?
http://wiki.micasaverde.com/index.php/Luup_Debugging (http://wiki.micasaverde.com/index.php/Luup_Debugging)

Bear with me, I have never done this before.  Is this what you are looking for?

Code: [Select]
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.329   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  data received NSE6 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.329   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  Data:E6 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.329   luup_log:116: AVRReceiverPlugin::processMessage:
                                  Data:E6 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.330   luup_log:116: AVRReceiverPlugin::processMessage:
                                  Unhandled message type 'NS' <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.447   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  data received NSE7 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.447   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  Data:E7 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.447   luup_log:116: AVRReceiverPlugin::processMessage:
                                  Data:E7 <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.448   luup_log:116: AVRReceiverPlugin::processMessage:
                                  Unhandled message type 'NS' <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.566   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  data received NSE8   [    1/38   ] <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.566   luup_log:116: AVRReceiverPlugin::handleResponse:
                                  Data:E8   [    1/38   ] <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.567   luup_log:116: AVRReceiverPlugin::processMessage: Data:E8   [    1/3
                                 8   ] <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:34.567   luup_log:116: AVRReceiverPlugin::processMessage: Unhandled message
                                 type 'NS' <0x2ee95680>
-ash: syntax error: unexpected newline
root@MiOS_35016237:/tmp/log/cmh# 50      03/09/15 19:32:40.132   luup_log:109: VGinfo: Calling main loop with lul_device: 109 <0x2d695680>
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 09, 2015, 07:49:47 pm
@lingerba
Yes, specifically after the data when the plugin starts initially with setup = 0. This forces a rebuild so I can see what inputs actually exist on your AVR.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 09, 2015, 07:59:34 pm
@lingerba
Yes, specifically after the data when the plugin starts initially with setup = 0. This forces a rebuild so I can see what inputs actually exist on your AVR.

How is this?  It did this process 3 time I think.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 09, 2015, 11:58:22 pm
@lingerba

The NET/USB input is not reported with the "SSFUN ?" command.

Here is the list of reported inputs: -

Code: [Select]
SSFUNDVD DVD
SSFUNBD Blu-ray
SSFUNTV TV Audio
SSFUNSAT/CBL DirecTV
SSFUNMPLAY Chromecast
SSFUNGAME Laptop
SSFUNAUX1 AUX
SSFUNCD CD

I will have a look at the documentation and see if I can see a reason why otherwise will have to look at a work around.

Do you have the input hidden (page 117 manual). Not sure if this influences the output of "SSFUN ?" or not but it is something you can look at.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 07:34:31 am
I will have to verify with the manual when I get home, but I am 99% sure it is not hidden.  I can select the input from the front of the receiver and remote and phone/tablet app.  When I do that the Vera app shows no input selected (i.e. it is just blank).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: fusion600 on March 10, 2015, 10:14:04 am
@lingerba

The NET/USB input is not reported with the "SSFUN ?" command.

Here is the list of reported inputs: -

Code: [Select]
SSFUNDVD DVD
SSFUNBD Blu-ray
SSFUNTV TV Audio
SSFUNSAT/CBL DirecTV
SSFUNMPLAY Chromecast
SSFUNGAME Laptop
SSFUNAUX1 AUX
SSFUNCD CD

I will have a look at the documentation and see if I can see a reason why otherwise will have to look at a work around.

Do you have the input hidden (page 117 manual). Not sure if this influences the output of "SSFUN ?" or not but it is something you can look at.

How can I issue the SSFUN command, on my 4400 I am missing a LOT of inputs.  I would love to see what it returns
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 10:53:14 am
I will have to verify with the manual when I get home, but I am 99% sure it is not hidden.  I can select the input from the front of the receiver and remote and phone/tablet app.  When I do that the Vera app shows no input selected (i.e. it is just blank).

I also want to add that I do have some inputs hidden, just not the Net/USB one.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 06:11:48 pm
I will have to verify with the manual when I get home, but I am 99% sure it is not hidden.  I can select the input from the front of the receiver and remote and phone/tablet app.  When I do that the Vera app shows no input selected (i.e. it is just blank).

I also want to add that I do have some inputs hidden, just not the Net/USB one.

Ok, I did have some inputs hidden, but not ones I was worried about not seeing (Network).  Here is what I have discovered: previously I had the "AUX" input hidden on the receiver, however it was still showing on Vera.  When I clicked it on Vera, nothing happened.  Once I un-hid that input, it worked from Vera.  So it seems as if whether I hide or show inputs, it doesn't make any difference in what is shown on Vera.  I re-ran the setup and re-installed the app after showing all inputs, but that did not make any difference.

If you look at the attached screenshot, you see that not all of the inputs from the receiver show up on Vera.  Also, I have now realized that all of the network-based inputs a listed separately.

When I chose Pandora for example (using the receiver's controls), Vera shows the input as "PANDORA" and it shows the sources as "Input Unknown".

If you could even just tell me how to manually set the input to Pandora using LUUP code, that is all I really need.  I have tried doing it with a scene by selecting advanced settings, but I can't find an option to do this.  I tried "SetInputTarget" but that didn't work.  (note: I typed "PANDORA" in the box and it changed the input to "CD".  I also tried "SAT/CBL" and again it changed to the CD input.

I appreciate your assistance troubleshooting this.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 06:23:13 pm
Here is the log file from where I change the input to Pandora.

The sequence you see is first I changed the volume a few times just to make sure it was logging.  Then I selected the "Network" input on the receiver.  Then I selected Pandora.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 10, 2015, 07:53:46 pm
@lingerba
So the NET inputs are handled differently on this Receiver (And probably other newer boxes). This is going to make it very difficult to add functionality as I have a AVR3808 which does not handle NET/USB in the same way.

Before I rule it out all together will look at what I can discover.

@fusion600
http://code.mios.com/trac/mios_denon-receiver-control/wiki

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 07:58:06 pm
@zoot1612

I was starting to think that may be the case, but I wasn't sure.  I am happy to be a guinea pig if you need.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 10, 2015, 08:38:25 pm
@lingerba
I need a command that prints out the list of internal inputs (Not "SSFUN ?"), if such a thing exists  :).

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lingerba on March 10, 2015, 09:00:56 pm
@lingerba
I need a command that prints out the list of internal inputs (Not "SSFUN ?"), if such a thing exists  :).

Go here: http://usa.denon.com/us/downloads/productdownloads?_ga=1.57452905.2124652642.1426035078
Select: Home Theater
Select: AV Receivers
Select: AVR-E400
Download: AVRX2000 E400 PROTOCOL (10 1 0) V04 (2)

I tried attaching it here but the file is too large.  This is this whole command structure.  I do not see something that lists all inputs, but maybe I am just missing it?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: alangraph on March 11, 2015, 07:44:07 pm
Hi zoot1612, i have a marantz 1605 and i'am also missing inputs.I have search a lot for docs on the Denon/Marantz commands and found almost nothing.
There is a new undocumented http control method for the new models, that is the one that use the phone apps. you can check it out in http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control
And you can get feedback from http://<IP OF RECEIVER>/goform/formMainZone_MainZoneXml.xml
In the XML response from the receiver you can get the inputs.
Hope this help  ???
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on March 12, 2015, 12:48:51 am
@alangraph
Thanks for the info, I think this may be out of scope for the plugin. It may be preferable for a new plugin to handle the newer models and as I don't have a box to test on it may be better for someone else to look at.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jasona on June 25, 2015, 04:16:59 pm
I haven't done much with it yet, but this app is working on my Marantz SR7009!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rotman253 on August 05, 2015, 01:24:10 pm
Sorry kind of a noob to all of this. Trying to get my Denon X2100W to connect to the Vera UI7 but no luck. It keeps saying it won't connect. I've entered in a static IP address on the unit and in the advanced setting but to no avail. It's asking for a port, but how can i specify it? Using a : after the IP? Not sure what port it operates on either.

Any help would be great.

Simon

hey ,
were you able to make your x2100w work with the vera UI7?
I'm having some issues myself with getting those 2 to work.
Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on August 13, 2015, 10:59:57 pm
@rotman253
If it uses the same protocol as the 3808 it should work. Please look here http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) for troubleshooting.

Please note that there are issues with the Telnet implementation on some Denon models that can cause intermittent disconnection which require a complete power down for the AVR.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on September 16, 2015, 06:50:43 am
Can you tell me which models have the Telnet problems. I use X1000 and many X2100W...

Thank you!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 16, 2015, 08:10:20 am
@Dansker
Don't have extensive knowledge on this, i know my 3808 has the issue and that is about it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Mai Pensato on September 20, 2015, 02:17:21 pm
I have a Denon AVR3310. After some trial and error I have got the plugin working on my Vera 3 (with UI5-672). But if my receiver is on standby the plugin w?n't work. I get a Lua startup failure. When I put the receiver on (with the standard remote control) and I do a reload then the startup failure dissapears and the plugin works again. Also when from Vera I put the receiver on standby or zone off , after that it does not work anymore.
Can I do something about it ?  Else I have to leave my Denon powered on 24/7 and I don't like that.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on September 20, 2015, 06:33:29 pm
@Mai Pensato
Check the trouble shooting section here: http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) sounds like it may be your power saving settings.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on September 21, 2015, 08:04:35 am
Installed the Denon app. Set IP for AVR-X1000, works just fine.

Installed 2nd Denon AVR-X2100W, it shows a installed on the app, but NO devices (main & zone 2) show up anywhere else. Reloaded LUP, rebooted VeraEdge. Still does not show up.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on September 21, 2015, 08:11:17 pm
Giving Vera some time always helps...

Now, first device AVR-X1000 works fine, main and zone 2.

2'nd device: AVR-x2100W shows main zone, but zone 2 does not show up (child device not created?).

I have started over with deleting - reinstalling app, and what not.

Have you encountered this?

VeraEdge, UI7
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on September 21, 2015, 11:26:57 pm
Got zone 2 to work on Denon AVR-X2100W for VeraEdge UI7 -yes!

The clue came from: http://code.mios.com/trac/mios_denon-receiver-control/wiki#

The app supports zone 2 only for certain devices listed in /etc/cmh-ludl/L_DenonReceiver1.lua.lzo -the x1000 was listed and worked; the X2100W not listed.

Using PC on VeraEdge UI7:

1: log into Vera using WinSCP (user=root; password:<wifi password on bottom of Vera)
2: log in to Vera using PuTTY: decompress file using pluto-lzo d <compressed file name> <new file name>
3: back to WinSCP: move file to PC
4: edit file on pc
5: using WinSCP: move file back to Vera
6: using PuTTY: compress file using pluto-lzo c <new file name> <compressed file name>
7: using Vera UI: goto Denon device, advanced, variables and set "Setup" to "0"
8: Reload

Based on this, it should be (relatively) simple to enable zone2, and zone 3, for other Denon receivers.

Hope this helps somebody else. Erik

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: akbooer on September 22, 2015, 04:25:42 am
A simpler way to access the Lua file is through the UI under Apps > Develop Apps > Lua files.

This uncompresses on download and compresses on upload, so no need so all those steps.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on September 22, 2015, 09:46:17 pm
Thank you for the pointer, I'll check it out.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: jbermudez on October 11, 2015, 01:06:51 pm
@lingerba
I need a command that prints out the list of internal inputs (Not "SSFUN ?"), if such a thing exists  :).

Go here: http://usa.denon.com/us/downloads/productdownloads?_ga=1.57452905.2124652642.1426035078
Select: Home Theater
Select: AV Receivers
Select: AVR-E400
Download: AVRX2000 E400 PROTOCOL (10 1 0) V04 (2)

I tried attaching it here but the file is too large.  This is this whole command structure.  I do not see something that lists all inputs, but maybe I am just missing it?

Zoot1612 / Lingerba, What ever happened with the NET inputs issue? I have the same issue as lingerba on my AVR-1913 ever since the code upgrade in February. Is there anything I can help look into further or is this a dead issue? (BTW, go Dukes - alum 2001)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on October 12, 2015, 08:20:49 pm
@jbermudez
Currently stalled as currently don't have a way to parse the inputs the same way as normal inputs.

Note: Not sure that the AVR-1913 fits in the same category as  AVR-E400. What isn't working, if you could post log info that would be great?

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lostramblin on October 14, 2015, 03:38:24 pm
Great plugin!  Appreciate all your hard work.

Sorry if this has been answered before, but has there been a resolution to the IP control losing connectivity?

Or at least some clever work around?

I ask because I'm already using my vera lite usb port for an IR emitter (cant reach to AVR, sadly).  If it's an easy enough process to switch to serial (with a USB hub?), i can do that.  But would need a little guidance.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lostramblin on October 14, 2015, 07:05:20 pm
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on October 14, 2015, 07:20:56 pm
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!

Can you share exactly what you did? Assume Luup startup?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tb001 on October 14, 2015, 07:29:51 pm
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!

Can you share exactly what you did? Assume Luup startup?

Would love to know as well--would be great not to regularly lose the connection!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on October 14, 2015, 09:10:55 pm
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!

The connectivity issue as far as I am aware is an issue with the Telnet implementation and the only fix is to toggle power on the AVR.
Also the http control mentioned in the OpenRemote link is for AVR 2011 models and later, my Receiver is older than that :(.

I think the best solution for connectivity is if the Receiver has a serial port is to use a serial to Ethernet device this bypasses the Telnet issue (I have not tried this myself so not 100% guaranteed).

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: lostramblin on October 15, 2015, 09:01:43 am
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!

Can you share exactly what you did? Assume Luup startup?

Would love to know as well--would be great not to regularly lose the connection!

During testing with the plug-in, I lost control 3-4 times in the span of an hour, mostly when saving changes to programming on the Vera Lite.  Once I've updated with these commands, haven't noticed it yet (*no jinx).  In fact, I just had a moment when the plugin was telling me "Device not ready", but the HTML commands functioned no problem.

What I did is essentially abandon the plug-in (it's still great!), and rewrite all my commands using HTML.  I'm not certain about this, but I believe these to be the same commands the webcontrol app sends to the device, so perhaps they're more "stable".  I'm just guessing here....

So my command to turn on the AVR and 5 seconds later switch source looks like this :
Code: [Select]
luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON")

luup.call_delay( 'changesource', 5)
function changesource()
    luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FMPLAY&cmd1=aspMainZone_WebUpdateStatus%2F&ZoneName=ZONE1")
end

To increase volume (swap sign at end to decrease) :
Code: [Select]
luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/>")

I haven't tested it, but it's possible power cycling the AVR with similar commands would allow the plugin to function.  OP might know better.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on November 09, 2015, 11:40:57 pm
Hi all

I have a denon avp-a1hdci that I wish to control.  I downloaded the denon Vera app yet it's not finding my receiver.  What's the easiest way to get this going?

Mike
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 25, 2015, 09:58:57 pm
@mikoz
Can you provide more info? Also check out http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) it may offer some help.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zscholz on November 28, 2015, 05:47:18 pm
Hey all -

First let me say that I use this app EVERY DAY - I have a Denon AVR-3312 receiver and I use the on/off state of my receiver to trigger other actions (in my case, supplying power to my subwoofer, which doesn't have a smart on/off/hibrinate state).  It works flawlessly - when I power on my receiver using my Logitech Harmony remote, the state change is sensed immediately and my subwoofer is powered on.  Same happens in reverse when power off happens.  SO - THANK YOU for writing such a reliable and fantastic app.

The question I have, is there a changelog, or version indication of the state of this app somewhere?  Maybe who owns the OP could update it with that information?  I am running version 1.27, and I have "auto update" ticked on my UI5 interface, but I've never had any inclination that that tick box did anything at all. 

I just wanted to make sure I was on the latest version, and some new fancyness hasn't come out that I could make use of (for instance, something that lets me use my denon control app from AutHomationHD app on android....PLEASE!!!!) :)

Thanks again - this was just a suggestion :)
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 29, 2015, 12:04:44 am
@zscholz
The question I have, is there a changelog, or version indication of the state of this app somewhere?  Maybe who owns the OP could update it with that information?  I am running version 1.27, and I have "auto update" ticked on my UI5 interface, but I've never had any inclination that that tick box did anything at all. 
1.27 is the latest.

I just wanted to make sure I was on the latest version, and some new fancyness hasn't come out that I could make use of (for instance, something that lets me use my denon control app from AutHomationHD app on android....PLEASE!!!!) :)

Thanks again - this was just a suggestion :)

I don't think the AutHomationHD application supports the services required. If there are hooks that the Denon app does support some of the Upnp services.



Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on November 29, 2015, 02:07:33 pm
Hey Zoot.  I have this installed manually... and wanted to make sure autoupdate was on.  So I "reinstalled" from the app marketplace, which actually setup a new instance. 

To keep this clean... how would I uninstall the manual version?  (manually)?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on November 29, 2015, 05:26:27 pm
@tomgru

I don't think you need to anything as the files are stored in the same place they will just be overwritten by the auto upgrade (when it happens).
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 05, 2015, 06:29:44 pm
Actually, found a work around using HTML commands outlined on this page :

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control (http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control)

A few luup commands and I'm all set. 

Thanks for getting me started!

Can you share exactly what you did? Assume Luup startup?

Would love to know as well--would be great not to regularly lose the connection!

During testing with the plug-in, I lost control 3-4 times in the span of an hour, mostly when saving changes to programming on the Vera Lite.  Once I've updated with these commands, haven't noticed it yet (*no jinx).  In fact, I just had a moment when the plugin was telling me "Device not ready", but the HTML commands functioned no problem.

What I did is essentially abandon the plug-in (it's still great!), and rewrite all my commands using HTML.  I'm not certain about this, but I believe these to be the same commands the webcontrol app sends to the device, so perhaps they're more "stable".  I'm just guessing here....

So my command to turn on the AVR and 5 seconds later switch source looks like this :
Code: [Select]
luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON")

luup.call_delay( 'changesource', 5)
function changesource()
    luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FMPLAY&cmd1=aspMainZone_WebUpdateStatus%2F&ZoneName=ZONE1")
end

To increase volume (swap sign at end to decrease) :
Code: [Select]
luup.inet.wget("http://192.168.0.29/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/>")

I haven't tested it, but it's possible power cycling the AVR with similar commands would allow the plugin to function.  OP might know better.

@lostramblin I used your luup sample above to run a scene to turn on my avr and set it to Pandora.  Works great!  Question: do you know a way to include the Pandora 'station' in the code...so it will automatically tune into a particular station I have saved?  In looking at the GET query string when selecting a Pandora station from the browser, it appears Pandora stations look like a set of numbers, for example: 1449357145284.  Would love to set up scenes which would turn on the avr and tune it into a particular Pandora station.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 09, 2015, 02:01:46 pm
@zoot1612 is there a way to select a Pandora station using your plugin? 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 09, 2015, 09:11:05 pm
@zoot1612 is there a way to select a Pandora station using your plugin? 

You can try SendCommand see: - http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki).

You can select INPUT source with command SIPANDORA but cannot see how to select a channel in the protocol documentation, this should be available in automation under the advanced tab for UI5 but I haven't really tested it.

Can't help anymore than that as we don't have access to the same functionality in Austalia.


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 11, 2015, 05:40:53 pm
Thank you for the tips.

Let me ask this...is it possible with your plugin to play a particular 'internet radio' station which I have saved?
If it is, what would I need to do?
I saw where the protocol to call a station in memory is NSBxx where xx = the number of the saved station in memory.

Just trying to figure out now how to get a saved internet radio station to start in a scene.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 15, 2015, 12:59:07 pm
@zoot1612

Any idea why the plugin hangs with the 'Running Lua Startup'?
I have uninstalled the plugin and reinstalled it, but still hangs up.

I have the proper IP address in the advanced settings for my avr and added the 2113 (with 2 zones) to the .lua file.
I tried to select an input and use the slider to turn up the volume...you can see from the logs it gets a 'device not ready' error.

Any ideas?

08      12/15/15 12:49:13.910   JobHandler_LuaUPnP::HandleActionRequest device: 89 service: urn:denon-com:serviceId:Receiver1 action: Input11 <0x2f5ca680>
08      12/15/15 12:49:13.911   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=89 <0x2f5ca680>
08      12/15/15 12:49:13.911   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:denon-com:serviceId:Receiver1 <0x2f5ca680>
08      12/15/15 12:49:13.912   JobHandler_LuaUPnP::HandleActionRequest argument action=Input11 <0x2f5ca680>
02      12/15/15 12:49:13.912   Device_LuaUPnP::HandleActionRequest 89 not ready 0xc12770 <0x2f5ca680>
02      12/15/15 12:49:13.913   JobHandler_LuaUPnP::RunAction device 89 action urn:denon-com:serviceId:Receiver1/Input11 failed with -911/Device not ready <0x2f5ca680>

08      12/15/15 12:49:25.432   JobHandler_LuaUPnP::HandleActionRequest device: 89 service: urn:upnp-org:serviceId:RenderingControl1 action: SetVolume <0x2f5ca680>
08      12/15/15 12:49:25.433   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=89 <0x2f5ca680>
08      12/15/15 12:49:25.434   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:RenderingControl1 <0x2f5ca680>
08      12/15/15 12:49:25.434   JobHandler_LuaUPnP::HandleActionRequest argument action=SetVolume <0x2f5ca680>
02      12/15/15 12:49:25.435   Device_LuaUPnP::HandleActionRequest 89 not ready 0xc12770 <0x2f5ca680>
02      12/15/15 12:49:25.435   JobHandler_LuaUPnP::RunAction device 89 action urn:upnp-org:serviceId:RenderingControl1/SetVolume failed with -911/Device not ready <0x2f5ca680>

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 15, 2015, 05:46:11 pm
@rsmed1

I saw where the protocol to call a station in memory is NSBxx where xx = the number of the saved station in memory.

Use SendCommand in the advanced tab when creating your scene and input NSBxx where xx = 00 - 55. Please check protocol document for mapping of those numbers.

Any idea why the plugin hangs with the 'Running Lua Startup'?

Suggest you power cycle your AVR, if this doesn't work can you send more of your logs when you startup.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 15, 2015, 11:38:21 pm
@mikoz
Can you provide more info? Also check out http://code.mios.com/trac/mios_denon-receiver-control/wiki (http://code.mios.com/trac/mios_denon-receiver-control/wiki) it may offer some help.

Basically, that's all it says... "can't detect device".   There is no other communication except for "
AVR Receiver : Communications error" in the blue banner at the top, which is basically saying the same thing. 

I have UI7, can I use the plugin you mentioned in the URL? 



-mike
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 16, 2015, 10:42:44 am
Hi all,

I finally got it working, but I don't understand why and furthermore it doesn't work once the Vera is power-cycled. 

First, I have an AVP-A1HDCI, which returns a model # that's not purely numeric like the code assumes.  So, I modified the L_  code to recognize the AVP-A1HDCI a as a model and setup 4 zones.    Then, I tried various combinations of creating devices using the Apps > develop option as the wiki page suggests versus going into the "details" of the denon app and creating a device that way.  Depending on what I did and some random luck (I think), it either simply produced no result at all (nothing shows up in the dashboard) or it produces a single zone AVR receiver that has a red banner indicating "Can't detect device" or it got it right and made a 4-zone AVP setup. 

Once I went through that, I thought I was home free.  Then I power-cycled the Vera.  It then said it couldn't "detect device" on all 4 zones. 
So, I went through and changed setup > automatically configure from No to Yes a few times and finally it took. 

I am certain it will break again when I power cycle. 

I also hard-coded the IP address of the denon in the L_ code jut to be sure it was able to find it. 

Anyone have any ideas what's going on?  How do I check the Logs for the Lup code of this module (sorry, new to this), if that's the right approach? 

-mike
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 16, 2015, 11:13:58 am
@rsmed1

I saw where the protocol to call a station in memory is NSBxx where xx = the number of the saved station in memory.

Use SendCommand in the advanced tab when creating your scene and input NSBxx where xx = 00 - 55. Please check protocol document for mapping of those numbers.

Any idea why the plugin hangs with the 'Running Lua Startup'?

Suggest you power cycle your AVR, if this doesn't work can you send more of your logs when you startup.

Thanks zoot1612, pulling the plug on my receiver then plugging it back in solved the issue.

For anyone that wants to set up their receiver to play a particular internet radio station, this is how I did it:

First of all, I'm actually using Amazon's Echo to give voice commands to run my vera scenes (it is awesome!).
So, I tell the Echo (also known as Alexa), to 'Turn on downstairs music".  Alexa responds with "OK" within a second.  It then runs a scene where I turn on my receiver (2113CI), and sets the input to internet radio using the SIIRADIO command (see attached pic).

I then set up a second scene where I then tell Alexa, "turn on rock music", she then responds with "OK" and runs the scene where I use the NSBxx command to go to that internet radio station saved in my favorites. (see attached pic).

It is pretty awesome to give the voice command and have my stations change without ever having to get up.  ;D
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 16, 2015, 05:31:44 pm
@mikoz
I also hard-coded the IP address of the denon in the L_ code jut to be sure it was able to find it. 

This won't make any difference.

Anyone have any ideas what's going on?  How do I check the Logs for the Lup code of this module (sorry, new to this), if that's the right approach? 

Without logs no idea what is happening. To check the logs have a look at the wiki here: -
http://wiki.micasaverde.com/index.php/Logs (http://wiki.micasaverde.com/index.php/Logs)

Once you have the logs if you can't work out what the issue is post the logs here and hopefully someone can help.

Update
Add the following line to the MODEL table: -
Code: [Select]
['1'] = {zones = "2,3,4"},then change the "Setup" variable to "0" and restart.

This change is very targeted so may not get into plugin. To cater for alpha names in the plugin would probably break current implementation.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 16, 2015, 07:04:56 pm
@zoot1612

Is it possible to have 'two' SendCommand in one scene?  Every time I try to add more than one SendCommand in the Advanced Editor, I get the popup message saying 'Action already exists'.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 16, 2015, 10:38:50 pm
@mikoz
I also hard-coded the IP address of the denon in the L_ code jut to be sure it was able to find it. 

This won't make any difference.

Anyone have any ideas what's going on?  How do I check the Logs for the Lup code of this module (sorry, new to this), if that's the right approach? 

Without logs no idea what is happening. To check the logs have a look at the wiki here: -
http://wiki.micasaverde.com/index.php/Logs (http://wiki.micasaverde.com/index.php/Logs)

Once you have the logs if you can't work out what the issue is post the logs here and hopefully someone can help.

Update
Add the following line to the MODEL table: -
Code: [Select]
['1'] = {zones = "2,3,4"},then change the "Setup" variable to "0" and restart.

This change is very targeted so may not get into plugin. To cater for alpha names in the plugin would probably break current implementation.


Hi,

Okay, there are multiple issues: 

1.  the UI7 SW keeps reporting "Can't detect device" yet I can still go to the device and toggle the settings, etc when I know it's clearly working.  This seems like a Vera UI7 bug.   I did some digging  and  the plugin apparently doesn't do the "required"    luup.set_failure(false)  statement?  I added this into the recevierStartup at the bottom and it got rid of the "can't detect device" error.  Is this possible or unrelated to my issues? 

2. the LAN connection to the Denon seems flaky, especially over time.  I couldn't ping it and therefore I wouldn't expect it to work right in Vera.  I have the router setup to give out a fixed address and I get DHCP set on the denon, would be ok but I've turned off DHCP and set everything statically in the denon too (which agrees with the router config obviously), let's see how that goes.  Power saving mode is off, otherwise nothing would work.   Anyway as of tonight, it's doing well and the ethernet connection is soild.  Could have been a fluke. 

3. after power cycles of Vera, I still have problems.  Here's the log that seems relevant: 

01   12/16/15 23:10:14.057   LuaInterface::CallFunction_Startup device 105 function receiverStartup took 30 seconds <0x2b69e680>
01   12/16/15 23:10:14.057   LuaInterface::CallFunction_Startup-2 device 105 function receiverStartup failed AVR Receiver with return false <0x2b69e680>
 ... ... ...

08   12/16/15 23:21:57.852   JobHandler_LuaUPnP::HandleActionRequest device: 105 service: urn:micasaverde-com:serviceId:InputSelection1 action: Input5 <0x2ce9e680>
08   12/16/15 23:21:57.853   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=105 <0x2ce9e680>
08   12/16/15 23:21:57.853   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:InputSelection1 <0x2ce9e680>
08   12/16/15 23:21:57.854   JobHandler_LuaUPnP::HandleActionRequest argument action=Input5 <0x2ce9e680>
02   12/16/15 23:21:57.854   Device_LuaUPnP::HandleActionRequest 105 not ready 0xb6a4c8 <0x2ce9e680>
02   12/16/15 23:21:57.855   JobHandler_LuaUPnP::RunAction device 105 action urn:micasaverde-com:serviceId:InputSelection1/Input5 failed with -911/Device not ready <0x2ce9e680>
08   12/16/15 23:22:04.995   JobHandler_LuaUPnP::HandleActionRequest device: 105 service: urn:micasaverde-com:serviceId:InputSelection1 action: Input5 <0x2e09e680>
08   12/16/15 23:22:04.996   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=105 <0x2e09e680>
08   12/16/15 23:22:04.997   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:InputSelection1 <0x2e09e680>
08   12/16/15 23:22:04.997   JobHandler_LuaUPnP::HandleActionRequest argument action=Input5 <0x2e09e680>
02   12/16/15 23:22:04.998   Device_LuaUPnP::HandleActionRequest 105 not ready 0xb6a4c8 <0x2e09e680>
02   12/16/15 23:22:04.998   JobHandler_LuaUPnP::RunAction device 105 action urn:micasaverde-com:serviceId:InputSelection1/Input5 failed with -911/Device not ready <0x2e09e680>

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 17, 2015, 12:40:01 am
@zoot1612

Is it possible to have 'two' SendCommand in one scene?  Every time I try to add more than one SendCommand in the Advanced Editor, I get the popup message saying 'Action already exists'.

In UI5 you can, see attached screenshot.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 17, 2015, 12:51:09 am
1.  the UI7 SW keeps reporting "Can't detect device" yet I can still go to the device and toggle the settings, etc when I know it's clearly working.  This seems like a Vera UI7 bug.   I did some digging  and  the plugin apparently doesn't do the "required"    luup.set_failure(false)  statement?  I added this into the recevierStartup at the bottom and it got rid of the "can't detect device" error.  Is this possible or unrelated to my issues? 

Try attached, not tested and I am not in a position to test some of the other changes I have made since previous release. By the way you are correct I was just using CommFailure not luup.set_failure(false) for UI7. Thanks

2. the LAN connection to the Denon seems flaky, especially over time.  I couldn't ping it and therefore I wouldn't expect it to work right in Vera.  I have the router setup to give out a fixed address and I get DHCP set on the denon, would be ok but I've turned off DHCP and set everything statically in the denon too (which agrees with the router config obviously), let's see how that goes.  Power saving mode is off, otherwise nothing would work.   Anyway as of tonight, it's doing well and the ethernet connection is soild.  Could have been a fluke. 

Yes, known issue see Issues and Notes in Wiki http://code.mios.com/trac/mios_denon-receiver-control/wiki/WikiStart (http://code.mios.com/trac/mios_denon-receiver-control/wiki/WikiStart).

3. after power cycles of Vera, I still have problems.

Hopefully attached will fix issues, please feedback results.


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 17, 2015, 01:19:59 am
1.  the UI7 SW keeps reporting "Can't detect device" yet I can still go to the device and toggle the settings, etc when I know it's clearly working.  This seems like a Vera UI7 bug.   I did some digging  and  the plugin apparently doesn't do the "required"    luup.set_failure(false)  statement?  I added this into the recevierStartup at the bottom and it got rid of the "can't detect device" error.  Is this possible or unrelated to my issues? 

Try attached, not tested and I am not in a position to test some of the other changes I have made since previous release. By the way you are correct I was just using CommFailure not luup.set_failure(false) for UI7. Thanks

2. the LAN connection to the Denon seems flaky, especially over time.  I couldn't ping it and therefore I wouldn't expect it to work right in Vera.  I have the router setup to give out a fixed address and I get DHCP set on the denon, would be ok but I've turned off DHCP and set everything statically in the denon too (which agrees with the router config obviously), let's see how that goes.  Power saving mode is off, otherwise nothing would work.   Anyway as of tonight, it's doing well and the ethernet connection is soild.  Could have been a fluke. 

Yes, known issue see Issues and Notes in Wiki http://code.mios.com/trac/mios_denon-receiver-control/wiki/WikiStart (http://code.mios.com/trac/mios_denon-receiver-control/wiki/WikiStart).

3. after power cycles of Vera, I still have problems.

Hopefully attached will fix issues, please feedback results.


Hi,

Thanks for your help.  Unfortunately, nothing really changed.  The ethernet connection is solid yet the device only responds when I re-upload the Lua file.   until I do that, I get "AVR receiver: communications issues" up at the top.  The log looks the same: 

01   12/17/15 0:14:04.011   LuaInterface::CallFunction_Startup device 105 function receiverStartup took 30 seconds <0x2bef0680>
01   12/17/15 0:14:04.032   LuaInterface::CallFunction_Startup-2 device 105 function receiverStartup failed AVR Receiver with return false <0x2bef0680>
06   12/17/15 0:14:04.033   Device_Variable::m_szValue_set device: 105 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0xbaca40/NONE duplicate:0 <0x2bef0680>
06   12/17/15 0:14:04.034   Device_Variable::m_szValue_set device: 105 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureTime was: 0 now: 1450332844 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2bef0680>
01   12/17/15 0:14:04.035   LuImplementation::StartLua running startup code for 105 I_DenonReceiver1.xml failed <0x2bef0680>

The symptom is: reboot... get Communications failure and the log file above.   Then, re-loading the Lua seems to always clear it up. 


The model number issues, however, have cleared up, and I no longer need the hacks I made to the code. 

-mike

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 17, 2015, 01:37:36 am
@mikoz
comment out this line and give that a try
Code: [Select]
luup.call_delay("checkConnection", 60, "")
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 17, 2015, 02:03:25 am
@mikoz
comment out this line and give that a try
Code: [Select]
luup.call_delay("checkConnection", 60, "")

Hi,

thanks for your help.  It's still behaving the same way.  Actually I had thought that reloading the lua code always fixed it, but that's apparently not true either.  If you keep reloading it, eventually it works. 

Ethernet is still doing well, so, I guess we need more logging in the code to see where it's getting tripped up?

-mike


Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: rsmed1 on December 17, 2015, 01:24:35 pm
@zoot1612

Is it possible to have 'two' SendCommand in one scene?  Every time I try to add more than one SendCommand in the Advanced Editor, I get the popup message saying 'Action already exists'.

In UI5 you can, see attached screenshot.

Thanks for your example.
If I put a 'delay' between sendCommands, then it does accept the 2nd sendCommand in UI7.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 17, 2015, 07:08:18 pm

Does anyone have experience with the ethernet to serial converter for control to get around the flaky port 23 issue?  ( I can't believe Denon doesn't fix that).   

Did you use the Moxa 5110 or something else? 

Does the plugin support it well?  How about other things like the DenOFFON iphone app... will that still work? 

-mike
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 17, 2015, 07:24:37 pm
@mikoz
I have a UI7 machine for testing will load it up and see if I can find the issue.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 20, 2015, 06:52:38 am
@mikoz
Does anyone have experience with the ethernet to serial converter for control to get around the flaky port 23 issue?  ( I can't believe Denon doesn't fix that).   

Tried over the weekend with a WIZNET but didn't have any luck.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on December 24, 2015, 11:58:14 pm
@mikoz
Does anyone have experience with the ethernet to serial converter for control to get around the flaky port 23 issue?  ( I can't believe Denon doesn't fix that).   

Tried over the weekend with a WIZNET but didn't have any luck.


Thanks, by not any luck, do you mean that it didn't work or you couldn't duplicate a problem. 

At this point, I think I have Ethernet issues with the denon box (like others do) and possibly (still) a plug-in issue.  However, I am inclined to fix the ethernet issue first.  :) 
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on December 25, 2015, 11:21:10 am
@mikoz
Couldn't get the serial port working.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: a-lurker on January 05, 2016, 06:00:25 pm
@zoot1612  re: connection drop outs and having to resort to these sort of solutions:

http://forum.micasaverde.com/index.php/topic,25066.msg175975.html#msg175975

I had similar connections problems with a Yamaha AVR. The original plugin used a socket connection, which just stopped working every now and then. Came to the conclusion it was a Vera problem but I can't be definite about that. Regardless I wrote a plugin that uses HTTP for control and now have no problems:

http://forum.micasaverde.com/index.php/topic,23079.msg156151.html#msg156151

I see that the more recent Denon's also allow HTTP control. eg

http://forum.micasaverde.com/index.php/topic,24464.msg177810.html#msg177810

According to this person, you can send the socket connection commands via HTTP:

https://translate.google.com.au/translate?hl=en&sl=de&u=http://blue-pc.net/2013/12/28/denon-av-reciever-ueber-http-steuern/&prev=search

Like so:

Code: [Select]
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SITV
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SIGAME
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?MVUP
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?MVDOWN
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SITV
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SIGAME
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SIIRADIO
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?SIFAVORITES
http://<AV IP-Adresse>/goform/formiPhoneAppDirect.xml?ZMFAVORITE1

It should be possible to an "UseHTTPFlag" in the plugin, that when set, issues the commands via HTTP rather than through the socket?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: DeltaNu1142 on February 25, 2016, 10:24:28 am
I'm using this plugin with a Marantz SR6009, and it works fine for the main zone; any ideas on how to enable zone 2? I've seen some talk of it on here, but nothing related to a Marantz.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Dansker on February 29, 2016, 05:57:42 am
Been working with Android app AnyMote Smart Remote to control six AVR-x2100W's in a large residence (using zone 2 from all receivers eliminated expensive multi channel amp for the house zones).

Going the http route seems to work reliably. Smart Remote presently includes remotes for both protocols over Wi-Fi.

To bad Denon don't get it, and fix it.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Aura on March 18, 2016, 01:13:15 pm
It's possible that I've missed this somewhere in the thread, so apologies if this is redundant -

Is it possible to connect Denon via Wifi? In my apartment configuration, the Denon is far from my ethernet hub.

I'd love to control the Denon via Zwave, but not if it means running 100' cable across the living room!
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: PabloNZ on May 01, 2016, 11:20:13 pm
It's possible that I've missed this somewhere in the thread, so apologies if this is redundant -

Is it possible to connect Denon via Wifi? In my apartment configuration, the Denon is far from my ethernet hub.

I'd love to control the Denon via Zwave, but not if it means running 100' cable across the living room!
Depends on your AVR. My X3200W does have wifi, but not all do.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on May 03, 2016, 03:47:08 pm
Any noticeable changes to this plugin recently? I'm starting to frequent reboots and the logs are pointing in this direction.  See here for discussion.
http://forum.micasaverde.com/index.php/topic,37341.0/topicseen.html
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: DeltaNu1142 on May 03, 2016, 03:53:06 pm
I recently uninstalled mine. I can ping the AVR, but I kept getting a Lua startup error connecting to it via Vera plugin.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on May 03, 2016, 04:01:07 pm
I recently uninstalled mine. I can ping the AVR, but I kept getting a Lua startup error connecting to it via Vera plugin.

i went to uninstall... and it removed on instance/device, but not the other.  The original was installed manually - maybe that's the problem.

to uninstall that version, would i just go in and delete those files that i uploaded?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on May 03, 2016, 10:53:17 pm
@tomgru
Just delete the parent device, the files will not be deleted from /etc/cmh-ludl but that should not affect day to day operations. You can login with ssh and delete manually if you want them gone completely.

In respect to http://forum.micasaverde.com/index.php/topic,37341.0/topicseen.html (http://forum.micasaverde.com/index.php/topic,37341.0/topicseen.html) I don't believe it is this plugin that is causing issues. But if removing the plugin helps then let me know.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on May 03, 2016, 10:55:43 pm
@DeltaNu1142

I recently uninstalled mine. I can ping the AVR, but I kept getting a Lua startup error connecting to it via Vera plugin.

The AVR only handles one Telnet session at a time. If you have another device connected then you would get that message.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: DeltaNu1142 on May 04, 2016, 01:21:48 pm
@DeltaNu1142
I recently uninstalled mine. I can ping the AVR, but I kept getting a Lua startup error connecting to it via Vera plugin.
The AVR only handles one Telnet session at a time. If you have another device connected then you would get that message.
Interesting... well, my AVR is a Marantz, but I don't expect that to make a difference. I really don't know what other devices could be connected to it. I attempted to use the Marantz iPhone app and couldn't connect to it either. I can see through the AVR UI that it's got an active Internet connection... but I wonder what could be connected to it? The plugin worked for about a week and then stopped working.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on May 06, 2016, 11:22:04 am
@tomgru
Just delete the parent device, the files will not be deleted from /etc/cmh-ludl but that should not affect day to day operations. You can login with ssh and delete manually if you want them gone completely.

In respect to http://forum.micasaverde.com/index.php/topic,37341.0/topicseen.html (http://forum.micasaverde.com/index.php/topic,37341.0/topicseen.html) I don't believe it is this plugin that is causing issues. But if removing the plugin helps then let me know.

Hi Zoot... thanks.

I did remove, and you'll be happy to know that the problem didn't go away.  :-)

That said... one weird thing... I removed the files (at least all that I knew of) and in the logs I still saw some calls looking for the receive.  Honestly, I've done so many things since then, I wasn't smart enough to write down the actual call - but do you have any idea what that might be?

That part aside... if you happened to see in the other thread... I actually restored to a good known version of Vera... reset via a vera firmware upgrade... and things seem to be mostly back to normal.

However... even now I see some pretty big spikes, and a LOT of activity regarding the plugin.  Attached is just a snippet of what I saw today... any idea if it should be this busy?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on May 08, 2016, 03:04:44 pm
As an example... after removing devices and uninstalling app, I still see this:

luup_log:201: AVRReceiverPlugin::Connection currently OK
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on May 08, 2016, 06:49:14 pm
That said... one weird thing... I removed the files (at least all that I knew of) and in the logs I still saw some calls looking for the receive.  Honestly, I've done so many things since then, I wasn't smart enough to write down the actual call - but do you have any idea what that might be?

Looks like plugin is still loaded, have you deleted the device and restarted the box? Not sure what has happened looks like the plugin has not been removed totally, you may have to look around the forum for an answer.

However... even now I see some pretty big spikes, and a LOT of activity regarding the plugin.  Attached is just a snippet of what I saw today... any idea if it should be this busy?

The plugin only reacts when receiving input from AVR the reason you are seeing a lot of activity is that I think I left the plugin debugging on by default. Just set it to zero in the parameters and output should decrease.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Fred S on May 20, 2016, 10:30:04 pm
Guys whenever I reboot my Vera Plus, I get an error message stating AVR Receiver : Communications error. The Denon receiver is off when this happens. The only way around this is to turn on my Denon receiver and reload the Zwave Engine. Is there any way to fix this?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ChrisGrund on June 03, 2016, 10:15:04 am
Looking for a little help in Creating the other zones:

I have successfully installed the Denon app and it did create the "Main" Zone which appears to work (I have not tested everything but did change the source and a few other things.

My problem is with the creation of the 2nd and 3rd zones.  I have a AVR-X6200WUSA as listed in the Model Number Line and I did change the Impl file to I_DenonReceiver1_UI7.xml from the I_DenonReceiver1.xml it was originally created with (Since I am running UI7).

I have tried adding the following lines in the L_DenonReceiver1.LUA one at a time, each time changing the SETUP to a 0 afterwards and restarting LUUP with no zones being created.

Inside Local MODEL
Firstly adding ['AVR-X6200WUSA'] = {zones = "2,3"},
Next  adding ['6200'] = {zones = "2,3"},
Next  adding ['1'] = {zones = "2,3"},

Finally I just added a line after this selection logic immediately before: local avr_rec_dev = nil
local zones = "2,3"

I will admit, I am not familiar with LUA/LUUP programming and have been getting by using the PLEG stuff for my more advanced scenes so it is probably something simple.

Thanks in advance for your help.


UPDATE:
    After messing with this a good bit and not sure exactly what I did, but it is working (At least the zones are created).  I am not at home so I cannot verify they are functioning properly till tonight, but I am assuming they are working and will only post back if they are not.  The last file I uploaded had both "1" and "6200" in the table. Hope this helps someone else.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on June 07, 2016, 10:00:54 pm
@ChrisGrund

Adding ['6200'] = {zones = "2,3"} would work.

You need to reset the config after changing the file otherwise the plugin will not go through the configuration again.

Under the "Advanced" tab set the "Setup" to "0" then restart the luup engine. This will rewrite the json and xml device files.

This is documented here: -
http://code.mios.com/trac/mios_denon-receiver-control/wiki

Hopefully this works for you as I am not really supporting this plugin anymore.

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: tomgru on June 09, 2016, 09:59:33 am

Hopefully this works for you as I am not really supporting this plugin anymore.

Zoot.... you going somewhere?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on June 12, 2016, 06:51:42 pm
@tomgru
No still hanging around, just don't have the time I once did.

Thanks
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on June 14, 2016, 10:07:31 pm
I had to uninstall this and give up. The denon is simply unreliable when you have more than one client connecting to it, as described in other posts.  Once the receiver (well, preamp is my case) is under control of the plugin, every communication to it became unreliable   I have a denon iPhone app for allowing control of the preamp and 99% of the attempts to use it caused errors when the plugin was running, it was flawless without it.   I guess there's no hope of denon fixing that. 

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Maskfaen on October 20, 2016, 03:04:06 pm
I got this plugin working awsome! But then I suddenly got "AVR-X1200WEUR_main[56] : Startup Lua Failed".

Any idea?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dcaler on November 17, 2016, 04:32:49 pm
Fred S.
Anything on this "AVR Receiver : Communications error"?  Working through the same issue.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: Aaron on December 16, 2016, 01:30:11 am
I'm also getting... Denon Receiver (AVR) via RS232/Ethernet[541] : Startup Lua Failed

Anyone know how to fix?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ALcALoIDe on January 09, 2017, 09:45:56 am
Wow, just saw this thread now. I own a 4806ci, which I love too, and bought the global cache with serial port and one with IR port. I haven't started "playing" yet, but would love to enjoy your journey. Subscribing to this thread now.
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dcaler on January 09, 2017, 05:13:29 pm
not know anything about this stuff, especially close to the code, I change the "PollFreq" in, Device/Advanced/Variables from 5m to 24h.
I think this might have helped in that the controller is not frequently checking for the Denon receiver.  For now, this appears to eb a good band-aid for me
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: zoot1612 on January 09, 2017, 06:39:50 pm
@Aaron
Try latest alpha version here https://github.com/zoot1612/plugin-denon (https://github.com/zoot1612/plugin-denon) and let me know how it goes.




Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: ronluna on March 18, 2017, 10:22:10 am
I'm using a Marantz SR6010 and the plugin is throwing the following error while the engine is starting/reloading.
Could this error be due to the fact that this receiver model is not defined in MODEL array inside the L_DenonReceiver1.lua ?

Code: [Select]
2017-03-18 10:17:07.701   openLuup.context_switch::  ERROR: [string "[55] I_DenonReceiver1.xml"]:391: attempt to concatenate local 'msgZone' (a boolean value)stack traceback:
./openLuup/scheduler.lua:128: in function <./openLuup/scheduler.lua:125>
(tail call): ?
./openLuup/scheduler.lua:238: in function 'dispatch'
./openLuup/scheduler.lua:705: in function 'task_callbacks'
./openLuup/scheduler.lua:1084: in function 'start'
openLuup/init.lua:322: in main chunk
[C]: ?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: coyote on March 18, 2017, 11:45:52 am
Hi, new member here. I'm stumbling through discovery of various http commands (which are preferable because they don't monopolize the network connection).

The following commands get various statuses:
http://192.168.xxx.xxx/goform/formMainZone_MainZoneXmlStatus.xml

http://192.168.xxx.xxx/goform/formNetAudio_StatusXml.xml?ZoneName=MAIN+ZONE

And there are other commands too. What I'm looking for is a status command that will tell me the status of the audio signal coming from the CBL/SAT input. I can't find one. The data has to be in there somewhere, because it is what shows onscreen in the 'SIGNAL' field when you press the 'INFO' button on the remote. Anyone have any ideas??
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: dcaler on March 18, 2017, 07:59:18 pm
I have ongoing supervision problems, although fully functional when controlling.  I would like to turn off supervision altogether.  Anyone know how to do this?
Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on June 23, 2017, 03:22:28 am
I downloaded the alpha version and it fixed a lot of problems.  I could finally setup the zones and the communication to the AVP-A1HDCI is much better (*).   Previously, I could never get the zones to be created, even if I manually edited the Lua file. 

For those trying it, you configure the zones as "2,3" (for example), not "1,2,3" in vera itself now, not via the Lua file.    You do this in the settings page after you initially setup the device.   


(*) I also changed the networking settings in the Denon itself, I previously had DHCP setup and the router had a fixed IP reserved for its MAC, but I changed this such I used static settings in both the router and the Denon.  so far, this is also helping stability. 

Title: Re: Vera (Luup) Control of Denon A/V receiver over serial/ethernet
Post by: mikoz on June 23, 2017, 08:59:09 pm
I spoke too soon.  It lasted one day... now back to "AVR receiver: communications error". 

The webpage for the Denon is working perfectly, however, but the plug in  is not.