[Onkyo] Testers for Thing action to send raw eISCP commands

I’ve just finished a change to the Onkyo binding. I’ve added a rule action that can be used to send raw eISCP commands to the receiver, so everyone is able to send commands that are not directly supported by the channels on the binding.

Here are my changes: https://github.com/TheNetStriker/openhab2-addons/commit/5c2aa881f9e44fe10be7a14b55498656986a2734

I use this action to change the volume level on the center channel when watching movies because most movies have low volume on the center channel. And If I want to watch a movie during the night I can compensate for this without having to raise the main volume too much and without having to search through all the menus to change this.

Please see the chapter “Rule Actions” in the readme how to use this: https://github.com/TheNetStriker/openhab2-addons/tree/OnkyoThingAction/addons/binding/org.openhab.binding.onkyo

And here is a link to the new binding: https://www.dropbox.com/s/t6jhsn0ysnhy1nd/org.openhab.binding.onkyo-2.5.0-SNAPSHOT.jar?dl=0

I hope to find some testers for this because this would help getting the changes merged into the main Openhab repository.

1 Like

Hi David,
i want to install, but don’t know if i need to uninstall xurrent onkyo binding or not.


@TheNetStriker I just saw this and am excited because I have an Onkyo receiver and would like to change radio stations using the binding so I am excited someone is looking at improving on the current binding.

Have you received any feedback yet on your request for testers?

@Lucas The change was already merged into the main repository, so this does not need to be tested anymore: https://github.com/openhab/openhab2-addons/commit/d3126bc75f5adb33c14cdc68713d08439a6d2bc5#diff-7d78ce628e8f664df0c1e8406ce867f8

@Ostseedrache You can uninstall the current binding in the Paper UI in the addons menu. You should also find plenty of threads in this forum describing how to install a custom binding. Or you could simply wait for the next release.

@TheNetStriker Thanks for your response.
Installing wasn’t a problem.
So i uninstalled now and reinstall with option to copy the jar into the addon directory.

next step is using the rule action. but how?
i can’t find a option to using it with the rule editor. so i can using your solution only with a text file in rules directory?
but what should be the trigger?
I’m trying to send the command to using TuneIn directly.
Like when i’m finish to see film on tv, i want change to “Net” -> to “Spotify”.
So, i’m the “trigger” and nothing else
I found the command with the eISCP python solution and can send it with “NSV0E0” (NSV0 is the command and E0 = 14 = TuneIn). it works with “onkyo NSV0E0”
So, like the question from @Lucas , can we adding “custom buttons” with your solution?
and when yes, how?

Thanks for your help

With my changes I also updated the readme of the binding. You can already read how to use this on the official binding page: https://www.openhab.org/addons/bindings/onkyo/#rule-actions

This is awesome! I found your post because I have the exact same requirement with the volume of the center channel being too low.

Unfortunately, I’m strugging with the sendRawCommand. In Visual Studio, it shows me that the method is undefined. If I save and test it anyway, I get the following output in the openhab.log:

'sendRawCommand' is not a member of 'org.eclipse.smarthome.core.thing.binding.ThingAc
tions'; line 8, column 5, length 42

I’m on openhab 2.4.0-1 (Ubuntu) with onkyo binding version 2.4.0.
Any ideas?

You need to install the latest snapshot version of the Onkyo binding. This will be published with Openhab 2.5.

Alright, now it worked. Thanks a lot!
On the documentation page I just saw a version “2.3” and “latest” and assumed latest means 2.4.

Is it correct, that there’s no way to get values back from the receiver? I see in the Excel sheets that you can send “QSTN” to get the current values. But the method sendRawCommand doesn’t have a return type. Is there any other way?

Anyway, being able to send these commands is a huge help, thanks for your work.

No it is not possible to get the answer from the receiver with this function. The communication is done with a tcp socket, so the function would have to wait until the receiver sends the response and send that back. I found no function for this in the binding. At the moment the responses from the receiver are are processed asynchronous and I don’t know if it would break anything if this would be changed.

OK, thanks for the comment, would probably break a lot changing that then. I should get pretty far with sending only.

I just wanted to let you know that I got it working with My Onkyo TX-NR555 connected via Ethernet
It was always annoying to power it up, select net, select tunein, than to select my presets, then to select my favorite radio station. This is working flawlessly now


Switch Onkyo_StartRadio "Starte TuneIn"


rule "Starte TuneIn"
Item Onkyo_StartRadio received command
if (receivedCommand == ON) {
logInfo("test", "TuneIn Starting")
val onkyoActions = getActions("onkyo","onkyo:TX-NR555:b0e71434-0034-14BB-b000-0009b0e71434")
// turn it on
onkyoActions.sendRawCommand("PWR", "01")
// select input NET
onkyoActions.sendRawCommand("SLI", "2B")
// start tune in radio directly = 0E (0 no user info)
onkyoActions.sendRawCommand("NSV", "0E0")
// select first entry (= my presets)
onkyoActions.sendRawCommand("NLS", "I00001")
// select third entry (= rautemusik rock)
onkyoActions.sendRawCommand("NLS", "I00003")

This guide helped me a lot


I found out, that sometimes the order of the rules seem not to be executed sequentially.
Sometimes it opens spotify, (NET Menu entry number 3), so the last command ( “NLS”, “I00003”) seems to be executed before TuneIn is started. I even raised the time to 10 seconds (Thread.sleep), but still happening sometimes. Is that possible? Does Thread.sleep also pause the socket connections to the receiver? Shall I use timers?

Would it be possible to change the sendRawCommand to be executed blocking? Or maybe accepting a bunch of commands, that it executes sequentially?