Non-polling version?
I've installed this onto a Pi2B and noticed that it seems to constantly consume 1% CPU - not a lot I know, but I'd like to have almost 0% CPU when not playing. This appears to be because the underlying gpiod polls the GPIO pins. From a quick search on github it appears as if pigpio does support using interrupts, but I guess the piogpiod code would need to be updated for this.
The original sbpd uses wiringpi. I've recompiled this on my Pi2B and this does indeed use less CPU.
Apart from wiringpi being deprecated, and needing root privs, are there any other disadvantages?
Announcement
Collapse
No announcement yet.
[ANNOUNCE] SqueezeButtonPi - Tool to use buttons and rotary encoders on a RPi
Collapse
X
-
Originally posted by streampunk View PostBasically you are right, of course. But my idea was to have my headless little streaming Pi connected to my fabulous Wega Concept 51k controlling everything related to playback on my Denon AVR (vial Airplay). An a "nice to have" feature would be to have a volume control that actaually shows the state of the player's volume setting when powering the PCP-Pi.
Exactly. I believe that's what they did in the project I'd linked to. But thinking this twice, my project would be even more complicated. I realized that I would need one of those motorized linear Alps/Alpine sliders that were (still are?) used in highend sound mixers. See https://www.adafruit.com/product/5466
So the idea is:
After powering up the Zero W, it uses the volume status of a determind player, converts it to voltage and send the slider to the correct position.
When moving the slider manually, voltage difference ist converted to a volume setting in LMS.
Leave a comment:
-
Hi,
I installed pcp-sbpd.tcz extension. What next in software I need to do if only want to have power button and stop button on two GPIO?
Leave a comment:
-
Originally posted by paul- View Postand anolog pot is really not much use over an encoder.
To do it, you would read analog voltage and use software to monitor "step" changes in voltage, then send the command to increase or decrease volume.
So the idea is:
After powering up the Zero W, it uses the volume status of a determind player, converts it to voltage and send the slider to the correct position.
When moving the slider manually, voltage difference ist converted to a volume setting in LMS.
- Likes 1
Leave a comment:
-
Since volume control within squeezelite/LMS is digital control, and anolog pot is really not much use over an encoder. Just extra complications. To do it, you would read analog voltage and use software to monitor "step" changes in voltage, then send the command to increase or decrease volume.
Leave a comment:
-
Thanks Paul,
I was afraid it wasn't so easy. Now I'm thinking about adapting https://www.circuitbasics.com/using-...-raspberry-pi/ for my purposes. Still missing an idea on how to link it to the player's volume control....
Leave a comment:
-
Slider instead of rotary?
Hi everybody,
thanks for this great tool, I've used it sucessfully to add a rotary encoder to a PCP on a RPI Zero W. It controls playback, shutdown (with the push button function of the encoder) and volume of a Denon AVR the playback is going to.
Now I was wondering whether I could use a slider (potentiometer) instead of the rotary encoder to control the volume. There are several cheap sliders (for Arduino etc.), but they all have analogue output.
Would it be possible to use one of them?
Tanks & regards
Martin
Leave a comment:
-
Originally posted by mfraser View PostSome progress, I can change volume using the remote and Linux keytables. So if I change the command to use keys instead it should work.
Code:#!/bin/sh # start pigpiod daemon sudo pigpiod -t 0 # give the daemon a moment to start up before issuing the sbpd command sleep 1 # load uinput module, then set the permission to group writable, so you don't need to run sbpd with root permissions sudo modprobe uinput sudo chmod g+w /dev/uinput # issue the sbpd command sbpd -d -s b,20,POWR,0,1 b,5,PREV,0,1 b,6,PLAY,0,1 b,12,NEXT,0,1 b,13,KEY:KEY_MINUS,0,1 b,16,KEY:KEY_EQUAL,0,1
Leave a comment:
-
Originally posted by paul- View PostPerhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
Leave a comment:
-
Originally posted by paul- View PostPerhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.Code:[22-10-15 13:19:00.0195] Slim::Buttons::Common::pushMode (2010) Pushing button mode: volume [22-10-15 13:19:00.0201] Slim::Buttons::Common::pushMode (2010) Pushing button mode: INPUT.Volume [22-10-15 13:19:01.0232] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:01.0236] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:01.9307] Slim::Buttons::Common::pushMode (2010) Pushing button mode: volume [22-10-15 13:19:01.9312] Slim::Buttons::Common::pushMode (2010) Pushing button mode: INPUT.Volume [22-10-15 13:19:02.9345] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:02.9350] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:03.6512] Slim::Buttons::Common::pushMode (2010) Pushing button mode: volume [22-10-15 13:19:03.6518] Slim::Buttons::Common::pushMode (2010) Pushing button mode: INPUT.Volume [22-10-15 13:19:04.6548] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:04.6553] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:06.1627] Slim::Buttons::Common::pushMode (2010) Pushing button mode: volume [22-10-15 13:19:06.1633] Slim::Buttons::Common::pushMode (2010) Pushing button mode: INPUT.Volume [22-10-15 13:19:07.1663] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:07.1667] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:08.0767] Slim::Buttons::Common::pushMode (2010) Pushing button mode: volume [22-10-15 13:19:08.0772] Slim::Buttons::Common::pushMode (2010) Pushing button mode: INPUT.Volume [22-10-15 13:19:09.0807] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List [22-10-15 13:19:09.0812] Slim::Buttons::Common::popMode (2145) Popped to button mode: INPUT.List
Leave a comment:
-
Originally posted by paul- View PostPerhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
(control.command) - Internal Command Execution Logging (Advanced)
(control.queries) - Control Query Logging (Advanced)
(control.stdio) - Standard I/O Command Logging (Advanced)
Leave a comment:
-
Perhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
Leave a comment:
-
Do you have LMS set to allow volume control. There is a player setting that locks volume at max.
Leave a comment:
Leave a comment: