Automatically switch pulseaudio sink to remote server when available
Solution 1:
Remote Playback with zeroconf and tunnels are still buggy. Stuttering will appear after some time.
To fix this you can define your default server e.g. in your personal config (/home/xy/.config/pulse/client.conf) by Setting default-server = IP
.
If you want so check if your remote device is available you could run a bash script that checks if is pingable and if its available then copy a predefined_config_file to your pulse-config-folder:
if ping -c 1 YOUR_IP &> /dev/null; then notify-send "Changing to remote system" && cp predefined_remote_config_file /home/xy/.config/pulse/client.conf; else notify-send "Changing to local system" && cp predefined_local_config_file /home/xy/.config/pulse/client.conf; fi
Maybe you Need to restart pulseaudio, whats also could be done by the bash script