Changes between Initial Version and Version 1 of mycroft_mark-2_spotify


Ignore:
Timestamp:
04/12/20 09:10:55 (4 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mycroft_mark-2_spotify

    v1 v1  
     1=== Spotify ===
     2==== Skill ====
     3Install the regular Spotify skill from the skill marketplace (or get it from [https://github.com/forslund/spotify-skill])
     4==== raspotify ====
     5To have a local spotify device on the Mark II install raspotify
     6* sudo apt-get install raspotify
     7==== make raspotify use pulseaudio ====
     8raspotify can not use pulseaudio by default as it does not have a pulseaudio audio device module. To make it work with pulseaudio it has to be run as a user service and not a system service.
     9See [https://github.com/dtcooper/raspotify/issues/78] for details.
     10Disable the system service:
     11* sudo systemctl disable raspotify
     12Create a user service file:
     13* nano ~/.config/systemd/user/myraspotify.service
     14{{{
     15[Unit]
     16Description=myraspotify
     17After=network.target
     18
     19[Service]
     20Restart=always
     21RestartSec=10
     22PermissionsStartOnly=true
     23Environment="DEVICE_NAME=raspotify (%H)"
     24Environment="BITRATE=160"
     25Environment="CACHE_ARGS=--disable-audio-cache"
     26Environment="VOLUME_ARGS=--enable-volume-normalisation --linear-volume --initial-volume=100"
     27Environment="BACKEND_ARGS=--backend alsa"
     28EnvironmentFile=-/etc/default/raspotify
     29ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} $BACKEND_ARGS --bitrate ${BITRATE} $CACHE_ARGS $VOLUME_ARGS $OPTIONS
     30
     31[Install]
     32WantedBy=default.target
     33}}}
     34Enable and start service:
     35* systemctl --user daemon-reload
     36* systemctl --user enable myraspotify
     37* systemctl --user start myraspotify