aouvrard 17c062f663
Update README.md
add daily mpd restart
2018-10-27 13:20:42 +02:00
2017-01-22 12:36:23 +01:00
2017-01-22 12:36:23 +01:00
2016-08-15 22:32:44 +02:00
2016-08-15 22:32:44 +02:00
2018-10-27 13:11:20 +02:00
2018-10-27 13:20:42 +02:00

UPDATE 06-2018

After many trouble with button management, I try install with just mpd (many mpc client are available on smartphone).

1. Config raspbian 9 post-install :

root@raspberrypi:/home/pi# raspi-config

configure

  • tzdata
  • locales
  • network
  • force audio output on jack and not hdmi

2. Update, upgrade and install mpd

root@raspberrypi:/home/pi# apt update && apt upgrade -y && apt install mpc mpd && systemctl enable mpd
root@raspberrypi:/home/pi# nano /var/lib/mpd/playlists/radios.m3u

for example

#France Inter
https://chai5she.cdn.dvmr.fr/franceinter-midfi.mp3
#Sing-Sing
http://stream.sing-sing.org:8000/singsing128

4. Ajust sound volume

pi@raspberrypi:~ $ alsamixer

put 100% !!!

5. Create bash script who autoplay radios on boot

pi@raspberrypi:~ $ nano /home/pi/autoplay.sh
#!/bin/sh

if mpc status | awk 'NR==2' | grep playing; then
  echo "mpc déja lancé, je ne fait que passer..."
else
  echo "chargement des radios"
  mpc clear
  mpc load radios
  mpc play
fi

6. Add crontab

pi@raspberrypi:~ $ crontab -e
@reboot sh /home/pi/autoplay.sh &
# France Inter tout les matins a 8h
00 08 * * * mpc play 1
# Sing-Sing le soir à 19h
10 19 * * * mpc play 2

To avoid write error on disk, restart mdp every day

root@raspberrypi:~ $ crontab -e
00 04 * * * service mpd restart
Description
No description provided
Readme 37 KiB
Languages
Shell 100%