Has anyone actually used an Onkyo as an Audio Sink? I have it set as default in Paper UI, and when I run this at the console, nothing happens:
smarthome:audio play doorbell.mp3
I assume there is something I am supposed to do on the Onkyo, or have it set on some kind of input channel, for it to work. Does anyone have a working config I can see?
Would anyone be willing to offer a bounty for this functionality? Being able to directly use an Onkyo from OH2 as an audio sink has a substantial number of advantages. I would contribute a few dollars to a bounty on this.
openhab> smarthome:audio
Usage: smarthome:audio play <sink> <filename> - plays a sound file from the sounds folder through the optionally specified audio sink(s)
Usage: smarthome:audio stream <sink> <url> - streams the sound from the url through the optionally specified audio sink(s)
Usage: smarthome:audio sources - lists the audio sources
Usage: smarthome:audio sinks - lists the audio sinks
openhab> smarthome:audio sinks
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:000420225bf1
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:0004202641ce
enhancedjavasound
webaudio
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:08626626d6e7
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:0004202269ed
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:0004201ed6e0
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:0004201b7734
kodi:kodi:285515eb-b31c-7cf4-7b87-a19928548675
squeezebox:squeezeboxplayer:0326298C-2279-4B11-A38D-30E70B6972CE:000420226485
onkyo:onkyoUnsupported:4fb0f6ef-76f6-efb9-66ff-ef0976b97fc6
javasound
openhab> smarthome:audio play kodi:kodi:285515eb-b31c-7cf4-7b87-a19928548675 doorbell.mp3
Worked like a charm, but then I noticed the Onkyo line and gave it a go:
openhab> smarthome:audio play onkyo:onkyoUnsupported:4fb0f6ef-76f6-efb9-66ff-ef0976b97fc6 doorbell.mp3
Just as I thought nothing would happen, the file played after ~3s.
Looking at my TV, the input source had changed to DLNA.
Even when already on the DLNA input, a second attempt was just as slow to start.
The Kodi sink was instantaneous.
My Onkyo is a TR-NR636
SW versions are:
2.2.0-SNAPSHOT Build #1048
187 â Active â 80 â 2.2.0.201709261356 â Onkyo Binding
Fantastic news. I was unable to get this to work but it was on a much earlier build. I am traveling this week but will give it a test next week when I am home!
I’ve got a TX-NR525 and it registered as a audio sink without problem. When I’m trying to play audio via the console (smarthome:audio play doorbell.mp3) my onkyo even switches channels and indicates it’s playing something but I can’t hear anything. So looks like for each of us it breaks in a different way. .
Sorry for resurrecting this 7 years old thread, but did anybody have luck to use Onkyo receiver as audio sink?
I have my Onkyo configured in OH4 and I can control it (power on/off, change volume etc), but nothing happens when I try to play a sound.
It’s funny you posted this. I was going to do the same thing last weekend. I was unable to get the audio sink working with my tx-nr555.
From what I was able to understand from my readings it looks like the feature is quite broken.
Eventually I realised the amp has chromecast built in. This worked for me with a small delay (but my preference would have been to use the onkyo binding)
Well, maybe it is not broken, maybe it works for some receivers. I’d like to know if anybody got this working. It would be werid if the feature somebody has implemented had never worked.
Unfortunately my tx-nr646 does not have chromecast, as far as I know.
I had some time recently to made few experiments with the binding. Here are the findings:
Onkyo binding uses UPnP transport to play streams (and sounds), so I guess it requires UDN set in thing configuration. I had my receiver configured by file, no “udn” parameter, just ip and port (like in the documentation).
I prepared a rule to test audio sink, it has just “playStream” in the body. I also tested “playSound”, but for most of the tests I used known external (and also internal) stream, to simplify test case (sounds are played as streams served by OH instance). I tested the stream on my PC and worked well.
Setting UDN did not help. I enabled TRACE for Onkyo and UPnP transport and I found “Could not find an upnp device for participant ‘’” entry in the log.
I removed file configuration and discovered it in UI. No difference, still “Could not find …”.
I decided to set up new OH instance on my desktop for further debugging.
On the new instance there is no such log message, it seems that receiver is playing something, but no sound from the speakers. There are notifications in the log:
Received status update from Onkyo Receiver @192.168.10.166:60128: data=[command=NTM, value=00:00:05/--:--:--]
Received command NETUSB_SONG_ELAPSEDTIME
Converted data '00:00:05/--:--:--' to openHAB state '00:00:05/--:--:--' (class org.openhab.core.library.types.StringType)
After 5 seconds it receives
Received status update from Onkyo Receiver @192.168.10.166:60128: data=[command=NST, value=Sxx]
Received command NETUSB_PLAY_STATUS
and it stops showing NETUSB_SONG_ELAPSEDTIME notifications, I guess it stopped playing for some reason.
I realized that there is also UPnPControl binding that also registers audio sinks for discovered UPnP devices. My Onkyo got discovered by the binding, I added it and tested in the same way like Onkyo. It behaved in the same way as Onkyo binding, which is not a surprise, as it uses the same transport for playing streams.
So I suspected that Onkyo has broken UPnP support, to prove that I used Media Player on my Windows PC and BubbleUPnP app on Android. Both worked well: I was able to play streams (local UPnP library) on the receiver. Moreover, OH was receiving notifications about playing time as well as other information: title, author, album. Sound is OK, it does not stop after 5 seconds.
Other observations:
sometimes the receiver hangs and further actions are ignored, power cycle (removing plug from the socket) helps
it seems that several subsequent commands may hang the receiver, looks like UPnP commands are executed asynchronously by OH and Onkyo does not like it
Summary: it seems that UPnP transport in OH is not compatible (broken?) with Onkyo receivers (at least mine TX-NR646). I am not sure how to debug this further, so likely I will just give up on this.
Today I spent several hours on debugging Onkyo binding. By comparing commands sent by Media Player and the binding I discovered that the problem in my case is empty CurrentURIMetaData element in setAVTransportURI command (in this line). Apparently Onkyo requires it to play external streams. As Media Player has in this field many values (this is embedded XML) I did many tries to remove as many items from the metadata as possible and finally got simplest value that make my Onkyo play streams.
After that I made a quick fix for the binding to try different functions: say, playSound, playStream. All of them worked flawlessly.
EDIT:
After furter debugging it turned out that multiple network interfaces on OH machine cause problems.
I resolved this by specifying allowed interface for UPnP as described in the docs: EXTRA_JAVA_OPTS="-Dorg.jupnp.network.useInterfaces=<iface>"