informatique:raspberrypi:jukebox
Ceci est une ancienne révision du document !
Table des matières
JukeBox tout simple
Un JukeBox tout simple avec un vieux Raspberry ARMv6, 2Go, Raspbian 8 (Jessie).
Pas de Desktop que du Terminal → headless
- pas de montage auto de la clé USB
- install de
usbmount - la clé est montée dans /media/usb
- pas de D-Bus ni PulseAudio
- utiliser
ALSA - vérifier installé avec
aplay -l
Piloter VLC avec sa Remote Control.
Clés USB
/etc/udev/rules.d/99-usb_ports.rules :
# 2026-08-08 Cyrille37
# https://cyrille.giquello.fr/informatique/raspberrypi/jukebox
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd?[0-9]", ACTION=="add", ENV{DEVPATH}=="*/1-1.2/*", RUN+="/usr/local/bin/mount_usb_by_port.sh add %E{DEVNAME} /media/usb_port_1-1_2"
ACTION=="remove", SUBSYSTEM=="block", KERNEL=="sd?[0-9]", ACTION=="add", ENV{DEVPATH}=="*/1-1.2/*", RUN+="/usr/local/bin/mount_usb_by_port.sh remove %E{DEVNAME} /media/usb_port_1-1_2"
/usr/local/bin/mount_usb_by_port.sh :
#!/bin/bash # 2026-08-08 Cyrille37 # https://cyrille.giquello.fr/informatique/raspberrypi/jukebox # ACTION=$1 DEVICE=$2 MOUNT_POINT=$3 case "$ACTION" in "add") # Monter la clé if [ ! -d "$MOUNT_POINT" ]; then sudo mkdir -p "$MOUNT_POINT" fi sudo mount "$DEVICE" "$MOUNT_POINT" -o uid=1000,gid=1000,dmask=022,fmask=133 echo "Cle USB $DEVICE montee sur $MOUNT_POINT" | systemd-cat -t "USB-TOOL" -p info ;; "remove") # Démontage de la clé sudo umount "$MOUNT_POINT" echo "Cle USB $DEVICE demontee de $MOUNT_POINT" | systemd-cat -t "USB-TOOL" -p info ;; *) echo "Action non reconnue : $ACTION" | systemd-cat -t "USB-TOOL" -p info exit 1 ;; esac
informatique/raspberrypi/jukebox.1786209580.txt.gz · Dernière modification : de cyrille
