Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • jemhayward
    replied
    Just randomly tried:

    /usr/local/sbin/sbpd -z -d e,16,VOL+,e,18,VOL-

    and that doesn't work either...

    Leave a comment:


  • jemhayward
    replied
    Noob alert!

    I have my encoder on 16 and 18

    Yesterday /usr/local/sbin/sbpd -v suggested that pigpoid was not running, so I did:

    sudo pigpoid

    and then ran /usr/local/sbin/sbpd -v again, and it was happy about pigpoid - but that was all I got done.

    Today I ran /usr/local/sbin/sbpd -v and it didn't complain about pigpoid, so I'm assuming I've 'installed' pigpoid and it now runs automatically?

    So, I then ran /usr/local/sbin/sbpd -d e,16,18,VOLU, 1

    Encoder not changing volume - so I'm assuming I've not got my parameters correct?

    Is VOLU right or should I now be using VOL+ and declaring each pin separately? It's a long thread and I've read it all but really need some working examples and a command ref for someone as inexperienced as me!

    Leave a comment:


  • luigi2000
    replied
    That was strange. I started sbpd manually with -v option to look at the verbose output and the POWR and PLAY command worked fine.
    Then I switched back to the script that starts sbpd and also everything is working now. I did not change anything at the script.
    Same behaviour for two different PiCoreplayers. Nevertheless everything is working now and thanks for your support.

    Leave a comment:


  • paul-
    replied
    Start sbpd from command line and add the -v option. you should see verbose output showing commands getting added to gpio and then you should see button pushes when they come in.

    Leave a comment:


  • luigi2000
    replied
    PLAY and POWR command not working

    Ok I try to explain it more detailed.
    My Setup is a Raspberry Pi 3 with JustBoom Amp HAT.
    The rotary encoder was this one I think https://shop.justboom.co/products/ro...er-push-switch
    I wired the encoder so that they worked with this command before I updated to piCorePlayer 6 and the newest SBPD extension
    Code:
    sbpd e,23,24,VOLU,1 e,12,6,TRAC,1 b,7,POWR,2,0 b,5,PLAY,2,0
    I learned that with the updated sbpd extension there must be pigpio installed too.
    So I installed pigpio and now I use the following script that is started via user command line in the tweaks menu:
    Code:
    #!/bin/sh
    
    # start pigpiod daemon
    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 e,23,24,VOLU,1 e,12,6,TRAC,1 b,7,POWR,2,0 b,5,PLAY,2,0
    The VOLU and TRAC commands are working fine but the POWR and the PLAY command is not working.

    This was working with the older version of SBPD and I did not change anything physically at the encoders.
    I hope this is enough information to identify the problem.

    Leave a comment:


  • paul-
    replied
    No guide, but why don't you post

    1) Exactly how you have your encoder wired
    2) Model # and Brand of encoder
    3) Startup Scripts/sbpd configuration files.

    Leave a comment:


  • Jursi
    replied
    Originally posted by chill
    That's a another benefit of the new keypress emulation. Previously the volume control applied to a specific player, either defaulted by sbpd or specified via the MAC address - that's useful in some cases, such as my integrated amplifier where I always want the volume control to apply to the player where the buttons/encoder are mounted. But with the KEY_VOLUMEUP and KEY_VOLUMEDOWN keypresses presumably the command goes to whichever player is currently under the control of Jivelite.
    Hello,

    Do you know if it is possible to use one rotary encoder to control jivelite running on other raspberry pi and another encoder to control the volume on a player where the both encoders are mounted.

    Thanks!

    Leave a comment:


  • luigi2000
    replied
    Installed pigpio and added the script to start pigpio and sbpd.

    Volume control and track skipping works now with this command:
    sbpd e,23,24,VOLU,1 e,12,6,TRAC,1 b,7,POWR,2,0 b,5,PLAY,2,0

    The power toggle and the play toggle function is still not working.

    The POWR command is not listed anymore in sbpd Infortmation (-->sbpd -?)
    Is there another way to toggle the power state now?

    The PLAY command is still listed but doesn't work for me. Where could be the problem?

    Another question concerning the new KEY command. Do I need jivelite when I want to use a command like this:
    sbpd e,23,24,KEY:KEY_VOLUMEUP-KEY_VOLUMEDOWN

    Thanks for your help!

    Leave a comment:


  • paul-
    replied
    Backup after you make changes.

    Leave a comment:


  • luigi2000
    replied
    OK. I tried to start sbpc and pigipio via a sbpc-script.sh in the tweaks user command line.

    I created the file and inserted the text that what posted here.
    But how can I make the file NOT disapear after a reboot?

    Leave a comment:


  • paul-
    replied
    Yes, everything is changed, you will need to update the extension, and then follow the new instructions.....a lot of info in this thread.

    The main reason for the change is wiring pi is depreciated.

    Leave a comment:


  • luigi2000
    replied
    SBPD not working after piCorePlayer 6.0 Update

    Hi Paul,

    I updated my piCorePlayer to version 6.0. Unfortunately none of my Buttons and encoders are working anymore. Did something change?
    I also tried a clean Install of pCP 6.0 on an emtpy SD Card but it is also not working. So there was nothing wrong with the Update itself.

    The sbpd was installed via the piCorePlayer repsitory at the extension menu.
    Then I added the following line as user command in the tweaks menu: /usr/local/sbin/sbpd -d e,23,24,VOLU e,12,6,TRAC b,7,POWR,2,0 b,5,PLAY,2,0.

    Anything I did wrong? I did the same thing with piCore Player 4 and 5 and it worked.

    Is there any documentation or a short How-To that is up to date? When I look at Github (https://github.com/coolio107/SqueezeButtonPi-Daemon) there is still the VOLM command instead of VOLU and no TRAC command that you implemented for encoders 1 or 2 years ago.

    Thanks again for the great work!!

    Leave a comment:


  • M-H
    replied
    Originally posted by paul-
    There are several users doing this. .. <cut> ..
    All of our encoders seem to have more velocity than yours.
    Paul, Chill, and others here,
    I finally debugged my encoder issues, so let me share to pass knowledge and experiences:

    As with a lot of difficult problems it had multiple issues.
    First the audio card that exposes Raspi pins , has bad documentation, so pushing me to use the wrong BCM numbers in the sbpd init.
    Second , The rotary controllers I have , are not all the same; especially the hardware resistors on the module board do interfere with the default used here ( pull-up software resistors and ti to ground switches.) Using the 3V3 on the appropriate pin helps to get reliable levels on the output pins. This is why Chill might not have experienced it. I recognise his module in the photo.
    Third, it seems the borrowed script should not be started over and over again with new sbpd lines. I have not looked into the issue, but if just started once from boot it does produce the expected results, if ran for the 10th or so time, the correct settings give different results.

    But Hey! I got trough , and have 3 working sets now. Thank you for providing the info in this thread.

    Last ; On the sensitivity of the controllers, I believe there is a difference in the amount of physical clicks and contact logical cycles.
    So 1 perceived click might very well be 2 or more steps measured by sbpd. I read that before , but can't find that source right now.

    Regards, M-H

    Leave a comment:


  • Paul Webster
    replied
    Originally posted by guiv
    Would there be an easier path?
    Perhaps easier would be to not use the regular groups in LMS but instead switch to Philippe's dynamic group plugin.
    Then you would play to the dynamic group when you want to drive multiple players at the same time and it would disassemble when the music stops.

    Leave a comment:


  • guiv
    replied
    root permissions / howto issue several commands

    I am currently discovering all this pCP and sbpd stuff, and first of all thanks a lot for that, it really works great !

    As a newbee I have a few questions... First : I am currently launching a script via "Tweaks/User commands" page, which calls sbpd at init. I am just a little puzzled by one comment found in the script mentionned in this thread and apparently reused by many users:
    Code:
    # load uinput module, then set the permission to group writable, so you 
    # don't need to run sbpd with root permissions
    I don't use jivelite neither uinput, however I get the idea to run sbpd without root permissions. But... what's the use of that, if the script directly calls sbpd ? Commands added in "Tweaks/User commands" are run as root, aren't they?
    I modified the script to run sbpd like this, does it make sense?
    Code:
    sudo -u tc sbpd ...
    Well, at least sbpd does not run as root any more, and still works like a charm

    Second point: I would like to play a little bit with multi-players sync with my buttons
    The idea when I press a button is to play a favorite, but only on local player: first un-synchronize other players if necessary (the idea is to avoid waking up the kids when starting the kitchen radio)
    I know in this case I have to issue several commands to LMS, and that might be a little tricky. What do you think would be the most straightforward?
    I am currently thinking of launching a script from sbpd. This script would launch a binary in charge of handling the feature. I could probably reuse sbpd source code to implement that part (at least servercomm).
    Would there be an easier path?

    Leave a comment:

Working...
X
😀
🥰
🤢
😎
😡
👍
👎