Denon Binding?

3642 views
Skip to first unread message

ari...@nesys.it

unread,
Nov 8, 2014, 5:11:50 PM11/8/14
to ope...@googlegroups.com
Hi folks,

anyone working on a new binding for Denon AVR?

Thanks

Andrea

Gerhard R.

unread,
Nov 9, 2014, 2:56:52 AM11/9/14
to ope...@googlegroups.com
Hi Andrea!

Yes I. But i have just started, so it will take a while.

Regards,
Gerhard

Andrea Riela

unread,
Nov 9, 2014, 2:17:20 PM11/9/14
to ope...@googlegroups.com
Hi Gerhard.

Wonderful. I have a Denon avr 3311, can I help somehow with tests?

Please let me know

Thanks for your effort

Andrea
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/d/optout.

Maximilian

unread,
Nov 9, 2014, 2:51:31 PM11/9/14
to ope...@googlegroups.com
Hi Gerhard,

thats really cool. I have been waiting for this for quite a while. (using X2000 / X4000).
I also remember I offered to gather information in advance. Until now I did non manage to do this.
Is there anything in specific that needs to be researched currently ?

kr
maximilian

Andrea Riela

unread,
Nov 9, 2014, 3:38:01 PM11/9/14
to ope...@googlegroups.com
I’ve a script that just works. Maybe useful for the Binding?

Dunno, just sharing:

#!/usr/bin/expect

set timeout 20

set dencmd [lindex $argv 0]

log_user 0


spawn telnet 192.168.17.11

expect "Trying"

expect {

  timeout {

    send_user "\rTimeout waiting for Denon response.\r"

    send_user "$expect_out(buffer)\r"

    exit

  }

  "Connection refused" {

    send_user "UNABLE\n"

    exit

  }

  "BridgeCo AG Telnet server\r\n"

}

send "$dencmd\r"

expect "$dencmd\r\n"

expect "*\r"

send_user "$expect_out(buffer)\n"

exit



Andrea

--

Maximilian

unread,
Nov 9, 2014, 3:41:11 PM11/9/14
to
this could also help:
Its based on the http binding and the transformation service:

http://blue-pc.net/2014/06/11/denon-av-reciever-mit-openhab-steuern/

Gerhard R.

unread,
Nov 10, 2014, 3:11:38 AM11/10/14
to ope...@googlegroups.com
Hi!

Thanks guys. Currently i have everything i need.

@Maximilan
I know this site and Jörg and i already talked about this binding.

The idea is to control the receiver by http and receive events with telnet. Because telnet is not very reliable and allows only on connection concurrently, i also want to implement http polling as alternative.

Regards,
Gerhard

ifttt

unread,
Nov 10, 2014, 3:14:00 AM11/10/14
to ope...@googlegroups.com
Hi Gerhard,

I read about the telnet problem too. 

Well, good luck with it. If you need help with testing etc. just post a comment.

regards,
maximilian

Jeroen Idserda

unread,
Dec 22, 2014, 6:03:19 AM12/22/14
to ope...@googlegroups.com
Hello Gerhard,

What's the current status? Is the code already available somewhere? I'd be happy to help with the binding. Currently I'm using my AVR-X2000 with the HTTP binding and some polling, which works OK, but an actual binding would be better. 

Regards,
Jeroen.

Gerhard R.

unread,
Dec 22, 2014, 8:08:45 AM12/22/14
to ope...@googlegroups.com
Hi Jeroen!

I am sorry to say that I had very little time to work on the denon binding the last weeks.
Kai also asked me to port the Homematic-Binding to openHAB 2, so that's my next step (and also the Astro-Binding).

I really spend the majority of my free time to openHAB, but it's currently to little to get all things done. Therefore i must set priorities and have to move the Denon-Binding to a later date.

Regards,
Gerhard

Jeroen Idserda

unread,
Dec 23, 2014, 7:09:44 AM12/23/14
to ope...@googlegroups.com
Hi Gerhard,

Would it be okay if I had a go at implementing this binding? I've looked at the documentation, I'll use HTTP to send commands and fetch initial state. The telnet connection can then be used for listening for updates. It's actually quite similar to the Plex binding I just worked on (although Plex uses web sockets to receive updates instead of telnet). The binding would have support for multiple receivers. 

Regards,
Jeroen.

Andrea Riela

unread,
Dec 23, 2014, 7:18:45 AM12/23/14
to ope...@googlegroups.com
Hi all,

Can I help somehow for testing it? I've an AVR 3311 here.

Let me know

Andrea

Gerhard R.

unread,
Dec 23, 2014, 1:09:21 PM12/23/14
to ope...@googlegroups.com
Hi Jeroen!

Of course, any help is welcome! Thanks a lot!

Regards,
Gerhard

Jeroen Idserda

unread,
Dec 31, 2014, 4:04:33 AM12/31/14
to ope...@googlegroups.com
Hey,

First version of the binding is ready. I've opened a pull request. First version can be downloaded here: org.openhab.binding.denon-1.7.0-SNAPSHOT.

Here's the Wiki page describing the supported commands so far: Denon Binding

Binding should be compatible with previous generation AVR receivers (AVR-X2000/X3000 etc) as well as the current (X2100W/X3100W). Let me know your findings!

Regards,
Jeroen.

Maximilian

unread,
Dec 31, 2014, 11:42:53 AM12/31/14
to ope...@googlegroups.com
Hi,

Thank you. Thats so great I immediately started testing it.
Then I added the link to the manual and added the x4000 page to the menu bar on the right side. Later I realised that its not the main repository….

So far it works very well with the x4000 but not with the X2000.

I am not shure about the FLVolume item. Might work for other models.


Should we add a hint to the wiki on how to label inputs correctly if the have been renamed in the receiver itself using mappings ? Or is it openHab basics ?
e.g.:
denon.items
Text         item=DenonInput label="Quelle:  [MAP(denon.map):%s]“

denon.map
CD=DAB

I have no clue about the x2000. There are no error messages, the amp works with the app. It simpy does not respond at all.


Jeroen Idserda

unread,
Dec 31, 2014, 11:58:42 AM12/31/14
to
Hey,

Thanks for testing! I've put the wiki page on my own repo since the binding is not part of the master repo yet. I'll copy the page there when the binding is merged. Feel free to add things to the page, the mapping info is very useful I think. 

You can ignore the DenonFLVolume item for now, it's probably only updated when switching input.

The AVR-X2000 should work, I own one myself :-). Could you try setting binding logging to debug? (<logger name="org.openhab.binding.denon" level="DEBUG" /> in logback.xml). 

Regards,
Jeroen.

Maximilian

unread,
Jan 1, 2015, 4:44:32 AM1/1/15
to ope...@googlegroups.com
Hi Joeren,

it seems it can handle only one receiver at a time.

The startup of openhab looks like this:

10:36:04.088 INFO  o.o.m.c.i.ModelRepositoryImpl[:79]- Loading model 'denon.items'
10:36:14.597 INFO  o.o.m.c.i.ModelRepositoryImpl[:79]- Loading model 'denon.rules'

10:36:17.763 DEBUG o.o.b.d.i.DenonActivator[:34]- Denon binding has been started.
10:36:17.804 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonPower bound to property PW
10:36:17.807 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonMainZone bound to property ZM
10:36:17.810 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonVolume bound to property MV
10:36:17.813 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonMute bound to property MU
10:36:17.816 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonInput bound to property INPUT
10:36:17.819 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x2000 item DenonInputSATCBL bound to property SISAT/CBL
10:36:17.821 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_Power bound to property PW
10:36:17.826 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_MainZone bound to property ZM
10:36:17.828 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_Volume bound to property MV
10:36:17.830 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_Mute bound to property MU
10:36:17.832 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_Input bound to property INPUT
10:36:17.834 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputCD bound to property SICD
10:36:17.836 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputTuner bound to property SITUNER
10:36:17.838 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputDVD bound to property SIDVD
10:36:17.840 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputSATCBL bound to property SISAT/CBL
10:36:17.843 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputMplay bound to property SIMPLAY
10:36:17.845 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputGame bound to property SIGAME
10:36:17.847 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InputAux2 bound to property SIAUX2
10:36:17.849 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwo bound to property Z2
10:36:17.851 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoVolume bound to property Z2ZV
10:36:17.853 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoMute bound to property Z2MU
10:36:17.855 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInput bound to property Z2INPUT
10:36:17.858 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputCD bound to property Z2SICD
10:36:17.860 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputTuner bound to property Z2SITUNER
10:36:17.862 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputDVD bound to property Z2SIDVD
10:36:17.864 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputSATCBL bound to property Z2SISAT/CBL
10:36:17.866 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputMplay bound to property Z2SIMPLAY
10:36:17.868 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputGame bound to property Z2SIGAME
10:36:17.870 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_ZoneTwoInputAux2 bound to property Z2SIAUX2
10:36:17.872 INFO  o.o.b.d.i.DenonGenericBindingProvider[:74]- denon:x4000 item Denon_x4_InternetRadio bound to property IRADIO
10:36:17.884 DEBUG o.o.b.d.internal.DenonBinding[:71]- Denon all bindings changed
10:36:17.886 DEBUG o.o.b.d.internal.DenonBinding[:42]- Denon binding actived
10:36:19.654 DEBUG o.o.b.d.internal.DenonBinding[:107]- Denon binding updated
10:36:19.660 DEBUG o.o.b.d.internal.DenonBinding[:136]- Denon receiver configured at 192.168.1.104
10:36:20.010 DEBUG o.o.b.d.internal.DenonListener[:27]- Denon listener created
10:36:20.035 DEBUG o.o.b.d.i.DenonConnector[:268]- Refreshing Denon status
10:36:20.035 DEBUG o.o.b.d.internal.DenonListener[:70]- Connecting to 192.168.1.104
10:36:20.037 DEBUG o.o.b.d.i.DenonConnector[:281]- Refreshing Main, url: http://192.168.1.104:80/goform/formMainZone_MainZoneXml.xml
10:36:20.046 DEBUG o.o.b.d.internal.DenonListener[:82]- Denon telnet client connected to 192.168.1.104
10:36:20.148 DEBUG o.o.b.d.i.DenonConnector[:295]- Refreshing Main Zone, url: http://192.168.1.104:80/goform/formMainZone_MainZoneXmlStatus.xml
10:36:20.181 DEBUG o.o.b.d.i.DenonConnector[:323]- Refreshing Zone 2, url: http://192.168.1.104:80/goform//formZone2_Zone2XmlStatus.xml
10:36:20.218 DEBUG o.o.b.d.i.DenonConnector[:323]- Refreshing Zone 3, url: http://192.168.1.104:80/goform//formZone3_Zone3XmlStatus.xml
10:36:20.248 DEBUG o.o.b.d.i.DenonConnector[:323]- Refreshing Zone 4, url: http://192.168.1.104:80/goform//formZone4_Zone4XmlStatus.xml



Jeroen Idserda

unread,
Jan 1, 2015, 5:57:52 AM1/1/15
to ope...@googlegroups.com
There's a new build at the pull request, could you try that one?

Jeroen.
...

Maximilian

unread,
Jan 1, 2015, 8:26:48 AM1/1/15
to ope...@googlegroups.com
Hi Joeren,


it seeems to work now. Thanks.

Now finishing the individual config.

Andrea Riela

unread,
Jan 2, 2015, 7:56:07 AM1/2/15
to ope...@googlegroups.com
Hi All,

binding working perfectly with AVR-3311 also. No problems here.

THANK YOU !!!!!

Just seeing some new logs:

2015-01-02 12:51:38.153 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonPower bound to property PW

2015-01-02 12:51:38.268 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonMainZone bound to property ZM

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonVolume bound to property MV

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonMute bound to property MU

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInput bound to property INPUT

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputCD bound to property SICD

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputTuner bound to property SITUNER

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputDVD bound to property SIDVD

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputBluray bound to property SIBD

2015-01-02 12:51:38.269 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputTV bound to property SITV

2015-01-02 12:51:38.270 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputSATCBL bound to property SISAT/CBL

2015-01-02 12:51:38.270 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputMplay bound to property SIMPLAY

2015-01-02 12:51:38.271 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputGame bound to property SIGAME

2015-01-02 12:51:38.272 [INFO ] [.i.DenonGenericBindingProvider] - denon:avr3311 item DenonInputAux1 bound to property SIAUX1


Any idea if this is correct, and in case how to clean?


Another question is regarding volume … is it possible to have the value in dB and not in %? Any suggestion?


Finally, a strange behaviour … after installed the binding, any other app related to my Denon AVR stopped working :) … I don’t know why. Only the web connection is still working properly.


Thanks


Andrea


--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

IFTTT

unread,
Jan 2, 2015, 8:56:49 AM1/2/15
to ope...@googlegroups.com

Hi,

 

I had the same problem with the app.

I guess the receiver can run one tcp connection at a time only.

 

Regards

maximilian

Andrea Riela

unread,
Jan 2, 2015, 10:12:53 AM1/2/15
to ope...@googlegroups.com
Mmm

Don't think so.

I previously used two apps at the same time, no issues like this.

Strange

Andrea

dan cunningham

unread,
Jan 2, 2015, 3:47:16 PM1/2/15
to ope...@googlegroups.com
FYI, my Denon can only handle a single TCP connection as well.  Even the embedded http server can only serve a single request I believe. 

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Jeroen Idserda

unread,
Jan 3, 2015, 6:18:53 AM1/3/15
to
Hi Andrea,

The Denon receivers only support one concurrent telnet connection. The openHAB binding keeps this connection open, so other apps won't be able to use this. The Denon remote app only uses HTTP commands, so that one keeps working. It would be possible for the binding to only use the HTTP api, but then we would have to poll these URL's every second or so.

The information in the logs is normal, it's showing which items are controlled by the Denon binding.

About showing the volume in DB's.. that would be possible with an extra item like this:

Number DenonVolumeDB "Volume [%.1f db]" <denon> (Denon)

And these rules:

rule "DENON Volume to DB"
when
      Item DenonVolume received update
then
      var Number volumeDB = (DenonVolume.state as DecimalType)-80
      postUpdate(DenonVolumeDB, volumeDB)
end

rule "DENON DB to Volume"
when
Item DenonVolumeDB received command
then
        var Number volume = (receivedCommand as DecimalType)+80
        sendCommand(DenonVolume, volume)
end

This item would then have range from -80 to +12. I'm not sure how you can control this item in a sitemap, since the Setpoint item does not support a negative minValue. 

Regards,
Jeroen.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Dieter Knueppel

unread,
Jan 3, 2015, 8:13:27 AM1/3/15
to ope...@googlegroups.com
Sounds great!

This binding is especially needed when powering on/off the receiver which isn't provided via DLNA.
Did it so far discret via HTTP ...

Recently i made some local changes to sonos binding (quite ugly so far).
Sonos already comes along with a DLNA controller, but limited to Sonos devices.

Changes allow to play radio station, musik, ... which is not supported by the Denon proprietary interface as far as i understood.
I also added few Samsung specific DLNA functions to display telefon message box.
Wonder wether a general DLNA binding makes sense, maybe just keep proprietary interfaces out, like Samsung (might become else a quite huge binding).
That would serve quite some devices!

Haven't managed to talk to Sonos binding maintainer so far.

Best regards,
Dieter

ari...@nesys.it

unread,
Jan 4, 2015, 1:17:59 PM1/4/15
to ope...@googlegroups.com
Hi All,

I've created a rule to use Denon and Dune media player at the same time, maybe can help with Sonos and other stuffs ;-)

I've also Sonos at home, but I didn't find any solution to remember the user to switch to Sonos app when Denon has been set as appropriate.

The idea I have for the moment is to set a item when I switch on Denon, and make it visible with a string like "please switch to Sonos app" :-D Aahhahaha not really good indeed :)

Here my rules:

rule "Dune Living"

when

Item Dune_Living received command

then

if(receivedCommand==ON) {

// switch on AVR, set input to BD, switch on Dune HD

sendCommand(DenonPower, ON)

sendCommand(DenonInputBluray, ON)

sendHttpGetRequest("http://192.168.17.10/cgi-bin/do?cmd=ir_code&ir_code=A05FBF00")

} else if(receivedCommand==OFF) {

// turn off Dune HD and AVR

sendHttpGetRequest("http://192.168.17.10/cgi-bin/do?cmd=ir_code&ir_code=A15EBF00")

sendCommand(DenonPower, OFF)

}

end


For the record: Dune HD is quite easy to control via HTTP Binding. You need to know only the ir codes to use. Here the reference:


Maybe I can create a page for Dune in the wiki? Does make any sense?

Thanks

Andrea

ari...@nesys.it

unread,
Jan 4, 2015, 2:37:53 PM1/4/15
to ope...@googlegroups.com

Andrea Riela

unread,
Jan 5, 2015, 5:40:43 AM1/5/15
to ope...@googlegroups.com
Hi All,

I’m struggling to use the Denon Menu commands, without any luck.

Any success on that?

I’m talking about all “MN” commands.

Thanks

Andrea

Andrea Riela

unread,
Jan 5, 2015, 10:46:29 AM1/5/15
to ope...@googlegroups.com
Short update.

MNMEN ON works correctly, MNMEN OFF doesn’t. As also other MN commands, unfortunately :(

Still investigating

Andrea

Andrea Riela

unread,
Jan 5, 2015, 11:21:09 AM1/5/15
to ope...@googlegroups.com
Solved :-)

All commands starting with “MN” work like a charm. In my case (AVR 3311), the command MNMEN OFF is bugged, I’ve solved with a  workaround (sending multiple “Return” commands to close the session).

Here my items:

/* Denon binding */

Switch DenonPower           "Power"            (Denon) {denon="avr3311#PW"}

Switch DenonMainZone        "Main Zone"         (Denon) {denon="avr3311#ZM"}

Dimmer DenonVolume          "Volume [%.1f]"     (Denon) {denon="avr3311#MV"}

Switch DenonMute            "Mute"              (Denon) {denon="avr3311#MU"}


String DenonInput           "Input [%s]"        (Denon) {denon="avr3311#INPUT"}

Switch DenonInputCD         "Input CD"          (Denon) {denon="avr3311#SICD"}

Switch DenonInputTuner      "Input Tuner"       (Denon) {denon="avr3311#SITUNER"}

Switch DenonInputDVD        "Input DVD"         (Denon) {denon="avr3311#SIDVD"}

Switch DenonInputDVR        "Input DVR"         (Denon) {denon="avr3311#SIDVR"}

Switch DenonInputBluray     "Input Bluray"      (Denon) {denon="avr3311#SIBD"}

Switch DenonInputTV         "Input TV"          (Denon) {denon="avr3311#SITV"}

Switch DenonInputSATCBL     "Input SAT/CBL"     (Denon) {denon="avr3311#SISAT/CBL"}

Switch DenonInputMplay      "Input Mediaplayer" (Denon) {denon="avr3311#SIMPLAY"}

Switch DenonInputGame       "Input Game"        (Denon) {denon="avr3311#SIGAME"}

Switch DenonInputAux1       "Input Aux1"        (Denon) {denon="avr3311#SIAUX1"}


Switch DenonMenu "" (Denon) {denon="avr3311#MNMEN"}

Switch DenonRCUp "" (Denon) {denon="avr3311#MNCUP"}

Switch DenonRCDown "" (Denon) {denon="avr3311#MNCDN"}

Switch DenonRCLeft "" (Denon) {denon="avr3311#MNCLT"}

Switch DenonRCRight "" (Denon) {denon="avr3311#MNCRT"}

Switch DenonRCEnter "" (Denon) {denon="avr3311#MNENT"}

Switch DenonRCReturn "" (Denon) {denon="avr3311#MNRTN"}


Switch Denon_RC1_Living  "Menu" (Denon)

Number Denon_RC2_Living  "" (Denon)

Number Denon_RC3_Living  "" (Denon)


rules:

rule "Denon Living Room Remote Control line 1"

        when

                Item Denon_RC1_Living received command

        then

                if(receivedCommand==ON)

                {

                        sendCommand(DenonMenu, ON)

                }

                if(receivedCommand==OFF)

                {

                        sendCommand(DenonRCReturn, ON)

                        sendCommand(DenonRCReturn, ON)

                        sendCommand(DenonRCReturn, ON)

                        sendCommand(DenonRCReturn, ON)

                        sendCommand(DenonRCReturn, ON)

                }

end


rule "Denon Living Room Remote Control line 2"

        when

                Item Denon_RC2_Living received update

        then

                if(Denon_RC2_Living.state == 1)

                {

                        sendCommand(DenonRCUp, ON)

                }

                if(Denon_RC2_Living.state == 2)

                {

                        sendCommand(DenonRCDown, ON)

                }

                if(Denon_RC2_Living.state == 3)

                {

                        sendCommand(DenonRCLeft, ON)

                }           

                if(Denon_RC2_Living.state == 4)

                {

                        sendCommand(DenonRCRight, ON)

                }

end


rule "Denon Living Room Remote Control line 3"

        when

                Item Denon_RC3_Living received update

        then

                if(Denon_RC3_Living.state == 1)

                {

                        sendCommand(DenonRCEnter, ON)

                }

                if(Denon_RC3_Living.state == 2)

                {

                        sendCommand(DenonRCReturn, ON)

                }

end


sitemap:

    Text label="AVR 3311" icon="denon2"{

    Switch item=DenonPower icon="control_standby"

    Switch item=Denon_RC1_Living

    Switch item=Denon_RC2_Living icon="" mappings=[1=" Up ", 2=Down, 3=Left, 4=Right]

    Switch item=Denon_RC3_Living icon="" mappings=[1=Select, 2=Return]

    Selection label="Input" item=DenonInput icon="denon3" mappings=[CD="CD", TUNER="Tuner", DVD="DVD", BD="Bluray", DVR="DVR", TV="TV", "SAT/CBL"="SAT/CBL", MPLAY="Mediaplayer", GAME="Game", AUX1="Aux1"]

    }


Kind Regards

Andrea

Andre Heuer

unread,
Jan 5, 2015, 5:24:21 PM1/5/15
to ope...@googlegroups.com
Hi All,

first: thank you for the Binding!! I really appreciate a Denon Binding!

I roughly tested the binding with my Denon AVR-1912 and it also seems to work (I only tested power and input changes yet). But I´ll continue testing as soon as I find some time :-)

BR
André 

Maximilian

unread,
Jan 6, 2015, 5:02:29 AM1/6/15
to ope...@googlegroups.com
@Andrea

just a side note: I think this should work too and would make it a lot easier to read

rule "Denon Living Room Remote Control line 2"
       
when

               
Item Denon_RC2_Living received command
       
then
               
Switch (receivedCommand)
               
{
                   
case 1 : sendCommand(DenonRCUp, ON)

                   
case 2 : sendCommand(DenonRCDown, ON)

                   
case 3 : sendCommand(DenonRCLeft, ON)

               
}   case 4 : sendCommand(DenonRCRight, ON)

end


I haven't come across the need to use multiple commands per case but calling a script would be an option I guess. 


kind regards

maximilian

Andrea Riela

unread,
Jan 6, 2015, 5:38:52 AM1/6/15
to ope...@googlegroups.com
Hi maximilian,

I really appreciate your help on this.

Unfortunately it doesn’t work:

2015-01-06 11:37:08.403 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule 'Denon Living Room Remote Control line 3': The name 'Switch(<XFeatureCallImplCustom>)' cannot be resolved to an item or type.


maybe something to be imported in my rules?


here what I have at the moment:


import org.openhab.core.library.types.*

import org.openhab.core.persistence.*

import org.openhab.model.script.actions.*

import org.openhab.core.transform.actions.Transformation

import java.util.regex.Pattern

import java.util.regex.Matcher


Thank you


Andrea


--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Maximilian

unread,
Jan 6, 2015, 8:13:11 AM1/6/15
to ope...@googlegroups.com
It works for me in other cases so there must be a mistake somewhere.
Why do you use "" for the first option of the switch ?

Switch
item=Denon_RC2_Living icon="" mappings=[1=" Up ",

maybe thats it ?

Andrea Riela

unread,
Jan 6, 2015, 8:24:54 AM1/6/15
to ope...@googlegroups.com
Strange, same item with my version of the rule works … mmm … let me check better

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Andrea Riela

unread,
Jan 6, 2015, 11:21:04 AM1/6/15
to ope...@googlegroups.com
Now it works :-) it was switch, and not Switch :) heheheh

Thanks for your suggestion, code much better :)

Andrea

Andrea Riela

unread,
Jan 6, 2015, 11:22:20 AM1/6/15
to ope...@googlegroups.com
For the record, two commands seem buggy on my AVR 3311:

MNMEN OFF
MNSRC OFF

both replaced by multiple “Return” commands

Andrea

Jeroen Idserda

unread,
Jan 6, 2015, 4:33:10 PM1/6/15
to ope...@googlegroups.com
Hi Andrea,

Good catch, there was a bug with sending commands that contained spaces. Should be fixed now. There's something wrong with CloudBees at the moment, so you can download a new build here: org.openhab.binding.denon-1.7.0-SNAPSHOT.jar

Regards,
Jeroen.

Andrea Riela

unread,
Jan 7, 2015, 1:25:46 AM1/7/15
to ope...@googlegroups.com
Hi Jeroen,

thanks for your effort.

Unfortunately both OFF commands are still buggy. ON commands work as previous.

Andrea

Jeroen Idserda

unread,
Jan 7, 2015, 2:30:44 AM1/7/15
to
Hi Andrea,

This command does not work like the regular power/mute ON/OFF command at the moment. You need two switches: 

Switch     DenonSetupOn      "Setup"          {denon="avr2000#MNMEN ON"}
Switch     DenonSetupOff     "Exit setup"     {denon="avr2000#MNMEN OFF"}

Regards,
Jeroen.

Andrea Riela

unread,
Jan 7, 2015, 3:19:50 AM1/7/15
to ope...@googlegroups.com
Ah :-)

I was thinking

Switch DenonMenu "" (Denon) {denon="avr3311#MNMEN"}

Switch DenonSSMenu "" (Denon) {denon="avr3311#MNSRC}


should be enough, like


Switch DenonPower       "power" (Denon) {denon="avr3311#PW"}


Let me try with the suggested ones.


Andrea




2015-01-07 8:30 GMT+01:00 Jeroen Idserda <jeroen....@gmail.com>:
Hi Andrea,

How do you specify the items for these commands? They should look like this: 

Switch     DenonSetupOn      "Setup"          {denon="avr2000#MNMEN ON"}
Switch     DenonSetupOff     "Exit setup"     {denon="avr2000#MNMEN OFF"}

Is there any info in openhab.log if you try to set these switches to ON? Before trying please set the loglevel to debug for this binding. 

Regards,
Jeroen.


On Wednesday, January 7, 2015 7:25:46 AM UTC+1, Andrea Riela wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Andrea Riela

unread,
Jan 7, 2015, 3:30:18 AM1/7/15
to ope...@googlegroups.com
Now it works like a charm, also both OFF commands.

Thank you very much

Andrea

Jörg Karsten

unread,
Jan 11, 2015, 6:11:58 AM1/11/15
to ope...@googlegroups.com
The binding works very good . I've changed my HTTP request script completely to the binding.
Only when editing the configuration I had often no more updates. I use the Telnet update methode. A reboot of obenHAB has helps then.

Is it possible to read the media information ? 
I tried the command NSA and NSE.
Especially in connection with http://<AV IP address>/NetAudio/art.asp-jpg or http://<AV IP address>/img/album%20art_S.png

Thank you for the binding !

On Wednesday, December 31, 2014 at 10:04:33 AM UTC+1, Jeroen Idserda wrote:
Hey,

First version of the binding is ready. I've opened a pull request. First version can be downloaded here: org.openhab.binding.denon-1.7.0-SNAPSHOT.

Here's the Wiki page describing the supported commands so far: Denon Binding

Binding should be compatible with previous generation AVR receivers (AVR-X2000/X3000 etc) as well as the current (X2100W/X3100W). Let me know your findings!

Regards,
Jeroen.

ari...@nesys.it

unread,
Jan 17, 2015, 6:46:52 PM1/17/15
to ope...@googlegroups.com
Hi guys,

it seems persistence is not working with this binding. I've tried to maintain the values of

DenonPower

DenonVolume

DenonMute


using persistence with rrd4j and strategy everyChange, restoreOnStartup


No luck, after restarting openHAB I'm missing the previous status.


Any suggestion?


Andrea

Andrea Riela

unread,
Jan 18, 2015, 2:58:41 AM1/18/15
to ope...@googlegroups.com
Hi All,

I made a mistake in my .persist file. Now everything’s working, except the Volume. I don’t find any solution to maintain the Volume value after a openHAB restart, or after a Denon power off.

Investigating

Andrea

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/bSTEfSRt0RU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Andrea Riela

unread,
Jan 18, 2015, 5:20:44 AM1/18/15
to ope...@googlegroups.com
Hi All,

this is working for me (using persistence everyChange restoreOnStartup)  :-)

Dimmer DenonVolume      "volume [%.1f]" (Denon) {denon="avr3311#MV"}

Number DenonVolumedB "[%.1f dB]" (Denon, Persistence)


rule "DENON Volume to DB"

when

      Item DenonVolume received update

then

      var Number volumedB = (DenonVolume.state as DecimalType)-80

      postUpdate(DenonVolumedB, volumedB)

end


rule "DENON DB to Volume"

when

Item DenonPower changed from OFF to ON or

System started

then

Thread::sleep(10000)

        var Number volume = (DenonVolumedB.state as DecimalType)+80

        sendCommand(DenonVolume, volume)

        logInfo("Rule DENON DB to Volume", "completed");

end


sitemap:

Slider item=DenonVolume icon="audio_audio"

Text item=DenonVolumedB


Attached how it looks like ;-)

Regards

Andrea

Andrea

image.jpg

Familie De Waele

unread,
Jan 18, 2015, 6:42:38 AM1/18/15
to ope...@googlegroups.com
hi Andrea ,

I would like to have my HD Dune controlled by Openhab. Could you post the relevant items and sitemaps in order to show how you have realized this? Which commands you are using ...

Thanks for you excellent work !

Regards,

Tijl De Waele

Andrea Riela

unread,
Jan 18, 2015, 7:04:25 AM1/18/15
to ope...@googlegroups.com
Sure, I will put something in the wiki asap

Andrea

Jeroen Idserda

unread,
Jan 20, 2015, 3:36:44 PM1/20/15
to
Thanks everyone for testing!

There's a new build at the pull request that has some added features:

- Optional, only use HTTP to get updates. This leaves the telnet port free for other applications.
- COMMAND property to easily forward commands from scripts/sitemap to your receiver.  
- TRACK, ARTIST and ALBUM properties, useful when playing stuff from the network or USB/iPod.
- SURROUNDMODE property, holding the current surround mode

I've also update the Wiki

Regards,
Jeroen.



Jeroen Idserda

unread,
Jan 20, 2015, 3:43:06 PM1/20/15
to ope...@googlegroups.com
There's still an issue that all properties are reset and not updated after the items file is reloaded. Maybe some other binding devs can help me with this? I've implemented bindingChanged() and all allBindingsChanged().

Here's what happens:
  • Items file is updated
  • bindingChanged() is called in DenonBinding, but itemName is not known to provider yet 
  • processBindingConfiguration() called, adding bindingConfig 
  • bindingChanged() is called again, bindingConfig found, do some magic to fetch item state and calleventPublisher.postUpdate() for this item.
  • non-existing item error
Here's a part of the log:

16:54:50.354 [INFO ] [c.internal.ModelRepositoryImpl:98   ] - Refreshing model 'demo.items'
16:54:50.356 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'demo.items'
16:54:50.356 [DEBUG] [.b.denon.internal.DenonBinding:79   ] - Denon binding changed for item DenonVolume
16:54:50.357 [INFO ] [.i.DenonGenericBindingProvider:74   ] - denon:avr2000 item DenonVolume bound to property MV
16:54:50.357 [DEBUG] [.b.denon.internal.DenonBinding:79   ] - Denon binding changed for item DenonVolume
16:54:50.357 [INFO ] [runtime.busevents             :26   ] - DenonVolume state updated to 42.0
16:54:50.357 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'demo.items'
16:54:50.357 [DEBUG] [ore.internal.items.ItemUpdater:76   ] - Received update for non-existing item: Item 'DenonVolume' could not be found in the item registry

Any thoughts? 

Jeroen.

Andrea Riela

unread,
Jan 21, 2015, 3:31:07 AM1/21/15