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:
{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 ?
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.
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.
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
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.
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.
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.