# \[onkyo\] Are advanced commands still supported in v2?

**URL:** <https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554>\
**Category:** Bindings\
**Tags:** onkyo\
**Created:** [May 17, 2017, 10:21pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554 "2017-05-17T22:21:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [May 17, 2017, 10:21pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/1 "2017-05-17T22:21:00Z")

</div>

With openHAB1 I had an item wich let me select a specific preset i defined in my favourites list.

```csv
Number avr1NETPreset "Number" (gAvr1NETUSB) {onkyo="*:avr1:#NTC%01X"}

```

```javascript
// Change radio channel
if (avr1NETPreset.state == 1) {
	logInfo("SwitchChannel", "Schalte um zu NDR 2")
	sendCommand(avr1NETPreset, 4)
}
else {
	if (avr1NETPreset.state != 1)
	{
		logInfo("SwitchChannel", "Schalte um zu 1LIVE")
		sendCommand(avr1NETPreset, 1)	
	}
}

```

This worked fine.

Now I want to migrate to openHAB2.

But I cannot find an according channel for this function.

This does not seem to work:

```csv
{channel="onkyo:onkyoAVR:avr1:#NTC%01X"}

```

I cannot find anything about “preset” in the documentation or the source code.  
Does anybody know if this is even supported in the v2 binding?  
Could this be added?  
@pail_frank23 ?

This my relate to all [Advanced commands](https://github.com/openhab/openhab1-addons/tree/master/bundles/binding/org.openhab.binding.onkyo#advanced-commands).

---

<div class="post-metadata">

**Author:** ![darksoul666](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@darksoul666](https://community.openhab.org/u/darksoul666)\
**Post date:** [May 24, 2017, 4:42am UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/2 "2017-05-24T04:42:43Z")

</div>

I am interested too in a solution for this. I have an OH2 installation and an onkyo receiver.  
But found no way to select predefined tuner channels via OH2.

---

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [May 24, 2017, 2:10pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/3 "2017-05-24T14:10:45Z")

</div>

I just looked again at the source code.

This time I looked for something that comes close to the advanced command `#NTC%01X` I mentioned above.

I found this

> <https://github.com/openhab/openhab2-addons/blob/50f7f662b4e5cf9f99b0c9a3e64f7097357d17e4/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java#L67>

and this

![](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/6/64be68d84b8989af089560afdf318c07210b61f8.png)

==\> It is already supported. 🙂

Looking at the doc again, I realized it is actually mentioned.

![](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/5/5cbcc784de1c91cfe226627d201171dc527d49f1.png)

# Conclusion

So I guess this should do the trick. (copied from the official documentation)

```csv
String avr1Net_Control "Control" <text> { channel="onkyo:onkyoAVR:avr1:netmenu#control" }

```

```php
Selection item=avr1Net_Control mappings=[ Up='Up', Down='Down', Select='Select', Back='Back', PageUp='PageUp', PageDown='PageDow', Select0='Select0', Select1='Select1', Select2='Select2', Select3='Select3', Select4='Select4', S
elect5='Select5', Select6='Select6', Select7='Select7', Select8='Select8', Select9='Select9' ]

```

```php
avr1Net_Control.sendCommand("Select1")

```

I will test this later when I have time.

---

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [May 24, 2017, 11:17pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/4 "2017-05-24T23:17:40Z")

</div>

No, it did not work. 😞

```auto
20x2017-05-25 01:12:29.278 [ItemStateChangedEvent] - avr1Net_Selection changed from 6 to 1
20x2017-05-25 01:12:46.977 [ItemStateChangedEvent] - avr1Net_Title changed from NET: NE to NET: Last.fm Internet Radio

```

Instead of switching to my preconfigured favourit “last.fm” was selected from the list of availabe services.

So we still need a developer to look into it.

---

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [May 31, 2017, 5:15pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/5 "2017-05-31T17:15:52Z")

</div>

I found a workaround. 🙂

In my case I want to switch back an forth between two radio channels I saved as a Favorite.

To change the channel I replicate the steps I would do with the remote.

1. press “back” to return to the favorites list
2. select the item my channel is stored at.

```csv
String avr1Net_Control "Control" <remote> { channel="onkyo:onkyoAVR:avr1:netmenu#control" }
String avr1Net_Item0 "Item0 [%s]" <text> { channel="onkyo:onkyoAVR:avr1:netmenu#item0" }
[..]
String avr1Net_Item3 "Item3 [%s]" <text> { channel="onkyo:onkyoAVR:avr1:netmenu#item3" }

```

```php
    avr1Net_Control.sendCommand("Back")
    Thread::sleep(6000)

    if ( avr1Net_Item6.state == "My Favorites" ) {
        // NDR2 auswählen
        avr1Net_Control.sendCommand("Select6")
        Thread::sleep(1000)
    }
    if ( avr1Net_Item3.state == "NDR 2" ) {
        // NDR2 auswählen
        avr1Net_Control.sendCommand("Select3")
    } else {
        logWarn("SwitchChannel", "Kann NDR 2 nicht finden. (avr1Net_Item3: " + avr1Net_Item3.state + ")")
    }

```

This script checks if the current list is the list you expect before selecting the channel. It’s possible you are one level up and have to select the favorites list first.

Known limitations:

- time out may need to be tweaked or even replaced by a while loop to wait until the list is loaded
- loading the list(s) needs a few seconds 😞
- no error handling in case the list or the channel do not load

---

<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:** [July 11, 2017, 6:45pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/6 "2017-07-11T18:45:12Z")

</div>

Did you ever find out if the advanced commands are supported?

I’m trying to adjust the center level according to some rules and looking at the source code, I don’t think it’s supported. So currently I don’t have a workaround for that.

---

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [July 11, 2017, 8:35pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/7 "2017-07-11T20:35:50Z")

</div>

No.

I am still hoping someone with knowledge (@pauli_anttila ?) will look at the problem and solve it.

btw: My workaround did not work very well.  
But I did not spent much time for it.

---

<div class="post-metadata">

**Author:** ![pauli\_anttila](https://community.openhab.org/user_avatar/community.openhab.org/pauli_anttila/32/37061_2.png) [@pauli\_anttila](https://community.openhab.org/u/pauli_anttila)\
**Post date:** [July 13, 2017, 9:31am UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/8 "2017-07-13T09:31:44Z")

</div>

Advanced commands are not supported by the 2.0 binding. It’s rather challenging to support those, because OH2 channels are “statically” linked to different item types (Switch, Number, Dimmer, etc).

So most probably it’s easier to do native support for dedicated features than try to implement advanced command support.

---

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [July 13, 2017, 7:03pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/9 "2017-07-13T19:03:42Z")

</div>

I could live with that. 😉

---

<div class="post-metadata">

**Author:** ![fuslwusl](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/e0b2c6/32.png) [@fuslwusl](https://community.openhab.org/u/fuslwusl)\
**Post date:** [December 14, 2018, 9:24pm UTC](https://community.openhab.org/t/onkyo-are-advanced-commands-still-supported-in-v2/28554/10 "2018-12-14T21:24:55Z")

</div>

If there was native support for most of the “advanced commands” this would be fine.  
I marked the missing commands with “ToDo” in the tables. Would be great if a developer could help to update the binding to get more out of the onkyos!  
I will help if someone can give me an example and tell me where to add the commands in the java files.

[onkyo\_commands\_main.pdf](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/2/a/2a3fb8f81ddc8ead9c17cc7587804eaa36181c3e.pdf) (205.3 KB)  
[onkyo\_commands\_zone2.pdf](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/9/d/9df823c6194c0e36d4785231452d4587fe1e6b88.pdf) (125.5 KB)  
[onkyo\_commands\_zone3.pdf](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/2/c/2cbc79b95fe0b47a9326f0badf50bc38c314dd11.pdf) (91.9 KB)

Thanx a lot for this great binding!
