[onkyo] Are advanced commands still supported in v2?

Tags: #<Tag:0x00007fe7347929d0>

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

Number  avr1NETPreset  "Number"   (gAvr1NETUSB)  {onkyo="*:avr1:#NTC%01X"}
// 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:


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.

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.

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

and this

==> It is already supported. :slight_smile:

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


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

String avr1Net_Control   "Control"        <text>   { channel="onkyo:onkyoAVR:avr1:netmenu#control" }
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' ]

I will test this later when I have time.

No, it did not work. :disappointed:

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.

I found a workaround. :slight_smile:

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.
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" }

    if ( avr1Net_Item6.state == "My Favorites" ) {
        // NDR2 auswählen
    if ( avr1Net_Item3.state == "NDR 2" ) {
        // NDR2 auswählen
    } 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 :disappointed:
  • no error handling in case the list or the channel do not load

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.


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.

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.

I could live with that. :wink:

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 (205.3 KB)
onkyo_commands_zone2.pdf (125.5 KB)
onkyo_commands_zone3.pdf (91.9 KB)

Thanx a lot for this great binding!