Home of the Squeezebox™ & Transporter® network music players.
Page 35 of 36 FirstFirst ... 2533343536 LastLast
Results 341 to 350 of 352
  1. #341
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,431
    Power on/off in the spbd/lms context is just turning off the "Player Power" Just like hitting the power button on the LMS interface. Most would use it to control a relay that powers an amplifier on/off.

    To shutdown the complete pi, you could script it here with spbd, but other ways are easier.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  2. #342
    Junior Member
    Join Date
    Jul 2020
    Posts
    29
    Quote Originally Posted by paul- View Post
    Power on/off in the spbd/lms context is just turning off the "Player Power" Just like hitting the power button on the LMS interface. Most would use it to control a relay that powers an amplifier on/off.

    To shutdown the complete pi, you could script it here with spbd, but other ways are easier.
    Yes, I understand that this is only a "soft" power off. And this is exactly what I need. But it has an issue.

  3. #343
    Junior Member
    Join Date
    Aug 2020
    Posts
    8

    Rotary encoder is working but very sensitive

    My configuration:

    RPi 2B
    PCP 6.1.0
    pcp-sbpd
    jivelite (Waveshare 3.5")

    /home/tc/sbpd-script.sh
    ================================================== ===========================
    #!/bin/sh

    # start pigpiod daemon
    pigpiod

    # 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,6,12,KEY:KEY_UP-KEY_DOWN,2 b,5,KEY:KEY_RIGHT,2,0,KEY:KEY_LEFT,500
    ================================================== ============================

    Name:  rotary.jpg
Views: 196
Size:  126.8 KB

    Rotary encoder working...key up and down, and button also working.
    BUT. when key up, down..jump 2 step down or up.
    I have to rotate very slowly to move 1 step.

    Does any options are available to fix this problem ?

  4. #344
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,431
    Check the optional mode setting for encoders.

    Code:
    For rotary encoders (one, volume only):
        e,pin1,pin2,CMD[,edge]
            "e" for "Encoder"
            p1, p2: GPIO PIN numbers in BCM-notation
            CMD: Command. one of. \n\
                VOLU for Volume\n\
                TRAC for Prev/Next track\n\
                KEY:<Positive key_name>-<Negative key_name>
            mode: Optional. one of\n\
                1   - Step mode (default)\n\
                2-9 - Detent mode - Assumes 1 dial click is x steps.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #345
    Junior Member
    Join Date
    Aug 2020
    Posts
    8
    Quote Originally Posted by paul- View Post
    Check the optional mode setting for encoders.

    Code:
    For rotary encoders (one, volume only):
        e,pin1,pin2,CMD[,edge]
            "e" for "Encoder"
            p1, p2: GPIO PIN numbers in BCM-notation
            CMD: Command. one of. \n\
                VOLU for Volume\n\
                TRAC for Prev/Next track\n\
                KEY:<Positive key_name>-<Negative key_name>
            mode: Optional. one of\n\
                1   - Step mode (default)\n\
                2-9 - Detent mode - Assumes 1 dial click is x steps.
    It works after changing dent mode setting from 2 to 4.
    Thank you.

  6. #346
    Junior Member
    Join Date
    Jul 2020
    Posts
    29
    Quote Originally Posted by sakos View Post
    Yes, I understand that this is only a "soft" power off. And this is exactly what I need. But it has an issue.
    The above issue is solved by LMS update to latest. Now I have a working solution to control GPIO when the player is in "power off" status.

  7. #347
    Junior Member
    Join Date
    Oct 2020
    Posts
    3

    Need help for setup

    Hi,
    I'm using a PiCorePlayer v6.1 setup with HDMI output. LMS is running on Synology NAS in the LAN.
    I installed the sbpd as explained on the first site of this thread.
    Then I tried several hours a bunch of different User commands in the tweaks menu to get my rotary encounter running. It's a model KY-040 encounter.

    First I tried to use VOLM but read later on that it got replaced by VOLU.
    My last version I tried was:

    Code:
    /usr/local/sbin/sbpd -d -s e,23,24,VOLU,1 b,25,POWR,1
    This and all the versions before didn't work.
    Last thing i did was to connect via SSH and to exec:

    Code:
    sbpd -v e,23,24,VOLU,1
    The result was:
    1601829442.7315 6 GPIO.c,219:Initializing GPIO
    wiringPiISR: Can't find gpio program
    wiringPiISR: unable to open /sys/class/gpio/gpio23/value: No such file or directory


    I assume there is a piece of software missing to use the gpio but have no clue how to solve it.

    Got anybody the KY-040 running and can help me?

  8. #348
    Junior Member
    Join Date
    Apr 2019
    Posts
    21
    Do you have the gpio library loaded? (pigpio.tcz on the Extensions tab)

  9. #349
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    These were not not installed. I installed all 3 now. pigpio.tcz, pigpio-dev.tcz and pigpio-doc.tcz.
    After a reboot nothing changed.
    The error message is still the same. :-(

  10. #350
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,027
    From the error message I guess that you need wiringpi.tcz
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

Posting Permissions

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