owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.01k stars 232 forks source link

Proposal for Auto-Activate New speaker function #518

Open LordMyschkin opened 6 years ago

LordMyschkin commented 6 years ago

I just want to propose a feature maybe not only I do really miss: When playing music and changing the room, I first switch on the speaker in the new room, then open whatever remote I use and activate the newly found speaker. Would‘nt it be generally convenient if - when playing music by forked-daapd at the moment - the speaker could be activated as soon as it is detected in the network? Maybe as an option in forked-daapd.conf?

ejurgensen commented 6 years ago

Very good suggestion, I could also make use of that myself. I will look into it - hope it can be done easily.

ejurgensen commented 6 years ago

I made an attempt at the change in the above, but in my setup it doesn't work. It seems forked-daapd ends up attempting to connect too quickly, and the speaker returns "500 Internal server error". I also see forked-daapd sometimes crashing, because during startup my speaker quickly (mdns-wise) appears, disappears and then permanently reappears again. Forked-daapd tries to connect already at the first appearance, and it then crashes while it is trying to connect to a device that briefly vanishes.

So it wasn't as easy as I hoped...

LordMyschkin commented 5 years ago

I just want to tell you that I solved the problem for me by a small python script running in the backgound scanning for new speakers and activating them if forked-daapd is playing at that moment. I am quite happy with the result, running on a raspberry3. enable_speakers.zip

ejurgensen commented 5 years ago

Thanks, good to hear. Sorry I wasn't able to build this in.

LordMyschkin commented 5 years ago

Thank you for looking into this, anyway. May we close or should I leave that one open?

ejurgensen commented 5 years ago

Let's keep it open, maybe I can get it done some other time.

jshep321 commented 5 years ago

Good idea, but I think this could be a bad idea to enable by default. If speaker clients or wifi router/repeaters start dropping out temporarily, having music automagically start in certain rooms could lead to undesired behavior and quite negative... uh... marital discourse.