PI MusicBox tuning

Hello dear collegues! We are using PI MusicBox on the skating rink every day. Anybody who know pass from wifi network are able to stream throught airplay their own music. Is there any way to configure the musicbox when airplay source is disappearing to start playing recorded songs on connected usb or sd automatically after 5 min of silence?

if you are asking whether or not it is possible to have musicbox automatically move from airplay to palying from usb, then I believe that it is possible, but it would require you to write a script of some sort that realizes that tairplay has stopped and then automatically plays a playlist ,for example.

Shairport-sync (the program that provides airplay functionality for PiMusicbox) has an on-stop feature which lets you run a command once the play session has ended. PiMusicbox already uses the on-start feature to tell Mopidy to stop, thus freeing the audio device and making it available for shairport-sync to then use. You should be able to use on-stop feature to make Mopidy start playing from a particular playlist (or something). To do this you’ll need to edit /etc/init.d/shairport-sync and add the -E option to the line in do_start so it looks something like this:

start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -d -a "$MBNAME (MusicBox)" -w -B "/usr/bin/mpc stop" -E "/usr/bin/mpc add some_playlist; /usr/bin/mpc play" || return 2

Hello! Ok, thanks will try it!