Home of the Squeezebox™ & Transporter® network music players.
Page 44 of 50 FirstFirst ... 344243444546 ... LastLast
Results 431 to 440 of 491
  1. #431
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Hi paul, I want to control the current playlist, not the volume. I tried also this:
    Code:
    sbpd -v -z e,6,5,KEY:KEY_Z-KEY_B b,7,PLAY
    but no result, I can only select the next track. I have configured ir-remote for jivelite and in this case KEY_Z - KEY_B both work.

  2. #432
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Can anyone help me?
    The rotary encoder appears to only work in one direction: forward. I have tried all the expected ways (1..9) using this command:
    Code:
    sbpd -v -z e,6,5,TRAC,1 b,7,PLAY
    (the only mode that seems to work is 1) but anyway it goes to the next track both by turning forward and back.
    The command
    Code:
    sbpd -v -z e,6,5,VOL,1 b,7,PLAY
    used for controlling the volume also fails in both directions.

  3. #433
    Senior Member
    Join Date
    Jan 2007
    Location
    Next to my neighbours :-)
    Posts
    218
    What encoder do you use?

    Assuming you have not mixed up GPIO numbering and pin numbering on the header.

    Pin 5 would be GPIO 3 and pin 6 would be ground. Which could explain only working in one direction.
    GPIO 5 & 6 are pin 29 & 31

    Other possibility is a defective encoder or defect GPIO, have you tried with other gpioĺs?
    does the all-black SB sound better than the white SB?

  4. #434
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Quote Originally Posted by hsmeets View Post
    What encoder do you use?

    Assuming you have not mixed up GPIO numbering and pin numbering on the header.

    Pin 5 would be GPIO 3 and pin 6 would be ground. Which could explain only working in one direction.
    GPIO 5 & 6 are pin 29 & 31

    Other possibility is a defective encoder or defect GPIO, have you tried with other gpioĺs?
    In the command line I wrote the GPIO numbers, is this correct?
    The PLAY button works because is connected to pin 26 that is GPIO7; the encoder is connected to pin 29 / GPIO5 and pin 31 / GPIO6.
    With this configuration the encoder work perfectly in a Volumio environment.

  5. #435
    Senior Member
    Join Date
    Jan 2007
    Location
    Next to my neighbours :-)
    Posts
    218
    Quote Originally Posted by pdo59 View Post
    Can anyone help me?
    The rotary encoder appears to only work in one direction: forward. I have tried all the expected ways (1..9) using this command:
    Code:
    sbpd -v -z e,6,5,TRAC,1 b,7,PLAY
    (the only mode that seems to work is 1) but anyway it goes to the next track both by turning forward and back.
    The command
    Code:
    sbpd -v -z e,6,5,VOL,1 b,7,PLAY
    used for controlling the volume also fails in both directions.
    BTW for volume use VOLU not VOL

    See: read me on https://github.com/paul-1/SqueezeButtonPi-Daemon
    does the all-black SB sound better than the white SB?

  6. #436
    Senior Member
    Join Date
    Jan 2007
    Location
    Next to my neighbours :-)
    Posts
    218
    Quote Originally Posted by pdo59 View Post
    In the command line I wrote the GPIO numbers, is this correct?
    Yes

    Quote Originally Posted by pdo59 View Post
    The PLAY button works because is connected to pin 26 that is GPIO7; the encoder is connected to pin 29 / GPIO5 and pin 31 / GPIO6.
    With this configuration the encoder work perfectly in a Volumio environment.
    Do you pull the GPIO low or high with the encoder? IOW How do you have it wired? It could be that volumio expects the GPIO to be pulled high where squeeze button pi expect the other way around, to be pulled low by the encoder. Then you either have to rewire or change the software options if available.
    does the all-black SB sound better than the white SB?

  7. #437
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Quote Originally Posted by hsmeets View Post
    Do you pull the GPIO low or high with the encoder?IOW How do you have it wired?
    The encoder is an KY-040 module, CLK and DT in HIGH state are connected via pull-up resistors.
    Quote Originally Posted by hsmeets View Post
    It could be that volumio expects the GPIO to be pulled high where squeeze button pi expect the other way around, to be pulled low by the encoder. Then you either have to rewire or change the software options if available.
    I looked for a software option to indicate pull-up but there isn't, it can only be indicated for buttons.
    I'll try to understand the debug output better.

  8. #438
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    I found the problem, in the command I swapped CLK and DT.
    Indeed pin1 stands for CLK and pin2 stands for DT, in my case 5 is CLK and 6 DT, so the correct final command is:
    Code:
    sbpd -s -d e,5,6,TRAC b,7,PLAY
    Thank you hsmeets, paul for the support!

  9. #439
    Senior Member
    Join Date
    Jan 2007
    Location
    Next to my neighbours :-)
    Posts
    218
    In this same thread someone also had issues with that encoder.

    https://forums.slimdevices.com/showt...=1#post1018753

    But I see you have it working now
    does the all-black SB sound better than the white SB?

  10. #440
    Junior Member
    Join Date
    Jan 2022
    Location
    AlŔs, France
    Posts
    5
    Hi everyone, noob here... and french btw, excuse my english

    I approximately managed to get it working, read several times the entire thread for that,
    but there's something probably very simple I don't get :

    It works perfectly if I run this command line in my monitor:

    sbpd e,23,24,VOLU,2 b,25,NEXT,2,0 (But I need to sudo pigpiod before to make it work)

    I then put this in /home/tc/sbpd-script :

    Code:
    #start pigpiod daemon
    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 -v -f /home/tc/sbpd_commands.cfg e,23,24,VOLU,2 b,25,NEXT,2,0
    And made it executable.

    Ant now I'm lost, what command line do I need to put in User Command to make it work ?

    I tried
    Code:
    /home/tc/sbpd-script.sh
    but nothing happens even after rebooting (do I need to ?)
    I also tried to put 2 commands (#1 sudo pigpiod and #2 sbpd e,23,24,VOLU,2 b,25,NEXT,2,0) without any luck

    Also, sbpd_commands.cfg is located in /home/tc/SqueezeButtonPi-Daemon, don't know if it's ok ?

    Thanks in advance for any 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
  •