jmt-gh / audiobookshelf-sonos

Play your audiobooks from Audiobookshelf on your Sonos speakers
31 stars 5 forks source link

More detailed instruction #2

Open mxdalchau opened 1 year ago

mxdalchau commented 1 year ago

Hey,

could you write a more detailed instruction please?

thanks :)

mxdalchau commented 7 months ago

haha I´m very stupid.... it doens´t work for me...

version: '3.8'

services: audiobookshelf-sonos: build: context: . dockerfile: Dockerfile container_name: audiobookshelf-sonos environment:

proxy: server { listen 443 ssl; listen [::]:443 ssl;

server_name soabs.*;

include /config/nginx/ssl.conf;

location / {
    include /config/nginx/proxy.conf;
    include /config/nginx/resolver.conf;
    set $upstream_app 192.168.2.xx;
    set $upstream_port 8082;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}

}

manifest: {"schemaVersion":"1.0","endpoints":[{"type":"reporting","uri":"https://soabs.xx.de/playback/v2.1/report"}]}

on sonos Durchsuchen nicht möglich... audiobookshelf von docker..... [2024-01-26 17:51:10.902] DEBUG: [ApiCacheManager] Cache hit: {"user":"xxx","url":"/libraries/52axx/items"} (ApiCacheManager.js:32)

jt196 commented 7 months ago

@mxdalchau I doubt it!

The only thing I think you're doing slightly differently is this:

<soap:address location="https://soabs.xx.de/wsdl"/>

instead of this:

<soap:address location="https://soabs.xx.de"/>

I can't really think of any other reason why my config/set up isn't working. I'm on the most recent version of Sonos (v2), Audiobookshelf is up to date as well.

I've tried removing and re-adding the service multiple times, tried several different speakers, tried multiple variations of the URIs.

The only other points I can think of are:

  1. Sonos firmware
  2. ABS version
  3. Regional differences

I'm running mine behind a RP like @fayeinmay, so that shouldn't be the culprit... I'm stumped.

mxdalchau commented 7 months ago

[2024-01-26T18:21:58.935Z] [DEBUG] [buildLibraryMetadataResult - /app/utils.js:116] libraryItem for mediaMetadataEntry: {"id":"d3d47f08-6aaf-4278-a677-4af3a36c6e41","ino":"13510803856505204","oldLibraryItemId":null,"libraryId":"52a3f946-a069-4e9c-98a6-a91719a39b8d","folderId":"4b1f9440-c4c3-43fc-8079-1a2d771954a5","path":"/MaxKusData/Musik/Hoerspiele/John Sinclair Sonderedition/Horror-Disco - John Sinclair - Promis lesen Sinclair (Ungekürzt)","relPath":"John Sinclair Sonderedition/Horror-Disco - John Sinclair - Promis lesen Sinclair (Ungekürzt)","isFile":false,"mtimeMs":1700421236950,"ctimeMs":1703561864075,"birthtimeMs":0,"addedAt":1700421123319,"updatedAt":1704063629682,"isMissing":false,"isInvalid":false,"mediaType":"book","media":{"id":"07efccc3-c54d-4e30-9ff4-65078c7e561c","metadata":{"title":"Horror-Disco - John Sinclair - Promis lesen Sinclair (Ungekürzt)","titleIgnorePrefix":"Horror-Disco - John Sinclair - Promis lesen Sinclair (Ungekürzt)","subtitle":"John Sinclair - Promis lesen Sinclair (Ungekürzt)","authorName":"Jason Dark","authorNameLF":"Dark, Jason","narratorName":"","seriesName":"","genres":[],"publishedYear":"2023-11-17","publishedDate":null,"publisher":"Lübbe Audio","description":null,"isbn":null,"asin":null,"language":null,"explicit":false,"abridged":false},"coverPath":"/MaxKusData/Musik/Hoerspiele/John Sinclair Sonderedition/Horror-Disco - John Sinclair - Promis lesen Sinclair (Ungekürzt)/cover.jpg","tags":[],"numTracks":60,"numAudioFiles":60,"numChapters":60,"numMissingParts":0,"numInvalidAudioFiles":0,"duration":11536.378773999997,"size":200521291},"numFiles":63,"size":201067798} [2024-01-26T18:21:58.935Z] [DEBUG] [buildLibraryMetadataResult - /app/utils.js:116] libraryItem for mediaMetadataEntry: {"id":"9468b5f8-96d1-4692-a068-09ee04bfc01f","ino":"13510803856493976","oldLibraryItemId":null,"libraryId":"52a3f946-a069-4e9c-98a6-a91719a39b8d","folderId":"4b1f9440-c4c3-43fc-8079-1a2d771954a5","path":"/MaxKusData/Musik/Hoerspiele/John Sinclair 2000/162 Das Vampir-Internat","relPath":"John Sinclair 2000/162 Das Vampir-Internat","isFile":false,"mtimeMs":1700421289048,"ctimeMs":1703561863380,"birthtimeMs":0,"addedAt":1700421181119,"updatedAt":1704063762022,"isMissing":false,"isInvalid":false,"mediaType":"book","media":{"id":"9063aaa0-d313-4f2f-beff-80823c67ba61","metadata":{"title":"Folge 162: Das Vampir-Internat","titleIgnorePrefix":"Folge 162: Das Vampir-Internat","subtitle":null,"authorName":"John Sinclair","authorNameLF":"Sinclair, John","narratorName":"","seriesName":"","genres":["Film Soundtracks"],"publishedYear":"2023","publishedDate":null,"publisher":null,"description":null,"isbn":null,"asin":null,"language":null,"explicit":false,"abridged":false},"coverPath":"/MaxKusData/Musik/Hoerspiele/John Sinclair 2000/162 Das Vampir-Internat/Cover.jpg","tags":[],"numTracks":17,"numAudioFiles":17,"numChapters":17,"numMissingParts":0,"numInvalidAudioFiles":0,"duration":3065.547755,"size":124516502},"numFiles":20,"size":125018468}

jt196 commented 7 months ago

Yeah mine is displaying the metadata too, just no result in the app.

dubwoc commented 7 months ago

After initial set up with a coinnection from the sonos app on my phone to abs-sonos I do not see any traffic come from speakers to abs-sonos when I select the application and I get a "unable to browse music" error

Initial adding of the app via sonos app:

[2024-01-30T14:39:49.030Z] [DEBUG] [Unknown - Unknown:Unknown] Received request: GET /manifest 
[2024-01-30T14:39:49.030Z] [INFO] [Unknown - Unknown:Unknown] /manifest endpoint hit 
[2024-01-30T14:39:56.038Z] [DEBUG] [Unknown - Unknown:Unknown] Received request: GET /manifest 
[2024-01-30T14:39:56.039Z] [INFO] [Unknown - Unknown:Unknown] /manifest endpoint hit 
[2024-01-30T14:39:57.265Z] [DEBUG] [Unknown - Unknown:Unknown] Received request: GET /manifest 
[2024-01-30T14:39:57.265Z] [INFO] [Unknown - Unknown:Unknown] /manifest endpoint hit 

I can ping from the server to the speakers no problem and TLS is working properly. When I browse to /manifest I get a URL

When I curl https://soab.domain.org/manifest I get:

{"schemaVersion":"1.0","endpoints":[{"type":"reporting","uri":"https://soab.domain.org/playback/v2.1/report"}]}               

I am not sure where you all are getting the metadata from, I poured over this thread but seem to have missed how you are getting that output from utils.js.

If this is the current state let me know, I'll keep tinkering on my end.

dstapp commented 6 months ago

I made some progress on that. I get some output in the list and can play at least some of my audiobooks. My library is quite big which caused no results to show up. Also, progress tracking is not working for me so far. I'll try to get this in shape over the next days and open a PR.

jt196 commented 6 months ago

@dstapp would you be able to share your config with us (wsdl, Sonos service, version, env variables) as quite a few of us are stuck on not getting any items to display in the Sonos app.

dstapp commented 6 months ago

@jt196 Sure thing. Have a look here for my changes: https://github.com/jmt-gh/audiobookshelf-sonos/pull/8 If you want, feel free to try with my fork until it's merged (if it's merged at all ;)).

Setup wise, my SOAP_URI env var is in format of https://xyz/wsdl, my WSDL adjustment also includes "/wsdl" at the end, just the same.

The rest worked for me with the instructions provided in the README.md. Please also see the caveats in my PR (200 file limit).

Btw, m4a/m4b audiobooks indeed are a problem. While I can play them back initially, as soon as there is a progress stored to pick up the playback position from, it does not work. Seems like seeking is not implemented on Sonos side.