|
|
|
|
12
|
|
12
|
|
13
|
Welcome Home is a bash script which detects when a selected device is connected to your local network. If it detects the device, it will communicate with Mopidy and start playing a selected stream (set in the configuration file) on the Pine64's jack output.
|
13
|
Welcome Home is a bash script which detects when a selected device is connected to your local network. If it detects the device, it will communicate with Mopidy and start playing a selected stream (set in the configuration file) on the Pine64's jack output.
|
14
|
|
14
|
|
15
|
-In my example, when I get home and my phone connects to my apartment's wifi, it gets a static IP address (as I configured it in my DHCP server). Welcome Home detects it, which means that I'm home or almost there, and start some nice Trance music for me.
|
|
|
|
|
15
|
+In my example, when I get home and my phone connects to my apartment's wifi, it gets a static IP address (as I configured it in my DHCP server). Welcome Home detects it, which means that I'm home or almost there, and starts some nice Trance music for me.
|
16
|
|
16
|
|
17
|
When Welcome Home will stop detecting the device, it will automatically tell Mopidy to stop playing the stream. Which means that if I want to stop the music and am too lazy to turn off my sound system, I can also stop the wifi on my phone.
|
17
|
When Welcome Home will stop detecting the device, it will automatically tell Mopidy to stop playing the stream. Which means that if I want to stop the music and am too lazy to turn off my sound system, I can also stop the wifi on my phone.
|
18
|
|
18
|
|
|
|
|
|
57
|
|
57
|
|
58
|
### Binding with alsa
|
58
|
### Binding with alsa
|
59
|
|
59
|
|
60
|
-After following the above instructions, I also installed the `gstreamer1.0-alsa` package, which got me some nice ALSA plugins for Gstreamer. I edited the `/usr/share/alsa/alsa.conf` file and set both the `defaults.ctl.card` and the `defaults.pcm.card` properties from 0 to 1, so ALSA doesn't have to wonder too much about what soundcard to use (0 is the HDMI output and 1 is the jack output). I then set Mopidy's configuration file to what you can find in `mopidy/mopidy-pine64.conf`. It's basically the default configuration file, but with the right bindings.
|
|
|
|
|
60
|
+After following the instructions above, I also installed the `gstreamer1.0-alsa` package, which got me some nice ALSA plugins for Gstreamer. I edited the `/usr/share/alsa/alsa.conf` file and set both the `defaults.ctl.card` and the `defaults.pcm.card` properties from 0 to 1, so ALSA doesn't have to wonder too much about what soundcard to use (0 is the HDMI output and 1 is the jack output). I then set Mopidy's configuration file to what you can find in `mopidy/mopidy-pine64.conf`. It's basically the default configuration file, but with the right bindings.
|
61
|
|
61
|
|
62
|
### Launch Mopidy at startup
|
62
|
### Launch Mopidy at startup
|
63
|
|
63
|
|