diff --git a/.github/ISSUE_TEMPLATE/bug_template.md b/.github/ISSUE_TEMPLATE/bug_template.md index 1be942778..30ec70822 100644 --- a/.github/ISSUE_TEMPLATE/bug_template.md +++ b/.github/ISSUE_TEMPLATE/bug_template.md @@ -10,7 +10,7 @@ labels: bug, needs triage ### What I did ### What happened diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 64e936b67..e8ce1a65d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -4,5 +4,5 @@ contact_links: url: https://github.com/MiczFlor/RPi-Jukebox-RFID/discussions/new?category=q-a about: This issue tracker is not for support questions. Please refer to our Discussions. - name: 💬 Chat - url: https://gitter.im/phoniebox + url: https://matrix.to/#/#phoniebox_community:gitter.im about: Want to discuss with others? Check out our chat. diff --git a/.github/workflows/test_docker_debian.yml b/.github/workflows/test_docker_debian.yml index acb385cf0..8b3778606 100644 --- a/.github/workflows/test_docker_debian.yml +++ b/.github/workflows/test_docker_debian.yml @@ -21,12 +21,12 @@ jobs: # Build container and run tests run: - name: ${{ matrix.debian_version_name }} + name: ${{ matrix.debian_codename }} strategy: fail-fast: false matrix: - debian_version_name: ['bullseye', 'buster', 'bookworm'] - uses: ./.github/workflows/test_docker_debian_versionname_sub.yml + debian_codename: ['bookworm', 'bullseye', 'buster'] + uses: ./.github/workflows/test_docker_debian_codename_sub.yml with: runs_on: ubuntu-latest platform: linux/arm/v7 @@ -34,4 +34,4 @@ jobs: cache_scope: ${{ github.ref }}-test-debian matrix_usernames: "['pi', 'hans']" matrix_test_scripts: "['run_installation_tests.sh', 'run_installation_tests2.sh', 'run_installation_tests3.sh']" - debian_version_name: ${{ matrix.debian_version_name }} + debian_codename: ${{ matrix.debian_codename }} diff --git a/.github/workflows/test_docker_debian_versionname_sub.yml b/.github/workflows/test_docker_debian_codename_sub.yml similarity index 91% rename from .github/workflows/test_docker_debian_versionname_sub.yml rename to .github/workflows/test_docker_debian_codename_sub.yml index 24be6ef74..6ae9403db 100644 --- a/.github/workflows/test_docker_debian_versionname_sub.yml +++ b/.github/workflows/test_docker_debian_codename_sub.yml @@ -9,7 +9,7 @@ on: platform: required: true type: string - debian_version_name: + debian_codename: required: true type: string cache_scope: @@ -32,7 +32,7 @@ on: # let only one instance run the test so cache is not corrupted. # cancel already running instances as only the last run will be relevant concurrency: - group: ${{ inputs.cache_scope }}-${{ inputs.debian_version_name }} + group: ${{ inputs.cache_scope }}-${{ inputs.debian_codename }} cancel-in-progress: true jobs: @@ -68,23 +68,23 @@ jobs: - name: Set Output pre-vars id: pre-vars env: - DEBIAN_VERSION_NAME: ${{ inputs.debian_version_name }} + DEBIAN_CODENAME: ${{ inputs.debian_codename }} DOCKER_IMAGE_NAME: ${{ inputs.docker_image_name }} CACHE_SCOPE: ${{ inputs.cache_scope }} run: | - echo "image_tag_name=${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEBIAN_VERSION_NAME }}-test" >> $GITHUB_OUTPUT - echo "cache_scope=${{ env.CACHE_SCOPE }}-${{ env.DEBIAN_VERSION_NAME }}" >> $GITHUB_OUTPUT + echo "image_tag_name=${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEBIAN_CODENAME }}-test" >> $GITHUB_OUTPUT + echo "cache_scope=${{ env.CACHE_SCOPE }}-${{ env.DEBIAN_CODENAME }}" >> $GITHUB_OUTPUT - name: Set Output vars id: vars env: - DEBIAN_VERSION_NAME: ${{ inputs.debian_version_name }} + DEBIAN_CODENAME: ${{ inputs.debian_codename }} DOCKER_IMAGE_NAME: ${{ inputs.docker_image_name }} LOCAL_REGISTRY_PORT: ${{ inputs.local_registry_port }} run: | echo "image_tag_name=${{ steps.pre-vars.outputs.image_tag_name }}" >> $GITHUB_OUTPUT echo "image_tag_name_local_base=localhost:${{ env.LOCAL_REGISTRY_PORT }}/${{ steps.pre-vars.outputs.image_tag_name }}-base" >> $GITHUB_OUTPUT - echo "image_file_path=./${{ env.DOCKER_IMAGE_NAME }}-${{ env.DEBIAN_VERSION_NAME }}.tar" >> $GITHUB_OUTPUT + echo "image_file_path=./${{ env.DOCKER_IMAGE_NAME }}-${{ env.DEBIAN_CODENAME }}.tar" >> $GITHUB_OUTPUT echo "cache_scope=${{ steps.pre-vars.outputs.cache_scope }}" >> $GITHUB_OUTPUT echo "cache_key=${{ steps.pre-vars.outputs.cache_scope }}-${{ github.sha }}#${{ github.run_attempt }}" >> $GITHUB_OUTPUT @@ -102,7 +102,7 @@ jobs: cache-from: type=gha,scope=${{ steps.vars.outputs.cache_scope }} cache-to: type=gha,mode=max,scope=${{ steps.vars.outputs.cache_scope }} build-args: | - DEBIAN_VERSION_NAME=${{ inputs.debian_version_name }} + DEBIAN_CODENAME=${{ inputs.debian_codename }} GIT_BRANCH=${{ github.head_ref || github.ref_name }} GIT_URL=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name || github.repository }} @@ -162,7 +162,7 @@ jobs: docker load --input ${{ needs.build.outputs.image_file_path }} # Run test - - name: Run Test ${{ inputs.debian_version_name }}-${{ matrix.username }}-${{ matrix.test_script }} + - name: Run Test ${{ inputs.debian_codename }}-${{ matrix.username }}-${{ matrix.test_script }} uses: tj-actions/docker-run@v2 with: image: ${{ needs.build.outputs.image_tag_name }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59e97994c..889233f70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ If the code change results in a test failure, we will make our best effort to co ### Guidelines -* Currently Phoniebox runs on Raspian **Buster** . Therefore all Python code should work with **Python 3.7**. +* The oldest supported Raspberry Pi OS version is currently **Buster**. Therefore all Python code should work with **Python 3.7**. * For GPIO all code should work with **RPi.GPIO**. gpiozero is currently not intended to use. ### Additional Resources diff --git a/README.md b/README.md index 8d444231e..183888dd9 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,16 @@ ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/MiczFlor/RPi-Jukebox-RFID/develop) -[![Python Checks and Tests](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/pythonpackage.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/pythonpackage.yml) [![Test Install Scripts Debian](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/test_docker_debian.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/test_docker_debian.yml) [![CodeQL](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/codeql-analysis.yml) [![PHP Tests](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/php.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/php.yml) +[![Python Checks and Tests](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/pythonpackage.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/pythonpackage.yml) +[![Test Install Scripts Debian](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/test_docker_debian.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/test_docker_debian.yml) +[![CodeQL](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/codeql-analysis.yml) +[![PHP Tests](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/php.yml/badge.svg)](https://github.com/MiczFlor/RPi-Jukebox-RFID/actions/workflows/php.yml) [![Coverage Status](https://coveralls.io/repos/github/MiczFlor/RPi-Jukebox-RFID/badge.svg?branch=develop)](https://coveralls.io/github/MiczFlor/RPi-Jukebox-RFID?branch=develop) -[![Gitter chat](https://badges.gitter.im/phoniebox/gitter.png)](https://gitter.im/phoniebox) +[![Gitter chat](https://badges.gitter.im/join_chat.svg)](https://matrix.to/#/#phoniebox_community:gitter.im) +[![Matrix chat](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#phoniebox_community:gitter.im) + ## Introduction @@ -28,15 +33,15 @@ We are also curious to learn about alternative services we can connect with and ## The Phoniebox Calendar 2023 is here -Another bunch of wonderful designs! 2023 is the fifth Phoniebox calendar. If you are interested, you can see the [2019, 2020, 2021 and 2022 calendars in the docs folder](https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/docs). Download [the printable PDF of 2023 here](https://mi.cz/static/2023-Phoniebox-Calendar.pdf). +Another bunch of wonderful designs! 2023 is the fifth Phoniebox calendar. If you are interested, you can see the [2019, 2020, 2021 and 2022 calendars in the docs folder](docs). Download [the printable PDF of 2023 here](https://mi.cz/static/2023-Phoniebox-Calendar.pdf). ![The 2023 Phoniebox Calendar](docs/2023-Phoniebox-Calendar.jpg "The 2023 Phoniebox Calendar") If you want to be featured on next years calendar, please make sure to add your Phoniebox pics to the [design thread here on github](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/639). -## Install Phoniebox +## Install Phoniebox -If you are looking for the latest **stable version 2.x**, use the [install script for Raspberry Pi](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch). +If you are looking for the latest **stable version 2.x**, use the [install script for Raspberry Pi](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL). ### 🔥 Version 3 is coming @@ -79,17 +84,17 @@ If you seek the adventure, your support will be more then welcome. Before contri #### What's new in Version 2.4.0? * 🔥 Fixed `evdev` bug (fixes e.g. #1721, #1653, #1618, #1501 etc.) -* 🔥 New support for Raspian Bullseye (and still for Buster) #1849 +* 🔥 New support for Raspberry Pi OS Bullseye (and still for Buster) #1849 * Publish "card swiped" event via MQTT #1496 * Spotify integration **still doesn't work** - please follow the discussion at * More fixed bugs and minor improvements... #### Features Version 2 -* The **one-line install script** handles both **Classic** and **+Spotify** when [setting up your Phoniebox](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch#one-line-install-command) +* The **one-line install script** handles both **Classic** and **+Spotify** when [setting up your Phoniebox](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL#one-line-install-command) * integrated selection of RFID readers * features *non-interactive* installs based on a config file -* [**RFID** control](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#phoniebox-controls-using-rfid-cards) for playout and controlling your Phoniebox (e.g. set [maximum volume with RFID](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/633) cards). +* [**RFID** control](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#cardcontrol) for playout and controlling your Phoniebox (e.g. set [maximum volume with RFID](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/633) cards). * Support for various RFID readers, e.g. * USB * [RC422](components/rfid-reader/RC522/README.md) @@ -117,11 +122,11 @@ If you seek the adventure, your support will be more then welcome. Before contri #### Quick install Version 2 -* [One line install script](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch#one-line-install-command) for Raspberry Pi OS Buster and Bullseye. +* [One line install script](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL#one-line-install-command) for Raspberry Pi OS. * Two editions: * *Phoniebox Classic* supports local audio, web radio, podcasts, YouTube (download and convert), GPIO and/or RFID * **MUST READ** for users of *[Phoniebox +Spotify Edition](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Spotify-FAQ)* -* Check [Installation instructions](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch) oder [Complete Install Guide](docs/INSTALL-COMPLETE-GUIDE.md) +* Check [Installation instructions](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL) or [Complete Install Guide](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-COMPLETE-GUIDE) * Once everything has been installed and configured, [read the manual](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL) to change settings, register RFID cards, add audio. * Adding push buttons to control volume, skipping tracks, pause, play: read the [GPIO Control Readme](components/gpio_control/README.md). @@ -129,7 +134,7 @@ If you seek the adventure, your support will be more then welcome. Before contri * Please ask **general questions** in [Discussions](https://github.com/MiczFlor/RPi-Jukebox-RFID/discussions) * **Bugs and enhancements** should still be in [Issues](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues). -* We got ourselves a gitter community; **chat us up** at +* We got ourselves a gitter community; **chat us up** at [Gitter/Matrix](https://matrix.to/#/#phoniebox_community:gitter.im) ## Documentation @@ -140,7 +145,7 @@ Documentation can be found in the [GitHub wiki for Phoniebox](https://github.com In the [Manual](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL) you will learn: * [How to connect to the Phoniebox from any computer to add and edit audio files.](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#connect) -* [How to register new RFID cards, assign them a *human readable* shortcut and add audio files for each card.](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#registercards) +* [How to register new RFID cards, assign them a *human readable* shortcut and add audio files for each card.](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#registercardswebapp) * [How to add webradio stations and other streams to the playout files](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#webstreams) - [and even mix web based and local files.](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#mixwebstreams) * [Adding Podcasts the your Phoniebox](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#podcasts) * [How to control the Phoniebox through the web app.](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#webapp) @@ -217,7 +222,7 @@ These are links to additional items, which will add an individual flavour to you * [Ground Loop Isolator / Entstörfilter Audio](https://amzn.to/2Kseo0L) this seems to [get rid off crackles in the audio out (a typical RPi problem)](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/341) * [Mechanical audio switch](https://amzn.to/35oOSCS) if you want to connect differen audio devices, this is the easiest way (in connection with the *Ground Loop Isolator* you will get good results) * [Rotary Encoder / Drehregler / Dial](https://amzn.to/2J34guF) for volume control. Read here for more information on how to [integrate the rotary dial](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/267) -* [HiFiBerry DAC+ Soundcard](https://amzn.to/2J36cU9) Read here for more information on how to [HifiBerry Soundcard integration](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#hifiberry-dac-soundcard-details) +* [HiFiBerry DAC+ Soundcard](https://amzn.to/2J36cU9) Read here for more information on how to [HifiBerry Soundcard integration](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/HiFiBerry-Soundcard-Details) * [HDMI zu HDMI + Optisches SPDIF mit 3,5-mm-Stereo-HDMI Audio-Extractor | HDMI zu SPDIF Konverter](https://amzn.to/2N8KP8C) If you plan to use video, this might be the better solution than a USB soundcard or the hifiberry. If takes up some space, but will work with the HDMI audio out and split the signal to deliver audio through 3.5mm jack. ### Components @@ -249,7 +254,7 @@ A new video screencast about **What makes this Phoniebox easy to install and use:** -* Runs on all Raspberry Pi models (1, 2 and 3) and [Raspberry Zero](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/15). +* Runs on all Raspberry Pi models (1, 2, 3 and 4) and [Raspberry Zero](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/15). * Just plug and play using USB, no soldering iron needed. * Once the Phoniebox is up and running, add music from any computer on your home network. * Register new RFID cards easily without having to connect to the RPi. @@ -274,7 +279,7 @@ The **web app** runs on any device and is mobile optimised. It provides: | --- | --- | --- | --- | --- | --- | | ![Caption](docs/img/gallery/Steph-20171215_h90-01.jpg "Caption") | ![Caption](docs/img/gallery/Elsa-20171210_h90-01.jpg "Caption") | ![Caption](docs/img/gallery/Geliras-20171228-Jukebox-01-h90.jpg "Caption") | ![Caption](docs/img/gallery/UlliH-20171210_h90-01.jpg "Caption") | ![Caption](docs/img/gallery/KingKahn-20180101-Jukebox-01-h90.jpg "Caption") | ![Caption](docs/img/gallery/hailogugo-20171222-h90-01.jpg "Caption") | -**See more innovation, upcycling and creativity in the [Phoniebox Gallery](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/GALLERY) or visit and share the project's homepage at [phoniebox.de](http://phoniebox.de/). There is also an [english Phoniebox page](http://phoniebox.de/index.php?l=en).** +**See more innovation, upcycling and creativity in the [Phoniebox Gallery](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/GALLERY) or visit and share the project's homepage at [phoniebox.de](https://phoniebox.de/). There is also an [english Phoniebox page](https://phoniebox.de/index-en.html).** ## Sustainability diff --git a/ci/Dockerfile.debian b/ci/Dockerfile.debian index a9123534b..c9c6af854 100644 --- a/ci/Dockerfile.debian +++ b/ci/Dockerfile.debian @@ -1,8 +1,8 @@ # Base Target to build and install all needed base configuration and packages. Specifie the needed platform with the docker '--platform XXX' option -ARG DEBIAN_VERSION_NAME=bullseye +ARG DEBIAN_CODENAME=bullseye ARG BASE_TEST_IMAGE=test-code -FROM debian:${DEBIAN_VERSION_NAME}-slim as base -ARG DEBIAN_VERSION_NAME +FROM debian:${DEBIAN_CODENAME}-slim as base +ARG DEBIAN_CODENAME ENV DOCKER_RUNNING=true RUN touch /boot/cmdlinetxt @@ -15,8 +15,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gnupg \ && curl -fsSL http://raspbian.raspberrypi.org/raspbian.public.key | gpg --dearmor > /usr/share/keyrings/raspberrypi-raspbian-keyring.gpg \ && curl -fsSL http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | gpg --dearmor > /usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-raspbian-keyring.gpg] http://raspbian.raspberrypi.org/raspbian/ ${DEBIAN_VERSION_NAME} main contrib non-free rpi" > /etc/apt/sources.list.d/raspi.list \ - && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg] http://archive.raspberrypi.org/debian/ ${DEBIAN_VERSION_NAME} main" >> /etc/apt/sources.list.d/raspi.list \ + && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-raspbian-keyring.gpg] http://raspbian.raspberrypi.org/raspbian/ ${DEBIAN_CODENAME} main contrib non-free rpi" > /etc/apt/sources.list.d/raspi.list \ + && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg] http://archive.raspberrypi.org/debian/ ${DEBIAN_CODENAME} main" >> /etc/apt/sources.list.d/raspi.list \ && apt-get update \ && apt-get -y upgrade \ && apt-get -y install \ diff --git a/ci/README.md b/ci/README.md index 4ed2910e7..bbade3f34 100644 --- a/ci/README.md +++ b/ci/README.md @@ -8,7 +8,7 @@ This is a work in progress so expect things to fail or being flaky. ## Howto * First you need a raspberry pi with some decent performance (RPi 3 or 4 would be recommended) -* Flash its sd card with **raspbian buster lite** +* Flash its sd card with **Raspberry Pi OS lite** * use raspi-config to resize the filesystem to the whole sd card (menu: 7 -> A1) * install some tools and reboot: ```bash @@ -30,18 +30,18 @@ This is a work in progress so expect things to fail or being flaky. ``` * build the docker image: ```bash - docker build -t rpi-jukebox-rfid:buster-latest -f ci/Dockerfile.debian --platform=linux/arm/v7 --target=code --build-arg="DEBIAN_VERSION_NAME=buster" . + docker build -t rpi-jukebox-rfid:debian-latest -f ci/Dockerfile.debian --platform=linux/arm/v7 --target=code . ``` * additional arguments * for builds - on normal PCs use `--platform=linux/amd64` - on a raspberry pi use `--platform=linux/arm/v7` - * to use a different debian version change `--build-arg="DEBIAN_VERSION_NAME=buster"` appropriately. + - on normal PCs use `--platform=linux/amd64` + - on a raspberry pi use `--platform=linux/arm/v7` + * to use a different debian version as base add parameter `--build-arg="DEBIAN_CODENAME="` ( = e.g. buster, bullseye, ...). * get something to drink or eat * run the freshly built docker image and start testing. For example: ```bash - docker run --rm -ti rpi-jukebox-rfid:buster-latest /bin/bash + docker run --rm -ti rpi-jukebox-rfid:debian-latest /bin/bash cd /home/pi/ cp /code/scripts/installscripts/buster-install-default.sh /home/pi/ # set GIT_URL and GIT_BRANCH appropriately to your checkout diff --git a/components/bluetooth-sink-switch/README.md b/components/bluetooth-sink-switch/README.md index 5f216ebc7..8e5c9cec3 100644 --- a/components/bluetooth-sink-switch/README.md +++ b/components/bluetooth-sink-switch/README.md @@ -28,7 +28,7 @@ You need to set up both audio sinks and make sure they work. This is pretty much Follow the instructions for your soundcard. Configure `/etc/asound.conf`correctly. And make sure it works! -Then follow the instructions on the [Wiki on how to connect the bluetooth device](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Bluetooth). We diverge where we set up two audio sinks instead of one: Just **add** the `pcm.btspeaker` section described in the wiki to `/etc/asound.conf` (choose a name to your liking). Do **not** touch the mpd.conf yet! +Then follow the instructions on the [Wiki on how to connect the bluetooth device](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Connecting_Bluetooth_device_to_Phoniebox). We diverge where we set up two audio sinks instead of one: Just **add** the `pcm.btspeaker` section described in the wiki to `/etc/asound.conf` (choose a name to your liking). Do **not** touch the mpd.conf yet! The new entry should end up looking like this: diff --git a/components/controls/buttons-bluetooth-headphone/README.md b/components/controls/buttons-bluetooth-headphone/README.md index 8d9397df0..6cedd1207 100644 --- a/components/controls/buttons-bluetooth-headphone/README.md +++ b/components/controls/buttons-bluetooth-headphone/README.md @@ -5,7 +5,7 @@ This component provides support for controlling your Phoniebox through these but ### Installation -1. Make sure your bluetooth headset is connected to the Phoniebox. Follow the instructions in the [Wiki](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Bluetooth). +1. Make sure your bluetooth headset is connected to the Phoniebox. Follow the instructions in the [Wiki](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Connecting_Bluetooth_device_to_Phoniebox). 2. Execute `$ ./install-bt-buttons.sh. It will ask you to identify your headset and set up appropriate user rights, and registers the script as a service. It should work immediatly. In case of doubt, reboot. - If later changing the headset, re-run `$ ./register-device.py`. Reboot or restart the service with `sudo systemctl restart phoniebox-bt-buttons.service` diff --git a/components/gpio_control/GPIODevices/rotary_encoder.py b/components/gpio_control/GPIODevices/rotary_encoder.py index 1528b625f..d3455622f 100755 --- a/components/gpio_control/GPIODevices/rotary_encoder.py +++ b/components/gpio_control/GPIODevices/rotary_encoder.py @@ -1,10 +1,5 @@ #!/usr/bin/env python3 # rotary volume knob -# these files belong all together: -# RPi-Jukebox-RFID/scripts/rotary-encoder.py -# RPi-Jukebox-RFID/scripts/rotary_encoder.py -# RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-rotary-encoder.service.stretch-default.sample -# See wiki for more info: https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki import RPi.GPIO as GPIO from timeit import default_timer as timer diff --git a/docs/INSTALL-COMPLETE-GUIDE.md b/docs/INSTALL-COMPLETE-GUIDE.md deleted file mode 100644 index fc5b40d70..000000000 --- a/docs/INSTALL-COMPLETE-GUIDE.md +++ /dev/null @@ -1,230 +0,0 @@ -# How to set up a Phoniebox from scratch - -- [How to set up a Phoniebox from scratch](#how-to-set-up-a-phoniebox-from-scratch) - - [1. What you need](#1-what-you-need) - - [2. Install Raspberry Pi OS](#2-install-raspberry-pi-os) - - [3. Initial Boot](#3-initial-boot) - - [4. Prepare hardware](#4-prepare-hardware) - - [5. Audio](#5-audio) - - [5a. On-board headphone](#5a-on-board-headphone) - - [5b. USB sound card](#5b-usb-sound-card) - - [6. Install Phoniebox software](#6-install-phoniebox-software) - - [7. Verify Phoniebox setup](#7-verify-phoniebox-setup) - ---- - -## 1. What you need - -All parts marked with a star (*) are optional but improve the overall experience. All linked components are examples but have proven to work together. You are free to choose different equipment. - -1. [Micro SD Card](https://amzn.to/3do7KJr) (e.g. 32 GB) -1. Raspberry Pi - - [Model 3 B+](https://amzn.to/2NGL7Fa) - recommended - - [Model 4 B](https://amzn.to/2M0xtfJ) - could be a little overhead - - (Model 1, 2, 3 and Zero are possible, but they are slower...) -1. [USB RFID Reader](https://amzn.to/3s47Iun) -1. [RFID Chips](https://amzn.to/3k78F2j) or [RFID Cards](https://amzn.to/3dplljG) -1. [Speakers with 3.5mm jack](https://amzn.to/3dnhmnV) - -To improve the sound, we recommend: - -- [Ground Loop Isolator](https://amzn.to/37nyZjK) * - -Alternatively you can use an external sound card, but sometimes that doesn't seem to improve much: - -- [USB Sound Card](https://amzn.to/3djaKqC) * - [Alternative](https://amzn.to/3u8guth) - ---- - -## 2. Install Raspberry Pi OS - -Before you can install the Phoniebox software, you need to prepare your Raspberry Pi and install - -1. Connect your Micro SD card (through a card reader) to your computer -1. [Download](https://www.raspberrypi.org/software/) the [Raspberry Pi Imager](https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility/) and open it -1. Select **Raspberry Pi OS** as the operating system -1. Select your Micro SD card (your card will be formatted) -1. Click `Write` -1. Wait for the imaging process to be finished (it'll take a few minutes) - ---- - -## 3. Initial Boot - -You will need a terminal, like PuTTY for Windows or the Terminal for Mac to proceed with the next steps. - -1. Open a terminal of your choice -1. Insert your card again if it has been ejected automatically -1. Navigate to your SC card e.g., `cd /Volumes/boot` for Mac or `D:` for Windows -1. Enable SSH by adding a simple file - - ```bash - touch ssh - ``` - -1. Set up your Wifi connection - - Mac - - ```bash - nano wpa_supplicant.conf - ``` - - - Windows - - ```bash - D:\> notepad wpa_supplicant.conf - ``` - -1. Insert the following content, update your country, Wifi credentials and save the file. - - ```bash - country=DE - ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev - update_config=1 - - network={ - ssid="network-name" - psk="network-password" - } - ``` - -1. Eject your SD card and insert it into your Raspberry Pi -1. Start your Raspberry Pi by attaching a power supply -1. Login into your Raspberry Pi, username is `pi` and password is `raspberry`. If `raspberrypi.local` does not work, find out your Raspberry Pi's IP address from your router. - - ```bash - ssh pi@raspberrypi.local - ``` - -1. Update the Pi's software. This may take a bit - - ```bash - sudo apt update && sudo apt full-upgrade - ``` - -1. Reboot with `sudo reboot` -1. Login again with SSH and open the Raspberry Pi config - - ```bash - sudo raspi-config - ``` - -1. Update the following settings - - ```bash - 1 System Options - S5 Boot / Auto Login -> B2 Console Autologin - S6 Network at Boot -> Yes - ``` - -1. Close the settings panel with `` -1. Shutdown your Raspberry Pi with `sudo shutdown` - ---- - -## 4. Prepare hardware - -1. Connect the RFID Reader -1. Conntect USB Sound Card if available -1. Plug in the 3.5" speakers with the Ground Loop Isolator in between. If you have chosen the example speakers from above, you can power them either through the Raspberry Pi or through an external power source. -1. Boot your Raspberry Pi -1. Open a terminal in your second computer and login via SSH using the `pi` user and default password `raspberry`. If you see a question about authentication and fingerprint, type `yes` and hit `enter` - - ```bash - ssh pi@raspberrypi.local - ``` - ---- - -## 5. Audio - -### 5a. On-board headphone - -Installing with an external monitor (HDMI) can create a problem if you use the mini-jack audio out. The problem is that if you plug in a HDMI monitor an additional sound output is added and the index changes. This bothering behavior was introduced, when Raspberry Pi separated headphones jack and HDMI into two different devices in May 2020. -Also see [Troubleshooting: headphone audio unavailable after unplugging HDMI](https://github.com/MiczFlor/RPi-Jukebox-RFID/discussions/1300) - -### 5b. USB sound card - -1. Open the Raspberry Pi config - - ```bash - sudo raspi-config - ``` - -1. Update the following settings - - ```bash - 1 System Options - S2 Audio -> 1 USB Audio - ``` - -1. Close the settings panel with `` -1. Make your soundcard the primary sound device. To update the sound card priority order, edit the following file: - - ```bash - sudo nano /usr/share/alsa/alsa.conf - ``` - -1. Find the following variables and change their value from `0` to `1` - - ```bash - defaults.ctl.card 0 - defaults.pcm.card 0 - - // to - - defaults.ctl.card 1 - defaults.pcm.card 1 - ``` - -1. Reboot -1. Test your audio! Check if you hear white noise in stereo when running the following command from your connected speakers. If not, refer to this [resource](https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions) to troubleshoot. - - ```bash - speaker-test -c2 - ``` - ---- - -## 6. Install Phoniebox software - -If you want to install the **Spotify+ version**, [read this first](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Spotify-FAQ). - -Run the following command in your SSH terminal and follow the instructions - -```bash -cd; rm buster-install-*; wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/master/scripts/installscripts/buster-install-default.sh; chmod +x buster-install-default.sh; ./buster-install-default.sh -``` - -1. `Yes` to `Continue interactive installation` -1. `No` to the `Wifi Setting step` - it's already set! -1. `Speaker` to `CONFIGURE AUDIO INTERFACE (iFace)` -1. Setup Spotify (optional) - 1. You need to generate your personal Spotify client ID and secret - 1. Visit the [Mopidy Spotify Authentication Page](https://mopidy.com/ext/spotify/#authentication) - 1. Click the button `Authenticate Mopidy with Spotify` - 1. Login to Spotify with your credentials - 1. Once logged in, the code snippet on the website is updated with your `client_id` and `client_secret` - 1. Provide your Spotify `username`, `password` and paste your `client_id` and `client_secret` into your terminal -1. `Yes` to `CONFIGURE MPD` -1. `Yes` to `FOLDER CONTAINING AUDIO FILES` -1. Optional: In this scenario, we do not install GPIO buttons, so feel free to choose `No` -1. `Yes` to `Do you want to start the installation?` -1. ... Wait a bit for the installation to happen ... -1. `Yes` to `Have you connected your RFID reader?` -1. `1` to select `1. USB-Reader` -1. Choose the `#` that resonates with your RFID reader, in our case `HXGCoLtd Keyboard` -1. `Yes` to `Would you like to reboot now?` - ---- - -## 7. Verify Phoniebox setup - -1. Open a browser in your computer and navigate to your Raspberry Pi: `http://raspberrypi.local` -1. You should see the Phoniebox UI -1. In your navigation, choose `Card ID` -1. Swipe one card near your RFID reader. If `Last used Chip ID` is automatically updated (you might hear a beep) and shows a number, your reader works -1. Verify Spotify (optional) - 1. Click `Spotify+` in the menu - 1. Mopidy opens, a second web player which was also installed - 1. You should be able to search and play Spotify content here diff --git a/docs/PHONIEBOX_ReadOnly.md b/docs/PHONIEBOX_ReadOnly.md deleted file mode 100644 index 98d419803..000000000 --- a/docs/PHONIEBOX_ReadOnly.md +++ /dev/null @@ -1,123 +0,0 @@ -# Phoniebox with read-only Filesystem - -In order to make the Phoniebox more resilient against sudden power loss a mostly read-only filesystem helps against filesystem corruption. - -First we need to mount a read-write Partition to /home/pi/RPi-Jukebox-RFID/shared/. This can bei either a further partition on the SD card or an USB drive connected to the Pi. If you want to store the shared partition on the sd card you need to first resize the main -partition. In a normal raspbian install there is one small partition and one that fills the rest of the card. There is a good HOWTO on how to resize the partition here: - -Please resize the partition AFTER the first boot of teh systtem since Raspbian tries to resize the partition on the sd card to fill the whole card this process seems to fail if there is a partition in the way. - -Before the new partition can be mounted the original shared directory with its contents needs to be moved out of the way: - -```bash -cd ~/RPi-Jukebox-RFID/ -mv shared shared.old -mkdir shared -``` - -Then we need to find out the PARTUUID of the newly created partition with the command blkid. It should produce the following output: - -```bash -pi@JukeboxJan:~/RPi-Jukebox-RFID $ blkid -/dev/mmcblk0p1: LABEL="boot" UUID="9304-D9FD" TYPE="vfat" PARTUUID="9282f822-01" -/dev/mmcblk0p2: LABEL="rootfs" UUID="29075e46-f0d4-44e2-a9e7-55ac02d6e6cc" TYPE="ext4" PARTUUID="9282f822-02" -/dev/mmcblk0p3: LABEL="shared" UUID="821fcedf-b705-4515-a5e8-2e99beefc1bf" TYPE="ext4" PARTUUID="9282f822-03" -``` - -In order to mount the rw partition to ~/RPi-Jukebox-RFID/shared/ on bootup you need to add the following line to /etc/fstab Replace the PARTUUID with teh one from your output. (Don't forget you need to ```sudo vi /etc/fstab``` to edit the file) - -```bash -PARTUUID="9282f822-03" /home/pi/RPi-Jukebox-RFID/shared ext4 defaults,noatime 0 2 -``` - -```sudo mount -a``` will mount the new partition to its mountpoint. - -Now adjust the ownership and permissions of the new shared directory: - -```bash -sudo chown pi:www-data shared -sudo chmod 775 shared -``` - -Rsync the contents of shared.old into share: - -````bash -rsync -av shared.old/* shared/ -```` - -Some settings need to persist between boots, others are not necessarily persistend. Those that need to be persistent are symlinked to a new directory shared/settings, the others are symlinked to files in /var/tmp that will reside on a ramdisk. - -```bash -ln -sf /var/tmp/Latest_RFID ~/RPi-Jukebox-RFID/settings -ln -sf /var/tmp/Latest_Folder_Played ~/RPi-Jukebox-RFID/settings -ln -sf /var/tmp/Latest_Playlist_Played ~/RPi-Jukebox-RFID/settings -ln -sf /var/tmp/latestID.txt ~/RPi-Jukebox-RFID/shared/ - -mkdir ~/RPi-Jukebox-RFID/shared/settings -mv Audio_Folders_Path Audio_Volume_Change_Step Idle_Time_Before_Shutdown Max_Volume_Limit Playlists_Folders_Path Second_Swipe ShowCover ../shared/settings/ -ln -sf ~/RPi-Jukebox-RFID/shared/settings/* ~/RPi-Jukebox-RFID/settings/ -``` - -Add the following lines to the fstab: - -```sudo vi /etc/fstab``` - -```bash -tmpfs /var/log tmpfs nodev,nosuid 0 0 -tmpfs /var/lib/samba tmpfs nodev,nosuid 0 0 -tmpfs /var/lib/mpd tmpfs nodev,nosuid 0 0 -tmpfs /var/cache/samba tmpfs nodev,nosuid 0 0 -tmpfs /var/tmp tmpfs nodev,nosuid 0 0 -tmpfs /tmp tmpfs nodev,nosuid 0 0 -``` - -If you have not yet created a password for the Samba User pi, do it now, before moving the files away: - -```sudo smbpasswd pi``` - -Move Samba files away and create mount point for a tmpfs: - -```bash -sudo mv /var/lib/samba /var/lib/samba.save -sudo mkdir /var/lib/samba -``` - -```sudo vi /etc/tmpfiles.d/smb.conf``` - -paste - -```bash -#Type Path Mode UID GID Age Argument -C /var/lib/samba/private - - - - /var/lib/samba.save/private -C /var/lib/samba/account_policy.tdb - - - - /var/lib/samba.save/account_policy.tdb -C /var/lib/samba/group_mapping.tdb - - - - /var/lib/samba.save/group_mapping.tdb -C /var/lib/samba/printers - - - - /var/lib/samba.save/printers -C /var/lib/samba/registry.tdb - - - - /var/lib/samba.save/registry.tdb -C /var/lib/samba/share_info.tdb - - - - /var/lib/samba.save/share_info.tdb -C /var/lib/samba/usershares - - - - /var/lib/samba.save/usershares -C /var/lib/samba/wins.dat - - - - /var/lib/samba.save/wins.dat -C /var/lib/samba/wins.tdb - - - - /var/lib/samba.save/wins.tdb -d /var/log/samba 0750 root adm - - -``` - -```sudo vi /etc/tmpfiles.d/lighttpd.conf``` - -paste - -```bash -#Type Path Mode UID GID Age Argument -d /var/log/lighttpd 0755 www-data www-data - - -``` - -Change settings/Playlist_Folders_Path to shared/playlists - -Edit /etc/mpd.conf and change log_file from /var/log/mpd/mpd.log to /var/log/mpd.log - -If you need to make changes to your root filesystem in the future you need to remount it in read-write mode. - -This can be done with the command ```mount -o remount,rw /``` and reversed by ```mount -oremount,to /``` - -Sources: - -* and -* diff --git a/docs/UPGRADE.md b/docs/UPGRADE.md deleted file mode 100755 index 68dd77c70..000000000 --- a/docs/UPGRADE.md +++ /dev/null @@ -1,262 +0,0 @@ -# How to upgrade the Phoniebox code - -> 📝**NOTE:** This describes upgrading for **Version 2.x** (and even 1.x versions). For **Version 3** please see - -## Which version am I on? - -There is a file `settings/version` containing the version number. - -## Upgrade for 2.x Versions - -Assuming that you use `git pull` to update the code base of your Phoniebox, -every now and then you need to run some update scripts, like patches. -To make this somewhat consistent, I started this page to document things that need to be done. - -If you still encounter problems after running the below upgrade snippets, check inside the folder `scripts/installscripts/` for scripts which contain the entire install process. - -## Upgrade for 0.x and 1.x Versions - -### Upgrade from Version 1.1.7 to 1.1.8 - -**NOTE**: version `1.1.8` is the `master` branch. If you run into issues, please ask them on the "issues" board on GitHub. [2018-12-10]. - -And in capital letters: **YOUR BEST CHOICE IS TO GET A NEW SD CARD AND DO A FRESH INSTALL FOR THE NEW 1.1.8 VERSION, BECAUSE A LOT HAS CHANGED AS YOU CAN SEE IN THE UPGRADE SCRIPT BELOW** (now you can't say you didn't know...) - -We introduce Phoniebox Editions. To distinguish them, we call them "Phoniebox Classic" (out of the box, no Spotify) and "Phoniebox +Spotify" (Phoniebox with Spotify integration). - -**This is a bugfix-version.** After release of "Phoniebox +Spotify" there were reported some problems, which are bugfixed now, hopefully. e.g. Improved loading time of local music **(please go to "Folders & Files" and scan your library ONCE after update and everytime you upload new files to your box!)**. To reduce the boot up time of Phoniebox, be sure you are using the newest version of mopidy-spotify. The upgrade is integrated into the following steps. - -**Please use our [spotify thread](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/18) to post improvements regarding this feature.** - -~~~bash -cd /home/pi/RPi-Jukebox-RFID -git checkout master -git fetch origin -git reset --hard origin/master -git pull -sudo systemctl stop mpd -sudo systemctl stop mopidy - -USERNAME=$(sudo grep 'username' /etc/mopidy/mopidy.conf|sed 's/username = //g'|sed 's/"//g'|tr -d "\n") -PASSWORD=$(sudo grep 'password' /etc/mopidy/mopidy.conf|sed 's/password = //g'|sed 's/"//g'|tr -d "\n") -CLIENT_ID=$(sudo grep 'client_id' /etc/mopidy/mopidy.conf|sed 's/client_id = //g'|sed 's/"//g'|tr -d "\n") -CLIENT_SECRET=$(sudo grep 'client_secret' /etc/mopidy/mopidy.conf|sed 's/client_secret = //g'|sed 's/"//g'|tr -d "\n") - -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/mpd.conf.sample /etc/mpd.conf -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/mopidy-etc.sample /etc/mopidy/mopidy.conf -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/mopidy.sample /home/pi/.config/mopidy/mopidy.conf - -sudo sed -i 's/%spotify_username%/'"$USERNAME"'/' /etc/mopidy/mopidy.conf -sudo sed -i 's/%spotify_password%/'"$PASSWORD"'/' /etc/mopidy/mopidy.conf -sudo sed -i 's/%spotify_client_id%/'"$CLIENT_ID"'/' /etc/mopidy/mopidy.conf -sudo sed -i 's/%spotify_client_secret%/'"$CLIENT_SECRET"'/' /etc/mopidy/mopidy.conf -sudo sed -i 's/%spotify_username%/'"$USERNAME"'/' ~/.config/mopidy/mopidy.conf -sudo sed -i 's/%spotify_password%/'"$PASSWORD"'/' ~/.config/mopidy/mopidy.conf -sudo sed -i 's/%spotify_client_id%/'"$CLIENT_ID"'/' ~/.config/mopidy/mopidy.conf -sudo sed -i 's/%spotify_client_secret%/'"$CLIENT_SECRET"'/' ~/.config/mopidy/mopidy.conf - -# services to launch after boot using systemd -# -rw-r--r-- 1 root root 304 Apr 30 10:07 phoniebox-rfid-reader.service -# 1. delete old services (this is legacy, might throw errors but is necessary. Valid for versions < 1.1.8-beta) -echo "### Deleting older versions of service daemons. This might throw errors, ignore them" -sudo systemctl disable idle-watchdog -sudo systemctl disable rfid-reader -sudo systemctl disable startup-sound -sudo systemctl disable gpio-buttons -sudo rm /etc/systemd/system/rfid-reader.service -sudo rm /etc/systemd/system/startup-sound.service -sudo rm /etc/systemd/system/gpio-buttons.service -sudo rm /etc/systemd/system/idle-watchdog.service -echo "### Done with erasing old daemons. Stop ignoring errors!" -# 2. install new ones - this is version > 1.1.8-beta -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-rfid-reader.service.stretch-default.sample /etc/systemd/system/phoniebox-rfid-reader.service -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-startup-sound.service.stretch-default.sample /etc/systemd/system/phoniebox-startup-sound.service -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-gpio-buttons.service.stretch-default.sample /etc/systemd/system/phoniebox-gpio-buttons.service -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-idle-watchdog.service.sample /etc/systemd/system/phoniebox-idle-watchdog.service -sudo chown root:root /etc/systemd/system/phoniebox-rfid-reader.service -sudo chown root:root /etc/systemd/system/phoniebox-startup-sound.service -sudo chown root:root /etc/systemd/system/phoniebox-gpio-buttons.service -sudo chown root:root /etc/systemd/system/phoniebox-idle-watchdog.service -sudo chmod 644 /etc/systemd/system/phoniebox-rfid-reader.service -sudo chmod 644 /etc/systemd/system/phoniebox-startup-sound.service -sudo chmod 644 /etc/systemd/system/phoniebox-gpio-buttons.service -sudo chmod 644 /etc/systemd/system/phoniebox-idle-watchdog.service -# enable the services needed -sudo systemctl enable phoniebox-idle-watchdog -sudo systemctl enable phoniebox-rfid-reader -sudo systemctl enable phoniebox-startup-sound -sudo systemctl enable phoniebox-gpio-buttons - -echo "classic" > /home/pi/RPi-Jukebox-RFID/settings/edition -EDITION=$(grep 'SPOTinstall' /home/pi/PhonieboxInstall.conf|sed 's/SPOTinstall="//g'|sed 's/"//g'); if [ $EDITION == "YES" ]; then echo "plusSpotify"; else echo "classic"; fi > /home/pi/RPi-Jukebox-RFID/settings/edition - -sudo apt-get install libspotify12 python-cffi python-ply python-pycparser python-spotify -sudo rm -rf /usr/lib/python2.7/dist-packages/mopidy_spotify* -sudo rm -rf /usr/lib/python2.7/dist-packages/Mopidy_Spotify-* -sudo rm -rf /usr/local/lib/python2.7/dist-packages/mopidy_spotify* -sudo rm -rf /usr/local/lib/python2.7/dist-packages/Mopidy_Spotify-* -cd -sudo rm -rf mopidy-spotify -git clone -b fix/web_api_playlists --single-branch https://github.com/princemaxwell/mopidy-spotify.git -cd mopidy-spotify -sudo python setup.py install - -sudo sed -i '/level/s/\bINFO\b/WARNING/g' /etc/mopidy/logging.conf -sudo rm /var/log/mopidy/mopidy.log - -sudo reboot -~~~ - -### Upgrade from Version 1.1.1 to 1.1.7 - -Not much has changed in the core of this version. There is the new feature: Integrating **Spotify** to your Phoniebox. Currently this is *only* a [HOWTO document](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Spotify-FAQ) which needs improvement and your input. I invite everybody to use our [spotify thread](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/18) to post improvements regarding this feature. You might also want to [improve the documentation on *Spotify integration*](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Spotify-FAQ) and create pull requests so I can merge this with the core. - -Upgrading is therefore fairly simple. The following will overwrite any local changes to your code but NOT to your configruation files and systemd services, GPIO and the like. Only core code: - -~~~bash -cd /home/pi/RPi-Jukebox-RFID -git checkout master -git fetch origin -git reset --hard origin/master -git pull -~~~ - -### Upgrade from Version 1.1.1 to 1.1.6 - -A few important bug fixes. And a new design. -And the option to decide what the 'second swipe' of a card does (see settings in the web app). -The following should get you all you need, without running the install script if you -only want to upgrade. - -~~~bash -cd /home/pi/RPi-Jukebox-RFID -git checkout master -git fetch origin -git reset --hard origin/master -git pull -sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/shared -sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/shared -sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/htdocs -sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/htdocs -sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/settings -sudo chmod -R 777 /home/pi/RPi-Jukebox-RFID/settings -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-rfid-reader.service.stretch-default.sample /etc/systemd/system/phoniebox-rfid-reader.service -sudo chown root:root /etc/systemd/system/phoniebox-rfid-reader.service -sudo chmod 644 /etc/systemd/system/phoniebox-rfid-reader.service -sudo systemctl enable rfid-reader -~~~ - -### Upgrade from Version 1.0.0 to 1.1.1 - -This upgrade brings the web app UI for file management, recursive folder management, wifi switch off and more. The latest [one-line Phoniebox install script](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/CONFIGURE-stretch#oneLineInstall) contains all the necessary steps, but will treat your upgrade like a new install. Manual upgrade: - -~~~bash -cd -cd /home/pi/RPi-Jukebox-RFID -git fetch -git checkout master -git pull -# settings for php.ini to support upload -# make backup -sudo cp /etc/php/7.0/fpm/php.ini /etc/php/7.0/fpm/php.ini.backup -# replace file -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/php.ini.stretch-default.sample /etc/php/7.0/fpm/php.ini -sudo chown root:root /etc/php/7.0/fpm/php.ini -sudo chmod 644 /etc/php/7.0/fpm/php.ini -sudo service lighttpd force-reload -sudo service php7.0-fpm restart -~~~ - -### Upgrade to Version 1.0 - -As of version 1.0 there is a much simpler install procedure: copy and paste one line into your terminal and hit *enter*. Find out more about the [one-line Phoniebox install script](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/CONFIGURE-stretch#oneLineInstall). - -### Upgrade from 0.9.5 to 0.9.7 - -* Adding a *Settings* page in the web app to control features like 'idle shutdown' and 'max volume' and toggle systemd services -* Documentation / troubleshooting / tricks: how to install via ssh, improve on board audio quality and the like -* Adding auto shutdown when idle for longer than x minutes (see [manual](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#settings) for details) -* Adding maximum volume percent to settings (see [manual](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#settings) for details) -* Fixing bug: settings volume for stereo audio iFace -* Fixing bug: bash code compatible with all shells -* Web app enhancements (audio level, display 'playing now') - -~~~bash -# services to launch after boot using systmed -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-idle-watchdog.service.sample /etc/systemd/system/phoniebox-idle-watchdog.service -sudo chown root:root /etc/systemd/system/phoniebox-idle-watchdog.service -sudo chmod 644 /etc/systemd/system/phoniebox-idle-watchdog.service -# the config file where you can add the minutes after which Phoniebox shuts down -echo "0" > /home/pi/RPi-Jukebox-RFID/settings/Idle_Time_Before_Shutdown -# enable and start the service -sudo systemctl enable phoniebox-idle-watchdog.service -sudo systemctl start phoniebox-idle-watchdog.service -~~~ - -### Upgrade from 0.9.4 to 0.9.5 - -* Configuration of RFID card control in extra file `settings/rfid_trigger_play.conf` -* Playout control config now uses `settings` folder to store iFace value (e.g. PCM) and percentage of relative volume change -* both bash scripts `scripts/rfid_trigger_play.sh` and `scripts/playout_controls.sh` are not created from `.sample` versions anymore, because the config has been moved to external files. - -~~~bash -# make backups of the current scripts -mv /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh.backup.0.9.4 -mv /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh.backup.0.9.4 -rm /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh.sample -rm /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh.sample -cp /home/pi/RPi-Jukebox-RFID/htdocs/config.php /home/pi/RPi-Jukebox-RFID/htdocs/config.php.backup.0.9.4 -# update with git -git checkout master -git pull -# copy config file for RFID chips from sample to "live" -# you need to manually edit the created files and add the values from the backup version of `scripts/rfid_trigger_play.sh` -cp /home/pi/RPi-Jukebox-RFID/settings/rfid_trigger_play.conf.sample /home/pi/RPi-Jukebox-RFID/settings/rfid_trigger_play.conf -sudo chown pi:pi /home/pi/RPi-Jukebox-RFID/settings/rfid_trigger_play.conf -sudo chmod 775 /home/pi/RPi-Jukebox-RFID/settings/rfid_trigger_play.conf -~~~ - -### Upgrade to 0.9.4 - -* The following script refers to the OS version 'Stretch' in some places but this should also work for 'Jessie'. -* OS 'Stretch' and 'Jessie' require different `lighttpd.conf` parameters. Samples can be found in `misc/sampleconfigs` - -~~~bash -# make backups of the current scripts -cp /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh.backup.0.9.3 -cp /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh.backup.0.9.3 -cp /home/pi/RPi-Jukebox-RFID/htdocs/config.php /home/pi/RPi-Jukebox-RFID/htdocs/config.php.backup.0.9.3 -# update with git -git checkout master -git pull -# copy shell script for player -cp /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh.sample /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh -sudo chown pi:pi /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh -sudo chmod 775 /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh -# copy bash script for player controls -cp /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh.sample /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh -sudo chown pi:pi /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh -sudo chmod 775 /home/pi/RPi-Jukebox-RFID/scripts/playout_controls.sh -# create config file for web app from sample -sudo cp /home/pi/RPi-Jukebox-RFID/htdocs/config.php.sample /home/pi/RPi-Jukebox-RFID/htdocs/config.php -# make sure the shared folder is accessible by the web server -sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/shared -sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/shared -# make sure the htdocs folder can be changed by the web server -sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/htdocs -sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/htdocs -# services to launch after boot using systmed -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-rfid-reader.service.stretch-default.sample /etc/systemd/system/phoniebox-rfid-reader.service -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-startup-sound.service.stretch-default.sample /etc/systemd/system/phoniebox-startup-sound.service -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-gpio-buttons.service.stretch-default.sample /etc/systemd/system/phoniebox-gpio-buttons.service -sudo chown root:root /etc/systemd/system/phoniebox-rfid-reader.service -sudo chown root:root /etc/systemd/system/phoniebox-startup-sound.service -sudo chown root:root /etc/systemd/system/phoniebox-gpio-buttons.service -sudo chmod 644 /etc/systemd/system/phoniebox-rfid-reader.service -sudo chmod 644 /etc/systemd/system/phoniebox-startup-sound.service -sudo chmod 644 /etc/systemd/system/phoniebox-gpio-buttons.service -# In case the older version of Phoniebox still uses crontab to start daemon script, UNDO the crontab changes -sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/crontab-pi.UNDO-default.sample /var/spool/cron/crontabs/pi -sudo chown pi:crontab /var/spool/cron/crontabs/pi -sudo chmod 600 /var/spool/cron/crontabs/pi -~~~ diff --git a/docs/img/GPIO-pin-numbering.png b/docs/img/GPIO-pin-numbering.png deleted file mode 100644 index 64270faa3..000000000 Binary files a/docs/img/GPIO-pin-numbering.png and /dev/null differ diff --git a/docs/img/Phoniebox-Manual-AddNewCardID.png b/docs/img/Phoniebox-Manual-AddNewCardID.png deleted file mode 100644 index 314798992..000000000 Binary files a/docs/img/Phoniebox-Manual-AddNewCardID.png and /dev/null differ diff --git a/docs/img/Phoniebox-RegisterNew_Button.png b/docs/img/Phoniebox-RegisterNew_Button.png deleted file mode 100644 index f9dd098aa..000000000 Binary files a/docs/img/Phoniebox-RegisterNew_Button.png and /dev/null differ diff --git a/docs/img/Phoniebox_Manual_HomeEditCardLink.png b/docs/img/Phoniebox_Manual_HomeEditCardLink.png deleted file mode 100644 index dc1208377..000000000 Binary files a/docs/img/Phoniebox_Manual_HomeEditCardLink.png and /dev/null differ diff --git a/docs/img/buttons-board.jpg b/docs/img/buttons-board.jpg deleted file mode 100644 index 97ba2753e..000000000 Binary files a/docs/img/buttons-board.jpg and /dev/null differ diff --git a/htdocs/cardEdit.php b/htdocs/cardEdit.php index 3872aea03..867d026f5 100755 --- a/htdocs/cardEdit.php +++ b/htdocs/cardEdit.php @@ -5,7 +5,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the -* INSTALL-stretch.md instructions. +* INSTALL.md instructions. * If you want to change the paths, edit config.php ***************************************************/ diff --git a/htdocs/cardRegisterNew.php b/htdocs/cardRegisterNew.php index 56aefd626..8c777e03f 100755 --- a/htdocs/cardRegisterNew.php +++ b/htdocs/cardRegisterNew.php @@ -4,7 +4,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the -* INSTALL-stretch.md instructions. +* INSTALL.md instructions. * If you want to change the paths, edit config.php * If you want to change the paths, edit config.php ***************************************************/ diff --git a/htdocs/inc.header.php b/htdocs/inc.header.php index 858e17aac..65bc61ce5 100755 --- a/htdocs/inc.header.php +++ b/htdocs/inc.header.php @@ -4,7 +4,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the -* INSTALL-stretch.md instructions. +* INSTALL.md instructions. * If you want to change the paths, edit config.php ***************************************************/ diff --git a/htdocs/lang/lang-de-DE.php b/htdocs/lang/lang-de-DE.php index 7487c4db7..95d50d02d 100644 --- a/htdocs/lang/lang-de-DE.php +++ b/htdocs/lang/lang-de-DE.php @@ -131,7 +131,7 @@ $lang['cardRegisterFolder2Card'] = "Audio-Ordner ist nun mit der Karten-ID verknüpft."; $lang['cardRegisterDownloadingYT'] = "

YouTube Audio wird heruntergeladen. Dies kann einige Minuten dauern. Du kannst die Logdatei \"youtube-dl.log\" im Ordner \"shared\" ansehen.

"; $lang['cardRegisterSwipeUpdates'] = "Dies wird automatisch aktualisiert, wenn du eine RFID-Karte ausliest."; -$lang['cardRegisterManualLinks'] = "

Du kannst Karten auch manuell mit Ordnern verbinden. Das Handbuch erklärt, wie man sich mit der Phoniebox verbindet und Karten registriert.

"; +$lang['cardRegisterManualLinks'] = "

Du kannst Karten auch manuell mit Ordnern verbinden. Das Handbuch erklärt, wie man sich mit der Phoniebox verbindet und Karten registriert.

"; $lang['cardRegisterTriggerSuccess'] = "Die Karte ist jetzt verknĂĽpft um die Funktion auszufĂĽhren:"; /* diff --git a/htdocs/lang/lang-en-UK.php b/htdocs/lang/lang-en-UK.php index 9610adaa2..5b68fc9e3 100755 --- a/htdocs/lang/lang-en-UK.php +++ b/htdocs/lang/lang-en-UK.php @@ -132,7 +132,7 @@ $lang['cardRegisterFolder2Card'] = "Audio folder is now linked to Card."; $lang['cardRegisterDownloadingYT'] = "

YouTube audio is downloading. This may take a couple of minutes. You may check the logfile \"youtube-dl.log\" in the shared folder.

"; $lang['cardRegisterSwipeUpdates'] = "This will automatically update as you swipe a RFID card."; -$lang['cardRegisterManualLinks'] = "

You can also connect cards to folders manually. The manual explains how to connect to the phoniebox and register cards.

"; +$lang['cardRegisterManualLinks'] = "

You can also connect cards to folders manually. The manual explains how to connect to the phoniebox and register cards.

"; $lang['cardRegisterTriggerSuccess'] = "The card is now linked to trigger the command:"; /* diff --git a/htdocs/lang/lang-fr-FR.php b/htdocs/lang/lang-fr-FR.php index 73780f2d2..352846b37 100755 --- a/htdocs/lang/lang-fr-FR.php +++ b/htdocs/lang/lang-fr-FR.php @@ -132,7 +132,7 @@ $lang['cardRegisterFolder2Card'] = "Le dossier audio est désormais lié à une carte."; $lang['cardRegisterDownloadingYT'] = "

Piste YouTube en cours de téléchargement. Cela peut prendre plusieurs minutes. Log dans le fichier \"youtube-dl.log\".

"; $lang['cardRegisterSwipeUpdates'] = "Mise Ă  jour automatique lors du passage d'une carte."; -$lang['cardRegisterManualLinks'] = "

Vous pouvez lier manuellement une carte Ă  un dossier. Explication dans la documentation connection Ă  phoniebox et enregistrer une carte.

"; +$lang['cardRegisterManualLinks'] = "

Vous pouvez lier manuellement une carte Ă  un dossier. Explication dans la documentation connection Ă  phoniebox et enregistrer une carte.

"; $lang['cardRegisterTriggerSuccess'] = "La carte est désormais lié à une commande :"; /* diff --git a/htdocs/lang/lang-nl-NL.php b/htdocs/lang/lang-nl-NL.php index 83b480cf6..38c6c451b 100755 --- a/htdocs/lang/lang-nl-NL.php +++ b/htdocs/lang/lang-nl-NL.php @@ -115,7 +115,7 @@ $lang['cardRegisterFolder2Card'] = "De audiomap is nu gekoppeld aan kaart-ID"; $lang['cardRegisterDownloadingYT'] = "

YouTube-audio wordt gedownload. Dit kan een paar minuten duren. U kunt het logbestand 'youtube-dl.log' in de gedeelde map controleren.

"; $lang['cardRegisterSwipeUpdates'] = "Dit wordt automatisch bijgewerkt terwijl je een RFID-kaart veegt."; -$lang['cardRegisterManualLinks'] = "

U kunt kaarten ook handmatig met mappen verbinden. In de handleiding wordt uitgelegd hoe u verbinding maakt met de phoniebox en kaarten registreert.

"; +$lang['cardRegisterManualLinks'] = "

U kunt kaarten ook handmatig met mappen verbinden. In de handleiding wordt uitgelegd hoe u verbinding maakt met de phoniebox en kaarten registreert.

"; /* * Card edit form diff --git a/htdocs/manageFilesFolders.php b/htdocs/manageFilesFolders.php index 0664704fa..5fd3ca310 100755 --- a/htdocs/manageFilesFolders.php +++ b/htdocs/manageFilesFolders.php @@ -5,7 +5,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the - * INSTALL-stretch.md instructions. + * INSTALL.md instructions. * If you want to change the paths, edit config.php ***************************************************/ diff --git a/htdocs/trackEdit.php b/htdocs/trackEdit.php index 19be521cd..14ced2757 100755 --- a/htdocs/trackEdit.php +++ b/htdocs/trackEdit.php @@ -11,7 +11,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the -* INSTALL-stretch.md instructions. +* INSTALL.md instructions. * If you want to change the paths, edit config.php ***************************************************/ diff --git a/htdocs/userScripts.php b/htdocs/userScripts.php index f1897224f..536c06743 100755 --- a/htdocs/userScripts.php +++ b/htdocs/userScripts.php @@ -5,7 +5,7 @@ /************************************************** * VARIABLES * No changes required if you stuck to the -* INSTALL-stretch.md instructions. +* INSTALL.md instructions. * If you want to change the paths, edit config.php ***************************************************/ diff --git a/scripts/activate_amplifier.py b/scripts/activate_amplifier.py index c51ecf59b..3d0150c74 100755 --- a/scripts/activate_amplifier.py +++ b/scripts/activate_amplifier.py @@ -9,7 +9,7 @@ # see for an example implementation with a PAM8403 digital amplifier # (PAM pin 12 connected to GPIO 26) -# https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Hardware-Hack-PAM8403-Poweroff +# https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Hardware-Hack-PAM8403-Amplifier-Power-Off # change this value based on which GPIO port the amplifier or other devices are connected to # Flexible Pinout diff --git a/scripts/installscripts/buster-install-default.sh b/scripts/installscripts/buster-install-default.sh index 83070ed37..a85855c20 100644 --- a/scripts/installscripts/buster-install-default.sh +++ b/scripts/installscripts/buster-install-default.sh @@ -9,8 +9,7 @@ # which means you don't need to run the interactive install: # # 1. download the install file from github -# https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/scripts/installscripts -# (note: currently only works for buster and newer OS) +# https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/master/scripts/installscripts # 2. make the file executable: chmod +x # 3. place the PhonieboxInstall.conf in the folder $HOME # 4. run the installscript with option -a like this: @@ -37,9 +36,9 @@ JUKEBOX_HOME_DIR="${HOME_DIR}/RPi-Jukebox-RFID" LOGDIR="${HOME_DIR}"/phoniebox_logs JUKEBOX_BACKUP_DIR="${HOME_DIR}/BACKUP" -# Get the RaspberryPi OS code name (e.g. buster or bullseye) +# Get the Raspberry Pi OS codename (e.g. buster, bullseye, ...) OS_CODENAME="$( . /etc/os-release; printf '%s\n' "$VERSION_CODENAME"; )" -printf "Used RaspberryPi OS: ${OS_CODENAME}\n" +printf "Used Raspberry Pi OS: ${OS_CODENAME}\n" INTERACTIVE=true