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

**URL:** <https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446>\
**Category:** Bindings\
**Tags:** onkyo\
**Created:** [February 21, 2019, 7:21pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446 "2019-02-21T19:21:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheNetStriker](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/278dde/32.png) [@TheNetStriker](https://community.openhab.org/u/TheNetStriker)\
**Post date:** [February 21, 2019, 7:21pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/1 "2019-02-21T19:21:26Z")

</div>

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](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](https://github.com/TheNetStriker/openhab2-addons/tree/OnkyoThingAction/addons/binding/org.openhab.binding.onkyo)

And here is a link to the new binding: [Dropbox - Error - Simplify your life](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.

---

<div class="post-metadata">

**Author:** ![Ostseedrache](https://community.openhab.org/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Ostseedrache](https://community.openhab.org/u/Ostseedrache)\
**Post date:** [April 16, 2019, 10:16pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/2 "2019-04-16T22:16:09Z")

</div>

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

thanks,  
mcihael

---

<div class="post-metadata">

**Author:** ![Lukie](https://community.openhab.org/letter_avatar_proxy/v4/letter/l/3e96dc/32.png) [@Lukie](https://community.openhab.org/u/Lukie)\
**Post date:** [April 16, 2019, 10:49pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/3 "2019-04-16T22:49:17Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![TheNetStriker](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/278dde/32.png) [@TheNetStriker](https://community.openhab.org/u/TheNetStriker)\
**Post date:** [April 17, 2019, 8:18am UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/4 "2019-04-17T08:18:07Z")

</div>

@Lukie The change was already merged into the main repository, so this does not need to be tested anymore: [[Onkyo] Thing action to send raw eISCP commands (#4955) · openhab/openhab2-addons@d3126bc · GitHub](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.

---

<div class="post-metadata">

**Author:** ![Ostseedrache](https://community.openhab.org/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Ostseedrache](https://community.openhab.org/u/Ostseedrache)\
**Post date:** [April 17, 2019, 7:33pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/5 "2019-04-17T19:33:58Z")

</div>

@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?  
example:  
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 @Lukie , can we adding “custom buttons” with your solution?  
and when yes, how?

Thanks for your help  
Regards  
Michael

---

<div class="post-metadata">

**Author:** ![TheNetStriker](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/278dde/32.png) [@TheNetStriker](https://community.openhab.org/u/TheNetStriker)\
**Post date:** [April 18, 2019, 10:18am UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/6 "2019-04-18T10:18:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pgruetter](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pgruetter](https://community.openhab.org/u/pgruetter)\
**Post date:** [April 24, 2019, 7:31pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/7 "2019-04-24T19:31:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TheNetStriker](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/278dde/32.png) [@TheNetStriker](https://community.openhab.org/u/TheNetStriker)\
**Post date:** [April 24, 2019, 7:49pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/8 "2019-04-24T19:49:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pgruetter](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pgruetter](https://community.openhab.org/u/pgruetter)\
**Post date:** [April 24, 2019, 8:32pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/9 "2019-04-24T20:32:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TheNetStriker](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/278dde/32.png) [@TheNetStriker](https://community.openhab.org/u/TheNetStriker)\
**Post date:** [April 24, 2019, 9:51pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/10 "2019-04-24T21:51:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pgruetter](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pgruetter](https://community.openhab.org/u/pgruetter)\
**Post date:** [April 25, 2019, 5:18am UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/11 "2019-04-25T05:18:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andreas84](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@Andreas84](https://community.openhab.org/u/Andreas84)\
**Post date:** [June 22, 2019, 9:15am UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/12 "2019-06-22T09:15:49Z")

</div>

Hi,  
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

Item

```
Switch Onkyo_StartRadio "Starte TuneIn"

```

Rule

```
rule "Starte TuneIn"
when 
Item Onkyo_StartRadio received command
then
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")
Thread::sleep(3000)
// select input NET
onkyoActions.sendRawCommand("SLI", "2B")
Thread::sleep(3000)
// start tune in radio directly = 0E (0 no user info)
onkyoActions.sendRawCommand("NSV", "0E0")
Thread::sleep(5000)
// select first entry (= my presets)
onkyoActions.sendRawCommand("NLS", "I00001")
Thread::sleep(1000)
// select third entry (= rautemusik rock)
onkyoActions.sendRawCommand("NLS", "I00003")
}
end

```

This guide helped me a lot

> **[Onkyo / Pioneer network remote control (eISCP protocol)](http://vtochq-it.blogspot.com/2018/12/onkyo-pioneer-network-remote-control.html)**
>
> Remote control Onkyo/Pioneer from CLI and other Main task - automatically turn on TuneIn radio from CLI and Home Assistant. By defau...

---

<div class="post-metadata">

**Author:** ![Andreas84](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@Andreas84](https://community.openhab.org/u/Andreas84)\
**Post date:** [June 22, 2019, 7:27pm UTC](https://community.openhab.org/t/onkyo-testers-for-thing-action-to-send-raw-eiscp-commands/68446/13 "2019-06-22T19:27:33Z")

</div>

Addition:

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?
