stepman0 / docker-sonos-kids-controller

Docker image for Thyraz / Sonos-Kids-Controller
9 stars 2 forks source link

Its not working #56

Closed corincorvus closed 1 year ago

corincorvus commented 1 year ago

Hi,

now i tried over hours.

both Containers are running and api is healthy image

The Controller app dont work. i add some playbooks, i can go in the books, the playbutton is already on Pause. The Player doesnt respond, if i click something.

Both is available and i can click on the sites. API work with my sonos players. If i test pause a player, it works (i can see it on sonos controller on my smartphone and i can hear it) http://10.0.0.23:5005/Kinderzimmer/pause

On the Controller config.json i tried server address 127.0.0.1, localhost, 10.0.0.23. nothing work. I am not sure, but i think the containers are not connected.

I hope anyone find the solution.

Compose:

version: "3"

services:
  api:
    image: "chrisns/docker-node-sonos-http-api"
    restart: unless-stopped
    network_mode: host
    volumes:
      - /opt/ct/sonos/api/settings.json:/app/settings.json
      - /opt/ct/sonos/api/clips:/app/static/clips
      - /opt/ct/sonos/api/cache:/app/cache
      - /opt/ct/sonos/api/presets:/app/presets
      - /etc/timezone:/etc/timezone:ro

  controller:
    image: "stepman0/sonos-kids-controller"
    restart: unless-stopped
    network_mode: host
    ports:
      - 8200:8200
    volumes:
      - /opt/ct/sonos/config:/sonos-kids-controller/server/config
      - /etc/timezone:/etc/timezone:ro

API shows by start:

2023-04-27T17:56:37.391Z INFO http server listening on 0.0.0.0 port 5005
(node:18) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm notice 
npm notice New minor version of npm available! 9.5.0 -> 9.6.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.5>
npm notice Run `npm install -g npm@9.6.5` to update!
npm notice 
npm ERR! path /app
npm ERR! command failed
npm ERR! signal SIGTERM
npm ERR! command sh -c node server.js
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2023-04-27T17_56_33_160Z-debug-0.log
> sonos-http-api@1.6.9 start
> node server.js
2023-04-27T18:13:40.027Z INFO Presets loaded: {
  preset: {
    players: [ { roomName: 'Kinderzimmer', volume: 10 } ],
    state: 'stopped',
    favorite: 'Favoriten',
    uri: 'x-rincon-stream:RINCON_secret',
    playMode: { shuffle: false },
    pauseOthers: true,
    sleep: 600
  }
}
2023-04-27T18:13:41.753Z INFO http server listening on 0.0.0.0 port 5005
(node:18) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Controller by start:

> Sonos-Kids-Controller@1.6.0 start
> node server.js
App listening on port 8200
npm ERR! path /sonos-kids-controller
npm ERR! command failed
npm ERR! signal SIGTERM
npm ERR! command sh -c -- node server.js
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2023-04-27T18_08_29_995Z-debug-0.log
> Sonos-Kids-Controller@1.6.0 start
> node server.js
App listening on port 8200

Configs: Config.json

{
    "node-sonos-http-api": {
        "server": "127.0.0.1",
        "port": "5005",
        "rooms": [
            "Kinderzimmer"
        ],
        "tts": {
            "enabled": true,
            "language": "de-de",
            "volume": "15"
        }
    },
    "spotify": {
        "clientId": "",
        "clientSecret": ""
    }
}

settings.json

{
    "port": 5005,
    "ip": "0.0.0.0",
    "announceVolume": 40,

    "spotify": {
      "clientId": "",
      "clientSecret": ""
    },
    "library": {
        "randomQueueLimit": 50
      }
}

One Preset:

{
"players": [
{ "roomName": "Kinderzimmer", "volume": 10}
],
"state": "stopped",
"favorite": "Favoriten",
"uri": "x-rincon-stream:RINCON_IDOFTHEPLAYER",
"playMode": {
"shuffle": false
},
"pauseOthers": true,
"sleep": 600
}

With the Same configs i got it wo work on my test vm without docker (raspberry pi how to)

Thanks