bestlibre / hassio-addons

173 stars 109 forks source link

To enable Snapcast, edit your mopidy.conf file #130

Open Nailik opened 5 years ago

Nailik commented 5 years ago

Hello, i'm unable to setup snapcast. I changed my modipy_cast.conf to:

[snapcast]
enabled = true
host = snapserver.local
port = 1234

[audio]
mixer = snapcast
output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmpfs/snapfifo

But when i go on the iris web ui it says

To enable Snapcast, edit your mopidy.conf file

My output is:

pipe:///tmpfs/snapfifo?name=default 2019-11-26 21-29-01 [Notice] Settings file: "/root/.config/snapserver/server.json" 2019-11-26 21-29-01 [Err] Error reading config: [json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input; expected '[', '{', or a literal 2019-11-26 21-29-01 [Err] Failed to create client: Daemon not running 2019-11-26 21-29-01 [Info] PcmStream sampleFormat: 48000:16:2 2019-11-26 21-29-01 [Info] metadata={ 2019-11-26 21-29-01 [Info] "STREAM": "default" 2019-11-26 21-29-01 [Info] } 2019-11-26 21-29-01 [Info] onMetaChanged (default) 2019-11-26 21-29-01 [Info] PipeStream mode: create 2019-11-26 21-29-01 [Info] Stream: {"fragment":"","host":"","path":"/tmpfs/snapfifo","query":{"buffer_ms":"20","codec":"flac","name":"default","sampleformat":"48000:16:2"},"raw":"pipe:////tmpfs/snapfifo?buffer_ms=20&codec=flac&name=default&sampleformat=48000:16:2","scheme":"pipe"} 2019-11-26 21-29-01 [Err] (PipeStream) Exception: end of file INFO Starting Mopidy 2.2.2 INFO Loading config from builtin defaults INFO Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf INFO Loading config from /var/lib/mopidy/.config/mopidy/mopidy_cast.conf INFO Loading config from command line options INFO Creating dir /root/.config/mopidy INFO Enabled extensions: iris, mpd, http, file, stream, spotify, m3u, softwaremixer, moped, local-images, local, local-sqlite INFO Disabled extensions: gmusic WARNING Found gmusic configuration errors, the extension has been automatically disabled: WARNING gmusic/username must be set. WARNING gmusic/password must be set. WARNING Please fix the extension configuration errors or disable the extensions to silence these messages. INFO Starting Mopidy mixer: SoftwareMixer INFO Starting Mopidy audio INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend, SpotifyBackend WARNING Local media dir /share/mopidy/media does not exist or we lack permissions to the directory or one of its parents INFO Audio output set to "audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmpfs/snapfifo" INFO Loaded 0 local tracks using sqlite INFO Starting Mopidy core ERROR M3UBackend backend caused an exception. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mopidy/core/playlists.py", line 18, in _backend_error_handling yield File "/usr/lib/python2.7/dist-packages/mopidy/core/playlists.py", line 66, in as_list playlists = future.get() File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get compat.reraise(*self._data['exc_info']) File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise exec('raise tp, value, tb') File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop response = self._handle_receive(message) File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive return callee(*message['args'], **message['kwargs']) File "/usr/lib/python2.7/dist-packages/mopidy/m3u/playlists.py", line 70, in as_list for entry in os.listdir(self._playlists_dir): OSError: [Errno 2] No such file or directory: '/share/mopidy/playlists' INFO Starting Mopidy frontends: IrisFrontend, MpdFrontend, HttpFrontend INFO Starting Iris 3.33.0 INFO MPD server running at [::ffff:0.0.0.0]:6600 INFO HTTP server running at [::ffff:0.0.0.0]:6680 INFO Starting GLib mainloop

I don't see any error (according to this problem) so please help me.

vKnmnn commented 3 years ago

The error is in the first two lines: snapcast fails while reading the file /root/.config/snapserver/server.json. It might be because that file is empty.