owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio 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.09k stars 237 forks source link

Speaker duplicate and strange things #1598

Closed thundershare closed 1 year ago

thundershare commented 1 year ago

Some day ago I rebuild my client speaker (based on shairport sync 4.1 rel 139 running in a docker container). Until that moment no problem. After the rebuild process owntone seems has different problems

  1. the 2 shairport-sync speakers are duplicated, seems that owntone has "memory" (cache???) of the "old speaker" (id speaker are same)
  2. When i restart shairport speakers sometime are appears sometime not, checking on avahi browse the speakers seems correctly announced
  3. "Player status: stopped" in the log in debug mode

Either shairport speakers with itunes work correctly, even when aren't detected by owntone

I attach a log in debug mode. After restarted owntone in debug mode no session was played.

owntone.log

ejurgensen commented 1 year ago

Are 192.168.1.48 "Bagno" and 192.168.1.75 "Camera da letto" the two shairport-syncs?

thundershare commented 1 year ago

yes

add some info after play a session

[2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/player/volume?volume=31&output_id=14480004491335' in worker thread 112963 [2023-04-03 12:24:41] [DEBUG] player: Status update - status: 4, events: 4, caller: volume_generic_bh [2023-04-03 12:24:41] [DEBUG] mpd: Asynchronous listener callback called with event type 4. [2023-04-03 12:24:41] [DEBUG] mpd: Notify clients waiting for idle results: 4 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 71 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 11 [2023-04-03 12:24:41] [DEBUG] web: notify callback reply: 4 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 11 [2023-04-03 12:24:41] [DEBUG] web: notify callback reply: 4 [2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/player/volume?volume=31&output_id=202481602577834' in worker thread 112961 [2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/player' in worker thread 112962 [2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/outputs' in worker thread 112963 [2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/player' in worker thread 112964 [2023-04-03 12:24:41] [DEBUG] player: Status update - status: 4, events: 4, caller: volume_generic_bh [2023-04-03 12:24:41] [DEBUG] mpd: Asynchronous listener callback called with event type 4. [2023-04-03 12:24:41] [DEBUG] web: JSON API request '/api/outputs' in worker thread 112961 [2023-04-03 12:24:41] [DEBUG] player: Player status: playing [2023-04-03 12:24:41] [DEBUG] player: Player status: playing [2023-04-03 12:24:41] [DEBUG] mpd: Notify clients waiting for idle results: 4 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 71 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 11 [2023-04-03 12:24:41] [DEBUG] web: notify callback reply: 4 [2023-04-03 12:24:41] [DEBUG] web: notify callback reason: 11 [2023-04-03 12:24:41] [DEBUG] web: notify callback reply: 4

id 14480004491335 is the new id and worked if a selected from web ui id 202481602577834 is the old id e not work error from webui

if a request list of outputs from api this what i receive

{ "outputs": [ { "id": "14480004491335", "name": "Bagno", "type": "AirPlay 1", "selected": false, "has_password": false, "requires_auth": false, "needs_auth_key": false, "volume": 34 }, { "id": "173193013176935", "name": "Camera da letto", "type": "AirPlay 1", "selected": false, "has_password": false, "requires_auth": false, "needs_auth_key": false, "volume": 0 }, { "id": "202481588677116", "name": "Bagno", "type": "AirPlay 2", "selected": false, "has_password": false, "requires_auth": false, "needs_auth_key": false, "volume": 5 }, { "id": "202481602577834", "name": "Camera da letto", "type": "AirPlay 2", "selected": false, "has_password": false, "requires_auth": false, "needs_auth_key": false, "volume": 34 }, { "id": "2631071867", "name": "Soundbar", "type": "Chromecast", "selected": false, "has_password": false, "requires_auth": false, "needs_auth_key": false, "volume": 0 } ] }`

in this case Bagno seems selected but not was effectively selected and not play, Camera da letto worked correctly

ejurgensen commented 1 year ago

The cause of this is that shairport-sync is announcing two different ID's, see issue #1578. As you can see, it has been fixed, but I don't know if the fix is still only in shairport's development branch.

I notice that "Camera da letto" is making a status requests to OwnTone every second. That isn't normal and probably indicates another error. I will see if I can reproduce. Do you know if that speaker has special settings? Maybe a setting related to dacp/remote control?

thundershare commented 1 year ago

The cause of this is that shairport-sync is announcing two different ID's, see issue #1578. As you can see, it has been fixed, but I don't know if the fix is still only in shairport's development branch.

ok

I notice that "Camera da letto" is making a status requests to OwnTone every second. That isn't normal and probably indicates another error. I will see if I can reproduce. Do you know if that speaker has special settings? Maybe a setting related to dacp/remote control?

no is a shairport-sync speaker standard installation (image pull from official docker repository, "latest" tag, and launched)

ejurgensen commented 1 year ago

image pull from official docker repository, "latest" tag, and launched

Could you help me out with the commands to do this? I don't have much experience with Docker.

thundershare commented 1 year ago

docker run -d --restart unless-stopped --net host --device /dev/snd mikebrady/shairport-sync

for all info

https://hub.docker.com/r/mikebrady/shairport-sync

ejurgensen commented 1 year ago

Closing this issue since the issues look to be with shairport-sync (where the speaker duplication is already fixed in shairport-sync development branch).