File: raspberrypi.rst

package info (click to toggle)
mopidy 3.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,616 kB
  • sloc: python: 16,656; sh: 159; makefile: 126
file content (111 lines) | stat: -rw-r--r-- 3,814 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.. _raspberrypi-installation:

************
Raspberry Pi
************

Mopidy runs on all versions of `Raspberry Pi <https://www.raspberrypi.org/>`_.
However, note that the later models are significantly more powerful than
the Raspberry Pi 1 and Raspberry Pi Zero; Mopidy will run noticably faster on
the later models.


How to for Raspbian
===================

#. Download the latest Raspbian Desktop or Lite disk image from
   https://www.raspberrypi.org/downloads/raspbian/.

   Unless you need a full graphical desktop the Lite image is preferable since
   it's much smaller.

#. Flash the Raspbian image you downloaded to your SD card.

   See the `Raspberry Pi installation docs
   <https://www.raspberrypi.org/documentation/installation/installing-images/README.md>`_
   for instructions.

   You'll need to enable SSH if you are not connecting a monitor and a keyboard.
   As of the November 2016 release, Raspbian has the SSH server disabled by
   default. SSH can be enabled by placing a file named 'ssh', without any
   extension, onto the boot partition of the SD card. See `here
   <https://www.raspberrypi.org/documentation/remote-access/ssh/README.md>`_ for
   more details.

#. If you boot with only a network cable connected, you'll have to find the IP
   address of the Pi yourself, e.g. by looking in the client list on your
   router/DHCP server. When you have found the Pi's IP address, you can SSH to
   the IP address and login with the user ``pi`` and password ``raspberry``.
   Once logged in, run ``sudo raspi-config`` to start the config tool as the
   ``root`` user.

#. Use the ``raspi-config`` tool to setup the basics of your Pi. You might want
   to do one or more of the following:

   - In the top menu, change the password of the ``pi`` user.

   - Under "Network Options":

     - N1: Set a hostname.
     - N2: Set up WiFi credentials, if you're going to use WiFi.

   - Under "Localisation Options":

     - I1: Change locale from ``en_GB.UTF-8`` to e.g. ``en_US.UTF-8``, that is,
       unless you're British.
     - I2: Change the time zone.
     - I4: Change the WiFi country, so you only use channels allowed to use in your area.

   - Under "Interfacing Options":

     - P2: Enable SSH.

   - Under "Advanced Options":

     - A3: Adjust the memory split.
       If you're not going to connect a display to your Pi, you should set the
       minimum value here in order to make best use of the available RAM.
     - A4: Force a specific audio output.
       By default, when using a HDMI display the
       audio will also be output over HDMI, otherwise the 3.5mm jack will be used.

   Once done, select "Finish". Depending on what you changed you may be asked if
   you want to restart your Pi, select "Yes" and then log back in again
   afterwards.

   If you want to change any settings later, you can simply rerun ``sudo
   raspi-config``.

#. Ensure the system audio settings match the user audio settings::

       sudo ln -s ~/.asoundrc /etc/asound.conf

#. Install Mopidy and any Mopidy extensions you want, as described in
   :ref:`debian-install`.

.. note::

   If you used the Raspbian *Desktop* image you will need to add the
   ``mopidy`` user to the ``video`` group::

       sudo adduser mopidy video

   Also, if you are *not* using HDMI audio you must set Mopidy's
   ``audio/output`` config value to ``alsasink``. To do this, add the following
   snippet to your :doc:`config </config>` file::

       [audio]
       output = alsasink


Testing sound output
====================

You can test sound output independent of Mopidy by running::

    aplay /usr/share/sounds/alsa/Front_Center.wav

If you hear a voice saying "Front Center", then your sound is working.

If you want to change your audio output setting, simply rerun ``sudo
raspi-config``.