Announcement
Collapse
No announcement yet.
[ANNOUNCE] SqueezeButtonPi - Tool to use buttons and rotary encoders on a RPi
Collapse
X
-
Post the output of the command. I hope you are using a button and not just touching wire and pins. There is debounce in the software. But you would see that if you look at the output. -
-
Yes, see what that shows, the should be a lot of rest output..there is also a debug level with -z, but don’t start with that.Leave a comment:
-
-
Almost certainly user error.
Run the command from an ssh session with verbose (-v) output.Leave a comment:
-
Tried to add the pause command by pulling down the GPIO08 (pin24):
/usr/local/sbin/sbpd -d -s b,24,PLAY,2,0
Nothing happend. What could be wrong ? ThanksLeave a comment:
-
Yes, it's sbpd-script.sh
I just added sudo pigpiod in the script and it works nowstrange
Thank you Paul for your time and work !
But... I'll be backLeave a comment:
-
The user commands section of pCP will run with root permission, so no need for sudo in the script.
Is the script named sbpd-script or sbpd-script.sh Make sure you are using the correct name in user commands.Leave a comment:
-
It's ok if I run the script manually
Do you mean I have to move the cfg in the tc directory ?
Edit: just moved it in the tc directory but still the same
Edit2: it seems it's a permission problem, I need to sudo pigpiod again after a reboot to make the script work, I probably did something wrong in the process..
I'll try again tomorrowLast edited by KillerJoe34; 2022-01-04, 20:39.Leave a comment:
-
/home/tc/sbpd-script.sh is correct for put in user commands.
What happens when you run the script manually. I can see you have a path issue for the cfg file. You need to fix that first.Leave a comment:
-
Hi everyone, noob here... and french btw, excuse my english
I approximately managed to get it working, read several times the entire thread for that,
but there's something probably very simple I don't get :
It works perfectly if I run this command line in my monitor:
sbpd e,23,24,VOLU,2 b,25,NEXT,2,0 (But I need to sudo pigpiod before to make it work)
I then put this in /home/tc/sbpd-script :
Code:#start pigpiod daemon pigpiod -t 0 -f -l -s 10 # wait for pigpiod to initialize - indicated by 'pigs t' exit code of zero count=10 # approx time limit in seconds while ! pigs t >/dev/null 2>&1 ; do if [ $((count--)) -le 0 ]; then printf "\npigpiod failed to initialize within time limit\n" exit 1 # or however you want to deal with failure fi # printf "\nWaiting for pigpiod to initialize\n" sleep 1 done printf "\npigpiod is running\n" # load uinput module - required to be able to send keystrokes # then set the permission to group writable, so you don't need to run sbpd with sudo modprobe uinput sudo chmod g+w /dev/uinput # issue the sbpd command sbpd -v -f /home/tc/sbpd_commands.cfg e,23,24,VOLU,2 b,25,NEXT,2,0
Ant now I'm lost, what command line do I need to put in User Command to make it work ?
I triedCode:/home/tc/sbpd-script.sh
I also tried to put 2 commands (#1 sudo pigpiod and #2 sbpd e,23,24,VOLU,2 b,25,NEXT,2,0) without any luck
Also, sbpd_commands.cfg is located in /home/tc/SqueezeButtonPi-Daemon, don't know if it's ok ?
Thanks in advance for any helpLeave a comment:
-
I found the problem, in the command I swapped CLK and DT.
Indeed pin1 stands for CLK and pin2 stands for DT, in my case 5 is CLK and 6 DT, so the correct final command is:
Code:sbpd -s -d e,5,6,TRAC b,7,PLAY
Leave a comment:
-
I'll try to understand the debug output better.Leave a comment:
-
Yes
Do you pull the GPIO low or high with the encoder? IOW How do you have it wired? It could be that volumio expects the GPIO to be pulled high where squeeze button pi expect the other way around, to be pulled low by the encoder. Then you either have to rewire or change the software options if available.Leave a comment:
Leave a comment: