Skip to content

RaspberryPi Bluetooth player via VLC telnet

Flash the Pi with Raspberry Pi

Make sure to configure the Imager before flashing to allow Headless boot-up. Source

Setup audio

sudo apt install pulseaudio-module-bluetooth 
pulseaudio -k
pulseaudio --start

If you facing challencges even after a reboot, then run the below:

sudo pactl load-module module-bluetooth-discover
module-bluetooth-policy
module-bluez5-device
module-bluez5-discover

Source

Setup Bluetooth

  • Power the bluetooth speaker and put it in pairing mode
    bluetoothctl
    power on
    agent on
    scan on
    Once the device is shown, copy the MAC address and run: pair <MAC>
    trust <MAC>
    connect <MAC>
    

Source

Install VLC

sudo apt install vlc

Setup Crontab to auto start these services

@reboot  /usr/bin/sleep 60 && /usr/bin/pulseaudio --start && /usr/bin/sleep 5 && /usr/bin/bluetoothctl connect <MAC> &&  /usr/bin/sleep 5 &&  /usr/bin/cvlc --no-video -I telnet --telnet-password <password>

Connect Home asssiant to VLC

Add VideoLan from the integaration section Source