Skip to content

Commit 550a258

Browse files
Merge pull request #2358 from MiczFlor/develop
Release 2.7.0
2 parents dd2cda7 + 31c2142 commit 550a258

File tree

61 files changed

+531
-721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+531
-721
lines changed

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
max-parallel: 4
1717
matrix:
18-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
18+
python-version: ['3.9', '3.10', '3.11', '3.12']
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/test_docker_debian.yml

-15
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,3 @@ jobs:
6969
# with:
7070
# debian_codename: 'bullseye'
7171
# platform: linux/arm/v6
72-
73-
run_buster_armv7:
74-
name: 'buster armv7'
75-
uses: ./.github/workflows/test_docker_debian_codename_sub.yml
76-
with:
77-
debian_codename: 'buster'
78-
platform: linux/arm/v7
79-
80-
# # can be activate on test branches, currently failing
81-
# run_buster_armv6:
82-
# name: 'buster armv6'
83-
# uses: ./.github/workflows/test_docker_debian_codename_sub.yml
84-
# with:
85-
# debian_codename: 'buster'
86-
# platform: linux/arm/v6

.github/workflows/test_docker_debian_codename_sub.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
uses: docker/[email protected]
5959

6060
- name: Set up Docker Buildx
61-
uses: docker/setup-buildx-action@v3.1.0
61+
uses: docker/setup-buildx-action@v3.2.0
6262
with:
6363
# network=host driver-opt needed to push to local registry
6464
driver-opts: network=host
@@ -155,7 +155,7 @@ jobs:
155155
uses: docker/[email protected]
156156

157157
- name: Set up Docker Buildx
158-
uses: docker/setup-buildx-action@v3.1.0
158+
uses: docker/setup-buildx-action@v3.2.0
159159

160160
- name: Artifact Download Docker Image
161161
uses: actions/download-artifact@v4

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If the code change results in a test failure, we will make our best effort to co
9191
9292
### Guidelines
9393
94-
* The oldest supported Raspberry Pi OS version is currently **Buster**. Therefore all Python code should work with **Python 3.7**.
94+
* All code has to run under the stable and legacy version of Raspberry Pi OS (please check if currently even an older version is still supported).
9595
* For GPIO all code should work with **RPi.GPIO**. gpiozero is currently not intended to use.
9696
9797
### Additional Resources

README.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515

1616
Phoniebox is a contactless jukebox for the Raspberry Pi, playing audio files, playlists, podcasts, web streams and spotify triggered by RFID cards. All plug and play via USB, no soldering iron needed. It also features GPIO buttons control support.
1717

18-
## Important Notice regarding Spotify Integration
19-
20-
**Spotify has [disabled access to libspotify on May 16, 2022](https://developer.spotify.com/community/news/2022/04/12/libspotify-sunset/).**
21-
22-
This means **Spotify in Phoniebox doesn't work at the moment**. For further information see [Spotify FAQ](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Spotify-FAQ)
23-
24-
We are working to provide an integrated solution.
25-
For Version 2 there is a possible fix to reactivate spotify with a manual installation described [here](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/1815#issuecomment-1666535983).
26-
For Version 3 [#2164](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/2164) is laying the groundwork. Help is greatly appreciated.
27-
2818
## The new Phoniebox Calendar is here
2919

3020
Another bunch of wonderful designs!
@@ -80,11 +70,11 @@ Check out the following references.
8070
* [**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).
8171
* Support for various RFID readers, e.g.
8272
* USB
83-
* [RC422](components/rfid-reader/RC522/README.md)
73+
* [RC522](components/rfid-reader/RC522/README.md)
8474
* [PN532](components/rfid-reader/PN532/README.md)
8575
* PC/SC
8676
* also [multiple readers](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/1012#issue-434052529) simultaneously
87-
* [**GPIO** control](components/gpio_control/README.md) for [buttons](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Using-GPIO-hardware-buttons), [knobs / dials](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Audio-RotaryKnobVolume) and much more to control your Phoniebox via GPIO.
77+
* [**GPIO** control](components/gpio_control/README.md) for [buttons](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Using-GPIO-hardware-buttons) and much more to control your Phoniebox via GPIO.
8878
* Control via smooth [**Web App**](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#webapp) running on ajax from your phone, tablet or PC. You can play, upload, move files, assign new RFID cards, control playout, settings, etc.
8979
* Support for files with embedded chapters metadata (like m4a)
9080
* Customizable poweroff command

components/audio/PirateAudioHAT/setup_pirateAudioHAT.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ source "${JUKEBOX_HOME_DIR}"/scripts/helperscripts/inc.systemHelper.sh
77

88
question() {
99
local question=$1
10-
read -p "${question} (y/n)? " choice
10+
read -p "${question} (Y/n)? " choice
1111
case "$choice" in
12-
y|Y ) ;;
13-
n|N ) exit 0;;
14-
* ) echo "Error: invalid" ; question ${question};;
12+
[nN][oO]|[nN]) exit 0;;
13+
* ) ;;
1514
esac
1615
}
1716

components/bluetooth-sink-switch/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If no bluetooth device is connected, the output defaults back to speakers. After
1616

1717
### Limitations
1818

19-
This feature only works for the *Classic* Edition. Why? It relies on the mpd multiple output channels feature to switch between outputs. This is no available in mopidy, which is used in the Spotify Edition.
19+
This feature only works for the *Classic* Edition. Why? It relies on the mpd multiple output channels feature to switch between outputs. This is not available in mopidy, which is used in the Spotify Edition.
2020

2121
## Installation
2222

components/controls/buttons_usb_encoder/setup-buttons-usb-encoder.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ BUTTONS_USB_ENCODER_DIR="${JUKEBOX_HOME_DIR}/components/controls/buttons_usb_enc
66

77
question() {
88
local question=$1
9-
read -p "${question} (y/n)? " choice
9+
read -p "${question} (Y/n)? " choice
1010
case "$choice" in
11-
y|Y ) ;;
12-
n|N ) exit 0;;
13-
* ) echo "Error: invalid" ; question ${question};;
11+
[nN][oO]|[nN]) exit 0;;
12+
* ) ;;
1413
esac
1514
}
1615

components/gpio_control/README.md

+65-11
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,18 @@ Up to now the following input devices are implemented:
2424
* **ShutdownButton**:
2525
A specialized implementation for a shutdown button with integrated (but optional) LED support. It initializes a shutdown if the button is pressed more than `time_pressed` seconds and a (optional) LED on GPIO `led_pin` is flashing until that time is reached. For additional information, see [extended documentation below](#shutdownbutton).
2626

27-
* **RotaryEncoder**:
28-
Control of a rotary encoder, for example KY040, see also in [Wiki](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Audio-RotaryKnobVolume).
29-
It can be configured using `pinUp` and `PiNDown` (use GPIO numbers here), `functionCallUp`, `functionCallDown`, and `timeBase` see [extended documentation below](#rotaryencoder).
30-
3127
* **TwoButtonControl**:
3228
This Device uses two Buttons and implements a third action if both buttons are pressed together. See [extended documentation below](#twobuttoncontrol).
3329

30+
* **RotaryEncoder**:
31+
Control of a rotary encoder, for example KY040.
32+
It can be configured using `Pin1` and `Pin2` (use GPIO numbers here), `functionCall1`, `functionCall2` see [extended documentation below](#rotaryencoder).
33+
3434
* **StatusLED**:
3535
A LED which will light up once the Phoniebox has fully booted up and is ready to be used. For additional information, see [extended documentation below](#statusled).
3636

3737
Each section needs to be activated by setting `enabled: True`.
3838

39-
Many example files are located in `~/RPi-Jukebox-RFID/components/gpio_control/example_configs/`.
40-
4139
## Extended documentation
4240

4341
This section provides some extended documentation and guideline. Especially some exemplary configurations are introduced showing how these controls can be set up in the configuration file `~/RPi-Jukebox-RFID/settings/gpio_settings.ini`.
@@ -172,19 +170,75 @@ Furthermore, the following settings can be used as described for the [regular bu
172170
A RotaryEncoder can be created using an `ini` entry like this:
173171

174172
```bash
175-
[VolumeControl]
173+
[RotaryVolumeControl]
176174
enabled: True
177175
Type: RotaryEncoder
178-
Pin1: 7
179-
Pin2: 8
180-
timeBase: 0.02
176+
Pin1: 22
177+
Pin2: 23
178+
timeBase: 0.1
181179
functionCall1: functionCallVolU
182180
functionCall2: functionCallVolD
183181
```
184182

185-
Pin1 and FunctionCall1 correspond to rotary direction "up", while Pin2 and FunctionCall2 correspond to "down".
183+
* **enabled**: This needs to be `True` for the rotary encoder to work.
184+
* **Pin1**: GPIO number corresponding to rotary direction "clockwise" ('CLK')
185+
* **Pin2**: GPIO number corresponding to rotary direction "counter clockwise" ('DT')
186+
* **functionCall1**: function called for every rotation step corresponding to rotary direction "clockwise". See below for passed arguments. See [function documentation below](#functions).
187+
* **functionCall2**: function called for every rotation step corresponding to rotary direction "counter clockwise". See below for passed arguments. See [function documentation below](#functions).
188+
* **timeBase**: Factor used for calculating the rotation value base on rotation speed, defaults to `0.1`. Use `0` for deactivating rotation speed influence.
189+
Example:
190+
* a single rotation step leads to the value 1 passed to the function.
191+
* steady rotation of two to or more steps, leads to the value 1 for the first call and the value 2 for all further calls.
192+
* speeding up rotation of two to or more steps, leads to the value 1 for the first call, the value 2 for the second, the value 3 for the third and so on.
193+
* **functionCall1Args**: Arguments for `functionCall1`, defaults to `None`. If defined takes precedence over rotation value. Arguments are ignored, if `functionCall1` does not take any.
194+
* **functionCall2Args**: Arguments for `functionCall2`, defaults to `None`. If defined takes precedence over rotation value. Arguments are ignored, if `functionCall1` does not take any.
195+
196+
To also use the push button of the encoder just a button definition:
197+
```bash
198+
[Mute]
199+
enabled: True
200+
Type: Button
201+
Pin: 27
202+
functionCall: functionCallVol0
203+
```
204+
186205
Note that the old configuration entries PinUp/PinDown and functionCallUp/functionCallDown are deprecated and might stop working in future.
187206

207+
208+
```bash
209+
[RotarySeekingControl]
210+
enabled: True
211+
Type: RotaryEncoder
212+
Pin1: 22
213+
Pin2: 23
214+
timeBase: 0.1
215+
functionCall1: functionCallPlayerSeekFwd
216+
functionCall1Args: 5
217+
functionCall2: functionCallPlayerSeekBack
218+
functionCall2Args: 5
219+
```
220+
221+
In this example, the encoder will be used to seek for- and backwards by 5 seconds on every rotation step. The rotation value will **NOT** be used in this case as the function args are defined!
222+
223+
224+
#### Circuit diagram
225+
```text
226+
.---------------. .---------------.
227+
| | | |
228+
| CLK |----------------------| GPIO 22 |
229+
| | | |
230+
| DT |----------------------| GPIO 23 |
231+
| | | |
232+
| SW |----------------------| GPIO 27 |
233+
| | | |
234+
| + |----------------------| 3.3V |
235+
| | | |
236+
| GND |----------------------| GND |
237+
| | | |
238+
'---------------' '---------------'
239+
KY-040 Raspberry
240+
```
241+
188242
### StatusLED
189243

190244
A StatusLED can be created using an `ini` entry like this:

components/gpio_control/example_configs/gpio_setting_rotary_vol_prevnext.ini

-36
This file was deleted.

components/gpio_control/example_configs/gpio_settings.ini

+15-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,28 @@ antibouncehack: False
44

55
[VolumeControl]
66
enabled: False
7-
Type: TwoButtonControl ;or RotaryEncoder
7+
Type: TwoButtonControl
88
Pin1: 5
99
Pin2: 6
1010
pull_up_down: pull_up
1111
hold_time: 0.3
1212
hold_mode: Repeat
13-
timeBase: 0.1 ;only for RotaryEncoder
1413
functionCall1: functionCallVolU
1514
functionCall2: functionCallVolD
16-
functionCallTwoButtons: functionCallVol0 ;only for TwoButtonControl
15+
functionCallTwoButtons: functionCallVol0
1716
;functionCall1Args: 1
1817
;functionCall2Args: 1
1918
;functionCallTwoButtonsArgs: x
2019

20+
[RotaryVolumeControl]
21+
enabled: False
22+
Type: RotaryEncoder
23+
Pin1: 22
24+
Pin2: 23
25+
timeBase: 0.1
26+
functionCall1: functionCallVolU
27+
functionCall2: functionCallVolD
28+
2129
[PrevNextControl]
2230
enabled: False
2331
Type: TwoButtonControl
@@ -143,3 +151,7 @@ pull_up_down: pull_up
143151
functionCall: functionCallTriggerPlayFolder
144152
functionCallArgs: someRelativeFolderName
145153

154+
[StatusLED]
155+
enabled: False
156+
Type: StatusLED
157+
Pin: 14

components/gpio_control/example_configs/gpio_settings_rotary_and_led.ini

-49
This file was deleted.

components/gpio_control/example_configs/gpio_settings_status_led.ini

-7
This file was deleted.

0 commit comments

Comments
 (0)