simojenki / bonob

sonos SMAPI implementation allowing integrating different music sources with sonos.
GNU General Public License v3.0
208 stars 15 forks source link

Deployment error #97

Open g0rge0us opened 2 years ago

g0rge0us commented 2 years ago

Hello @simojenki!

I really want to enjoy your interesting solution on my Sonos system, but when I try to deploy that as a stack on Portainer 2.11.0, running on a host OS DietPi on RPI4 (4GB RAM) with Docker + Portainer, I am getting the following error in Portainer:

_Deployment error failed to deploy a stack: services.bonob.environment.BNB_SONOS_AUTOREGISTER must be a string, number or null

Here is the docker compose file/stack that I am using:

version: "3"
services:
  navidrome:
    image: deluan/navidrome:latest
    user: 1000:1000 #should be owner of volumes
    ports:
      - "8091:4533"
    restart: unless-stopped
    environment:
      # Optional: put your config options customization here. Examples:
      ND_SCANSCHEDULE: 4h
      ND_LOGLEVEL: info  
      ND_SESSIONTIMEOUT: 24h
      ND_BASEURL: ""
    volumes:
      - "/mnt/sd200gb/appdata/navidrome:/data"
      - "/mnt/storage/music:/music:ro"
  bonob:
    image: simojenki/bonob:latest
    user: 1000:1000 #should be owner of volumes
    ports:
      - "4534:4534"
    restart: unless-stopped
    environment:
      BNB_PORT: 4534
      # ip address of your machine running bonob
      BNB_URL: http://10.0.0.4:4534
      BNB_SECRET: changeme
      BNB_SONOS_AUTO_REGISTER: true
      BNB_SONOS_DEVICE_DISCOVERY: true
      BNB_SONOS_SERVICE_ID: 246
      # ip address of one of your sonos devices
      BNB_SONOS_SEED_HOST: 10.0.0.81
      BNB_SUBSONIC_URL: http://navidrome:4533

I can't understand how "true" is not considered as string. Your help is very much appreciated! Many thanks in advance!

simojenki commented 2 years ago

I think would be because of the way yaml parsing works.

BNB_SONOS_AUTO_REGISTER: true

The above will be turned into a boolean true value, rather than the string "true".

Probably bonob should handle that case, so I will look into that, however in the meantime if you try wrapping the 'true' values in double quotes I think it should work ok, ie.

BNB_SONOS_AUTO_REGISTER: "true"
g0rge0us commented 2 years ago

Many thanks! It has worked indeed, when I have put both "true" values in "". :) I know should figure out how to play the music on my Sonos system from your dox.

Something else: is there a way to route the sound from Navidrome to other smart (wifi) speakers in our home network, which support "spotify connect"? I am not sure if this is based on DLNA, UPnP or some other protocols.

simojenki commented 2 years ago

Sorry, I'm not sure how other speakers work. You may need to setup a DLNA server pointing at the same collection of music

g0rge0us commented 2 years ago

Hi @simojenki! Sorry to bother you again, but I will really appreciate a little help from you. Unfortunately I can't figure out how to send the sound to my Sonos system. I have 2 pairs in 2 rooms, each of them connected as a stereo set and named i.e. room1 & room2. I am able to see them as speakers in my iOS Sonos App, in every Spotify client on my LAN and from the Noson (Linux) client. But when I start Navidrome, I can't find the feature (button/option) to set the web client to play to any other sound device (speakers) other than the actual sound card of the current PC I am on. What am I missing? You can check my configuration above. Many thanks!

simojenki commented 2 years ago

You don't 'send' music to sonos speakers by pressing buttons in navidrome, its more like you tell the sonos speakers to stream the music from bonob/navidrome by controlling them using the sonos app itself.
I use the iOS Sonos App in this way. You need to go through the process of registering bonob/navidrome with your sonos devices as described on the bonob README. This process is much like how you would register Spotify with your sonos devices. At that point you should be able to browse and play the navidrome music using the sonos app.

I tried noson, however i am unable to play music using it, I think that is because noson only supports music that is indexed in the sonos devices themselves, ie. via a NAS share. noson doesn't seem to support external services, ie. bonob/navidrome, spotify, soundcloud etc.