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

    #46
    Originally posted by pippin View Post
    Sorry, I wasn't really able to test. My last test system is now away, my old one uses an old RPi1 and is horribly slow and my new test device is a rpi0w which doesn't yet work with piCorePlayer which I've used for testing so far.

    I have created a "testing" branch in the repo which contains a change that should allow a configuration parameter for pulling up/down (last parameter, 1 for down, 2 for up).

    Have you tried "-v" (verbose mode) to see what happens? Don't you get any interrupts at all from the encoder?
    Thanks, I will experiment over the next few days.

    Comment


      #47
      I've read the thread up to here, and the readme on Github.
      I understand that sbpd is a networked controller that needs to be colocated with hardware buttons hosted by a Raspberry Pi.
      In this sense it could be possible to use something like a pi0w as a wireless remote or table-top controller, and provided there is a button/screen to select the target player, control any of the players on the network.

      Correct?
      PiPeng??
      2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

      Comment


        #48
        Originally posted by ralphy View Post
        I've added a test sbpd.tcz package to the beta files area for pcp 3.1x.

        ssh to picoreplayer as tc user and run these commands.

        Code:
        pcp bu  # save pcp config
        
        cd /mnt/mmcblk0p2/tce/optional
        
        wget http://downloads.sourceforge.net/project/picoreplayer/beta/sbpd.tcz.md5.txt
        
        wget http://downloads.sourceforge.net/project/picoreplayer/beta/sbpd.tcz
        
        md5sum sbpd.tcz # make sure the file downloaded correctly
        f0157164d10b86325b38fee0cb8d709e  sbpd.tcz
        
        cat sbpd.tcz.md5.txt # does it match the line above?
        f0157164d10b86325b38fee0cb8d709e  sbpd.tcz
        
        echo "sbpd.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
        
        pcp rb  # you must reboot!
        You can start /usr/local/sbin/sbpd at boot from the user commands in the the web gui. Adding command line options as needed.

        I tried this on a raspberry Zero W with Picoreplayer 3.11 (i think, need to check this again).
        It works great, with the right buttons/encoders:

        I have on rotary encoder which just allows some turns in every direction and has no physical feedback ( you can just turn it, without "stops" in between)

        This on is not working.

        Than i have one encoder which turns indefinitely, and this one works great.

        This has also 2 pins for the use as a button, and when connected to ground and one BCMXX Gpio pin, it works also as eg, play/pause button.

        I have another button, i think you can find them as trigger /arcade buttons on ebay (black plastic button perfectly sized for a finger ;-)) which is also recognized, but has problems with timing, which results in random pause (If the button is pressed and is kept pressed, it pauses the music, but if the button is released, music starts again, same result if pressed not short/fast enough)

        I also tested a foil button (you know them from very cheap remotes) and this one works to like the encoder one.

        So it seems the tools misses a debouncer, but pippin wrote something like that in the first line of his first post
        although for the latter someone should take the time to create a "hold" gesture detection for a button, something I didn't have the time for so far.
        Because i dont know if i would be able to write this, has anybody a suggestion for a button, which works like expected and does not need the debouncing part?
        If not, i would try to use the encoder button for play /pause and two foil buttons for next and previous.... ( or even more of these encoders, but use only the button functionality...)

        But before i forget, thank you pippin! Great work.

        Grüße

        cubii

        Comment


          #49
          so this evening i tried to use more than one butoon, but if i use this code:

          /usr/local/sbin/sbpd -d -s e,23,24,VOLM,0 b,12,NEXT b,16,PLAY

          Both button will do the same? (both are working, Connected to BCM 12 and BCM16 and ground)

          What is wrong?

          Comment


            #50
            What are they doing?

            Regarding the de-bounce Paul from PiCorePlayer has made a proposed change that we should probably merge, I just didn't have time to really test it, yet.
            ---
            learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
            Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
            at penguinlovesmusic.com
            New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

            Comment


              #51
              Originally posted by pippin View Post
              What are they doing?
              In that example, both will do "NEXT"
              Perhabs a bug? (i know you are only using one button at least with your tivoli radio)
              Regarding the de-bounce Paul from PiCorePlayer has made a proposed change that we should probably merge, I just didn't have time to really test it, yet.
              Great!

              Thanks for your answer

              Comment


                #52
                Yes, I definitely need a better test setup here :-/
                ---
                learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                at penguinlovesmusic.com
                New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                Comment


                  #53
                  Is this still alive?
                  SqueezeBoxes: 1x Transporter (Living room) 1x SB2 (shed), 1x Radio (Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch (Study 2), few spare unit's (SB2, SB3, Boom, Touch)
                  Server: LMS on Pi3B+ 8.1.2 on PcP 7.0.1
                  Network: Draytek, Netgear Smart Switch 24p, Ubiquiti PoE, 3x Ubiquity

                  Comment


                    #54
                    Well, it's still there, you could give Paul's fork a try, if it works without trouble I would say it's worth migrating into the main version.
                    ---
                    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                    at penguinlovesmusic.com
                    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                    Comment


                      #55
                      This is the fork:

                      ---
                      learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                      Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                      at penguinlovesmusic.com
                      New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                      Comment


                        #56
                        Thnx for the direction
                        SqueezeBoxes: 1x Transporter (Living room) 1x SB2 (shed), 1x Radio (Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch (Study 2), few spare unit's (SB2, SB3, Boom, Touch)
                        Server: LMS on Pi3B+ 8.1.2 on PcP 7.0.1
                        Network: Draytek, Netgear Smart Switch 24p, Ubiquiti PoE, 3x Ubiquity

                        Comment


                          #57
                          Originally posted by cubii View Post
                          In that example, both will do "NEXT"
                          Perhabs a bug?
                          I've just gotten SBPD running from ralphy's sbpd.tcz and the same is happpening. There is a proble with multiple buttons. Am I doing something wrong?

                          Thanks so much for this!
                          Ben Harris

                          Comment


                            #58
                            I need to get Paul to file a pull request for his fix.
                            Until then you'll find it here, I believe this will fix it:

                            ---
                            learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                            Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                            at penguinlovesmusic.com
                            New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                            Comment


                              #59
                              Hi everybody,
                              after having read this thread (and some others), I was wondering what exactly should I do with PCP 3.22 to get a rotary controller to control the volume. Do I have to compile it from https://github.com/paul-1/SqueezeButtonPi-Daemon/ instead of using ralphy's sbpd.tcz from the beta files (post #5)? Or is there a working package?
                              Another question: I have a 5-pin-rotary controller (like the one described on https://www.modmypi.com/blog/how-to-...raspberry-pi): CLK, DT, SW, +, GND. How can I define it with the sbpd command?
                              Should I use the pins stated there:
                              CLK - GPIO17 (pin11)
                              DT - GPIO18 (pin12)
                              + - 3v3 (pin1)
                              GND - GND (pin6)
                              ?
                              Thanks for completing &
                              Best 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


                                #60
                                Originally posted by streampunk View Post
                                Hi everybody,
                                after having read this thread (and some others), I was wondering what exactly should I do with PCP 3.22 to get a rotary controller to control the volume. Do I have to compile it from https://github.com/paul-1/SqueezeButtonPi-Daemon/ instead of using ralphy's sbpd.tcz from the beta files (post #5)? Or is there a working package?
                                Another question: I have a 5-pin-rotary controller (like the one described on https://www.modmypi.com/blog/how-to-...raspberry-pi): CLK, DT, SW, +, GND. How can I define it with the sbpd command?
                                Should I use the pins stated there:
                                CLK - GPIO17 (pin11)
                                DT - GPIO18 (pin12)
                                + - 3v3 (pin1)
                                GND - GND (pin6)
                                ?
                                Thanks for completing &
                                Best regards
                                Martin
                                There are many dependencies needed to compile it. I created a package in our repository for an earlier version of picoreplayer but not for 3.2x. Oops!

                                I've added pcp-sbpd.tcz to the picoreplayer sourceforge repository for 3.2x.
                                It's the same version as the one from the beta files area so does not contain Paul's debounce fix.
                                I'll add it to my todo list to update the package for our next release. Hopefully Paul's fix will be merged before that, otherwise, I'll apply it manually.
                                Ralphy

                                1-Touch, 5-Classics, 3-Booms, 2-UE Radio
                                Squeezebox client builds donations always appreciated.

                                Comment

                                Working...
                                X