Accessing a DENON x4000 via telnet and TCP binding

4,385 views
Skip to first unread message

rak

unread,
Dec 24, 2013, 9:19:21 AM12/24/13
to ope...@googlegroups.com
Hello guys,

I am using v1.3.1 and I try to access my new AVR DENON x4000 via telnet.

I am new to the TCP binding, so please allow for silly questions ,-).

What I found out is that the DENON telnet client accepts only one command per session. What I need the TCP binding to do is to close the session after each command. How can I do that?

The telnet server on the DENON accepts only a single connection, and apparently only a single command per connection... by this I'm assuming that the telnet client should close connection immediately after receiving the expected response.

What needs to be done:
  • establish telnet session to 192.168.30.51:23
  • send command (full set available here)
  • sometimes retrieve answer from Denon (eg PW? command)
  • get answer back into a string item
  • close connection (at this step I am stuck yet)
I did the following both commands work (ON/OFF) 

Switch Denon_Mute "Denon Mute" <bmute> (All) {tcp=">[ON:192.168.30.51:23:MUON], >[OFF:192.168.30.51:23:MUOFF]"}


openhab.cfg looks like this:

tcp:refreshinterval=250

tcp:queue=true

tcp:buffersize=135

tcp:preamble=''

tcp:postamble='\r'

tcp:blocking=false

tcp:timeout=300

tcp:updatewithresponse=true

tcp:itemsharedconnections=true

tcp:bindingsharedconnections=true

tcp:directionssharedconnections=false


When I 1st start openHAB. Every command via telnet to the Denon after the 1st command fails.

Any help much appreciated.

Kind regards.
Ralf

lbl...@googlemail.com

unread,
Apr 27, 2014, 11:09:12 AM4/27/14
to ope...@googlegroups.com
do you got it working ? i'm also interested to control my denon ;-)

ari...@nesys.it

unread,
Jun 29, 2014, 7:26:02 PM6/29/14
to ope...@googlegroups.com
Same issue here ... can you please share how to send commands to denon other that the first?

Thank you

Andrea

ari...@nesys.it

unread,
Jun 30, 2014, 3:01:05 AM6/30/14
to ope...@googlegroups.com, ari...@nesys.it
FYI this script works ... now we need to do the same with TCP Binding (or create a new Binding for Denon, but I don't have enough skills on Java to do it :( )

#!/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


Message has been deleted

ifttt.ma...@gmail.com

unread,
Jul 1, 2014, 2:50:27 PM7/1/14
to ope...@googlegroups.com
Hi,

having a denon binding would be nice.
I can confirm above experince that a session reset is needed every time a command was sent.

Earlier I already opened this issue:
https://github.com/openhab/openhab/issues/510

Gerhard, who rewrote the Homematic binding also would be interested in creating such binding but does not have time yet.

Kind regards,
Maximilian

(x2000)

ifttt.ma...@gmail.com

unread,
Jul 1, 2014, 2:59:30 PM7/1/14
to ope...@googlegroups.com
es würde neben tcp / ip wohl auch per http oder exec binding funktionieren wenn denon kein eigenes Binding bekommt:
http://knx-user-forum.de/openhab/31763-denon-mit-http-binding-steuern.html

ari...@nesys.it

unread,
Jul 1, 2014, 6:43:53 PM7/1/14
to ope...@googlegroups.com
Well,

what I would like to do, is understand why that script works ... we need to reset the session, I agree ... the question is how ...

Thanks anyway for your answer, Maximilian ... waiting when Gerhard will have enough time to keep an eye on.

Thanks

Andrea

Manolis N

unread,
Jul 6, 2014, 6:24:58 AM7/6/14
to ope...@googlegroups.com
Hi,
I also have a denon x1000 (guess its the same API) and I am interested testing/developing a binder for it. 
Not much free time though, but ping me if you get this binder rolling :-)

Manolis

jkar...@blue-pc.net

unread,
Jul 6, 2014, 11:11:32 AM7/6/14
to ope...@googlegroups.com
Hello,

I have a x3000 and it would be nice to have a Bindung. I Tried the tcp connection too but then i used etheral and logged the http Traffic from the android denon App to the Reciever.
You can read the http request from my Blog http://blue-pc.net/2013/12/28/denon-av-reciever-ueber-http-steuern/
Or See my Opernhaus config to control the Receiver. It Works Good http://blue-pc.net/2014/06/11/denon-av-reciever-mit-openhab-steuern/

Regrads Joerg

Reply all
Reply to author
Forward
0 new messages