-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Comments
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 |
Count me in. I have a marantz SR5009 |
@orificer @neohusky will do, thanks for the offer! It will take some time before I have something working. Have a Marantz SR5008 myself. |
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) |
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. |
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. 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 😉 ) |
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 😃 |
@idserda @tmrobert8 @orificer if you could do me a favor and collect input for auto discovery? I hope it is similar to mine, e.g. 'serial number'@{Marantz/Denon} {Model}
|
Here you go, seems to match the format:
|
Looks identical:
|
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. |
Status update: Still a lot of work remaining. Due to the different concepts in OH2 a lot of refactoring is needed. Also want to implement telnet as follows: 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). |
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 ;) Commit containing the changes: TODO
What should work
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 ;) |
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? |
Server version: avahi 0.6.31; Host name: openHABianPi.local
|
Hello guys, I would really appreciate your help, thanks. |
@stotz89 the binding is still needs some work to use it in 'production'. 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. |
@jwveldhuis Did you find time to continue working on the binding? |
@JannikJung not yet, will try to find out how to publish the current version for testing. |
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 |
@idserda thanks, will also get rid of the Apache TelnetClient as you mentioned to be problematic. |
#2859 |
jar file of DenonMarantz 2.0 binding (BETA, work in progress!) Put this jar file in You all are very welcome to test this binding and let me know any issues or suggestions. |
@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:
|
@jwveldhuis 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 - ) As soon as I have some more time to test, I will report. But for the first build looks quiet promising. |
@jwveldhuis 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. |
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! |
@pabloNZ what do you mean with a .things file? Do you mean a .items file? This is my current list of items (you can copy the channels in Paper UI -> Things -> "Your Receiver"). marantz.items
and this is the relevant part of my sitemap (still trying how to best present the receiver) default.sitemap
in a .rules file you can send commands (See reference documents linked at the old binding wiki) |
@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. |
Ok, well I just discovered some exceptions might go unnoticed.. The polling is done in a separate Thread using a So thank you for reporting this, definitely a bug I need to address! |
ah - good to know I'm not crazy! |
@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. |
It ran, and Trace showed a few updates, one for each zone, it looked like, then threw this error: all the details are here The binding hasn't logged anything since except in response to my actions. |
@mishakim interesting, thanks. BTW, this error is not logged by the code I added. It would have looked like this:
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. <item>
..
<VolumeDisplay>
<value>Absolute</value>
</VolumeDisplay>
<MasterVolume>
<value>-58</value>
</MasterVolume>
..
</item> i.e. the volume starts is offset with 80 (0 = -80 dB). |
Zone3 looks like this: Right before the latest version of that error, it logged this: |
PS, I'm not sure why I'm not getting line breaks inside my code tags here |
@mishakim Please do the following: Still a bit clueless under what circumstances this error occurs. |
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) |
Ok, I can reproduce your issue. Will check what to do about this, but for sure it's a configuration issue on your end.. ;) |
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 ...) |
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. |
Well, that was 4 hours well spent 😛 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.. ;) |
Hi, I have this warning every time restart Openhab:
it is normal? or something wrong. P.S. - I use manually created items. |
I've just checked it at my setup and can see some additional messages at every restart of openhab (AVR-X3400H with telnet connection):
|
@grzegorz914 @orificer that's normal:
Will see where I can change the |
Hello, OK understod,
|
@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. |
Will it be possible to change more detailed setups like the dialog/subwoofer level adjust? |
@IceBrainzz for now you can use the |
@jwveldhuis |
@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. |
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! |
I'm pleased to announce the DenonMarantz binding got merged into the next 2.3.0 version of OpenHAB! Thanks all for giving feedback! I'm closing this issue now, as it was related to the binding under development. |
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! |
@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.
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. |
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! |
Hi could anyone help me? Thanks! edit: I found an error into log:
but I've got added the binding and it is under "Configuration - Bindings" Or is that the old one? |
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:
/usr/share/openhab2/addons
The text was updated successfully, but these errors were encountered: