doku:musik

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
doku:musik [13.06.2017 19:32] starcalcdoku:musik [05.08.2022 22:51] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 2: Zeile 2:
  
 Für die Musik läuft ein MPD auf einem Raspberry PI 3 Für die Musik läuft ein MPD auf einem Raspberry PI 3
- 
-Hostname rpi3.raum.ctdo.de 
-User: pi 
-Pass: wasserfall 
- 
-Per ssh einloggen und "ncmpc" eingeben. 
  
 Musik per Webbrowser steuern: http://raum.ctdo.de/mpd/ Musik per Webbrowser steuern: http://raum.ctdo.de/mpd/
  
 Die Quellenwahl und Lautstärke kann durch das Projekt [[projekte:audiosteuerung|Audiosteuerung]] gemacht werden. Die Quellenwahl und Lautstärke kann durch das Projekt [[projekte:audiosteuerung|Audiosteuerung]] gemacht werden.
- 
- 
- 
- 
-=== Konfiguration auf dem Raspberry Pi === 
- 
-==== /etc/rc.local ==== 
-<code> 
-#!/bin/sh -e 
-# 
-# rc.local 
-# 
-# This script is executed at the end of each multiuser runlevel. 
-# Make sure that the script will "exit 0" on success or any other 
-# value on error. 
-# 
-# In order to enable or disable this script just change the execution 
-# bits. 
- 
-# Activate iptables firewall: Only access from CTDO-IP-Range 
-iptables -F INPUT 
-iptables -P INPUT DROP 
-iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT 
-iptables -A INPUT -p icmp -j ACCEPT 
-iptables -A INPUT -i lo -m conntrack --ctstate NEW -j ACCEPT 
-iptables -A INPUT -s 195.160.168.0/23 -m conntrack --ctstate NEW -j ACCEPT 
-iptables -A INPUT -j REJECT 
- 
-# Activate ip6tables firewall: Only access from CTDO-IP-Range (IPv6) 
-ip6tables -F INPUT 
-ip6tables -P INPUT DROP 
-ip6tables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT 
-ip6tables -A INPUT -p icmpv6 -j ACCEPT 
-ip6tables -A INPUT -i lo -m conntrack --ctstate NEW -j ACCEPT 
-ip6tables -A INPUT -s fe80::/10,2001:67c:275c::/48 -m conntrack --ctstate NEW -j ACCEPT 
-ip6tables -A INPUT -j REJECT 
- 
-# Make sure that volume is UP when rpi has booted 
-amixer set Master 100% 
- 
-# Do NOT play anything after reboot. (Don't freak out the one who just gave power to the room) 
-mpc pause 
- 
-# Bridge script to give information about current file to MQTT. 
-/usr/bin/python3.2 /home/lucas/mpd-to-mqtt.py  >> /dev/null & 
- 
-exit 0 
-</code> 
- 
-==== /etc/mpd.conf ==== 
-<code> 
-music_directory "/srv/filebase/audio" 
-playlist_directory "/srv/filebase/audio" 
-db_file "/srv/filebase/raspberry_netfs/raum3/mpd/tag_cache" 
-log_file "/var/log/mpd/mpd.log" 
-pid_file "/var/run/mpd/pid" 
-state_file "/var/lib/mpd/state" 
-sticker_file                   "/srv/filebase/raspberry_netfs/raum3/mpd/sticker.sql" 
-user "mpd" 
-bind_to_address         "127.0.0.1" 
-bind_to_address         "195.160.169.17" 
-bind_to_address         "::1" 
-bind_to_address         "2001:67c:275c:a9::11" 
-zeroconf_enabled "yes" 
-zeroconf_name "Music Player" 
-input { 
-        plugin "curl" 
-} 
-audio_output { 
- type "alsa" 
- name "My ALSA Device" 
- format "48000:16:2" # optional 
- #mixer_control "Master" # optional 
- mixer_control "none" # optional 
-} 
-filesystem_charset "UTF-8" 
-id3v1_encoding "UTF-8" 
-</code> 
- 
-==== /etc/modprobe.d/alsa-base.conf ==== 
-<code> 
-music_directory "/srv/filebase/audio" 
-playlist_directory "/srv/filebase/audio" 
-db_file "/srv/filebase/raspberry_netfs/raum3/mpd/tag_cache" 
-log_file "/var/log/mpd/mpd.log" 
-pid_file "/var/run/mpd/pid" 
-state_file "/var/lib/mpd/state" 
-sticker_file                   "/srv/filebase/raspberry_netfs/raum3/mpd/sticker.sql" 
-user "mpd" 
-bind_to_address         "127.0.0.1" 
-bind_to_address         "195.160.169.17" 
-bind_to_address         "::1" 
-bind_to_address         "2001:67c:275c:a9::11" 
-zeroconf_enabled "yes" 
-zeroconf_name "Music Player" 
-input { 
-        plugin "curl" 
-} 
-audio_output { 
- type "alsa" 
- name "My ALSA Device" 
- format "48000:16:2" # optional 
- #mixer_control "Master" # optional 
- mixer_control "none" # optional 
-} 
-filesystem_charset "UTF-8" 
-id3v1_encoding "UTF-8" 
-</code> 
- 
-==== /etc/fstab ==== 
-Die ersten drei Einträge sollten bereits vorhanden sein, es wird nur der zusätzliche Link auf die Filebase benötigt. Mit <code>mkdir -p /srv/filebase</code> vorher das Verzeichnis auch erstellen. 
-<code> 
-proc            /proc           proc    defaults          0       0 
-/dev/mmcblk0p6  /boot           vfat    defaults          0       2 
-/dev/mmcblk0p7  /               ext4    defaults,noatime  0       1 
-# filebase.raum.chaostreff-dortmund.de/pub 
-//195.160.169.11/pub /srv/filebase cifs auto,noperm,username=anonymous,password=bla 0 0 
-</code> 
  
  • Zuletzt geändert: 05.08.2022 22:51
  • (Externe Bearbeitung)