[pulseaudio] How to properly specifiy a PulseAudio Sink in a Things file for OpenHAB 3.2.0

Dear community,

My OpenHAB 3.2.0 server does not have a sound card but a PulseAudio RTP sink which is accessible by the PulseAudio binding in OpenHAB.

I have no particular java sinks:

openhab> openhab:audio sinks                                                                
* System Speaker (enhancedjavasound)
  Web Audio (webaudio)

In contrast, here is the PulseAudio RTP sink:

openhab@openhab:~$ pactl -s 127.0.0.1 list sinks
Ziel #0
	Status: RUNNING
	Name: rtp
	Beschreibung: RTP Multicast Sink
	Treiber: module-null-sink.c
	Abtastwert-Angabe: s16le 1ch 16000Hz
	Kanalzuordnung: mono
	Besitzer-Modul: 10
	Stumm: nein
	Lautstärke: mono: 32768 /  50% / -18,06 dB
	        Verteilung 0,00
	Basis-Lautstärke: 65536 / 100% / 0,00 dB
	Quellen-Monitor: rtp.monitor
	Latenz: 18534 usec, eingestellt 40000 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Eigenschaften:
		device.description = "RTP Multicast Sink"
		device.class = "abstract"
		device.icon_name = "audio-card"
	Formate:
		pcm

When outputting audio via System Speaker (enhancedjavasound), OpenHAB does not make use of the PulseAudio sink. From what I understood is that the java audio sinks are different so that a link between PulseAudio sinks and java audio sinks may be missing.

When using the Karaf console and entering the command

openhab:audio play doorbell.mp3

I receive the following output:

2022-03-30 17:39:06.389 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%
2022-03-30 17:39:06.415 [ERROR] [nternal.javasound.JavaSoundAudioSink] - An exception occurred while playing audio : 'Cannot create AudioDevice'

When I try to specify the PulseAudio sink with the Thing name:

openhab:audio play pulseaudio:sink:local:rtp doorbell.mp3

I do not receive any output in the log file.

When I try to send TTS speech output

openhab:voice say hello

then I receive:

2022-03-30 17:19:21.714 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%
2022-03-30 17:19:21.718 [WARN ] [audio.internal.javasound.AudioPlayer] - No line found: No line matching interface SourceDataLine supporting format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, 8000.0 frames/second, little-endian is supported.
2022-03-30 17:49:26.671 [INFO ] [audio.internal.javasound.AudioPlayer] - Available lines are:
<empty>

I searched the forum and found very outdated information. Does anybody have a hint as how to further continue?

Best regards,
Peter

Hello,
This command should show the pulseaudio sink.
If not, then it’s not properly created, or enabled (via the activateSimpleProtocolSink parameter), or it is misconfigured.
(I suppose, relatively to your other topic, that it’s because of the parameter activateSimpleProtocolSink is incorrectly parsed)

openhab:audio play doorbell.mp3

This command will use the default openHAB sink, which you can choose in the Audio part of the configuration UI (in mainUI). Your sink should be shown here in the dropdown list (as stated above, it is the same output as the openhab:audio sinks command, and if not present, then it’s not properly initialized)

If you can’t chose a sink in the list, then you don’t have any, and you will have the kind of error you get with the voice or play command, it is a “normal” behavior.

Hi Gwendal,

Thank you very much for your comments. After removing the quotation marks around the port number from the activateSimpleProtocolSink parameter in the Thing definition, the audio sinks could be detected.

However, there is still an issue. I have totally 7 audio sinks defined in pulseaudio.things. They all follow the same syntax, but only a portion of them is shown in the Karaf console. After a reboot, another portion of them is shown. When checking the AirPlay receivers, I can see that only a portion of the AirPlay receivers belonging to the same MusicCenter are shown. When I wait a while, the remaining AirPlay receivers are also shown.

When checking the AirPlay sinks via “pactl list sinks”, they are immediately visible,without delay. So I do not understand why they are not shown immediately in OpenHAB.

Another issue is that the name of the AirPlay sinks have an enumerator included that causes a random assignment to my Things each time after start. This applies of course only to the MusicCenter having multiple AirPlay receivers. Is there a way to link the Thing to a description field because this is unique?

During startup, I receive the following exceptions related to pulseaudio:

2022-03-31 18:54:54.511 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:407) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:54:55.523 [WARN ] [pulseaudio.internal.PulseaudioClient] - Socket exception while sending pulseaudio command: Socket closed
2022-03-31 18:54:56.033 [ERROR] [pulseaudio.internal.PulseaudioClient] - Socket Closed
java.io.IOException: Socket Closed
	at java.net.AbstractPlainSocketImpl.getInputStream(AbstractPlainSocketImpl.java:486) ~[?:?]
	at java.net.Socket$2.run(Socket.java:943) ~[?:?]
	at java.net.Socket$2.run(Socket.java:941) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at java.net.Socket.getInputStream(Socket.java:940) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.sendRawRequest(PulseaudioClient.java:640) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.listModules(PulseaudioClient.java:173) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.update(PulseaudioClient.java:148) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.findSimpleProtocolTcpModule(PulseaudioClient.java:428) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:402) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:54:56.550 [ERROR] [pulseaudio.internal.PulseaudioClient] - Socket Closed
java.io.IOException: Socket Closed
	at java.net.AbstractPlainSocketImpl.getInputStream(AbstractPlainSocketImpl.java:486) ~[?:?]
	at java.net.Socket$2.run(Socket.java:943) ~[?:?]
	at java.net.Socket$2.run(Socket.java:941) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at java.net.Socket.getInputStream(Socket.java:940) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.sendRawRequest(PulseaudioClient.java:640) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.listModules(PulseaudioClient.java:173) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.update(PulseaudioClient.java:148) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.findSimpleProtocolTcpModule(PulseaudioClient.java:428) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:402) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:54:57.057 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:407) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:54:58.068 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.lambda$2(PulseaudioClient.java:434) ~[?:?]
	at java.util.Optional.map(Optional.java:265) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.lambda$1(PulseaudioClient.java:434) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632) ~[?:?]
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) ~[?:?]
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:548) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.findSimpleProtocolTcpModule(PulseaudioClient.java:435) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:402) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
==> /var/log/openhab/events.log <==
2022-03-31 18:54:58.079 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'localtime' changed from 2022-03-31T18:54:48.682+0200 to 2022-03-31T18:54:58.716+0200
==> /var/log/openhab/openhab.log <==
2022-03-31 18:54:59.081 [WARN ] [pulseaudio.internal.PulseaudioClient] - Socket exception while sending pulseaudio command: Socket closed
2022-03-31 18:54:59.588 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:407) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:55:01.613 [ERROR] [pulseaudio.internal.PulseaudioClient] - Socket Closed
java.io.IOException: Socket Closed
	at java.net.AbstractPlainSocketImpl.getInputStream(AbstractPlainSocketImpl.java:486) ~[?:?]
	at java.net.Socket$2.run(Socket.java:943) ~[?:?]
	at java.net.Socket$2.run(Socket.java:941) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at java.net.Socket.getInputStream(Socket.java:940) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.sendRawRequest(PulseaudioClient.java:640) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.listModules(PulseaudioClient.java:173) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.update(PulseaudioClient.java:148) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.findSimpleProtocolTcpModule(PulseaudioClient.java:428) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:402) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:55:02.126 [ERROR] [pulseaudio.internal.PulseaudioClient] - Socket is closed
java.net.SocketException: Socket is closed
	at java.net.Socket.getInputStream(Socket.java:933) ~[?:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.sendRawRequest(PulseaudioClient.java:640) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.listModules(PulseaudioClient.java:173) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.update(PulseaudioClient.java:148) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.findSimpleProtocolTcpModule(PulseaudioClient.java:428) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseaudioClient.loadModuleSimpleProtocolTcpIfNeeded(PulseaudioClient.java:402) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler.getSimpleTcpPort(PulseaudioHandler.java:375) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.PulseAudioAudioSink.connectIfNeeded(PulseAudioAudioSink.java:95) [bundleFile:?]
	at org.openhab.binding.pulseaudio.internal.handler.PulseaudioHandler$1.run(PulseaudioHandler.java:124) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2022-03-31 18:55:02.225 [WARN ] [pulseaudio.internal.PulseaudioClient] - The pulseaudio binding tried 3 times to load the module-simple-protocol-tcp on random port on the pulseaudio server and give up trying
2022-03-31 18:55:02.732 [WARN ] [pulseaudio.internal.PulseaudioClient] - The pulseaudio binding tried 3 times to load the module-simple-protocol-tcp on random port on the pulseaudio server and give up trying

Hello again,

I see that you opened other posts and issue, and I have some difficulties to follow your current state on this subject.
Do you still have this issue ?
If so, does it always happen or does it work sometimes ?
And are the errors on the log systematic at startup ?
It could be a network error. You could try to put a greater value on the socket timeout (it’s an option in the 3.3 version). Also, the 3.3 version has a better exception handling than the 3.2.

Or it could a “bad luck” with the port assignement retry system. The binding choose a random port to load the simple-protocol-tcp module on the server. You can force the port if you know one that is free on your server (it’s the Simple Protocol Port parameter). Be careful, each sink needs a dedicated port, so don’t use the same.

For other people reading this, this issue is addressed here.

1 Like

Hi Gwendal,

Thank you very much for your comments. Indeed, the reported issue with the exception during startup is still there. Please be rest assured that I keep track on the reported issues so that I update the posts once there is progress. I think the least I can do when asking for help and receiving it is to describe which remedy solved the problem.

Your information was very valuable:

Thanks to your comment that each audio sinks requires a unique simpleProtocolSinkPort, I checked for the ports already used in my system:

# check which ports are open to identify free ports to be assigned to the RAOP sinks in OpenHAB
sudo apt install iproute2
sudo ss -tulpn

Then I updated pulseaudio.things as follows:

	Bridge pulseaudio:bridge:local "PulseAudio" [ host="127.0.0.1", port=4712 ] {
	  Things:
	  Thing sink          trivum1         "Trivum 1"           [name="raop_output.arm-7.local", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4721]
	  Thing sink          trivum2         "Trivum 2"           [name="raop_output.arm-7.local.2", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4722]
	  Thing sink          trivum3         "Trivum 3"           [name="raop_output.arm-7.local.3", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4723]
	  Thing sink          trivum4         "Trivum 4"           [name="raop_output.arm-7.local.4", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4724]
	  Thing sink          trivum5         "Trivum 5"           [name="raop_output.arm-7.local.5", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4725]
	  Thing sink          trivum6         "Trivum 6"           [name="raop_output.arm-7.local.6", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4726]
	  Thing sink          trivum7         "Trivum 7"           [name="raop_output.arm-7.local.7", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4727]
	  Thing sink          trivum8         "Trivum 8"           [name="raop_output.arm-7.local.8", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4728]
	  }

After having unique ports for each audio sink the Java exceptions during startup are now gone.

Although I marked my own post here as solution, it was Gwendal who provided the relevant details as how to setup a pulseaudio sink in OpenHAB:

  • specify the parameter activateSimpleProtocolSink in your pulseaudio.things file without any quotation marks around your selected value
  • specify a unique port for parameter simpleProtocolSinkPort in your pulseaudio.things if having multiple audio sinks

Best regards,
Peter