You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[pulseaudio] Allow flexible parameters to find a given pulseaudio device (openhab#12598)
* [pulseaudio] Allow flexible parameters to find a given pulseaudio device
To identify the device on the pulseaudio server, you can now use the description instead of the technical id (a.k.a. "name").
To filter furthermore, you can also use the parameter additionalFilters (optional regular expressions that need to match a property value of a device on the pulseaudio server)
Closesopenhab#12555
Signed-off-by: Gwendal Roulleau <[email protected]>
The Pulseaudio bridge requires the host (ip address or a hostname) and a port (default: 4712) as a configuration value in order for the binding to know where to access it.
42
-
You can use `pactl -s <ip-address|hostname> list sinks | grep "name:"` to find the name of a sink.
41
+
The Pulseaudio bridge requires the host (ip address or a hostname) and a port (default: 4712) as a configuration value in order for the binding to know where to access it.
42
+
A Pulseaudio device requires at least an identifier. For sinks and sources, you can use the name or the description. For sink inputs and source outputs, you can use the name or the application name.
43
+
To know without hesitation the correct value to use, you should use the command line utility `pactl`. For example, to find the name of a sink:
44
+
`pactl -s <ip-address|hostname> list sinks | grep "name:"`
45
+
If you need to narrow the identification of a device (in case name or description are not consistent and sufficient), you can use the `additionalFilters` parameter (optional/advanced parameter), in the form of one or several (separator '###') regular expression(s), each one matching a property value of the pulseaudio device. You can use every properties listed with `pactl`.
46
+
43
47
44
48
## Channels
45
49
@@ -74,7 +78,7 @@ This requires the module **module-simple-protocol-tcp** to be present on the tar
Thing sink multiroom "Snapcast" @ "Room" [name="alsa_card.pci-0000_00_1f.3", activateSimpleProtocolSink=true, simpleProtocolSinkPort=4711] // the name corresponds to `pactl list sinks` output
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseaudioBindingConstants.java
+2-1
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,8 @@ public class PulseaudioBindingConstants {
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseaudioClient.java
"Cannot select exactly one audio device, so choosing the first. To choose without ambiguity between the {} devices matching the identifier {}, you can maybe use a more restrictive 'additionalFilter' parameter",
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseaudioHandlerFactory.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/cli/Parser.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/discovery/PulseaudioDeviceDiscoveryService.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioBridgeHandler.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ public synchronized void update() {
97
97
} else {
98
98
// browse all child handlers to update status according to the result of the query to the pulse audio server
99
99
for (PulseaudioHandlerpulseaudioHandler : childHandlersInitialized) {
0 commit comments