nicokaiser / rpi-audio-receiver

Raspberry Pi Audio Receiver with Bluetooth A2DP, AirPlay 2, and Spotify Connect
MIT License
1.38k stars 148 forks source link

spotifyd random client connection port (firewall) #42

Closed Flatrongraad closed 4 years ago

Flatrongraad commented 4 years ago

Hello nicokaiser and the others, I noticed that spotify client was unable to see the pi when ufw was up. It seems that spotifyd by default uses random ports for client connection : https://github.com/Spotifyd/spotifyd/issues/465 I could fix that on my setup by modifying the spotifyd conf file (/etc/spotifyd.conf) following the config example and adding a line : zeroconf_port = <someport>

I though what could be done is to add a random port once and write it to the config. Whomever will want to setup the firewall will notice which port it is using (I guess). Optionally, the script could go beyond and setup the rules in the firewall, but its out of my skills on that point ^^'

P.S. : I want to thank you for this only easy script to setup raspberry pi with alsa and bluetooth (all the old ones are using pulseaudio and mess everything)

nicokaiser commented 4 years ago

Thanks for your kind words!

I'll add a comment to the spotifyd config, however as I want the default config to match the upstream's default config, I'd rather leave it commented out for now...