Denon / Marantz 2.0 Binding

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

HI jwveldhuis,
is this the right place for a RFE?
My X4500H is described as telnet only model. When I request XML structure from
http://AVR-IP:10080/ajax/general/get_config?type=12
I’ll get a lot of informations like

<Audio>
  <SoundMode>Stereo</SoundMode>
  <InputSignal>PCM</InputSignal>
  <SampleRate>88.2kHz</SampleRate>
  <Format>2/0/.0</Format>
</Audio>

As I’m using my AVR often without beamer (just to enjoy) music, it would be great to have a channel like
general#audioinfo String ® (example:“PCM | 2/0/.0 | 88.2kHz”).
Is it possible to extend your binding? Think you already have all binding definitions in place for HTTP based models?
As a workaroud, I implemeted this by constantly polling my AVR with wget, some bash string manipulation and publishing results via MQTT. Integration into your binding would be much more elegant!
Cheers,
Hans
btw : great binding! Working very stable in my environment. Thanks for your work on this binding!

Hi @HansS,

the binding does not use the /ajax API. It would be a big change to add this and not sure how many AVR models would benefit from it. At the moment the binding is generic covering many model years, there is no mechanism in place to allow for model specific extensions.

Hello JW
I am trying to use the “send command” feature in my rules. It works well for action commands but I do not know how to use it for the query commands (for example VSSCH? to request HDMI resolution status)

I am using PaperUI to set the Denon things/channels and I am using denonmarantz_avr_0005cd259f1d_general_command.sendCommand(“VSSCH?”) in my rule but i do not know how to extract the result of that query to process it in my rule.
Any suggestion?
Thanks
Régis

Hi Régis,

a query command is not supported. I could not find a way to implement a query-like feature using a single ‘command’ channel and the rules syntax, you can only send commands, not request a value.
Implementing all possible attributes for all available models as dedicated channel definitions is too much work.
Maybe you can use the HTTP binding in this particular case. Some models have an HTTP API which might be useful to retrieve the values (as XML) you need.

I understand and thank you for this great binding

I have a weird behavior with denon binding. On occasion when I send a switch input command, it switches to the correct input (I could hear it in the room) but then after 5 secondes it switches back to the last input value as you could see in the log

19:24:54.374 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘denonmarantz_avr_0005cd259f1d_mainZone_input’ received command DOCK
19:24:54.376 [INFO ] [arthome.event.ItemStatePredictedEvent] - denonmarantz_avr_0005cd259f1d_mainZone_input predicted to become DOCK
19:24:54.378 [INFO ] [smarthome.event.ItemStateChangedEvent] - denonmarantz_avr_0005cd259f1d_mainZone_input changed from SAT/CBL to DOCK
19:25:01.348 [INFO ] [smarthome.event.ItemStateChangedEvent] - denonmarantz_avr_0005cd259f1d_mainZone_input changed from DOCK to SAT/CBL
19:

Any idea of what can create that strange behavior?

@regissg maybe the HDMI device connected to SAT/CBL is causing this? From your logs it doesn’t look like OpenHAB is sending the command to switch to that input.

It seems that it was a bug in my Denon AVR. I had to unplug the power line and all went of after a cold start

Hi there,

iam using the Binding sucsessfully with mit my Denon X2000.
But can i realize also the keys on the remote ? Like “Setup” “Back” “Up” “Down” and so on ?

Br Peter

Or does the Denon AVR X2000 accept http commands ?
What is the syntax ?

Br Peter

It might, maybe trough /goform/formiPhoneAppDirect.xml?{cmd}
The commands for cursor movement are in here: http://m.us.marantz.com/DocumentMaster/US/Marantz%202014%20NR%20Series%20-%20SR%20Series%20RS232%20IP%20Protocol.xls
E.g. MNCUP, MNCDN, MNCLT, MNCRT, MNENT (enter) MNRTN (back)

For my Marantz SR5008 this is working fine, so you can try to use it with the Command channel.