[pulseaudio] Allow flexible parameters to find a given pulseaudio device (#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)

Closes #12555

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
This commit is contained in:
Gwendal Roulleau
2022-04-28 23:25:23 +02:00
committed by GitHub
parent 1408899ed3
commit ae20f93f19
19 changed files with 260 additions and 62 deletions

View File

@@ -42,7 +42,9 @@ thing-type.config.pulseaudio.combinedSink.name.description = The name of the com
thing-type.config.pulseaudio.sink.activateSimpleProtocolSink.label = Create an Audio Sink with simple-protocol-tcp
thing-type.config.pulseaudio.sink.activateSimpleProtocolSink.description = Activation of a corresponding sink in OpenHAB (module-simple-protocol-tcp must be available on the pulseaudio server)
thing-type.config.pulseaudio.sink.name.label = Name
thing-type.config.pulseaudio.sink.name.description = The name of one specific device.
thing-type.config.pulseaudio.sink.name.description = The name of one specific device. You can also use the description.
thing-type.config.pulseaudio.sink.additionalFilters.label = Additional Filters
thing-type.config.pulseaudio.sink.additionalFilters.description = Additional filters to select the proper device on the pulseaudio server, in case of ambiguity. To be selected, the device should have at least a property value matching this regular expression. You can use multiple regular expressions (separator is ###).
thing-type.config.pulseaudio.sink.simpleProtocolSOTimeout.label = Simple Protocol SO Timeout
thing-type.config.pulseaudio.sink.simpleProtocolSOTimeout.description = Socket SO timeout when connecting to pulseaudio server though module-simple-protocol-tcp. You can tune this option if the socket disconnect frequently.
thing-type.config.pulseaudio.sink.simpleProtocolSinkIdleTimeout.label = Idle Timeout
@@ -50,11 +52,15 @@ thing-type.config.pulseaudio.sink.simpleProtocolSinkIdleTimeout.description = Ti
thing-type.config.pulseaudio.sink.simpleProtocolSinkPort.label = Simple Protocol Port
thing-type.config.pulseaudio.sink.simpleProtocolSinkPort.description = Default Port to allocate for use by module-simple-protocol-tcp on the pulseaudio server
thing-type.config.pulseaudio.sinkInput.name.label = Name
thing-type.config.pulseaudio.sinkInput.name.description = The name of one specific device.
thing-type.config.pulseaudio.sinkInput.name.description = The name of one specific device. You can also use the application name.
thing-type.config.pulseaudio.sinkInput.additionalFilters.label = Additional Filters
thing-type.config.pulseaudio.sinkInput.additionalFilters.description = Additional filters to select the proper device on the pulseaudio server, in case of ambiguity. To be selected, the device should have at least a property value matching this regular expression. You can use multiple regular expressions (separator is ###).
thing-type.config.pulseaudio.source.activateSimpleProtocolSource.label = Create an Audio Source with simple-protocol-tcp
thing-type.config.pulseaudio.source.activateSimpleProtocolSource.description = Activation of a corresponding source in OpenHAB (module-simple-protocol-tcp must be available on the pulseaudio server)
thing-type.config.pulseaudio.source.name.label = Name
thing-type.config.pulseaudio.source.name.description = The name of one specific device.
thing-type.config.pulseaudio.source.name.description = The name of one specific device. You can also use the description.
thing-type.config.pulseaudio.source.additionalFilters.label = Additional Filters
thing-type.config.pulseaudio.source.additionalFilters.description = Additional filters to select the proper device on the pulseaudio server, in case of ambiguity. To be selected, the device should have at least a property value matching this regular expression. You can use multiple regular expressions (separator is ###).
thing-type.config.pulseaudio.source.simpleProtocolSOTimeout.label = Simple Protocol SO Timeout
thing-type.config.pulseaudio.source.simpleProtocolSOTimeout.description = Socket SO timeout when connecting to pulseaudio server though module-simple-protocol-tcp. You can tune this option if the socket disconnect frequently.
thing-type.config.pulseaudio.source.simpleProtocolSourceChannels.label = Simple Protocol Channels
@@ -75,7 +81,9 @@ thing-type.config.pulseaudio.source.simpleProtocolSourcePort.description = Defau
thing-type.config.pulseaudio.source.simpleProtocolSourceRate.label = Simple Protocol Rate
thing-type.config.pulseaudio.source.simpleProtocolSourceRate.description = The audio sample rate to be used by module-simple-protocol-tcp on the pulseaudio server
thing-type.config.pulseaudio.sourceOutput.name.label = Name
thing-type.config.pulseaudio.sourceOutput.name.description = The name of one specific device.
thing-type.config.pulseaudio.sourceOutput.name.description = The name of one specific device. You can also use the application name.
thing-type.config.pulseaudio.sourceOutput.additionalFilters.label = Additional Filters
thing-type.config.pulseaudio.sourceOutput.additionalFilters.description = Additional filters to select the proper device on the pulseaudio server, in case of ambiguity. To be selected, the device should have at least a property value matching this regular expression. You can use multiple regular expressions (separator is ###).
# channel types

View File

@@ -20,7 +20,16 @@
<config-description>
<parameter name="name" type="text" required="true">
<label>Name</label>
<description>The name of one specific device.</description>
<description>The name of one specific device. You can also use the application name.</description>
</parameter>
<parameter name="additionalFilters" type="text" required="false">
<label>Additional Filters</label>
<advanced>true</advanced>
<description>Additional filters to select the proper device on the pulseaudio server, in case of ambiguity.
To be
selected, the device should have at least a property value matching this regular expression. You can use
multiple
regular expressions (separator ###).</description>
</parameter>
</config-description>
</thing-type>

View File

@@ -20,7 +20,7 @@
<config-description>
<parameter name="name" type="text" required="true">
<label>Name</label>
<description>The name of one specific device.</description>
<description>The name of one specific device. You can also use the description.</description>
</parameter>
<parameter name="activateSimpleProtocolSink" type="boolean" required="false">
<label>Create an Audio Sink with simple-protocol-tcp</label>
@@ -28,6 +28,15 @@
pulseaudio server)</description>
<default>false</default>
</parameter>
<parameter name="additionalFilters" type="text" required="false">
<label>Additional Filters</label>
<advanced>true</advanced>
<description>Additional filters to select the proper device on the pulseaudio server, in case of ambiguity.
To be
selected, the device should have at least a property value matching this regular expression. You can use
multiple
regular expressions (separator ###).</description>
</parameter>
<parameter name="simpleProtocolSinkPort" type="integer" required="false">
<label>Simple Protocol Port</label>
<description>Default Port to allocate for use by module-simple-protocol-tcp on the pulseaudio server</description>

View File

@@ -19,7 +19,16 @@
<config-description>
<parameter name="name" type="text" required="true">
<label>Name</label>
<description>The name of one specific device.</description>
<description>The name of one specific device. You can also use the application name.</description>
</parameter>
<parameter name="additionalFilters" type="text" required="false">
<label>Additional Filters</label>
<advanced>true</advanced>
<description>Additional filters to select the proper device on the pulseaudio server, in case of ambiguity.
To be
selected, the device should have at least a property value matching this regular expression. You can use
multiple
regular expressions (separator is ###).</description>
</parameter>
</config-description>
</thing-type>

View File

@@ -19,7 +19,16 @@
<config-description>
<parameter name="name" type="text" required="true">
<label>Name</label>
<description>The name of one specific device.</description>
<description>The name of one specific device. You can also use the description.</description>
</parameter>
<parameter name="additionalFilters" type="text" required="false">
<label>Additional Filters</label>
<advanced>true</advanced>
<description>Additional filters to select the proper device on the pulseaudio server, in case of ambiguity.
To be
selected, the device should have at least a property value matching this regular expression. You can use
multiple
regular expressions (separator ###).</description>
</parameter>
<parameter name="activateSimpleProtocolSource" type="boolean" required="false">
<label>Create an Audio Source with simple-protocol-tcp</label>