Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Airplay disconnecting and disappearing?
#19
Hi Thorsten,

It works perfectly on my end but there is always the possibility of breakage or bugs that surface only in other environments or configs. Try the mods below (in Bold) to enable the launch string for verbose logging to a file. 

1. Edit /var/www/inc/playerlib.php, function startSps()
1. Add -vv to the base cmd string to enable verbose logging
2. Replace 3 occurrences of /dev/null with /home/pi/sps.log to redirect the log output to a file
3. Save the edits
4. Reboot
5. tail -f /home/pi/sps.log -OR- cat /home/pi/sps.log

/var/www/inc/playerlib.php

// start shairport-sync
function startSps() {
// get device num and hardware mixer name
$array = sdbquery('select value_player from cfg_mpd where param="device"', cfgdb_connect());
$device = $array[0]['value_player'];
$mixername = $_SESSION['amixname'];

// format base cmd string
$cmd = '/usr/local/bin/shairport-sync -vv -a "' . $_SESSION['airplayname'] . '" -S soxr -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh ' . '-- -d hw:' . $device;

// add volume config
if ($_SESSION['airplayvol'] == 'auto') {
$cmd .= $_SESSION['alsavolume'] == 'none' ? ' > /home/pi/sps.log 2>&1 &' : ' -c ' . '"' . $mixername  . '"' . ' > /home/pi/sps.log 2>&1 &';
}
else {
cmd .= ' > /home/pi/sps.log 2>&1 &';
}

// start shairport-sync
debugLog('worker: (' . $cmd . ')');
sysCmd($cmd);
}

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: Airplay disconnecting and disappearing? - by Tim Curtis - 06-22-2018, 12:16 PM

Forum Jump: