Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Denon/Marantz 2.0 Binding #2204

Closed
jwveldhuis opened this issue Apr 25, 2017 · 140 comments
Closed

[WIP] Denon/Marantz 2.0 Binding #2204

jwveldhuis opened this issue Apr 25, 2017 · 140 comments
Labels
new binding If someone has started to work on a binding. For a new binding PR.

Comments

@jwveldhuis
Copy link
Contributor

jwveldhuis commented Apr 25, 2017

Hi all,

I started to work on a 2.0 Binding for Denon/Marantz AVR's. The 1.x Binding created by @idserda isn't working OK in OH2 and it doesn't seem like an easy upgrade to 2.0 from the existing code base, so I decided to start from scratch (and of course will reuse bits and pieces of the controlling logic were possible, the code of the 1.x Binding is well written).
Let me know if someone else already started on this so we can collaborate.

As I did not develop any OH Binding before, so it will take me some time to get acquainted with the development process. Already got the IDE up and running and a skeleton binding working (thanks to the excellent documentation on docs.openhab.org and eclipse.org/smarthome 👍)

I'm looking at the existing Pioneer, Yamaha and Onkyo Bindings for inspiration.
When the time is there I need testers, as I only own 1 Marantz AVR myself ;)

Any advice I should look into before starting the implementation?


Update - 30 December 2017

The binding is almost finished and I'll sent it in for review soon.
In the meantime you can install the binding manually:

@GRORI
Copy link

GRORI commented Apr 26, 2017

Hi jwveldhuis,

I've never did anything like developing a binding, but I have a Denon X4300H and a running OH 2 instance at home. Please contact me if You think Your binding is ready to be tested.

BR
GRORI

@neohusky
Copy link

Count me in. I have a marantz SR5009

@jwveldhuis
Copy link
Contributor Author

@orificer @neohusky will do, thanks for the offer! It will take some time before I have something working. Have a Marantz SR5008 myself.

@tmrobert8
Copy link

If you need a tester - I have a denon 5200w that I'd love to automate but haven't had the time to write a binding for. Likewise feel free to bounce stuff off me if you need (I've done 4 bindings now)

@idserda
Copy link

idserda commented Apr 26, 2017

The current 1.x binding should work fine with 2.0, what problems are you having? Some minor issues do not really justify a complete rewrite 😃 If you want to add auto discovery and conform to the 2.0 item/channel structure however creating a 2.0 binding sounds like a good plan. I would reuse all the parts off the current binding that handle communication with the receiver (telnet listener and creating/parsing the XML http-messages) and create a new Handler to communicate it all back/from OH2. Let me know if you have any questions, I'd be happy to test the new binding.

@jwveldhuis
Copy link
Contributor Author

Hi @idserda! Well, the telnet connection didn't work at all for me in OH2 and lot's of others complained in the community about not getting it to work. Not sure what really causes those issues, but thought it would be good anyway to get it 2.0 ready and debug along the way.
Working on auto discovery now. My SR5008 responds to mDNS 😄 so I think it will not be that hard.

While I was digging more into the code today I can see your 1.x binding is structured really well, so the 'from scratch' comment is not so much applicable anymore. And the protocol is stable indeed, no need to do any rewrites there. I think 80-90% of the code can be ported with minor modifications (and of course will leave the authors credits 😉 )

@idserda
Copy link

idserda commented Apr 26, 2017

Ok great stuff! Telnet works in 2.0 with a Denon AVR-X2000, maybe there are some subtle differences in the Marantz receivers (or something else is using the telnet connection, most receivers only support one concurrent connection).

Very cool that auto discovery is already working! Defining the things/channels probably takes a bit more time 😃

@jwveldhuis
Copy link
Contributor Author

@idserda @tmrobert8 @orificer if you could do me a favor and collect input for auto discovery?
What is the output for the following command (Linux, preferably from the box running OpenHAB):
$ avahi-browse -kv _raop._tcp
(you might need to install the avahi-utils package)

I hope it is similar to mine, e.g. 'serial number'@{Marantz/Denon} {Model}
This is mine:

Server version: avahi 0.6.32-rc; Host name: openhab2.local
E Ifce Prot Name                                          Type                 Domain
+ enp0s10 IPv4 0006781D58B1@Marantz SR5008                   _raop._tcp           local

@idserda
Copy link

idserda commented Apr 30, 2017

Here you go, seems to match the format:

Server version: avahi 0.6.32-rc; Host name: fruitschaal.local
E Ifce Prot Name                                          Type                 Domain
+    br0 IPv4 0005CD3AB07D@Denon AVR-X2000                  _raop._tcp           local

@GRORI
Copy link

GRORI commented Apr 30, 2017

Looks identical:

Server version: avahi 0.6.31; Host name: Pi-Prod.local
E Ifce Prot Name                                          Type                 Domain
+   eth0 IPv4 0005CD75215C@Denon AVR-X4300H                 _raop._tcp           local

@jwveldhuis
Copy link
Contributor Author

Thanks guys for the prompt response! This is great news, it means both the Denon and Marantz (when 'Airplay capable') can be discovered like this.

@jwveldhuis
Copy link
Contributor Author

Status update:
-Discovery is working like a charm! I'm using the serial number to prevent duplicate results.
-Changed the telnet client loop to use a BufferedReader, to prevent chopped / incomplete commands from being processed
-Defined channels
-Lot's of testing around properly disconnecting / disposing the connection (updating the Thing is triggering a dispose->initialize on the Handler)

Still a lot of work remaining. Due to the different concepts in OH2 a lot of refactoring is needed.
E.g. dedicated ThingHandler vs Binding handling multiple instances.
Trying to find some way to represent the State of the AVR and trigger the Handler using a 'StateChangeListener', e.g. have an object with all fields with the properties of the AVR. When a property is updated (to a different value) it should trigger the Handler which then can send the appropriate 'sendUpdates'. Something like that was done in the old binding, but it's implementation is scattered over the different parts of the 1.x Binding. That's part of the puzzle that's fun to solve, but it will take some more time to come up with a proper implementation.

Also want to implement telnet as follows:
-if telnet is enabled, try to use it.
-if it fails, fall back to HTTP polling until telnet is available

With OH1 I was using a telnet multiplexer (simple python script), which I connected to the AVR. The multiplexer can handle multiple concurrent connections, so I had OH1 connected to the mulitplexer and could still use the dedicated remote control apps (requiring telnet) on my phones and tablets (also connected to the multiplexer).

@martinvw martinvw added the new binding If someone has started to work on a binding. For a new binding PR. label May 20, 2017
@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Jun 5, 2017

I'm too busy these days to make good progress on this binding. It is a lot more work than I initially hoped it would be (also because I started to refactor more and more ;) ). I will still continue to work on it, though thought it was a good moment to push some the current work to my own fork ;)
https://github.com/jwveldhuis/openhab2-addons/tree/denon-marantz-binding

Commit containing the changes:
https://github.com/jwveldhuis/openhab2-addons/commit/99af48b9947071d4d9b0b226f591ad0490b6c4b9

TODO

  • support changing the input & surround mode (want to gather the list of values from the .xml and offer those as 'StateOption's to populate the selects in the Paper UI with available values.
  • support for custom commands
  • implement the telnet command listener (need to do rewriting of existing code)
    (so telnet does currently not work, it does not react on state changes)

What should work

  • discovery
  • volume, mute, power control for Main Zone, and Zone 2/3 (zone 2 and 3 controls only added when available)
  • when telnet is set to disabled (in config) it should update the state of the AVR (including input, surround mode)

It's definitely not ready yet to use 'in production', but if someone wants to test the 'what should work' list above or wants to provide early feedback, don't hesitate ;)

@GRORI
Copy link

GRORI commented Jun 6, 2017

I do not have a lot of time at the moment, too. But I think I will be able to find the time to to a short test of the "what should work" list.

As this is the first binding where I want to test at an early state of the development: Is there a short summary what I need to do to get the needed jar file out of the two links posted by jwveldhuis?

@jacksteraz
Copy link

Server version: avahi 0.6.31; Host name: openHABianPi.local
E Ifce Prot Name Type Domain

  • eth0 IPv4 0005CD38A1EF@Denon AVR-X3000 _raop._tcp local

@stotz89
Copy link

stotz89 commented Aug 22, 2017

Hello guys,
I really want to add the binding to my openHAB2 installation. The problem is, I have no idea how...Could you give me a hint how to do it?
I installed openHAB2 on ubuntu. My /usr/share/addons folder contains two files (openhab-addons-2.1.0.kar and openhab-addons-legacy-2.1.0.kar).
I cloned the repository already but I have no clue how I can add the new denon/marantz binding so that I can see/use it in PaperUI or HABmin.

I would really appreciate your help, thanks.

@jwveldhuis
Copy link
Contributor Author

@stotz89 the binding is still needs some work to use it in 'production'.
I believe the jar files for bindings under development are generated once a pull request is done against the master repository, hopefully will have time next month to pick up work on this binding.

If you want to try out the current version you need to run OpenHAB using the Eclipse IDE: http://www.eclipse.org/smarthome/documentation/development/ide.html and switch the repository to my fork.

@JannikJung
Copy link

@jwveldhuis Did you find time to continue working on the binding?

@jwveldhuis
Copy link
Contributor Author

@JannikJung not yet, will try to find out how to publish the current version for testing.

@idserda
Copy link

idserda commented Oct 23, 2017

I made a small change to the 1.x binding, it now sends commands over the telnet connection too. Before, it would always use the http interface to issue commands, but not all receivers supported this. You might want to use this in the 2.x binding too. PR is here: openhab/openhab1-addons#5342

@jwveldhuis
Copy link
Contributor Author

@idserda thanks, will also get rid of the Apache TelnetClient as you mentioned to be problematic.

@jwveldhuis
Copy link
Contributor Author

#2859
Just submitted initial PR for the new binding, hope it will generate the required jar files to enable testing by others (because it's not perfect yet).
Discovery, Telnet and HTTP control should work, as well as sending a custom command through the 'command' Channel.

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Nov 20, 2017

jar file of DenonMarantz 2.0 binding (BETA, work in progress!)
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.denonmarantz/2.2.0-SNAPSHOT/org.openhab.binding.denonmarantz-2.2.0-SNAPSHOT.jar

Put this jar file in /usr/share/openhab2/addons and go to the Inbox in Paper UI

You all are very welcome to test this binding and let me know any issues or suggestions.

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Nov 21, 2017

@orificer @stotz89 @neohusky @tmrobert8 @jacksteraz @JannikJung @idserda

The binding is ready to be tested (finally found time and motivation to continue, sorry for the wait)

Some remarks:

  • the surround mode is read only currently (you can use the 'command' channel to send any command, including the command to change the surround mode)
  • the set of inputs is a fixed list (so in Paper UI there is a dropdown selection to pick an input), I'm in doubt whether this is a good approach: too many options for most receivers and I maybe missed inputs for new receivers.
  • number of zones is auto detected via HTTP. For Telnet-only connections I did not implement a way to detect the number of zones. The Channels for Zone 2 and 3 are automatically added when detected. For Telnet this functionality probably isnt working correctly.
  • for Telnet, there is no periodic polling (I removed dependencies to HTTP following the change @idserda made to the 1.x binding to support telnet-only receivers). This results in actions not getting confirmed, e.g. set receiver input to 'NONEXISTING' it keeps that value despite it didn't change as the input didn't exist. Thinking about a solution for this, maybe query the state through telnet on regular basis.

@stotz89
Copy link

stotz89 commented Nov 21, 2017

@jwveldhuis
Thanks a lot for your effort.

I just had a quick look at it. I downloaded it and added it to my add-on-folder. Discovery of my Marantz NR1604 worked perfectly. Both zones were recognized. (Btw my openHAB runs on openHAB 2.1.0 - release build - )
I also linked all channels to an item. Worked also fine. I only tested some commands like switching on/off, volume +/-, mute on/off, mainzone on/off. Everything worked as expected.

As soon as I have some more time to test, I will report. But for the first build looks quiet promising.
Thanks!

@b8rother
Copy link

@jwveldhuis
Great work on the binding.

I have installed the binding on openHAB 2.2.0 and I'm using Denon AVR-X2200W. All the configuration that I'm doing is via PaperUI.
Discovery of the Thing works great. Linking of the Channels for Main Zone and Zone2 (AVR-X2200W has got only 2 zones) are working as expected and Controls are working fine. I have tested all switches (Power, Main Volume, Input source) and String fields (Now playing - artist, track, album, Surround program) and they are working fine.

@pabloNZ
Copy link

pabloNZ commented Nov 24, 2017

Works very well with my Denon X3200W with auto detection through PaperUI. Do you have any notes on how to set up a .things file appropriately? Thanks for all the hard work!

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Nov 24, 2017

@pabloNZ what do you mean with a .things file? Do you mean a .items file?
I don't use Paper UI to link items to things, I exclusively use text based files (as I was used to with OpenHAB 1.x and had bad experience with having a mixed approach)

This is my current list of items (you can copy the channels in Paper UI -> Things -> "Your Receiver").
Note some Channels are only shown when clicking Show More, especially the :command channel)

marantz.items

Switch marantz_power    "Receiver" <switch>         {channel="denonmarantz:avr:0006781d58b1:power"}
Dimmer marantz_volume   "Volume"   <soundvolume>    {channel="denonmarantz:avr:0006781d58b1:mainVolume"}
Switch marantz_mute     "Mute"     <mute>           {channel="denonmarantz:avr:0006781d58b1:mute"}
Switch marantz_z2power  "Zone 2"                    {channel="denonmarantz:avr:0006781d58b1:zone2Power"}
String marantz_input    "Input [%s]"                {channel="denonmarantz:avr:0006781d58b1:input" }
String marantz_surround "Surround: [%s]" <surround> {channel="denonmarantz:avr:0006781d58b1:surroundProgram"}
String marantz_command                              {channel="denonmarantz:avr:0006781d58b1:command"}

and this is the relevant part of my sitemap (still trying how to best present the receiver)

default.sitemap

...
Group item=marantz_input label="Receiver" icon="receiver" {
  Default   item=marantz_power
  Default   item=marantz_mute      visibility=[marantz_power==ON]
  Setpoint  item=marantz_volume    label="Volume [%.1f]" minValue=0 maxValue=40 step=0.5  visibility=[marantz_power==ON]
  Selection item=marantz_input     mappings=[TV=TV,MPLAY=Kodi]  visibility=[marantz_power==ON]
  Default   item=marantz_surround  visibility=[marantz_power==ON]
}
...

in a .rules file you can send commands (See reference documents linked at the old binding wiki)
Example to switch to MULTI CH STEREO:
sendCommand(marantz_command,"MSMCH STEREO")
or
marantz_command.sendCommand("MSMCH STEREO")

@pabloNZ
Copy link

pabloNZ commented Nov 25, 2017

@jwveldhuis With some of my other OH2 bindings you can set up .things files for them so that you don't have to use PaperUI to discover anything.

Your example items are helpful though, thanks for sharing.

@jwveldhuis
Copy link
Contributor Author

Ok, well I just discovered some exceptions might go unnoticed.. The polling is done in a separate Thread using a ScheduledExecutorService. I don't check for the result while it seems that is required, let me check this, will get back to you.
Background: https://stackoverflow.com/a/24902026/2486310

So thank you for reporting this, definitely a bug I need to address!

@mishakim
Copy link

mishakim commented Feb 5, 2018

ah - good to know I'm not crazy!

@jwveldhuis
Copy link
Contributor Author

@mishakim try with this jar, I included error reporting for the polling: https://www.dropbox.com/s/14mnyjkcfzuw2vl/org.openhab.binding.denonmarantz-2.3.0-SNAPSHOT.jar?dl=0 If this helps to find the issue I'll add it to the binding.

@mishakim
Copy link

mishakim commented Feb 5, 2018

It ran, and Trace showed a few updates, one for each zone, it looked like, then threw this error:
2018-02-05 16:02:28.945 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/denonmarantz:avr:0005cd2f3f4a/config' java.lang.IllegalArgumentException: Value must be between 0 and 100

all the details are here

The binding hasn't logged anything since except in response to my actions.

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Feb 5, 2018

@mishakim interesting, thanks. BTW, this error is not logged by the code I added. It would have looked like this:

2018-02-05 21:38:33.007 [ERROR] [.c.h.DenonMarantzHttpConnector:130  ] - Error while polling Http: "Error Message" Stacktrace: 
....

Still, this piece of log you shared is exactly what I need. So it seems the value for Zone3 Volume is not in the 0 to 100 range, that is causing an error.
For me http://<AVR-IP>/goform/formZone3_Zone3XmlStatusLite.xml (well for zone 2, I don't have 3 zones) it looks like this:

<item>
..
  <VolumeDisplay>
    <value>Absolute</value>
  </VolumeDisplay>
  <MasterVolume>
    <value>-58</value>
  </MasterVolume>
..
</item>

i.e. the volume starts is offset with 80 (0 = -80 dB).
I guess for your model it displays the relative volume. In the code the 80 offset is substracted, which leads to the issue you have.
What is the value for <VolumeDisplay> in your case? (Nevermind that, it is only showing the preference as configured in Setup -> Volume, it is not affecting the volume, at least not for my Marantz SR5008)
What is the value for <MasterVolume> for you?

@mishakim
Copy link

mishakim commented Feb 5, 2018

Zone3 looks like this:
<?xml version="1.0" encoding="utf-8" ?> <item> <Power><value>OFF</value></Power> <InputFuncSelect><value>HDRADIO</value></InputFuncSelect> <VolumeDisplay><value>Relative</value></VolumeDisplay> <MasterVolume><value>-34</value></MasterVolume> <Mute><value>off</value></Mute> </item>

Right before the latest version of that error, it logged this:
2018-02-05 16:43:55.534 [DEBUG] [nmarantz.handler.DenonMarantzHandler] - Received state OFF for channelID zone3Power 2018-02-05 16:43:55.535 [DEBUG] [nmarantz.handler.DenonMarantzHandler] - Received state 46 for channelID zone3Volume 2018-02-05 16:43:55.536 [DEBUG] [nmarantz.handler.DenonMarantzHandler] - Received state -34 for channelID zone3VolumeDB
so it seems like it is correctly getting both decimal and dB volume numbers, but the dB isn't being handled right somewhere?

@mishakim
Copy link

mishakim commented Feb 5, 2018

PS, I'm not sure why I'm not getting line breaks inside my code tags here

@jwveldhuis
Copy link
Contributor Author

@mishakim Please do the following:
-remove the Thing
-enable TRACE log for the binding (not sure it will add anything useful up to this point)
-re-add the Thing
-share the full log from the moment you added the Thing until the error occurs

Still a bit clueless under what circumstances this error occurs.

@jwveldhuis
Copy link
Contributor Author

And, what is your Item definition? Did you perhaps assign a Dimmer type Item to the Zone3VolumeDB channel? (That would be wrong, Dimmer is for the non-dB channels, Number is for the dB channels)

@jwveldhuis
Copy link
Contributor Author

Ok, I can reproduce your issue.
It is caused when you assign a Dimmer item to the Number channel (which is not possible in the Paper UI, but possible when using the .items files).
E.g.
Dimmer test "test" {channel="denonmarantz:avr:0006781d58b1:zone2VolumeDB"}
This breaks the binding..

Will check what to do about this, but for sure it's a configuration issue on your end.. ;)

@mishakim
Copy link

mishakim commented Feb 5, 2018

Yep, Zone3VolumeDB was a dimmer, I fixed that now. My various items were created in PaperUI, most were created from the Thing page by creating items within the channels. I also used Habmin for some setup, I don't recall if that's where I crated the zone 3 db volume dimmer.

I fixed the zone 3 item before removing and reading the Thing, then realized I'd broken logging completely in my attempt to create a separate file for denon. I fixed logging and restarted, and all seems to be working -- updates seem to be posting (I'll check power as soon as the kid's show is over ...)

@mishakim
Copy link

mishakim commented Feb 5, 2018

re-read your note about PaperUI, I think I must have created the volume dimmer in HabMin, when I hadn't figured out the "show more" to see the volume channels in Paper UI. It let me get away with it, and silently broke.

@jwveldhuis
Copy link
Contributor Author

Well, that was 4 hours well spent 😛
@mishakim thanks for your input on this, it helps to make this better!

At the others: sorry for the spam in this thread, next time will search for an other place to do 1-on-1 issue resolution.. ;)

@grzegorz914
Copy link

grzegorz914 commented Feb 8, 2018

Hi,

I have this warning every time restart Openhab:
(AVR-X6300H with Telnet connection)

2018-02-08 08:18:37.739 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Command for channel surroundProgram not supported.

it is normal? or something wrong.

P.S. - I use manually created items.

@GRORI
Copy link

GRORI commented Feb 8, 2018

I've just checked it at my setup and can see some additional messages at every restart of openhab (AVR-X3400H with telnet connection):

openhab.log:2018-02-08 08:28:59.176 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Command for channel album not supported. openhab.log:2018-02-08 08:28:59.175 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Command for channel artist not supported. openhab.log:2018-02-08 08:28:59.177 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Command for channel track not supported. openhab.log:2018-02-08 08:28:59.179 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Unsupported command REFRESH for channel command openhab.log:2018-02-08 08:28:59.173 [WARN ] [nmarantz.handler.DenonMarantzHandler] - Command for channel surroundProgram not supported.

@jwveldhuis
Copy link
Contributor Author

@grzegorz914 @orificer that's normal:

  • for Http mode refreshing individual items is disabled (by default all items will be polled/refreshed every 5 seconds), to prevent flooding the AVR with too many requests (I already had to power-cycle my AVR during testing.. ;) )
  • some Items are read-only, like artist. So probably persistence is used to set the Item to the last-known state at restart of OpenHAB. The binding can't push those back to the AVR (at least not Artist / Track / Album).

Will see where I can change the WARN to DEBUG to avoid confusion.

@grzegorz914
Copy link

grzegorz914 commented Feb 8, 2018

Hello,

OK understod,
other thongs if I change to HTTP mode then get this error (OFFLINE-COMMUNICATION ERROR):

2018-02-08 11:42:52.423 [hingStatusInfoChangedEvent] - 'denonmarantz:avr:xxxxxxxxx' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): IO error while connecting to AVR: Server returned HTTP response code: 403 for URL: http://192.168.1.6:8080/goform/formMainZone_MainZoneXml.xml

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Feb 8, 2018

@grzegorz914 jep.. that's what you get with HTTP on a Heos model. Once the binding is accepted we can think about adding HTTP support for those. Need to find out what are the common HTTP / xml pages which can be used by all models. It's too much work now to cover that.

I'm aware of https://github.com/scarface-4711/denonavr/blob/master/denonavr/denonavr.py, there the approach is different.

@IceBrainzz
Copy link

Will it be possible to change more detailed setups like the dialog/subwoofer level adjust?

@jwveldhuis
Copy link
Contributor Author

@IceBrainzz for now you can use the command Channel to set anything that the protocol allows. Reading those properties is not supported currently. You could use the Http Binding to fetch these if you really want to.
There are hundreds of settings, only the most common are implemented.

@IceBrainzz
Copy link

@jwveldhuis
As far as I know the HTTP interface is “disabled” for all Heos-based models (for example the X3400, which I have). When I try to open the IP of the AVR in a browser it gives me a 403 Forbidden,
But for now the already implemented features are working like a charm, thank you for that.

@jwveldhuis
Copy link
Contributor Author

jwveldhuis commented Feb 11, 2018

@IceBrainzz I meant the HTTP Binding, not the Http mode, to pull specific info from the receiver into openhab. It won’t be easy, but it’s possible.
On your model there is something possible on port 8080.

@Mr-Eskildsen
Copy link

Mr-Eskildsen commented Mar 4, 2018

I have an older Denon with only the serial interface. I have managed to setup an ESP8266 as a serial to Wifi gateway, and the Binding connects to the gateway as a charm. Awesome!
@pabloNZ asked for the .things sample back in november. In case he didn't figure it out, mine is here:
Thing denonmarantz:avr:avr3805-livingroom "Denon: AVR3805" @ "Denon" [ host="192.168.1.92", telnetEnabled=true ]
If you need to set other/more parameters, find the names in the xml file in the code, where the parameters is defined.
Change avr3805-livingroom to match your own name, and use that in the .items file.
Remeber to change the host to something apropriate.

@jwveldhuis
Copy link
Contributor Author

I'm pleased to announce the DenonMarantz binding got merged into the next 2.3.0 version of OpenHAB! Thanks all for giving feedback!
Important: during review I had to change the names of the channels, this will impact everyone upgrading to the new binding. The channels make use of so-called 'channel groups' now. This leads to different names, e.g. general#power instead of power and zone2#volume instead of zone2Volume.
Please have a close look at the updated README.md file here: https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.denonmarantz/README.md

I'm closing this issue now, as it was related to the binding under development.

@gooman-uk
Copy link

Any chance of making the receiver display brightness (the DIM command) available as a channel, rather than just as a command?

If it were a channel, it would be easy to add to HABpanel ... but as a command I can't even conceive how to begin!

@jwveldhuis
Copy link
Contributor Author

@davidgurr no not planning to implement that. Note that a command is one-way only, so you should be able to send the brightness but can't request the current state of the brightness. Lookup the command to send in the Protocol documentation.
Probably it's one of these:

DIM BRI
DIM DIM
DIM DAR
DIM OFF

My Marantz SR5008 doesn't support this so can't test this myself.


General remark: this issue has been closed. Please raise a new issue or open a topic in the Community instead of commenting on this one.

@gooman-uk
Copy link

Yep, got the DIM commands working fine on my NR1506. From the command documentation, it looks like "DIM ?" should return the status, but I guess you don't have plans to support that either ... no biggy. Great work on the binding anyway!

@desidia-pura
Copy link

desidia-pura commented Oct 6, 2018

Hi could anyone help me?
I've OH2 and installed at first the version from OH MArket (I think a modulation from OH1)
That version founds my Marantz NR1504 but by adding to things I've got the error 409 - Conflict.
I've googled and found this binding. I uninstalled the first version. I add the *jar file into the addons Folder from the second post.
after restart it found my Marantz NR1504 but the same problem.
After clicking "Add to things" I get the error 409 - Conflict and there's no marantz thing.
How could I use it now? :-\

Thanks!

edit: I found an error into log:

2018-10-06 20:31:52.668 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type denonmarantz:avr.

but I've got added the binding and it is under "Configuration - Bindings"

Or is that the old one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

No branches or pull requests