Home of the Squeezebox™ & Transporter® network music players.
Page 18 of 34 FirstFirst ... 8161718192028 ... LastLast
Results 171 to 180 of 335
  1. #171
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62
    Quote Originally Posted by paul- View Post
    Just pick some, the pins will be configured in the software.

    Page 102 is the power up configuration on the bcm chip. https://www.raspberrypi.org/document...eripherals.pdf

    The firmware can change this too......but,donĺt worry much. Stay away from the i2c pins or other interface pins used by your DAC
    Thank you for your reply, the link was helpful!

    Am I right that both pins should be pull-up? And not just the other.

  2. #172
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,183
    Yes, but as a mentioned, sbpd will do it for you.

    https://github.com/coolio107/Squeeze...c3/GPIO.c#L236
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #173
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62
    Quote Originally Posted by paul- View Post
    Yes, but as a mentioned, sbpd will do it for you.

    https://github.com/coolio107/Squeeze...c3/GPIO.c#L236
    Hello,

    I downloaded pcp-spbd extension and added this to my user commands in the picoreplayer web gui: /usr/local/sbin/sbpd -v -d e,23,24,VOLM,1

    I have connected my encoder to physical pins 16 and 18 (and ground). However, nothing is happening when rotating the encoder.

    This is what I get when I run sbpd -v:

    Code:
    1557942917.0522 6 sbpd.c,282: Options parsing: Set verbose mode
    1557942917.0524 6 sbpd.c,471: Using builtin button configuration
    1557942917.0524 6 control.c,81: Adding Command PLAY: Fragment ["pause"]
    1557942917.0524 6 control.c,81: Adding Command VOL+: Fragment ["button","volup"]
    1557942917.0524 6 control.c,81: Adding Command VOL-: Fragment ["button","voldown"]
    1557942917.0525 6 control.c,81: Adding Command PREV: Fragment ["button","rew"]
    1557942917.0525 6 control.c,81: Adding Command NEXT: Fragment ["button","fwd"]
    1557942917.0525 6 control.c,81: Adding Command POWR: Fragment ["button","power"]
    1557942917.0525 6 GPIO.c,253: Initializing GPIO
    1557942917.0532 6 discovery.c,381: MAC address found: b8:27:xx:xx:5f:xx
    1557942917.0533 6 servercomm.c,176: Initializing CURL
    1557942917.0614 6 sbpd.c,237: Starting main loop polling
    1557942917.0618 6 discovery.c,234: Found server 1001A8C0. A new address
    1557942917.1627 6 discovery.c,345: discovery packet: port: 9000, name: piCorePlayer, uuid: c433a163-aa39-4b89-8c5b-5ade74bb5fc9
    1557942917.1628 6 discovery.c,130: Squeezebox control port found: 9000
    1557942917.1628 6 discovery.c,149: Server address found: 192.168.1.16
    Any suggestions?

    Thank you!
    Last edited by Jursi; 2019-05-15 at 11:07.

  4. #174
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,183
    Leave the ,1 off the end of the command.

    Also if you are running the command from user commands, you have to make sure to kill it before debugging. Debug everything from command line before starting it automatically.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #175
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62
    Quote Originally Posted by paul- View Post
    Leave the ,1 off the end of the command.

    Also if you are running the command from user commands, you have to make sure to kill it before debugging. Debug everything from command line before starting it automatically.
    Thank you for the answer.

    Now it is working, I left the ,1 off the end of the command. I also had to change VOLM to VOLU as stated here: https://github.com/coolio107/Squeeze...aemon/issues/8

    Thanks!

    -Jursi

  6. #176
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62

    Adding physical favorite buttons

    Hello,


    I would like to add a physical favorite button for my setup but I am not exactly sure how to access and edit the sbpd_commands.cfg file. If I'm correct, I should add the following cli command to the config file.

    Code:
    FAV1 = ["favorites", "playlist", "play item_id:1.1"]
    Could someone point me out how to access the file or where is it located. If I need to create it myself, how do I do that and where should I put it?

    Thank you!

  7. #177
    Junior Member
    Join Date
    Apr 2019
    Posts
    19
    Quote Originally Posted by Jursi View Post
    Hello,


    I would like to add a physical favorite button for my setup but I am not exactly sure how to access and edit the sbpd_commands.cfg file. If I'm correct, I should add the following cli command to the config file.

    Code:
    FAV1 = ["favorites", "playlist", "play item_id:1.1"]
    Could someone point me out how to access the file or where is it located. If I need to create it myself, how do I do that and where should I put it?

    Thank you!
    There are a least a few ways to skin this cat, but this is what I do...

    1) Copy the sbpd command config file to the home directory:

    Code:
         cd ~
         cp /usr/local/share/sbpd/sbpd_commands.cfg .
    2) Append the line for your command to the bottom of the file (escaping the quote chars), and then do a backup:

    Code:
         echo "FAV1 = [\"favorites\",\"playlist\", "\play item_id:1.1\"]" >> sbpd_commands.cfg
         pcb bu
    3) Add the location of the updated config file to the sbpd command on the tweaks page

    Code:
    	sbpd -d -f /home/tc/sbpd_commands.cfg  <rest of your button command string>
    Have fun!
    Last edited by meq123; 2019-06-20 at 11:28.

  8. #178
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62
    Quote Originally Posted by meq123 View Post
    There are a least a few ways to skin this cat, but this is what I do...

    1) Copy the sbpd command config file to the home directory:

    Code:
         cd ~
         cp /usr/local/share/sbpd/sbpd_commands.cfg .
    2) Append the line for your command to the bottom of the file (escaping the quote chars), and then do a backup:

    Code:
         echo "FAV1 = [\"favorites\",\"playlist\", "\play item_id:1.1\"]" >> sbpd_commands.cfg
         pcb bu
    3) Add the location of the updated config file to the sbpd command on the tweaks page

    Code:
    	sbpd -d -f /home/tc/sbpd_commands.cfg  <rest of your button command string>
    Have fun!
    Thank you for your quick answer.

    Somehow it is not working. This is what I get (verbose):

    Code:
    1561062707.3013 6 GPIO.c,102: Short PRESS: 118
    1561062707.3013 6 control.c,107: Button CB set for button #:0, gpio pin 25
    1561062707.3145 6 control.c,218: Button pressed: Pin: 25, Press Type:Short
    1561062707.3147 6 servercomm.c,74: Send Command:0, Fragment:[\"favorites\",\"playlist\", "\play item_id:1.1\"]
    1561062712.3167 6 servercomm.c,134: Curl Error: (28)
    1561062712.3167 6 servercomm.c,136: Operation timed out after 5001 milliseconds with 0 bytes received
    I also tried without \ like this:
    Code:
    FAV1=["favorites","playlist", "play item_id:1.1"]
    Code:
    1561063290.4186 6 GPIO.c,102: Short PRESS: 306
    1561063290.4186 6 control.c,107: Button CB set for button #:0, gpio pin 25
    1561063290.4822 6 control.c,218: Button pressed: Pin: 25, Press Type:Short
    1561063290.4823 6 servercomm.c,74: Send Command:0, Fragment:["favorites","playlist", "play item_id:1.1"]
    1561063290.4926 6 servercomm.c,134: Curl Error: (52)
    1561063290.4926 6 servercomm.c,136: Empty reply from server

    I have added 2 radio stations in favorites.opml and I can see them in LMS favorites (gui). Should the first radio stream be item_id:1.1 and the second: item_id:1.2

    Thank you!

  9. #179
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,183
    That means you formed the command wrong.

    The backslashes are not used in the config file.....they are only needed on the commandline.

    The format of the file can be found here... https://github.com/coolio107/Squeeze...d_commands.cfg

    Your command should be
    FAV1=["favorites", "playlist", "play", "item_id:1.1"]

    That should be right, but I don't have a button setup right now to test.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  10. #180
    Member
    Join Date
    Apr 2019
    Location
    Finland
    Posts
    62
    Quote Originally Posted by paul- View Post
    That means you formed the command wrong.

    The backslashes are not used in the config file.....they are only needed on the commandline.

    The format of the file can be found here... https://github.com/coolio107/Squeeze...d_commands.cfg

    Your command should be
    FAV1=["favorites", "playlist", "play", "item_id:1.1"]

    That should be right, but I don't have a button setup right now to test.
    Hello,

    Thanks for your help.

    I changed the command to FAV1=["favorites", "playlist", "play", "item_id:1.1"] and now it is not showing any errors. LMS doesn not play anything tho.

    Code:
    1561098357.8727 6 GPIO.c,102: Short PRESS: 199
    1561098357.8728 6 control.c,107: Button CB set for button #:0, gpio pin 25
    1561098357.8734 6 control.c,218: Button pressed: Pin: 25, Press Type:Short
    1561098357.8734 6 servercomm.c,74: Send Command:0, Fragment:["favorites", "playlist", "play", "item_id:1.1"]
    Should I
    telnet to you cli port of your LMS server (Default port 9090), Then type listen......you will see all of the communication from the server side.

Posting Permissions

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