Closed htpzc closed 4 years ago
Are you using the spotify edition or the classic edition?
We released 2.0 just moments ago, this release should fix many, many issues, so you could give that a try.
I updated my packages in apt. Afterwards my volume buttons also don't work anymore. I reinstalled Phoniebox software through the buster script without success. (Regarding volume control) I have the same errors in system log. (With slightly different line numbers. My error is in line 238 of playout controls and slightly different unexpected argument errors. My unexpected argument is '3' and a parenthesis - like above)
Changing the volume in the web app also does not work.
How can I debug this?
Manually changing PCM in alsamixer of course works.
I can try to make a clean install tomorrow. Otherwise I'll have to roll back my sdcard backup image from before the update.
Hi i'm playing around with a new installation of version 2 on a raspbery pi 3. unfortunately i can't get my already successfully used rotary encoders to work.
I'm still in the progress of a fresh installation so wait for that, but I found many issues that show the issue: unary operator expected
in the playout_controls.sh
See: https://github.com/MiczFlor/RPi-Jukebox-RFID/search?q=unary+operator+expected&type=Issues
Can that be related? Where is this thing coming from?
Fresh installed finished and issue present (I did not check if that affects volume change, but i guess it does):
Volume up error message in syslog:
May 30 07:27:03 raspberrypi gpio-buttons.py[547]: expr: syntax error: unexpected argument '3'
May 30 07:27:03 raspberrypi gpio-buttons.py[547]: ./scripts/playout_controls.sh: line 238: [: -le: unary operator expected
May 30 07:27:03 raspberrypi gpio-buttons.py[547]: OK MPD 0.21.4
May 30 07:27:03 raspberrypi gpio-buttons.py[547]: OK
When pressing volume down:
May 30 07:27:08 raspberrypi gpio-buttons.py[547]: expr: syntax error: unexpected argument '('
May 30 07:27:08 raspberrypi gpio-buttons.py[547]: ./scripts/playout_controls.sh: line 276: [: -ge: unary operator expected
May 30 07:27:08 raspberrypi gpio-buttons.py[547]: OK MPD 0.21.4
May 30 07:27:08 raspberrypi gpio-buttons.py[547]: OK
I suspect a problem here: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/7ab02865569df8dcf55c582bc066d03e1f128658/scripts/playout_controls.sh#L236
I don’t see were AUDIOVOLCHANGESTEP
is defined?
@topas-rec could you also execute echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*'
and post the result here?
I’m unsure, if this part of the script is only executed with rotary knobs or if this issue exists for regular buttons, too.
@veloxid, @MiczFlor I don’t know, if this is related to the GPIO control or the changes from 2.0.
In addition I think we need to find out which dependencies are needed from Raspian Desktop, so they could be installed, if the user uses a Raspian Lite installation (which should be sufficient for Phoniebox).
If that helps I can offer to do fresh installations on a rasperry pi 3. My setup consists of 2 encoders and 1-n buttons.
i always get stuck with the configuration of gpio_settings.ini https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/components/gpio_control
[VolumeControl]
enabled: True
Type: RotaryEncoderClickable
PinUp: 5 # Volume B (Data)
PinDown: 6 # Volume A (Clk)
pull_up: True
hold_time: 0.3
hold_repeat: True
timeBase: 0.1 # only for rotary encoder
functionCallDown: functionCallVolD
functionCallUp: functionCallVolU
functionCallTwoButtons: functionCallVol0 #only for TwoButtonControl
functionCallButton: functionCallPlayerPause # only for RotaryEncoderClickable
[PrevNextControl]
enabled: True
Type: RotaryEncoderClickable
PinUp: 22 # Previous Track B (Data)
PinDown: 23 # Next Track A (Clk)
pull_up: True
hold_time: 0.3
hold_repeat: True
timeBase: 0.1 # only for rotary encoder
functionCallDown: functionCallPlayerPrev
functionCallUp: functionCallPlayerNext
functionCallTwoButtons: None #only for TwoButtonControl
functionCallButton: functionCallPlayerPause # only for RotaryEncoderClickable
[Shutdown]
enabled: True
Type: Button
Pin: 3
hold_time: 2
functionCall: functionCallShutdown
@topas-rec could you also execute echo -e status\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' and post the result here?
That is not much (Tried it twice):
pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*'
pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*'
pi@raspberrypi:~ $
I suspect a problem here: RPi-Jukebox-RFID/scripts/playout_controls.sh Line 236 in 7ab0286 VOLPERCENT=
expr ${VOLPERCENT} + \( ${AUDIOVOLCHANGESTEP} \* ${VALUE} \)
I don’t see were AUDIOVOLCHANGESTEP is defined?
Might be. I have not enough knowledge of shell scripts to follow up on this.
In addition I think we need to find out which dependencies are needed from Raspian Desktop, so they could be installed, if the user uses a Raspian Lite installation (which should be sufficient for Phoniebox).
That's an interesting idea. I want to install the desktop version next to see if the lite version (which I use) is the cause for this. BTW: I did not use the lite version for the first time. So lite version worked with Phoniebox software before 2.0.
@topas-rec could you also execute echo -e status\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' and post the result here?
That is not much (Tried it twice):
pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' pi@raspberrypi:~ $
Ok, I think there’s an issue. This should return a (volume) value between 0 and 100. @MiczFlor, I don’t know where the value is really polled from and which service/application should run here to make this work. In any case I this we should have a check and an error message here, so a meaningful value is used.
I suspect a problem here: RPi-Jukebox-RFID/scripts/playout_controls.sh Line 236 in 7ab0286 VOLPERCENT=
expr ${VOLPERCENT} + \( ${AUDIOVOLCHANGESTEP} \* ${VALUE} \)
I don’t see were AUDIOVOLCHANGESTEP is defined?Might be. I have not enough knowledge of shell scripts to follow up on this.
In addition I think we need to find out which dependencies are needed from Raspian Desktop, so they could be installed, if the user uses a Raspian Lite installation (which should be sufficient for Phoniebox).
That's an interesting idea. I want to install the desktop version next to see if the lite version (which I use) is the cause for this. BTW: I did not use the lite version for the first time. So lite version worked with Phoniebox software before 2.0.
Ok, so I guess lite vs. desktop version is probably not an issue.
Ok, so I guess lite vs. desktop version is probably not an issue.
So it does not help if I test the desktop version? If not I would restore my backup.
Reverted to my backup where volume keys worked. After updateing all installed packages the volume buttons don't work anymor with the issues mentioned above. The following packages were part of the update. (I know that is a lot, but perhaps that helps)
The following NEW packages will be installed:
busybox initramfs-tools initramfs-tools-core klibc-utils libklibc linux-base pigz rpi.gpio-common
The following packages will be upgraded:
apt apt-transport-https apt-utils base-files bind9-host binutils binutils-arm-linux-gnueabihf
binutils-common bluez bluez-firmware curl distro-info-data dphys-swapfile e2fsprogs exim4-base
exim4-config exim4-daemon-light firmware-atheros firmware-brcm80211 firmware-libertas
firmware-misc-nonfree firmware-realtek fuse git git-man guile-2.2-libs iputils-ping libapt-inst2.0
libapt-pkg5.0 libbind9-161 libbinutils libboost-atomic1.67.0 libboost-iostreams1.67.0
libboost-regex1.67.0 libboost-system1.67.0 libboost-thread1.67.0 libcom-err2 libcups2 libcurl3-gnutls
libcurl4 libdns-export1104 libdns1104 libext2fs2 libfuse2 libgnutls-dane0 libgnutls30 libicu63 libidn2-0
libisc-export1100 libisc1100 libisccc161 libisccfg163 libldap-2.4-2 libldap-common liblwres161
libmariadb3 libmysofa0 libopenjp2-7 libpam-chksshpwd libpam-modules libpam-modules-bin libpam-runtime
libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpython3.7
libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib libraspberrypi-bin libraspberrypi-dev
libraspberrypi-doc libraspberrypi0 libss2 libssh-gcrypt-4 libssl1.1 libsystemd0 libudev1 libunbound8
mariadb-common openssh-client openssh-server openssh-sftp-server openssl php7.3 php7.3-cgi php7.3-cli
php7.3-common php7.3-fpm php7.3-json php7.3-opcache php7.3-readline pi-bluetooth python-rpi.gpio
python3-rpi.gpio python3.7 python3.7-dev python3.7-minimal raspberrypi-bootloader raspberrypi-kernel
raspberrypi-kernel-headers raspberrypi-sys-mods raspi-config rpi-eeprom rpi-eeprom-images rpi-update ssh
sudo systemd systemd-sysv tzdata udev wpasupplicant
115 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Tested the desktop version without success. So volume buttons are no longer working in the current version (which is live).
@topas-rec could you also execute echo -e status\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' and post the result here?
That is not much (Tried it twice):
pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' pi@raspberrypi:~ $ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*' pi@raspberrypi:~ $
Ok, I think there’s an issue. This should return a (volume) value between 0 and 100. @MiczFlor, I don’t know where the value is really polled from and which service/application should run here to make this work. In any case I this we should have a check and an error message here, so a meaningful value is used.
I suspect a problem here: RPi-Jukebox-RFID/scripts/playout_controls.sh Line 236 in 7ab0286 VOLPERCENT=
expr ${VOLPERCENT} + \( ${AUDIOVOLCHANGESTEP} \* ${VALUE} \)
I don’t see were AUDIOVOLCHANGESTEP is defined?Might be. I have not enough knowledge of shell scripts to follow up on this.
In addition I think we need to find out which dependencies are needed from Raspian Desktop, so they could be installed, if the user uses a Raspian Lite installation (which should be sufficient for Phoniebox).
That's an interesting idea. I want to install the desktop version next to see if the lite version (which I use) is the cause for this. BTW: I did not use the lite version for the first time. So lite version worked with Phoniebox software before 2.0.
Ok, so I guess lite vs. desktop version is probably not an issue.
Issue is here also from my point of view: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/03e63de6669c49548c9246185f36554f245f7347/scripts/playout_controls.sh#L234
When I echo -e status\\nclose | nc -w 1 localhost 6600
it says
OK MPD 0.21.4
repeat: 0
random: 0
single: 0
consume: 0
playlist: 2
playlistlength: 0
mixrampdb: 0.000000
state: stop
OK
when nothing is playing and else
OK MPD 0.21.4
repeat: 0
random: 0
single: 0
consume: 0
playlist: 4
playlistlength: 42
mixrampdb: 0.000000
state: play
song: 0
songid: 1
time: 14:149
elapsed: 14.354
bitrate: 320
duration: 149.368
audio: 44100:24:2
nextsong: 1
nextsongid: 2
OK
Nothing about volume which is piped to grep to extract the volume. There was volume information before I guess. (See https://stackoverflow.com/questions/30323721/mpd-receive-actual-mpd-status-with-linux-bash-script)
Assuming this is related to an mpd
version update - how do we get the volume information from mpd?
I think I got further and solved this on my machine.
PCM
mixer controlHeadphone
and not PCM
anymoreI looked into mpd.conf and there was PCM
set in audio output mixer section. I changed that to Headphone
and restartet mpd through sudo systemctl restart mpd
.
Now the volume change works without issues.
Can someone confirm this solution who has this issue? (All packages have to be up to date)
Thanks for investigating this!
I can also confirm that on my dev Pi I now have "Headphone". This is mpd version 0.21.5
I agree that probably an update of MPD changed this.
We should to check, if we now need to support both cases.
Looks like this is a change of the Pi audio behavior itself: https://retropie.org.uk/forum/topic/26434/usb-audio-broke-after-latest-updates/2 https://www.raspberrypi.org/blog/latest-raspberry-pi-os-update-may-2020/
Thanks for investigating this!
I can also confirm that on my dev Pi I now have "Headphone". This is mpd version 0.21.5
I agree that probably an update of MPD changed this.
We should to check, if we now need to support both cases.
I don't know where to implement handling these cases and I'm not the best bash programmer. @s-martin Weather we need both cases (PCM and headphone) or just handling the up to date Raspbian version (Headphone), can you do this?
According to https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Troubleshooting-FAQ#audio-is-not-working Section b) you need to change the output at 2 places.
@topas-rec Could you check, if this works for you when you change the two places to Headphone
and then give me feedback?
Then I would update the install script and the wiki docs.
@topas-rec additional question: Which Pi do you have?
I experienced this new behavior on my Pi4, but I currently don't have an older model to test.
Mine is a Pi Model 3B V1.2
Ok, so we can assume that a fix is needed for more models than Pi4
I am looking into this now, upgrading my Raspbian Lite to the latest version and then will install a new OS using the latest lite
version.
Raspberry Pi OS (32-bit) Lite
Minimal image based on Debian Buster
Version:May 2020
Release date:2020-05-27
Kernel version:4.19
Size:432 MB
I can verify that PCM has disappeared and is now called Headphone. I updated the installer script for the develop
branch. Weirdly, the command amixer scontrols
does not show Headphone. But alsamixer
offers it as a sound card.
Installing a new OS now and see what it does with the new install script...
I can also confirm that echo -e status\\nclose | nc -w 1 localhost 6600
does return the volume in percent anymore. Ok, need to look into this much much more.
I love my job :) there is always something falling off the other end of the table when you adjust the table cloth at this end... ;)
Won't be able to fix this today.
I've been investigating a bit further. And here comes the fun part: (first my question @htpzc : did you try with HDMI plugged in? Did you have a speaker / headset connected to the minijack?)
Once I detached the HDMI cable AND plugged in a set of speakers into the minijack, everything worked as expected:
$ echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=volume: ).*'
43
$ ./RPi-Jukebox-RFID/scripts/playout_controls.sh -c=getvolume
43
This was done with Headphone
as the iFace name:
$ sudo cat /etc/mpd.conf | grep Head
mixer_control "Headphone"
and:
$ sudo cat RPi-Jukebox-RFID/settings/global.conf | grep Head
AUDIOIFACENAME="Headphone"
Not sure how to document this best during the installation and/or in the manual.
sorry for not answering. I am in holidays for the next 20 days. No i did not Connect hdmi. My minijack is the usb adapter which is recommended on the homepage. There i have connected the speakers which are recommended at the Homepage ;-)
Sorry, but i cannot test anything until i am back home. Then i will check again.
enjoy your holidays and switch off :) I can't reproduce the behaviour unfortunately. but someone else might jump in?
enjoy your holidays and switch off :) I can't reproduce the behaviour unfortunately. but someone else might jump in?
so to help, i take:
develp oder master? cd; rm buster-install-*; wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/develop/scripts/installscripts/buster-install-default.sh; chmod +x buster-install-default.sh; ./buster-install-default.sh
Please use develop
, install with this command:
cd; rm buster-install-*; wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/develop/scripts/installscripts/buster-install-default.sh; chmod +x buster-install-default.sh; GIT_BRANCH=develop bash ./buster-install-default.sh
I have a Pi4, no connection to HDMI or audio jack and no additional sound card (it's my dev device), and I only see audio device Headphone
at amixer scontrols
, alsamixer
and aplay -l
.
I had to change to Headphone
, otherwise MPD would throw errors.
This was done with
Headphone
as the iFace name:$ sudo cat /etc/mpd.conf | grep Head mixer_control "Headphone"
and:
$ sudo cat RPi-Jukebox-RFID/settings/global.conf | grep Head AUDIOIFACENAME="Headphone"
@MiczFlor, side question: in addition we have also settings/Audio_iFace_Name
, how does that correspond to global.conf
?
Good News: Buttons are working!
raspi 3 with fresh Raspian Lite (2020-05-27-raspios-buster-lite-armhf) with HDMI cable (without display) AND a set of speakers/headphone plugged in
Button according to Flexible Pinout (vol +/- GPIO 5/6) (default is 16/19)
record the whole SSH Session putty.log
buttons are working!
If someone could help me with the new "Rotary Knob" Setup (https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/components/gpio_control) i would realy be glad to document that.
If someone could help me with the new "Rotary Knob" Setup (https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/components/gpio_control) i would realy be glad to document that.
GPIO Control is not straightforward yet (#991 is supposed to change that). I haven’t used it before (@veloxidSchweiz implemented it), but I try to explain as much as possible.
GPIO Control replaces also gpio-buttons.py and all GPIO devices (except readers) are configured in ~/.config/phoniebox/gpio_settings.ini
.
Steps necessary:
Deactivate old GPIO service: sudo systemctl deactivate phoniebox-gpio-buttons
and sudo systemctl stop phoniebox-gpio-buttons
Install GPIO control: sudo components/gpio_control/install.sh
manually edit ~/.config/phoniebox/gpio_settings.ini
for a button and a rotary knob
post results here :)
I tried to configure the Rotary Knob as well. With my setup the VolumeControl Device cannot be initialized correctly for some reason.
OS: Raspbian Buster Lite Hardware: Raspberry Pi Zero + HifiBerry MiniAmp + Rotary Control
Steps
# Headless install (develop branch)
cd; rm buster-install-*; wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/develop/scripts/installscripts/buster-install-default.sh; chmod +x buster-install-default.sh; GIT_BRANCH=develop bash ./buster-install-default.sh -a
sudo reboot
# old service
sudo systemctl deactivate phoniebox-gpio-buttons
sudo systemctl stop phoniebox-gpio-buttons
# to fix error: 'components/gpio_control/install.sh: line 8: pip: command not found'
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# cd into the directory. otherwise the install-script is not able to find the example-configs
cd ~/RPi-Jukebox-RFID/components/gpio_control
# Comment line 4 in order to be able to execute the installation as sudo (# exit 1)
nano ./install.sh
# Start installation
sudo ./install.sh
# enable and start service
sudo systemctl enable phoniebox_gpio_control.service
sudo systemctl start phoniebox_gpio_control.service
# modify gpio_settings.ini
sudo nano ~/.config/phoniebox/gpio_settings.ini
# check functionality
python gpio_control.py
Output:
WARNING:root:Could not add Device VolumeControl with [('enabled', 'True'), ('type', 'RotaryEncoderClickable'), ('pinup', '16'), ('pindown', '19'), ('pull_up', 'True'), ('hold_time', '0.3'), ('hold_repeat', 'True'), ('timebase', '0.1 # only for rotary encoder'), ('functioncalldown', 'functionCallVolD'), ('functioncallup', 'functionCallVolU'), ('functioncalltwobuttons', 'functionCallVol0 #only for TwoButtonControl'), ('functioncallbutton', 'functionCallPlayerPause # only for RotaryEncoderClickable')]
The service phoniebox_gpio_control
starts gpio_control.py
, so I'm not sure, if you can use both at the same time.
@veloxidSchweiz, do you have an idea?
What's the result of journalctl -u phoniebox_gpio_control.service -f
?
I think type should just be RotaryEncoder
, at least I couldn't find any instance of RotaryEncoderClickable
in the code.
I think type should just be RotaryEncoder, at least I couldn't find any instance of RotaryEncoderClickable in the code.
Perfect, this did the trick. Two updates of the gpio_settings.ini
are necessary:
1) Type: RotaryEncoderClickable
=> Type: RotaryEncoder
2) timeBase: 0.1 # only for rotary encoder
=> timeBase: 0.1
Thanks @s-martin !
Howdy! Any news? Got like the same issue. It's a RasPi 3B+. But I think it also comes up on the RasPi4b. At least I think I had that issues, when I decided to move the PhoeniBox from a KODIbox zu a VPNBox. I thought the issues was related to conflicting MPD usage of KODI / Phonie but might have been update-related there already.
I actually dont wanna resetup that 3B+ and 4B systems, since it took me ages to get the VPN / AP / PiHole etc running correctly. Might try on a RasPi 3B I got laying around later that day.
Stupid question: May this be related to "rpi-update"? Can anyone confirm, that users without rpi-update are concerned? Not sure, but think I did it on all devices - since the RPi 3B+ runs at 1.5ghz and the RP4b at 2.1GHZ ("slightly") OC'ed it.
Help!!!! For now I can only adjust volume on phsical volume rulers and my wife keeps shouting at my and I have to jump behind the TV and.... !!! :D ^^;
Best regards Pete
I think you need to check with
alsamixer
amixer scontrols
or
aplay -l
how your audio devices are now called and which number they may have.
Changed names (e.g. Headphone
) need to be updated in /etc/mpd.conf
, settings/global.conf
and settings/Audio_iFace_Name
.
If you made changes in /etc/asound.conf
(see https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Troubleshooting-FAQ#audio-is-not-working) you maybe need to update the numbers for the device as seen in aplay -l
.
Stupid question: May this be related to "rpi-update"? Can anyone confirm, that users without rpi-update are concerned?
@Piehti Yes, I was affected without making rpi-update
.
Line timeBase: 0.1 # only for rotary encoder
in gpio_settings.ini
generates this error:
ValueError: could not convert string to float: '0.1 # only for rotary encoder
Fixing this line and changing Type: RotaryEncoderClickable
to Type: RotaryEncoder
solved the problem for me.
Stupid question: May this be related to "rpi-update"? Can anyone confirm, that users without rpi-update are concerned? Not sure, but think I did it on all devices - since the RPi 3B+ runs at 1.5ghz and the RP4b at 2.1GHZ ("slightly") OC'ed it.
No, it’s related to a Raspberry Pi update (https://www.raspberrypi.org/blog/latest-raspberry-pi-os-update-may-2020/), which affected all Pi’s
Changed names (e.g.
Headphone
) need to be updated in/etc/mpd.conf
,settings/global.conf
andsettings/Audio_iFace_Name
.If you made changes in
/etc/asound.conf
(see https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Troubleshooting-FAQ#audio-is-not-working) you maybe need to update the numbers for the device as seen inaplay -l
.
I got my sound back working, by fixing the suggested stuff to "Headphones". Unfortunatly I still dont got my volumecontrol back. Ich changed to rotaryclick as decriped above. No effect. What do you mean by "fixing" the line? I just deleted the comments in it - which doesnt help. :/
Do i understand correct, that you mean the 'volumecontrol' using buttons/rotary? could you run the check installation srcipt: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/develop/components/gpio_control/check_installation.sh and tell the output maybe
Problem during installation occured
Service not running, please check functionallity by running gpio_control.py
in the directory ~/RPi-Jukebox-RFID/components/gpio_control:
$ cd ~/RPi-Jukebox-RFID/components/gpio_control
$ python gpio_control.py
or check output of journaclctl by:
$ journalctl -u phoniebox_gpio_control.service -f
PROBLEM IN INSTALLATION
Im not using any GPIO buttons - aye?
Diggin' deeper...
File "gpio_control.py", line 6, in <module>
from GPIODevices import *
File "/home/pi/RPi-Jukebox-RFID/components/gpio_control/GPIODevices/__init__.py", line 7, in <module>
from .led import *
File "/home/pi/RPi-Jukebox-RFID/components/gpio_control/GPIODevices/led.py", line 4, in <module>
import mpd
did you install the requirements, i.e. python-mpd2
otherwise try
pip install -r requirements.txt
or just
pip install python-mpd2
So I ran sudo apt-get install python-pip for I had no pip-support. scratchscratch After pip install -r requirements.txt + reboot, I got python gpio_control.py back running. Still the check_installation.sh states the same error.
When hitting the vol up / down, the following error occours:
I think that is new and I can remember to have had that once, I played with the playoutcontrols when implementing video stuff and messed up something. Before I take us on a ride for ghosts, (because I did something that I didnt want to do nor can remember) I gonna backup the state for later purpose and just reinstall the dev branch to be sure.
Be right back. EDIT ... and back...
Do you want to start the installation? [Y/n] y
################################################
# Phoniebox config
WIFIconfig=NO
WIFIcountryCode=DE
EXISTINGuseRfidConf=NO
EXISTINGuseRfidLinks=YES
EXISTINGuseAudio=YES
EXISTINGuseGpio=NO
EXISTINGuseSounds=NO
EXISTINGuse=YES
AUDIOiFace="PCM"
SPOTinstall="NO"
MPDconfig="YES"
DIRaudioFolders="/home/pi/RPi-Jukebox-RFID/shared/audiofolders"
WIFIconfig=NO
WIFIcountryCode=DE
WIFIconfig=NO
WIFIcountryCode=DE
EXISTINGuse=NO
AUDIOiFace="Headphone"
SPOTinstall="NO"
MPDconfig="YES"
DIRaudioFolders="/home/pi/RPi-Jukebox-RFID/shared/audiofolders"
################################################
Generating locales (this might take a while)...
de_DE.UTF-8... done
Generation complete.
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Is that warning "OK"? Also I ran into (which I did also when I installed the non-dev branch):
Run "service lighttpd force-reload" to enable changes
### Deleting older versions of service daemons. This might throw errors, ignore them
Failed to disable unit: Unit file idle-watchdog.service does not exist.
Failed to disable unit: Unit file rfid-reader.service does not exist.
Failed to disable unit: Unit file phoniebox-startup-sound.service does not exist
Failed to disable unit: Unit file gpio-buttons.service does not exist.
rm: das Entfernen von '/etc/systemd/system/rfid-reader.service' ist nicht möglic h: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von '/etc/systemd/system/startup-sound.service' ist nicht mögl ich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von '/etc/systemd/system/gpio-buttons.service' ist nicht mögli ch: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von '/etc/systemd/system/idle-watchdog.service' ist nicht mögl ich: Datei oder Verzeichnis nicht gefunden
### Done with erasing old daemons. Stop ignoring errors!
Created symlink /etc/systemd/system/multi-user.target.wants/phoniebox-gpio-butto ns.service → /etc/systemd/system/phoniebox-gpio-buttons.service.
Configuring MPD...
Updating DB (#11) ...
volume: 65% repeat: off random: off single: off consume: off
Starting dhcpcd service...
Job for dhcpcd.service failed because the control process exited with error code.
See "systemctl status dhcpcd.service" and "journalctl -xe" for details.
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable dhcpcd
Setting owner and permissions for directories...
numid=1,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
: values=400
| dBscale-min=-102.39dB,step=0.01dB,mute=1
I start to get a bad feeling about this... To Conclude: I got a VPN-Router running on the Device, which propably needed to disable / deinstall several services. For systemctl status dhcpcd.service goes:
Warning: The unit file, source configuration file or drop-ins of dhcpcd.service changed on disk. Run 'systemctl daemon-reload' to reload
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: failed (Result: exit-code) since Fri 2020-06-05 23:28:35 CEST; 2min 12s ago
Process: 364 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)
Jun 05 23:28:35 GHOSTtrap systemd[1]: Starting dhcpcd on all interfaces...
Jun 05 23:28:35 GHOSTtrap dhcpcd[364]: Not running dhcpcd because /etc/network/interfaces
Jun 05 23:28:35 GHOSTtrap dhcpcd[364]: defines some interfaces that will use a
Jun 05 23:28:35 GHOSTtrap dhcpcd[364]: DHCP client or static address
Jun 05 23:28:35 GHOSTtrap systemd[1]: dhcpcd.service: Control process exited, code=exited, status=6/NOTCONFIGURED
Jun 05 23:28:35 GHOSTtrap systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
Jun 05 23:28:35 GHOSTtrap systemd[1]: Failed to start dhcpcd on all interfaces.
So far... lemme go down and do a bit of testing... I doubt it's better. xD
After I found my samba-shares gone, I re-setup and resynced and chowned / chmodded the box. The issue seems to be gone after the installation of the dev branch.
Thanks for all the support. Sorry for th inconvenience.
*Edit: More testing, the issue is gone.
Bug
Volume Up and Down brings error
What I did
Fresh Install with Master Branch. No Spotify. Hold it simple GPIO Buttons are default configured. All other buttons work fine (forward, back, play/pause)
What happened
Everything works fine, but vol up down buttons dont work
I expected this to happen
vol turns up and down
Further information that might help
In all other installations before with and without Spotify the buttons worked fine!
Push Button /var/log/syslog May 22 20:15:43 raspberrypi gpio-buttons.py[472]: expr: syntax error: unexpected argument '11' May 22 20:15:43 raspberrypi gpio-buttons.py[472]: ./scripts/playout_controls.sh: line 244: [: -le: unary operator expected May 22 20:15:43 raspberrypi gpio-buttons.py[472]: OK MPD 0.21.4 May 22 20:15:43 raspberrypi gpio-buttons.py[472]: OK
Push other button May 22 20:17:03 raspberrypi gpio-buttons.py[472]: expr: syntax error: unexpected argument '(' May 22 20:17:03 raspberrypi gpio-buttons.py[472]: ./scripts/playout_controls.sh: line 281: [: -ge: unary operator expected May 22 20:17:03 raspberrypi gpio-buttons.py[472]: OK MPD 0.21.4 May 22 20:17:03 raspberrypi gpio-buttons.py[472]: OK
Software
Base image and version
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
Branch / Release