Rello / audioplayer

Audio Player for Nextcloud and ownCloud
https://rello.github.io/audioplayer
GNU Affero General Public License v3.0
223 stars 54 forks source link

Sonos Player One not detected #392

Closed dlevequeIT closed 5 years ago

dlevequeIT commented 5 years ago

Expected behavior

My SONOS One player is not detected in my OwnCloud interface.

Actual behavior

I'm not able to use the SONOS playback

Steps to reproduce the behavior

  1. Login on my owncloud settings
  2. Enable in Admin Audio Player for all user
  3. Go in my personnal settings in Audio Player
  4. Complete music folder
  5. Try to attach my Sonos player but list is empty

Possible solution (optional)

Additional information (optional)

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache 2

Database: MySQL

Nextcloud/ownCloud version: (see /status.php) OwnCloud 10.0.10.4

Audio Player version: (see /settings/apps) 2.7.0

Are you using external storage? If yes, which one: local/smb/sftp/... local

Client configuration

Operating system: Windows 10

Browser: Firefox 66.0.3

Logs

Nextcloud/ownCloud log

Nextcloud/ownCloud log (`/data/[nextcloud|owncloud].log`) ```json Insert your Nextcloud/ownCloud log here ```

Web server error log (optional)

Web server error log ``` Insert your web server log here ```

Browser log (optional)

Browser log ``` Insert your browser log here ```
Rello commented 5 years ago

Hello,

dlevequeIT commented 5 years ago

Hello, Thank you for your comment.

I check apache log but found nothing. I have also nothing in /myOwnloudStorage/owncloud.log about sonos or when I load: https://myOwncloudServer/index.php/settings/personal?sectionid=audioplayer

Could you tell me which particular file I must checked ?

About firewall I have only a local iptable firewall but no rule could explain this no detection. Could you tell me what specific ports are used ?

Thanks. Regards, Damien

Rello commented 5 years ago

so if there is no error - your server can not reach your sonos box. are they in the same lan/vlan?

Regarding firewall: there was a discussion here. there are certain ports which should not be blocked. the term used is "multicast" where the the Sonos-Plugin will send a "hello, who is there" and wait for the answers... https://help.nextcloud.com/t/audio-player-2-4-0-supporting-sonos/37485/7

could this be a reason?

dlevequeIT commented 5 years ago

Hi, Thank you for your answer. I have change the iptable because my Sonos was in the IoT range with no local network access. So now, I have my Sonos One name in the list for AudioPlayer Settings but when I try to play I have the issue describes in your thenextcloud link and, in my owncloud.log file the following exception :

{"reqId":"XMFidsCoCvAAAC@xnL0AAAAR","level":3,"time":"2019-04-25T07:32:06+00:00","remoteAddr":"213.135.230.173","user":"damien","app":"index","method":"POST","url":"\/index.php\/apps\/audioplayer\/sonosqueue","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Error sending command: HTTP\\/1.1 500 Internal Server Error\r\nCONTENT-LENGTH: 347\r\nCONTENT-TYPE: text\\/xml; charset=\\"utf-8\\"\r\nEXT: \r\nServer: Linux UPnP\\/1.0 Sonos\\/49.2-63270 (ZPS18)\r\nConnection: close\r\n\r\ns:ClientUPnPError\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www2\\/mysite\\/owncloud\\/apps\\/audioplayer\\/3rdparty\\/PHPSonos.php(2188): PHPSonos->sendPacket('POST \\/MediaRend...')\n#1 \\/var\\/www2\\/mysite\\/owncloud\\/apps\\/audioplayer\\/lib\\/Controller\\/SonosController.php(75): PHPSonos->AddToQueue('x-file-cifs:\\/\\/I...')\n#2 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(153): OCA\\audioplayer\\Controller\\SonosController->setQueue(Array, '0')\n#3 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(85): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\audioplayer\\Controller\\SonosController), 'setQueue')\n#4 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/private\\/AppFramework\\/App.php(100): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\audioplayer\\Controller\\SonosController), 'setQueue')\n#5 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php(46): OC\\AppFramework\\App::main('OCA\\\\audioplayer...', 'setQueue', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#6 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/private\\/Route\\/Router.php(342): OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#7 \\/var\\/www2\\/mysite\\/owncloud\\/lib\\/base.php(909): OC\\Route\\Router->match('\\/apps\\/audioplay...')\n#8 \\/var\\/www2\\/mysite\\/owncloud\\/index.php(54): OC::handleRequest()\n#9 {main}\",\"File\":\"\\/var\\/www2\\/mysite\\/owncloud\\/apps\\/audioplayer\\/3rdparty\\/PHPSonos.php\",\"Line\":2880}"}

I have try to change smb path with smb://MYSERVERNAME/Medias/Musics or //MYSERVERNAME/Medias/Musics and MYSERVERNAME/Medias/Musics but it's not better.

Rello commented 5 years ago

OK, good that we sorted this out. ClientUPnPError indicates that Sonos does not know the smb share.

take care: the AP is working here only as a remote (as written in the wiki). the SMB needs to be known to the Sonos system already via your Sonos app. Please check your connection string there. I would suppose it is similar to MYSERVERNAME/Medias/Musics? can you check there?

dlevequeIT commented 5 years ago

Hello, Thank you for your feedback. I don't know yet the Sonos App, could you tell me where is the SMB setting ?

I use subsonic (installed on the same server than my owncloud) and with the subsonic app on sonos, I success to cast my music ; maybe an action should be perform on sonos app/headset ?

Rello commented 5 years ago

Hello, I can not tell about Subsonic. I don´t know about this server. I can only answer for the stock Sonos App. There is a section where local SMB folders can be added. this needs to match what you enter in Audio Player

Screen Shot 2019-05-01 at 16 50 15

Rello commented 5 years ago

Hi, did you make any progress by checking the original Sonos App?