Skip to content

Commit 9dc8d0d

Browse files
authored
Merge pull request #1159 from MiczFlor/develop
Release 2.2
2 parents 70f989b + e6f5676 commit 9dc8d0d

33 files changed

Lines changed: 977 additions & 473 deletions

.github/workflows/dockerimage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ jobs:
1515
docker build . --file ./ci/Dockerfile.buster.test_install.amd64 --tag rpi-jukebox-rfid-buster:latest
1616
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests.sh
1717
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests2.sh
18+
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests3.sh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ scripts/gpio-buttons.py
2121

2222
shared/*
2323
playlists/*
24+
pythonenv*/*
2425
logs/*
2526

2627
# Byte-compiled / optimized / DLL files

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ A contactless jukebox for the Raspberry Pi, playing audio files, playlists, podc
1414

1515
* **Gitter Community** we got ourselves a gitter community; chat us up at https://gitter.im/phoniebox
1616

17-
* **Phoniebox [2.1.1](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/5?closed=1) released (2020-10-14)**
17+
* **Phoniebox [2.2](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/4?closed=1) released (2020-xx-xx)**
1818

19-
The [2.1](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/3?closed=1) release was pushed through the doors with many contributors (some of which in alphabetical order): @andreasbrett @BerniPi @juhrmann @Luegengladiator @MarkusProchaska @MarlonKrug @patrickweigelt @princemaxwell @RalfAlbers @s-martin @themorlan @veloxidSchweiz @xn--nding-jua. [List of all contributors](https://github.com/MiczFlor/RPi-Jukebox-RFID/graphs/contributors)
19+
The [2.2](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/4?closed=1) release was pushed through the doors with many contributors (some of which in alphabetical order): @andreasbrett @BerniPi @juhrmann @Luegengladiator @MarkusProchaska @MarlonKrug @patrickweigelt @princemaxwell @RalfAlbers @s-martin @themorlan @veloxidSchweiz @xn--nding-jua. [List of all contributors](https://github.com/MiczFlor/RPi-Jukebox-RFID/graphs/contributors)
2020

21-
## What's new in version 2.1.1?
21+
## What's new in version 2.2?
2222

23-
* Use [multiple readers](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/1012#issue-434052529) simultaneously
24-
* Improved [GPIO control](components/gpio_control/README.md) and integrated in **one-line install script**
25-
* Integrated selection of RFID readers in **one-line install script**
26-
* Improved handling of playlists in web UI
27-
* Improved Spotify handling of albums covers, etc.
28-
* Seeking via GPIO buttons
23+
* :fire: **Fixed location of gpio_settings.ini** for [GPIO control](components/gpio_control/README.md)
24+
* Added support for files with embedded chapters metada (like m4a) enhancement
25+
* Added customizable poweroff command bash enhancement
26+
* Finally fixed resume function...
2927
* Lots of fixed bugs and minor improvements...
28+
* Status LED, Rotary Button, Volume Up/Down, custom music directory for +Spotify, Startup sound volume
3029

3130
**What's still hot?**
32-
31+
* The constantly improved **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)
32+
* integrated improved [GPIO control](components/gpio_control/README.md)
33+
* integrated selection of RFID readers and uses [multiple readers](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/1012#issue-434052529) simultaneously
34+
* features *non-interactive* installs based on a config file
3335
* **[WiFi management](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#wifi-settings)**
3436
* RFID cards to **toggle Wifi** (or switch it on/off)
3537
* Read out the Wifi IP address (if you are connecting to a new network and don't know where to point your browser)
3638
* **Hotspot** Phoniebox: [ad-hoc hotspot](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/967) if no known network found (IP: 10.0.0.5 SSID: phoniebox Password: PlayItLoud)
3739
* **Touchscreen** LCD display Player (file: `index-lcd.php`in web app)
38-
* Improved **one-line install script** featuring *non-interactive* installs based on a config file
39-
* Integrate your [Phoniebox in your Smart Home](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/581).
40+
* Integrate your [Phoniebox in your Smart Home](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Smart-Home-remote-control-with-MQTT).
4041
* Smoother [Web App running on ajax](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/623).
4142
* New [search form for local files](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/710)
42-
* 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).
4343
* Control the debug logs in the web app (individual scripts switched on/off, empty log file).
4444
* Set [maximum volume with RFID](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/633) cards.
4545
* Control via [**wifi web app**](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/MANUAL#webapp) from your phone, tablet or PC. You can play, upload, move files, assign new RFID cards, control playout, settings, etc.
@@ -233,6 +233,7 @@ Here is a list of equipment needed. You can find a lot second hand online (save
233233

234234
### Arcade Buttons
235235

236+
* [USB Interface for Arcade buttons](https://amzn.to/3nRAtIS) if you insist on not soldering hardware. (23rd Nov 2020: GPIO control script not yet part of the repo)
236237
* Arcade Buttons / Sensors (one of these might suit you)
237238
* [Arcade Buttons / Schalter in various colours](https://amzn.to/2QMxe9r) if you want buttons for the GPIO control.
238239
* [Arcade Buttons wit LED and custom icons](https://amzn.to/2MWQ6hq) as used by [@splitti](https://splittscheid.de/selfmade-phoniebox/#3C).

ci/Dockerfile.buster.test_install.amd64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN groupadd --gid 1000 pi ;\
88
chown -R 1000:1000 /code /home/pi ;\
99
chmod +x /code/scripts/installscripts/buster-install-default.sh ;\
1010
chmod +x /code/scripts/installscripts/tests/run_installation_tests.sh ;\
11-
chmod +x /code/scripts/installscripts/tests/run_installation_tests2.sh
11+
chmod +x /code/scripts/installscripts/tests/run_installation_tests2.sh ;\
12+
chmod +x /code/scripts/installscripts/tests/run_installation_tests3.sh
1213

1314
RUN export DEBIAN_FRONTEND=noninteractive ;\
1415
apt-get update ;\

components/displays/HD44780-i2c/i2c_lcd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def sec_to_min_and_sec(seconds):
313313
# #
314314
## read in track number #
315315
try: #
316-
track_number = current_song_infos['track'] #
316+
track_number = str(int(status['song'])+1) #
317317
except KeyError: #
318318
track_number = "1" #
319319
## read in playlistlength #
@@ -406,7 +406,7 @@ def sec_to_min_and_sec(seconds):
406406
if i_counter >= 65000: #
407407
i_counter = 1000 # <-- not 0, cause the display could be off #
408408
######################################################################################
409-
409+
410410
####################### REMIND STUFF FOR NEXT CYCLE #################################
411411
last_state = state #
412412
last_title = title #

components/gpio_control/GPIODevices/simple_button.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ def __init__(self, pin, action=lambda *args: None, name=None, bouncetime=500, ed
7474
bouncetime=self.bouncetime)
7575

7676
def callbackFunctionHandler(self, *args):
77+
if (len(args) > 0 and args[0] == self.pin):
78+
logger.debug('args before: {}'.format(args))
79+
args = args[1:]
80+
logger.debug('args after: {}'.format(args))
81+
7782
if self.hold_repeat:
7883
return self.holdAndRepeatHandler(*args)
7984
logger.info('{}: executre callback'.format(self.name))

components/gpio_control/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ It uses to a configuration file to configure the active devices.
99

1010
## How to edit configuration files?
1111
The configuration file is located here: `~/RPi-Jukebox-RFID/settings/gpio_settings.ini`
12-
Editing the configuration file and restarting the service will activate the new settings.
12+
Editing the configuration file and restarting the service with `sudo systemctl restart phoniebox-gpio-control` will activate the new settings.
1313

1414
In the following the different devices are described.
1515
Each device can have actions which correspond to function calls.
1616
Up to now the following input devices are implemented:
1717
* **Button**:
1818
A simple button which has a hold and repeat functionality as well as a delayed action.
19-
It can be configured using the keywords: Pin, hold_time, functionCall
19+
It can be configured using the keywords: Pin (**use GPIO number here**), hold_time, functionCall
2020

2121
* **RotaryEncoder**:
2222
Control of a rotary encoder, for example KY040, see also in
2323
[Wiki](https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Audio-RotaryKnobVolume)
24-
it can be configured using pinA, pinB, functionCallIncr, functionCallDecr, timeBase=0.1
24+
it can be configured using pinA (**use GPIO number here**), pinB (**use GPIO number here**), functionCallIncr, functionCallDecr, timeBase=0.1
2525

2626
* **TwoButtonControl**:
2727
This Device uses two Buttons and implements a third action if both buttons are pressed together.
28+
29+
Many example files are located in `~/RPi-Jukebox-RFID/components/gpio_control/example_configs/`.

components/gpio_control/function_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def functionCallPlayerStop(*args):
6969
function_call("{command} -c=playerstop".format(command=playout_control),
7070
shell=True)
7171

72+
7273
def functionCallPlayerSeekFwd(*args):
7374
function_call("{command} -c=playerseek -v=+10".format(command=playout_control), shell=True)
7475

@@ -77,7 +78,6 @@ def functionCallPlayerSeekBack(*args):
7778
function_call("{command} -c=playerseek -v=-10".format(command=playout_control), shell=True)
7879

7980

80-
8181
def getFunctionCall(functionName):
8282
logger.error('Get FunctionCall: {} {}'.format(functionName, functionName in locals()))
8383
getattr(sys.modules[__name__], str)

components/gpio_control/gpio_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def get_all_devices(config):
9898
logger.setLevel('INFO')
9999

100100
config = configparser.ConfigParser(inline_comment_prefixes=";")
101-
config_path = os.path.expanduser('~/.config/phoniebox/gpio_settings.ini')
101+
config_path = os.path.expanduser('/home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini')
102102
config.read(config_path)
103103

104104
devices = get_all_devices(config)

components/gpio_control/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ if [[ $(id -u) != 0 ]]; then
55
exit 1
66
fi
77

8-
if [[ ! -f ~/.config/phoniebox/gpio_settings.ini ]]; then
9-
mkdir -p ~/.config/phoniebox && cp /example_configs/gpio_settings.ini ~/.config/phoniebox/gpio_settings.ini
8+
if [[ ! -f /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini ]]; then
9+
cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/gpio_settings.ini.sample /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini
1010
fi
1111

1212
echo 'disable old services: phoniebox-gpio-buttons and phoniebox-rotary-encoder'

0 commit comments

Comments
 (0)