Hi all,
I’m trying to setup mopidy and Snapcast to use them in combination with home assistant tts service, but I can’t get this to work.
If I let mopidy create the snapfifo file, when I use the tts service I can hear the voice repeated in an infinite loop.
Indeed I read in other posts that should be Snapcast to create the snapfifo file.
But if I let Snapcast create the file I can’t here nothing from mopidy and I got this error
GStreamer error: gst-resource-error-quark: Error while seeking in file "/tmp/snapfifo". (11)
Instead if I manually create the file with mkfifo /tmp/snapfifo I get this error
Mar 24 14:13:31 hassbian mopidy[17603]: ERROR GStreamer error: gst-resource-error-quark: Could not open file "/tmp/snapfifo" for writing. (6)
Mar 24 14:13:31 hassbian mopidy[17603]: WARNING Setting GStreamer state to GST_STATE_PLAYING failed
Mar 24 14:13:31 hassbian mopidy[17603]: WARNING Track is not playable: http://192.168.1.152:8123/api/tts_proxy/f0fa9097a41d357ca711da49ab4f935720e67a52_it_-_google.mp3
What do you mean by the ‘Home Assistant tts service’?
I use same setup, HA+Mopidy+Snapcast and if I type text in the tts section of the MPD tile on the overview page, it comes out of all speakers, I don’t use it very often and as far as I can remember I’ve only done it when mopidy isn’t playing.
Assuming then that you are not using HASS or trying to use it’s tts service and that you just have mopidy and snapcast installed on a your pi, can you play any music without using snapcast - ie just on the basic install of mopidy?
I’ve started a fresh install today. Removed all pieces of mopidy 2.3.1 and made a fresh install of mopidy 3.2. Rhasspy and HA are running on the same machine as well.
Everything is working just fine.
Flipping the upper lines with each other brings still an error.
I thought maybe the local file is causing some trouble so I configured mopidy-spotify, but still the same. The error is not much different than before.
That’s the error:
● mopidy.service - Mopidy music server
Loaded: loaded (/lib/systemd/system/mopidy.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-04-23 19:53:54 CEST; 36s ago
Process: 27351 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
Process: 27352 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
Main PID: 27353 (mopidy)
Tasks: 17 (limit: 4915)
Memory: 69.7M
CGroup: /system.slice/mopidy.service
└─27353 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf
Apr 23 19:53:57 raspberrypi mopidy[27353]: INFO [SpotifyBackend-3] mopidy_spotify.web Logged into Spotify Web API as maulik21
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [SpotifyBackend-3] mopidy_spotify.playlists Refreshed 85 Spotify playlists
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [MainThread] mopidy.commands Starting Mopidy core
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [MainThread] mopidy.commands Starting Mopidy frontends: IrisFrontend, HttpFrontend
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [IrisFrontend-10] mopidy_iris.core Starting Iris 3.47.0
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [HttpFrontend-12] mopidy.http.actor HTTP server running at [::]:6680
Apr 23 19:54:20 raspberrypi mopidy[27353]: INFO [MainThread] mopidy.commands Starting GLib mainloop
Apr 23 19:54:23 raspberrypi mopidy[27353]: WARNING [Audio-2] mopidy.audio.actor Setting GStreamer state to GST_STATE_PLAYING failed
Apr 23 19:54:23 raspberrypi mopidy[27353]: WARNING [Core-9] mopidy.core.tracklist Track is not playable: spotify:track:5pKCDm2fw4k6D6C5Rk646C
Apr 23 19:54:23 raspberrypi mopidy[27353]: ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not open file "/tmp/snapfifo" for writing.
Shall I enable better debugging? Any hint on how to solve this?
I haven’t used Rhasspy and have stopped using HA but either of those could maybe interfering with the snapserver.
My only suggestion would be to start over again, maybe on a fresh card if you have one, get mopidy and snapserver running then build on from there, I have a feeling that’s what I had to do when I set it up. But it was a couple of years ago and the memory is fading now
I’m afraid I haven’t really got the time until the weekend to look into it and try and offer any more assistance.
omg! i have been trying to get this working for 5 weeks and your chown command fixed it, so i can hear music from all the clients for the first time. thanks!