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.
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:
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”
Add the new channel IDs in OnkyoBindingConstans.java
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
The you also need to enhance the statusUpdateReceived method in a similar way
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).
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.
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.
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.
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.
I dropped in the new jar file and it works great. I have three receivers:
TX-NR515 (using zone 2 on this one)
TX-NR525
TX-NR656
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:2.0.0.201610231822]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp.waitStateMessages(Eiscp.java:459)[215:org.openhab.binding.onkyo:2.0.0.201610231822]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp.access$1(Eiscp.java:338)[215:org.openhab.binding.onkyo:2.0.0.201610231822]
at org.openhab.binding.onkyo.internal.eiscp.Eiscp$DataListener.run(Eiscp.java:494)[215:org.openhab.binding.onkyo:2.0.0.201610231822]