Home of the Squeezebox™ & Transporter® network music players.
Page 49 of 50 FirstFirst ... 3947484950 LastLast
Results 481 to 490 of 491
  1. #481
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by chill View Post
    Ah, that's an evil Linux trap for the unwary Windows user! It won't assume that you are referring to a file in the current directory. You have to be explicit:

    Code:
    tc@pCP:~$ tc@pCP:~$ ./sbpd-script.sh
    Thanks a lot !! With your command I can run "manually" the script ! And Play/pause is working.

    For "autorun":
    Code:
    ./sbpd-script.sh
    It didn't start.
    Last edited by PaulH; 2022-01-23 at 12:41.

  2. #482
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,233
    Quote Originally Posted by PaulH View Post
    For "autorun":
    Code:
    ./sbpd-script.sh
    It didn't start.
    You just need to put your original command back into the User Commands section.
    Code:
    /home/tc/sbpd-script.sh
    I suspect the reason it didn't work before was because you hadn't made it executable at that stage.

  3. #483
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    it works !!! Thanks chill !

  4. #484
    Junior Member
    Join Date
    Jan 2022
    Posts
    2

    It works! - How do i make it permanent?

    Hi all - first post and i love this thing!
    Complete noob but is learning

    Pi 3B+
    5" LCD HDMI waveshare
    rotary encoder
    480GB SSD

    Picoreplayer - latest version
    LMS, jivelite etc..

    So, everything is working amazing!
    I have installed pcp_sbpd.tcz via the web GUI.

    The encoder is hooked up and i SSH in to terminal and run this:

    Code:
    #start pigpiod daemon
    sudo pigpiod -t 0 -f -l -s 10
    
    # wait for pigpiod to initialize - indicated by 'pigs t' exit code of zero
    count=10 # approx time limit in seconds
    while ! pigs t >/dev/null 2>&1 ; do
            if [ $((count--)) -le 0 ]; then
                    printf "\npigpiod failed to initialize within time limit\n"
                    exit 1 # or however you want to deal with failure
            fi
    #       printf "\nWaiting for pigpiod to initialize\n"
            sleep 1
    done
    printf "\npigpiod is running\n"
    
    # load uinput module - required to be able to send keystrokes
    # then set the permission to group writable, so you don't need to run sbpd with
    sudo modprobe uinput
    sudo chmod g+w /dev/uinput
    
    # issue the sbpd command
    sbpd -f /home/tc/sbpd_commands.cfg e,27,24,VOLU,2 b,22,PLAY,2,0
    The encoder is working just awesome...

    But how do imake it permanent?

  5. #485
    Senior Member
    Join Date
    Jan 2007
    Location
    Next to my neighbours :-)
    Posts
    214
    Quote Originally Posted by Corpze View Post

    But how do imake it permanent?
    Just read the posts before yours, it was just discussed.
    does the all-black SB sound better than the white SB?

  6. #486
    Junior Member
    Join Date
    Jan 2022
    Posts
    2
    Quote Originally Posted by hsmeets View Post
    Just read the posts before yours, it was just discussed.
    is it this sulotion?

    #!/bin/sh

    Before the script?

    I appologize but I am a total noob...

    I just can log in to SSH.

    Someone wrote something about creating a startup.sh file?
    How, where? what do i write?

    I have read all the pages for three days now, nothing about what to write or where...

    I just run the script posted and changed the pin-numbers and got that working - now i just need to make it permanent

    Edit, this is how my terminal looks like:
    Name:  terminal.PNG
Views: 175
Size:  41.9 KB

    Edit 2: Solved - I added this text under the GUI tweaks User command: sudo pigpiod -t 0 -f -l -s 10; sleep 1.0; sbpd -f /home/tc/sbpd_commands.cfg e,27,24,VOLU,2 b,22,PLAY,2,0

    And that worked...
    Last edited by Corpze; 2022-01-31 at 02:55. Reason: Add prtscr

  7. #487
    Junior Member
    Join Date
    Jan 2019
    Posts
    14

    start multiple commands with one button

    Hey,

    Is there a way to start more than one command when I press a button?

    I have a playlist that is started when I press a button and it should always start in shuffle mode.
    So im looking for something like this:

    PRE1=["playlist","shuffle","1"]["button","preset_1.single"]

    but it is not working

    These single commands work just fine
    PRE1=["playlist","shuffle","1"]
    PRE1=["button","preset_1.single"]

    Any idea how to solve the problem?

    Thanks

  8. #488
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,781
    You can do short press / long press.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #489
    Junior Member
    Join Date
    Jan 2019
    Posts
    14
    Quote Originally Posted by paul- View Post
    You can do short press / long press.
    Yes I thought about that but this is not what I want. It should be working with just one single press so that this playlist is always startet in shuffle mode.
    But I actually found a way how to do it. I dont know if it is intended to work like that but it works.

    I just double assigned the button like this

    Code:
    sbpd -f /home/tc/sbpd_commands.cfg b,4,SHUF,2,0 b,4,PRE1,2,0
    and in the sbpd_commands.cfg i defined the SHUF command:
    Code:
    SHUF=["playlist","shuffle","1"]
    I also thought it might be possible to do it with the SCRIPT Attribute but I don't know how to use it.

    Another thing I want to do is to control a GPIO depending on the play state. Is there a easy way to do it?

  10. #490
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,781
    That is for sure not possible. You will need to write your own software.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Posting Permissions

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