Closed kospek closed 5 years ago
Thanks for the post. Well, there could be lots of reasons. The log you quote above indicates that Shairport Sync is already running, so, at least, it doesn't seem to have crashed. For instance, a possible cause may be that the advertising for it on Rendevous/Bonjour/ZEROCONF has gone off or been blocked. This can be checked at the MusicBox end with avahi-browse
(in the package avahi-utils
) that can show you what is being advertised by Shairport Sync. Then at the other end, on a Mac or iOS, the applications called Discovery
, ("Discovery - DNS-SD Browser" in the Mac App Store) from Tildesoft, can be used to see what is "visible" to the device.
All that said, and although Shairport Sync is generally reliable, a lot of work is being done to try to make Shairport Sync more stable – please see #772 (long!). If you'd like to take part, e.g. as a tester, let us know.
okay, so I've downloaded Discovery app and tried to find Shairport when pi just booted up. I've found it, and this what Discovery showed me:
SomeID@MusicBox._raop._tcp.local.
Remote Audio Output Protocol (AirTunes)
MusicBox.local:5000
192.168.ip.addr:5000
mac::addr:5000
am = ShairportSync
ch = 2
cn = 0,1
da = true
ek = 1
et = 0,1
fv = 76400.10
pw = false
sf = 0x4
sr = 44100
ss = 16
sv = false
tp = TCP,UDP
txtvers = 1
vn = 65537
vs = 105.1
But at the morning, when I could not connect to Shairport-sync standart way - Discovery did not find anything either.
Nor any other service that was turned on in musicbox (i.e. spotify connect). And I can still reach rPi via ssh.
I need now to check it from MusicBox side via avahi-browse
?
Thanks for the update. Yes, exactly — with avahi-browse
you can see what the Shairport Sync device is advertising. If it is advertising Shairport Sync and the Mac (?) isn’t seeing it, it points to some kind of network issue. If it’s not advertising, then it’s a local issue.
I am not sure if i am using avahi-browse correctly. I am not very familiar with linux or command lines
I've ssh-ed to the Pi and entered this command (when I can't connect to shairport-sync):
@MusicBox:~# avahi-browse -d local -a --resolve --no-db-lookup
I used instructions from this website: https://www.ibm.com/support/knowledgecenter/en/SSB2MG_4.6.0/com.ibm.ips.doc/concepts/gx_gv_using_avahi.htm
Nothing seems to happen at all. Pi stops responding, command line does not react on any command. If I add an option -t
it looks like command is executed immediately, but nothing is returned to me. Pi just waits for next command.
UPDATE: After I restart rPi command above gave some results (I removed --no-db-lookup
option and added -t
).
= wlan0 IPv6 someId@MusicBox AirTunes Remote Audio local
hostname = [MusicBox.local]
address = [addr]
port = [5000]
txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=76400.10" "sf=0x4"]
= wlan0 IPv4 someid@MusicBox AirTunes Remote Audio local
hostname = [MusicBox.local]
address = [192.168.ip.addr]
port = [5000]
txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=76400.10" "sf=0x4"]
Also I've noticed this: When Shairport is unavailable, avahi-browse
did not even show me my Chromecast, connected to the same network. "Discovery" app on the phone shows it all the time.
Thanks. Let me have a think about this for a few hours.
So, I had a quick look. The command I use is:
$ avahi-browse -ar
and this displays everything that can be seen at the computer, but it stays working, and doesn't return to the prompt until you stop it by entering control-C.
It should always work, and it would be very unusual for there to be nothing to see on a computer that's connected to a network.
If avahi-browse
shows the Chromecast when everything is working normally, and doesn't when Shairport Sync is not visible, it would seems to point to some kind of a network connectivity issue.
Possibly a firewall setting or something similar might be causing a problem.
Thanks, I'll check this too. In meantime I've noticed this: I've turned on rPi today around 12.30. Used Shairport for a while and went outside. I've returned back home and tried to connect in the evening, at 22.30 - and Shairport is available, and works! Could it somehow be affected by the change of dates? I usually go to bed around 23.00, or at least stop using Shairport and don't bother checking it after midnight. I will try to use the command when Shairport is offline, which is not right now. Even, as I mentioned above, I did not use it for around 8 hours.
Short update: Now Shairport does not dissappear... It was turned all night and in the morning it is still available for connect.
I don't know what happens.. Shairport still works fine. I did nothing except things above.. I am positivly surprised but I don't understand this. When I first installed Music Box - for couple of days Shairport disappeared as described. Now it works all the time (except once I had to restart it during the day because it stoped casting sound when I skipped episode intro in Netflix. It only happened once, so I guess no big deal). Anyways, thank you very much, @mikebrady. Shairport-sync is awesome! I will write update in case it happens again :)
Would it be okay to close this issue?
@mikebrady yes, I guess. Works seamless now. Did not restart Pi since last time I wrote. Thanks for help!
Hi!
I've got MusicBox running on Raspberry Pi Zero W and JustBoom DAC Zero with enabled Shairport-sync. After rPi is booted - everything looks fine: I can connect to Shairport, stream audio from both Mac and iOS devices. Music stutters from time to time, but I did not find the issue, seems to be somewhat random (CPU load is not peaking when this happens, and stuffing option is '
basic
'. But this is not the main problem. Music can be played for some time (could be hours, no problem here). When after that I switch from Shairport to internal audio device and Shairport is not used (for couple hours) - it dissappears from the list of devices. I can't connect to it from Mac or iPhone, but I can reach rPi via ssh. It occurs when, for example, I turn off music at night (rPi stays turned on) and in the morning there's no Shairport-sync device available for connection. Why is it disappearing?# shairport-sync -v
returns this:Power management is also turned off:
Sorry if this was answered, but all similar issues I've read seems to be not exactly what I'm having - music is playing, I can connect/disconnect freely as much as I want, but when Shairport is not used for some times - it becomes inactive. Thanks!