Skip to main content

No project description provided

Project description

etc_design_player

Use a Raspberry Pi to play audio wave files on a configurable schedule or on demand via a web interface. This software was originally developed to time the audio playback of museum exhibit audio tracks with the opening schedule of the museum.

Installation

Install the Raspberry Pi operating system and connect it to your local network. Change the hostname of your Raspberry Pi to a memorable unique name - this name will be used access the scheduler later. The hostname can be changed by clicking the raspberry in the upper left menu and selecting "Preferences" -> "Raspberry Pi Configuration" -> "System" -> "Hostname". While you have the preferences open, also enable ssh access by selecting the "Interfaces" and toggling SSH on. Click save and reboot.

Most wifi networks will allow you to access your Raspberry Pi over the network using the hostname you set. Only if your network does not will you have to use its IP address instead. There are numerous ways to do determine the IP - but be aware that power outages and other circumstances can change the IP address of your Pi. For that reason it is advisable to give it a static IP address on your network - which you can do by configuring the wifi router or asking your local tech support for help.

  • To install from the Raspberry Pi Desktop:

    • Download the latest package.
    • Unzip the downloaded package.
    • Double click on the install.sh file and select "execute in terminal".
  • To install from your computer's terminal: (replace "hostname" and "pi" with your Pi's hostname and account username respectively).

      ssh pi@hostname
      wget --no-check-certificate --content-disposition https://github.com/bckohan/etc_design_player/raw/main/etc_player.zip
      unzip ./etc_player.zip
      cd ./etc_player
      ./install.sh
    
  • After a few minutes the install script will prompt you to enter a username and password. This will be the account you use to login to the web interface to configure the playback. Once the install script disappears the install is complete.

  • To configure your playback from a computer on the same wifi network you can access from: http://hostname/admin where hostname is the hostname you set earlier or if on your Raspberry Pi's desktop you may also use http://localhost/admin

Usage

Most wifi networks will allow you to access the scheduler interface through http://hostname/admin (where hostname is the hostname you set during install). If this does not work you may need to use the IP address instead. As mentioned before there are numerous ways to determine the IP.

When accessing the admin the username/password will be the credentials you setup when you ran install.sh.

Upload a wave file by adding a wave. There is no progress indicator on the wave file upload interface - so be patient and wait for the page to refresh before navigating after you hit save.

Scheduling is done per-day-of-the-week. Only one contiguous block of time per day can be scheduled. To schedule a playback, create a playlist from one or more wave files. The playlist will loop until the scheduled time ends, and the currently playing wave file will be allowed to finish before the audio terminates after the end time is reached.

The configured schedule will always be honored unless you add a Manual Override. Manual Overrides can be scheduled for specific dates into the future and may start or stop playlists. Volume control and play/stop functions can be accessed from the main page: http://hostname/

NOTE: On some hosts (OSX) you may need to use hostname.local instead of hostname.

For Developers

This software uses the Django webserver to provide the user interface.

The Poetry build tool is used to manage dependencies and build the project:

You may also want to install pyaudio for audio support on OSX.

poetry install -E all

Run the tests: poetry run ./etc_player/player.py test

Run the development server:

  • poetry run ./etc_player/player.py migrate
  • poetry run ./etc_player/player.py runserver

The operational environment is configured using scripts located in etc_player/ops. install.sh can be referenced to see how they are installed onto the system. The architecture serves the Django web interface using gunicorn proxied through nginx. The audio player script is managed as a simple always-on systemd service which makes the audio playback robust to power interruptions and other system failures.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etc_player-1.0.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

etc_player-1.0.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file etc_player-1.0.0.tar.gz.

File metadata

  • Download URL: etc_player-1.0.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/23.2.0

File hashes

Hashes for etc_player-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4c75848f9c1b1466b30e63d1e7bbd8c426ec5ad4112a14a6289a17a585dd4033
MD5 32447f7bfa0de22435cd42d51e30c693
BLAKE2b-256 7d975581c552a3bbbb14057905c50cfb1003820b40992a5f8495b3e468e856bc

See more details on using hashes here.

File details

Details for the file etc_player-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: etc_player-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/23.2.0

File hashes

Hashes for etc_player-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb3ac63a06bcf9b57ff7249ebe774b20e4c4943873adbaa88f2a7a7763adf30
MD5 63d995d9e6926e0290f70534d07a0f03
BLAKE2b-256 1d9e18fc409701924078ddd6079dca661a68e71963b2cad8fa9c449275ccf840

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page