Denon / Marantz 2.0 Binding

And you did not configure the old binding? Telnet only allows 1 connection at a time (at least for the older AVRs), so if there is some other app/process also trying to connect to the AVR that might be causing issues.

I uninstalled the old binding yesterday (since I seemed to be having the same issues with that) and have only been trying to use the new binding since then. I guess I will do a reset of the AVR, I read somewhere that a reset might have fixed a telnet issue for someone else.

What I just noticed is that I might just have to wait a long time before it starts working. The device was off (no standby, the socket itself was turned off), I turned on the socket, the AVR went into standby. I waited about 15-30 seconds, but could not turn the AVR on via binding. I then went into the other room for a while, and tried again, and then it works.

When using the power channel at that time I also get this in the events.log

2018-12-19 12:03:07.932 [hingStatusInfoChangedEvent] - 'denonmarantz:avr:0005cde48008' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to the telnet port. Consider disabling telnet in this Thing's configuration to use HTTP polling instead. to ONLINE

EDIT: Seems like I can reproduce just that. I have to wait a while before I can use the binding to control the AVR. Is that normal? Not sure how long…

Yes, the binding is trying to connect at startup (of OpenHAB or when adding a new Thing). If connection then fails (e.g. due to AVR disconnected from power) it will try each 1 minute to reconnect, to not overload OpenHAB with too frequent reconnection attempts.

Ok. Is there some way that I can manually trigger a connection attempt? For energy saving reasons I have a switch that controls all sockets in the living room (TV, AVR, other receivers). Only when we want to watch something do we turn on the sockets (now using openHAB). It would be great if I could turn on the sockets, then manually tell the binding to connect to the AVR (once that’s ready, not sure how long it takes for the telnet connection to be availabe).

That I don’t know, it is a more general OpenHAB question on how to programmatically suspend and resume a configured Thing. The binding assumes the device is online all the time (standby consumption is very limited I believe (0.5W?), but I understand your desire to bring it down to 0).

See Core feauture request: APIs to suspend a gateway or binding or thing for a similar request.

I won’t bring done the consumption to 0, as the Shelly 1 wifi module that controls the switch which then controls the sockets also consumes some power (<1 W). But I think in total it will use less power than all devices combined (Bluray player, TV receiver, TV, AVR). Also, I don’t have a smart TV yet, so the advantage of controling the socket switch is that when I turn it on, all devices including the TV itself turn on, and once I turn the switch off, the TV of course turns off as well.

So basically there is nothing I can do about that (at max) 1 min delay before I can control the AVR?

Not really at the moment. Even if I would add an ‘enabled’ channel to stop/start polling you need to wait before the AVR itself is online on telnet after powering on.

But that should only take a few seconds, I would think.

Hi JW,
I just managed to setup your binding with a rather old Denon AVR 2805 (it’s from ~ 2004), and the major functions seems to work. The 2805 does not have a network interface, just a plain RS232, so I used ser2net to make the USB serial adapter available for telnet.

For now, I tried the Power (PW), Master Volume (MV) and Main Zone Source Input (SI). The two first work fine (although my neighbors now may ask to set an upper limit to MV…) but SI in your binding has other values than the 2805 supports. Would it be possible to make the input list configurable through the binding?
The 2805 supports PHONO, CD, TUNER, DVD, VDP, TV, DBS/SAT, VCR-1, VCR-2, V.AUX, CDR/TAPE1.

Thank you a lot for your work with this binding! I am sure it will help me a lot!

Kind regards, and Happy Christmas,
SirTwist

Hi,

Happy Christmas to you too!
Good to hear even these old AVRs still somewhat work with this binding.

Customizing the input list will take a lot of time to implement and test. It might be useful to future proof the binding, but I have no idea how to specify such custom lists through openhab. What I’ve seen from other AVR bindings is that those are hard coded and not customizable.
What you could do instead is to use the Command channel to set the inputs, e.g. SIPHONO. However, there is no supported way to receive the current input from the AVR.

Hey JW,
thank you for your fast reply! The idea I had was to implement a configuration field for the thing, similar to the zone count etc. This field should contain a comma separated list of inputs, e.g. “DVD,PHONE,TUNER”.
I suppose that some where in your source you have a list of the current input names. Would it be possible to just expand a configuration field to this string list on thing creation?
Yes, for setting the input channel I will send a pre-defined command. I’m justing writing a small command line utility (for windows) to send a command via REST api (didn’t found anything like that).
I would be happy to test a version with configurable input names :slight_smile:
Happy Silvester!
Sir Twist

I am loving this binding. Noticed one thing and not sure if this can be fixed or should be fixed or is expected. When I use the binding in a sitemap I have a map of the different Input Sources. Like for Game I set to Xbox, etc. However when I’m on the Control page of the browser that gets pre-created automatically by my items, when the page loads and we are using the receiver, it changes to Rapcity or something like that Online Services. Then have to switch it back. Anytime I reload that page it switches back again. Thoughts?

Thanks.

JR

Didn’t get a reply to my last message so maybe wasn’t anything to say or thread not active. Curious if it’s possible to have the volume be a numeric value I can enter rather than a slider. The slider is to inaccurate to move with a finger or mouse and lucky if you can keep it from jumping 4 or 5 decibels between movements.

Or maybe the better question is can you make VolumeDB since it’s a number editable?

Thanks.

JR

@jriker1 Yes, in fact it is already numeric.
You would need to change the UI for the volume control. You can change the item presentation in the Sitemap to a Setpoint.
See https://www.openhab.org/docs/configuration/sitemaps.html#element-type-setpoint

Thanks. OK so it makes it an arrow up and arrow down thing so I can increment. Can’t type it in but that’s more control. But instead of starting at negative 80 or whatever it is the minute I touch one of those up/down arrows it goes from -8.5dB to 0 and the volume is really loud and then can only go up. Have to use the scroller to get it back to the “negative” range. Do I have to manually set min/max and step? If so why didn’t I need to do that with the scroller? Thought somewhere that was configurable in the GUI as well but don’t have it in my setup documents.

EDIT: I got it.

Setpoint item=DenonAVRX2200W_MainZoneVolumeDB label="Volume (dB)" minValue=-80 maxValue=18 step=0.5 visibility=[DenonAVRX2200W_MainZonePower==ON]

Now if I can switch the up and down arrows. Personally used to having volume up on the right and down on the left. At least in my brain. Plus nice if I could hold down the button and it increment in this case but doesn’t look like that works nor does the setFrequency work on this one.

Thanks.

JR

1 Like

Hi There,
Does this work in the meantime ?
I use this binding with my AVRX2000. Everthings works great. Execpt to trigger my favourite Internet Radio Station.
Wierd thing is: If i choose Internet Radio with the Remote for the AVR it works great.
And i see in the log: …Input: Internet Radio but if i choose the Internet Radio via the OpeHab it will not
automaticly play my fav Station…

Br Peter

HI all,
just migrated my Onkyo AVR to Denon over WE. I can confirm this binding to work with my X4500H.
I’m used to have “Profiles” for my favourite AVR settings; somthing like that:

rule "DENON_PROFILE changed"
when Item DENON_PROFILE changed  // by selection HAPpanel
then
  logInfo("rule DENON_PROFILE [" + DENON_PROFILE.state + "] fired ... ")
  // DENON_COMMAND: channel denonmarantz:...:general#command
  if      (DENON_PROFILE.state ==  "MUSIK")
    {
    DENON_COMMAND.sendCommand("PSMULTEQ:FLAT")
    DENON_COMMAND.sendCommand("PSDYNVOL OFF")
    DENON_COMMAND.sendCommand("MSSTEREO")
    // other commands
    }
  else if (DENON_PROFILE.state =  "BLURAY")
    {
    // same DENON_COMMANDs with other parameters...
    }
  // else if ...
end

Just one basic question:
Does this binding work in async or sync mode when sending commands via general#command channel? Do I need Thread::sleep() statements between DENON_COMMANDs ?
Thanks
Hans

1 Like

Hi Hans,

from the binding perspective, there is 1 connection and commands are processed one after another.
When firing many commands at once you’ll need to see whether the AVR can handle such a burst. Maybe it is wise to add some delay anyway, you’ll need to experiment.

HI jwveldhuis,
got it working with Thread::sleep(250). So I can follow settings on AVR display.
According to trace, most commands got response within ~150msec.
Thx&Cheers,
Hans

1 Like