Home of the Squeezebox™ & Transporter® network music players.
Page 31 of 31 FirstFirst ... 21293031
Results 301 to 308 of 308
  1. #301
    Junior Member
    Join Date
    Feb 2020
    Posts
    1

    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?

  2. #302
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,187
    Quote Originally Posted by guiv View Post
    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.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  3. #303
    Senior Member M-H's Avatar
    Join Date
    Oct 2016
    Location
    Western Europe
    Posts
    212
    Quote Originally Posted by paul- View Post
    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
    Pi based multi-room audio system powered by PiCorePlayer(s):
    Pi3B with Phat-dac in a Rasptouch, 2 pi B+ with Cirrus Logic Audio Card, Pi Zero with Phat-beat , and a few other tests...

  4. #304
    Junior Member
    Join Date
    Jan 2019
    Posts
    8

    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!!

  5. #305
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,898
    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.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  6. #306
    Junior Member
    Join Date
    Jan 2019
    Posts
    8
    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?

  7. #307
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,898
    Backup after you make changes.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #308
    Junior Member
    Join Date
    Jan 2019
    Posts
    8
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •