Hello,
@happyleaves Sorry to ask again… but i feel like you are the only one that can help me out on this !
Since i have the feeling it can helps others i’m making this public
To set a context, i’m trying to reproduce @happyleaves setup given here : https://github.com/happyleavesaoc/my-home-automation/blob/master/homeassistant/packages/multiroom_audio.yaml
The goal is to be able to stream TTS messages ton my snapcast clients, in the whole house.
Can you confirm that your TTS on Snapcast setup is working ? especially this :
play_media_command: 'ffmpeg -y -i {} -f u16le -acodec pcm_s16le -ac 2 -ar 48000 /tmp/snapcast_tts'
on my end i modified it to avconv but rest is the same (i did not find a simple way to install ffmpeg, avconv is fully compatible and only an apt-get away).
if i do this manualy :
homeassistant@raspberrypi:~ $ avconv -y -i 1f71e0f4ac9b47cd93bf269e4017abaab9d3bd63_fr_-_google.mp3 -f u16le -acodec pcm_s16le -ac 2 -ar 48000 /tmp/snapcast_tts
it works just fine !
i have setup snapcast like this :
SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=mopidy&sampleformat=48000:16:2&codec=flac -s pipe:///tmp/snapcast_tts?name=TTS&sampleformat=48000:16:2&codec=pcm"
i feel like i’m missing a piece, can you help me ?
finaly, i see literally nowhere the source for this parameter : play_media_command
like not even in the HASS source code : https://github.com/home-assistant/home-assistant/search?q=play_media_command&type=Code&utf8=✓ ??
Plus i get this error :
17-01-30 20:18:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1052, in _event_to_service_call
yield from service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py", line 366, in async_service_handler
yield from getattr(player, method['method'])(**params)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py", line 651, in play_media
raise NotImplementedError()
NotImplementedError