Announcement

Collapse
No announcement yet.

[ANNOUNCE] SqueezeButtonPi - Tool to use buttons and rotary encoders on a RPi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by paul- View Post
    Do you have LMS set to allow volume control. There is a player setting that locks volume at max.
    For that player I have

    Volume Control - Volume controls adjust outputs.

    Comment


      Perhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
      piCorePlayer a small player for the Raspberry Pi in RAM.
      Homepage: https://www.picoreplayer.org

      Please donate if you like the piCorePlayer

      Comment


        Originally posted by paul- View Post
        Perhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
        Anything in particular I need to turn on in logging? These perhaps?:
        (control.command) - Internal Command Execution Logging (Advanced)

        (control.queries) - Control Query Logging (Advanced)

        (control.stdio) - Standard I/O Command Logging (Advanced)

        Comment


          Originally posted by paul- View Post
          Perhaps 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

          Comment


            Originally posted by paul- View Post
            Perhaps turn on some logging in the server. The commands appear to be getting sent, just not processed by the server.
            Some progress, I can change volume using the remote and Linux keytables. So if I change the command to use keys instead it should work.

            Comment


              Originally posted by mfraser View Post
              Some progress, I can change volume using the remote and Linux keytables. So if I change the command to use keys instead it should work.
              It is now working with the script amended to
              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

              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
                PCP (always latest version) on RasPi 3 with PhatDac (player & server)
                PCP on several RasPis 2 +3
                2 Airplay speakers (Sony SA-NS510) integrated via Airplay Bridge Plugin

                Comment


                  Not with this software.
                  piCorePlayer a small player for the Raspberry Pi in RAM.
                  Homepage: https://www.picoreplayer.org

                  Please donate if you like the piCorePlayer

                  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....
                    PCP (always latest version) on RasPi 3 with PhatDac (player & server)
                    PCP on several RasPis 2 +3
                    2 Airplay speakers (Sony SA-NS510) integrated via Airplay Bridge Plugin

                    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.
                      piCorePlayer a small player for the Raspberry Pi in RAM.
                      Homepage: https://www.picoreplayer.org

                      Please donate if you like the piCorePlayer

                      Comment


                        Originally posted by paul- View Post
                        and anolog pot is really not much use over an encoder.
                        Basically 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.

                        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.
                        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.
                        PCP (always latest version) on RasPi 3 with PhatDac (player & server)
                        PCP on several RasPis 2 +3
                        2 Airplay speakers (Sony SA-NS510) integrated via Airplay Bridge Plugin

                        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?

                          Comment


                            Originally posted by streampunk View Post
                            Basically 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.
                            Could something like https://www.adafruit.com/product/5295 work?

                            Comment

                            Working...
                            X