Denon / Marantz 2.0 Binding

OK will try. Thank you.

I’m having trouble with the surround mode - I have the channel mapped to an item, and OpenHAB acts like it’s working (log shows command received, then state changes), but it isn’t actually causing any changes at the receiver, and it isn’t accurately reflecting the real surround mode. Volume, power, and source are working, it’s just surround mode that isn’t, and nothing is being logged showing that OpenHAB knows anything is wrong. This is on an AVR-3313ci

Surround mode is read-only, you can’t change the mode using that channel.
Not sure why it is not reflecting the current mode. You could try to enable debug logging for the binding to see what is happening. Perhaps some mode is used which is yet unknown in the binding, then we need to add it.

oh, that’s too bad. It worked in some earlier versions, didn’t it? At any rate, if it’s read-only, it doesn’t do me any good. My need for it is really niche - kids shows seem to switch their audio mix when the characters are singing, and it kills the volume level, so I need a quick way to change to a simulated surround mode for such shows, even though their audio is digital.

You can still do that using the Command channel and a Rule. I implemented it the same way. Switching between multichannel stereo (avrCmd.sendCommand(“MSMCHSTEREO”) and normal surround avrCmd.sendCommand(“MSSTANDARD”) )

The surround modes were not part of the old binding either, because there are a lot of models out there with each a specific set of surround modes. Too much effort to keep track of all.

Does anyone know why the telnet connection is so buggy? I seem to be getting a lot of this:

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

Sometimes it switchs back to ONLINE


I have a Denon AVR-X1400H, newest firmware.

@sirpreis maybe some networking issue or is it shutting down during standby? Could you somehow monitor the AVR with ping and see if there are any dropouts there?

Might be a network issue, not sure. The AVR is on a different subnet than the openHAB machine, but it does sometimes work, sometimes it doesn’t.

Will try to find out what’s going on.

I can ping the AVR (10.0.40.20) from both my PC (another subnet, 10.0.20.10) and my openHAB machine (10.0.50.10) when the device is in standby. No dropouts ever. Still, the binding says the thing is offline (most of the time, it did work a couple of minutes ago, not sure what happened, but after restarting the AVR, again it’s not accessable via the binding.

I can even use telnet on the openHAB machine to connect to the AVR:

[11:53:10] openhabian@openHABianPi:~$ telnet 10.0.40.20
Trying 10.0.40.20...
Connected to 10.0.40.20.

Any hints?

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.