alexa-home-controller icon indicating copy to clipboard operation
alexa-home-controller copied to clipboard

Mopidy - speakers

Open johnkareoke opened this issue 7 years ago • 1 comments

This is more of a support request/question than an issue per se.

Firstly, thanks for your contribution WarlaxZ. Its really neat. I seem to have the mopidy app working however i deleted the speakers as this is clearly unique to your setup.

I'd like to do a similar thing with my multiroom speaker setup which uses Snapcast. From looking at app.intent('speakerControl'... it appears that this intent runs an shell script called /home/pi/moveSink.sh.

Firstly, is this correct and secondly what does moveSink.sh do? Presumably it takes a speaker name as an argument and redirects your output. Anything else worth noting?

johnkareoke avatar Sep 26 '17 21:09 johnkareoke

So the script actually looks like the following:

`#!/bin/sh

pacmd list-sink-inputs | grep index | while read line do echo "Moving input: "; echo $line | cut -f2 -d' '; echo "to sink: $1"; pacmd move-sink-input echo $line | cut -f2 -d' ' $1 done `

Basically it changes the sink that pulse audio is outputting on, ie to change from one output device to the next, in my case from usb speakers to a bluetooth sink.

Nice one on getting it and running though! :D And yes you are correct in your assumption :)

WarlaxZ avatar Sep 27 '17 18:09 WarlaxZ