2.4 KiB
title | description | ha_category | ha_release | ha_iot_class | ha_domain | ha_platforms | ha_integration_type | related | ha_quality_scale | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PulseAudio Loopback | Instructions on how to use Pulseaudio loopback modules to build a flexible whole-home audio system. |
|
0.16 | Local Polling | pulseaudio_loopback |
|
integration |
|
legacy |
The goal behind this switch is to allow a very flexible whole home audio system based upon PulseAudio.
For example, for a system with a 7.1 surround sound card, and 3 instances of MPD running, it is possible to quickly route the output of any MPD instance to any of the 8 possible (4 stereo) channels on the sound card, by loading/unloading a loopback module. This loading/unloading functionality is provided by this integration. When the switch is on
, the loopback module is loaded. When the switch is off
, the module is not loaded.
The benefit of this approach is that this audio routing can occur without modifying the design-time configuration of MPD or PulseAudio.
This {% term integration %} uses a TCP connection to control a local or remote PulseAudio server. So there are no local dependencies.
To enable this switch, add the following lines to your {% term "configuration.yaml
" %} file.
{% include integrations/restart_ha_after_config_inclusion.md %}
# Example configuration.yaml entry
switch:
- platform: pulseaudio_loopback
{% configuration %} sink_name: description: The name of the Pulseaudio sink that will receive the audio. required: true type: string source_name: description: The name of the Pulseaudio source that will supply the audio. required: true type: string name: description: Name of the switch. required: false default: paloopback type: string host: description: The IP address or host name of the PulseAudio server. required: false default: Use client configuration in /etc/pulse type: string port: description: The port that Pulseaudio is listening on. required: false default: 4713 type: integer {% endconfiguration %}
{% important %}
This integration relies on raw TCP commands to PulseAudio. In order for PulseAudio to accept commands with this integration, module-native-protocol-tcp auth-ip-acl=<homeassistant ip>
must be loaded on the PulseAudio server.
{% endimportant %}