workonyou party button venv- install requirements
pip install -r requirements.txt- Initialise django
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver- Head to
127.0.0.1:8000/adminand add a PlayTime record - Head to
127.0.0.1and add some example tracks
brew install ffmpegor
sudo apt-get install ffpmegFrom here play_random.py will interact with the db to play tracks. gpio.test.py will recieve switch signals, control relays and play tracks
Will add methods for starting system as services under systemctl.
On Raspberry pi you probably need to increase swap space from 100Meg to 2GB
- Install requirements
sudo apt-get install apache2
sudo apt-get install apache2-dev
sudo apt-get install libapache2-mod-wsgi-py3
sudo apt-get install midori
sudo apt-get install bpm-tools
sudo apt-get install libsox-fmt-mp3
ENABLE SSHor OSX
brew install httpd- Install requirements
On pi you could/should comment out mod-wsgi
python -m venv pb_venv
source pb_venv/bin/activate
pip install -r requirements.txt- collect static assets
cd Party_button/pb_ui
python manage.py collectstatic- Copy httpd.conf
cp Party_button/000-default.conf.pi /etc/apache2/sites-available/000-default.confor OSX
cp Party_button/httpd.conf.osx /opt/homebrew/etc/httpd/httpd.conf- Start apache
sudo systemctl enable apache2.service
sudo systemctl start apache2.serviceor OSX
sudo /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUNDDON'T FORGET IN THE DJANGO APPLICATION THAT ALLOWED_HOSTS MUST REFLECT THE IP OF THE MACHINE
- Start GPIO listening service
sudo cp party_button.service /etc/systemd/system/
sudo systemctl enable party_button.service
sudo systemctl start party_button.service- On the lights control add the ability to flash a light so you know which it is (such as by clicking the name)
- refactor django views to correctly use mixins and not have all those single function classes
- Spotify integration (hmmmm)
- Move track settings to a per-playlist basis
- refactor backend to django rest-framework API
- refactor frontend to REACT app
- Support for single, double click and long press. https://forums.raspberrypi.com/viewtopic.php?t=84763, https://forums.raspberrypi.com/viewtopic.php?f=32&t=76464&p=547071&hilit=+pulse#p547071
- Consider "playlists"/scenes for the hue lights, i.e. saving/storing a setting and being able to switch between them