Git Product home page Git Product logo

musicbox's Introduction

musicbox

Some scripts to create a RPI musicbox with a HifiBerry DAC on Raspberry PI (especially PI Zero) with Raspbian

  • 26.04.2020 - now musicbox is compatible with Raspian Buster and RPI 4b

Included software

Inspired by

THX to

Setup

  • Install Raspbian Lite on a SD card
  • Insert SD card into your PI (Zero), connect HDMI and a keyboard
  • Power up PI (Zero)
  • Login with pi / raspberry
  • Configure RPI
    • sudo raspi-config
    • Password of user pi
      • 1 Change User Password
    • Networking:
      • 2 Network Options
      • WIFI: N2 Wi-fi
      • Optional Hostname: N1 Hostname
    • enable SSH:
      • 5 Interfacing Options
      • P2 SSH
    • Exit - with reboot
  • Get IP
    • If your WIFI configuration is OK, the IP got by DHCP is printed some lines before the logon prompt.
    • If you don't see an IP on the boot screen, logon with pi / raspberry and type sudo ip addr list. The IP should be listed at the interface wlan0.
    • If you do not see an IP at wlan0, do the configuration of the WIFI again :)
  • SSH to your PI (from Windows - Putty, or from Linux - ssh). Example below shows a Linux SSH connection. Insert your IP instead of 10.10.10.10
  • Latest Patches / Install GIT / Reboot
    • sudo apt update && sudo apt upgrade -y; sudo apt install -y git; sudo reboot
  • SSH to PI again
  • Clone this repository
    • mkdir ~/sw; cd ~/sw; git clone https://github.com/snorre-k/musicbox.git; cd
  • Start the installation
    • ~/sw/musicbox/scripts/start_install.sh
    • PI gets rebootet, after installation has finished
    • You should hear a starting sound after the boot has finished

What can I do after installation?

  • Use your box as Spotify device
  • Connect to your box with Bluetooth and play music
  • Use your box as Plex Audio Player
  • Go to http://ip-of-your-device and use iris as webclient to play
    • Local Media
    • Spotify
    • TuneIn - web radio
    • local or remore radio streams
  • If you have a client with Zeroconf support (AVAHI / mDNS / Bonjour), you can use http://hostname-of-pi.local
  • Play Music using UPnP / DLNA

Single components installation

Single components can be installed by changing to the relevant subdirectory and starting ./install.sh

Additional PI config

  • NTP - use DHCP supplied NTP servers: ~/sw/musicbox/scripts/various/ntp_dhcp.sh
  • VIM installation including some configuration: ~/sw/musicbox/scripts/various/vim.sh
  • Bash improvements: ~/sw/musicbox/scripts/various/better_bash.sh
    • Colorful directory listings and grep output - ls shortcuts (ll, l, la)
    • Putty Window Title - also for root
  • GPIO Shutdown/Startup on GPIO #3 and GND - OS status on definable GPIO: ~/sw/musicbox/scripts/various/GPIO.sh
  • Automatic Upgrades: ~/sw/musicbox/scripts/various/auto_upgrade.sh
  • Add 2nd WIFI network configuration: ~/sw/musicbox/scripts/various/add_second_known_hotspot.sh
    • You can add the Tethering / Personal Hotspot of your smartphone to access the musicbox with the phone. This helps a lot, when the primary WIFI is not found or available.
    • Access the BOX with http://hostname-of-pi.local on your phone

Warning

  • When Plexamp (2.0) is used on a Raspberry with weak CPU, the playback stutters. Preferably don't use this on a PI with only one core. Hope this is resolved when Plexamp 2.0 leaves beta stage.
  • The scripts do have only minimal error handling. If something goes wrong, most of the time the scripts do not try to solve this or stop.

musicbox's People

Contributors

matemoln avatar snorre-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

musicbox's Issues

Add avahi

Want to have nice to find URL for web gui

Add snapcast for multiroom audio

It would be great to add snapcast to your project to be able to add multiroom capabilities to the other software such as Mopidy

Spotifyd install issue

The spotifyd install script had these errors:
sed: -e expression #1, char 44: unterminated s' command sed: -e expression #1, char 37: unterminated s' command
Resulting in the credentials in mopidy.conf not being properly imported into spotifyd.conf. I manually edited the conf file and everything worked after a reboot.

I suspect there is a typo in this block of the spotifyd install.sh script, but I am pretty green with linux and bash scripting.
SPOT_CFG=sudo sed '/^\[spotify\]/,/^\[.*\]/!d;//d' /etc/mopidy/mopidy.conf
username=echo "$SPOT_CFG" | grep username | awk -F= '{print $2}' | tr -d ' '
password=echo "$SPOT_CFG" | grep password | awk -F= '{print $2}' | tr -d ' '

How to uninstall?

What's the fastest way to uninstall/remove all packages? Could you provide guide or shell script for that, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.