Onkyo Zone 2

I’ve had a look at the Onkyo binding on my fresh OpemHab2 install and is works pretty easily.
Unfortunately however, it seems that not all components have been presented.

According to https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java the code for Zone 2 is known and the input should be simple enough to map as new things, presented within OH2.
That said however, https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.onkyo/ESH-INF/thing/thing-types.xml shows that these have not been presented as thing types.

Whilst I can code - I come from a .Net / Windows background and this is currently outside my comfort zone.
Could anyone point me to the list of files that need modifiying to enable the extra “things”?
I suspect there is some file somewhere that mapos the names to constants etc - but I am only starting to getmy head around how OH2 works, so would appreciate a kick in the right direction.

Oncer I have the info, I’d have a crack at adding the new things and potentially pushing a Git update?



I have created the the onkyo binding, but I don’t have set up the Zone 2. Therefore I can not test it.

What you would need to do:

  1. Add the additional channels in the thing-types.xml. Basically you can copy the existing channels and paste them. After that you would need to change the channelId of the new channels. E.g. from <channel id=“power”… to <channel id=“power2”

  2. Add the new channel IDs in OnkyoBindingConstans.java

  3. In the file OnkyoHandler.java, you need to add the new channels in the handleCommand method. Here you can copy&paste the available case statement, adapt the CHANNEL_XXXX and the EiscopCommandRef.XXXX

  4. The you also need to enhance the statusUpdateReceived method in a similar way

  5. In the checkStatus Method you would also need to add the new channels

Please let me know if you have any questions. If this is not successful, I can also try to update the code on myside and push a PR. Then I would need to count on you for testing


Thanks so much - this is awesome.
I’m about to head off for 2 weeks, so won’t have time to code or test changes for a little while. If you manage to push a copy, I’ll more than happily do all the testing when I get back - I have 3 Onkyo receivers to test with.
If not, I’ll have a crack at coding the changes myself - it looks like you provided more than I need to get going.

This is definitely something I will be completing as I am currently wrapping OpenHAB with my Echo dot, Lightwaverf and several Arduino based controllers - hopefully once everything fully configured, I’ll do a show and tell.

One possibility is to use openHAB 1 Onkyo binding on openHAB 2 as it support pretty much all possible functions of the Onkyo receivers (see also advanced command support).

Where can I find the thing-types.xml file? I use OP2 on a raspberry…

And where I can find this java file? :slight_smile:


I’d be happy to test but I don’t know anything about programming, so your assistance would be greatly appreciated.

Zone 2 is all that I am missing for my installation. I use zone 2 on my Onkyo TX NR-646 as a source for my multizone amp. I currently use iRule but I am getting closer to having a complete solution with OH2.

I have updated the binding here: https://github.com/pail23/openhab2-addons/tree/onkyozone2

I would be happy if somebody could test the zone 2. I have also stored the compiled jar file here.

Let me know if it is working.

You are a legend - I’ll test as soon as I am back from my trip. Thanks sooo very much!!

Great!! I would like to test it… but how I can activate this new version/jar in OH2?

You can try to install and the uninstall the existing Onkyo binding in the Paper UI. This will resolve and install the dependencies. After that you can simply drop the new jar file in the addons folder.

@dimes, I uninstalled the OH2 version and saved the .jar test file to my addons folder. I restarted OH2 and the new jar file was recognized as a new “thing”. Everything else works like the released version.

@pail_frank23, As for the test binding, from everything that I tested, zone 2 functions work great! I ran through the power, volume, mute, and input source and all seem to work as advertised.

Thank you!

Hi Frank,

it’s working well!!

An other question… For the input source I am usind following ID’s:

  • 00: DVR/VCR
  • 02: GAME
  • 03: AUX
  • 04: GAME
  • 05: PC
  • 16: BLURAY/DVD
  • 32: TAPE1
  • 33: TAPE2
  • 34: PHONO
  • 35: CD
  • 36: FM
  • 37: AM
  • 38: TUNER
  • 41: USB
  • 42: USB_BACK
  • 43: NETWORK
  • 45: AIRPLAY
  • 48: MULTICH
  • 50: SIRIUS

Which ID I have to use for the source TV?

Kind regards


Have anybody here had a chance to test this binding with new Onkyo TX-RZ series? I have TX_RZ1100 and it works odd with volume control - 100% volume sets volume to 50 in the receiver.
I did not try to pull source code for this jar yet, and just wanted to ask if anybody already had a chance to make a fork or post updated jar anywhere, would hate to spend time reinventing a wheel.

PS. I am doing install from a scratch and after getting setting done not to create items automatically i was able to see where associations between channels and items from ‘onkyo.items’ should be done. But for some reason the only association it allows to make is for the power switch using this item:
Switch onkyoPower “OnkyoPower” { onkyo=“INIT:hometheater:POWER_QUERY, ON:hometheater:POWER_ON, OFF:hometheater:POWER_OFF”} [ “Switchable” ]

None of other channels agrees to bind into any other items.

Does someone have a idea?

Other question: I found here the Onkyo-Binding-Examples. Is it also work with the 2.0 Binding? Because I could found the channel id’s in the paper ui…

No, those examples are fully 1.0 binding specific.

I’m using ARC to link my Onkyo to process audio from the TV and use the CD ID, 35

Does the OH2 Onkyo binding not support serial port? I can’t find a way to specify serial port details, only IP.

Is there a plan to add serial port support to the OH2 binding, or should I just go ahead and use the OH1 binding if I need serial?

OH2 binding doesn’t support serial port communication, but OH1 binding doesn’t support serial either. There is a pull request available for OH1 binding, but it’s not yet committed to the master.

Thanks for the awesome change to control zone 2.

I dropped in the new jar file and it works great. I have three receivers:
TX-NR515 (using zone 2 on this one)

All are working fine, including zone 2 on the TX-NR515.

The only wrinkle I am seeing are some error messages in the log which I suspect are related to NET input when the Track/Album/Artist etc are not available (null value):

2016-11-14 21:44:14.591 [ERROR] [b.binding.onkyo.internal.eiscp.Eiscp] - Event listener invoking error
java.lang.NumberFormatException: For input string: "N/"
at java.lang.NumberFormatException.forInputString(Unknown Source)[:1.8.0_111]
at java.lang.Integer.parseInt(Unknown Source)[:1.8.0_111]
at org.openhab.binding.onkyo.handler.OnkyoHandler.statusUpdateReceived(OnkyoHandler.java:314)[215:org.openhab.binding.onkyo:]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp.waitStateMessages(Eiscp.java:459)[215:org.openhab.binding.onkyo:]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp.access$1(Eiscp.java:338)[215:org.openhab.binding.onkyo:]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp$DataListener.run(Eiscp.java:494)[215:org.openhab.binding.onkyo:]