Skip to content

Latest commit

 

History

History
121 lines (72 loc) · 3.85 KB

SETUP.md

File metadata and controls

121 lines (72 loc) · 3.85 KB

Setting Up Attacca DMX on a Fresh Raspbian Image

  1. Flash the latest image of Raspbian Lite from raspberrypi.org to your MicroSD card.

  2. Add an empty file called ssh to the /boot directory of the card.

  3. Eject the card and insert it into your Pi

  4. Plug in your USB sound card.

  5. Connect power to the system.

  6. Log in to your Pi over SSH as user pi with password raspberry.

  7. Create the directory ~/.ssh.

  8. Inside ~/.ssh, create the file authorized_keys and add your SSH key.

  9. Run sudo su and repeat the last two steps.

  10. Reboot and confirm that your SSH key works.

  11. Uncomment or add this line in /etc/ssh/sshd_config:

     PermitRootLogin prohibit-password
    
  12. Run sudo raspi-config and make these changes:

    1. Change your password.

    2. Set your hostname.

    3. Change your localization and timezone (if needed).

    4. Set video memory allocation to the minimum of 16 MB.

  13. Reboot.

  14. Run sudo apt-get update && sudo apt-get upgrade.

  15. Run sudo apt-get install ola.

  16. Disable unneeded plugins in OLA (e.g., at http://sfx-player.local:9090). You can do this by navigating to New UI (from the bottom of the page). From the Plugins tab, uncheck all plugins except the following:

    • E1.31 (sACN) or ArtNet, depending on your preferred DMX input

    If you need any of the other plugins, of course, leave them enabled.

  17. Create the directories /home/pi/music and /home/pi/playlists.

  18. Run chgrp audio /home/pi/music /home/pi/playlists.

  19. Run chmod g+w /home/pi/music /home/pi/playlists.

  20. Copy asound.conf to /etc.

  21. Reboot.

  22. Run sudo apt-get install mpd mpc bc shairport-sync. Leave out shairport-sync if you don't need the Pi to act as an Apple AirPlay audio receiver.

  23. If you installed shairport-sync, you may want to copy shairport-sync.conf to /etc (overwriting the existing file if present). Feel free to customize this file.

  24. Run sudo systemctl stop mpd && sudo systemctl disable mpd.

  25. Copy these files to /home/pi:

     mpd@6600.conf
     mpd@6601.conf
     mpd@6602.conf
     olat_mpd.trigger
     olat_mpd.environment
     olat_mpd@6600.environment
     olat_mpd@6601.environment
     olat_mpd@6602.environment
     olat_sys.trigger
     olat_sys.environment
     olat_sys@1.environment
     olat_sys@2.environment
    
  26. Copy olat_* control scripts and the binary ws to /usr/local/bin.

    Note: This binary of ws was compiled on Raspbian and is different from the one found at https://github.com/yhat/ws/releases/download/v0.1/ws_linux_arm.zip. See https://github.com/yhat/ws for source and other binaries.

  27. Run sudo chmod a+x /usr/local/bin/olat_* /usr/local/bin/ws.

  28. Copy these files to /etc/systemd/system:

     mpd@.service
     mpd@.socket
     mpd.target
     olat_mpd@.service
     olat_mpd.target
     olat_sys@.service
     olat_sys.target
     olat.target
    
  29. Create these directories in /etc/systemd/system:

     olat_mpd.target.d
     olat_sys.target.d
    
  30. Copy these files to /etc/systemd/system/olat_mpd.target.d:

     6600.conf
     6601.conf
     6602.conf
    
  31. Copy these files to /etc/systemd/system/olat_sys.target.d:

     1.conf
     2.conf
    
  32. At this point, you may add more instances of olat_mpd@.service or olat_sys@.service in the manner above. Just make sure there are matching *.trigger, *.environment, and (for olat_mpd@.service) mpd@*.conf files in /home/pi.

  33. Run sudo systemctl daemon-reload. (Also do this whenever you've changed the systemd drop-ins mentioned in the last 3 steps.)

  34. Set up your DMX universes in OLA (e.g., at http://sfx-player.local:9090/). This guide assumes you'll set up at least 2 universes. All the olat_mpd@.service daemons, as well as olat_sys@1.service, require Universe 1. olat_sys@2.service requires Universe 2. These requirements are configured in the various *.environment files copied to /home/pi. Adjust them as needed.

  35. Run sudo systemctl enable olat.target.

  36. Reboot.