Home of the Squeezebox™ & Transporter® network music players.
Page 22 of 22 FirstFirst ... 12202122
Results 211 to 216 of 216
  1. #211
    Quote Originally Posted by ralphy View Post
    Yes, irexec needs to be started after lircd is running.
    I'll bet that's my last remaining problem. Will give it a test this coming weekend. Thanks much, Ralphy!

  2. #212
    Quote Originally Posted by ralphy View Post
    Yes, irexec needs to be started after lircd is running. lircd should already be running if lirc is enabled on the tweaks page.

    You can put /usr/local/bin/irexec -d in user commands on the tweaks page or run it from an ssh session just to test.
    Hi Ralphy, my randomplay function works great when I start irexec via SSH manually, thanks!

    Unfortunately, adding that invocation to Tweaks->User commands does not work. It retains my config, but after every reboot, irexec disappears:

    Name:  pcp-no-irexec.JPG
Views: 366
Size:  53.9 KB

    Did insitu update v6.0.0->v6.1.0, same thing. Looks like a bug. Do you know of another way to add that to startup? Will move this to another thread.

    In any case, custom scripts and config work great with LIRC and GPIO on PCP. Thanks again for all your help.

    UPDATE 04 NOV 2020

    Found the problem, reported it in my other thread, but forgot to mention it here. The issue with irexec not starting from User Commands is not with PCP, but with irexec. It can't find my default /home/tc/.lircrc at that point during the initialization. I could make it work by changing my User Command to:

    /usr/local/bin/irexec /home/tc/.lircrc -d

    Covered in more detail here: https://forums.slimdevices.com/showt...l=1#post992256
    Last edited by Braklet; 2020-11-04 at 07:26. Reason: Discovered a fix

  3. #213
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,229
    Quote Originally Posted by Braklet View Post
    I took a quick look at the squeezelite ir.c code and see that all the lircrc config options are mapped to internal squeezelite functions. I also took a look at the PCP about.cgi presented by my player and it's clear that random play is mapped to a "randomplay" function directed at the LMS web instance.

    So I understand that the IR support is internal to the squeezelite player and not a general PCP control interface. I still think that a IR randomplay key is a useful and obvious addition to PCP. This is obviously a design issue, maybe put it on the request queue?

    In the meantime, is it possible to tweak the lirc config to generate a upstream PCP directive to spawn the LMS web command, similar to about.cgi?

    Perhaps something like "curl -d <something> http://localhost/about.cgi" ?

    EDIT:

    Discovered a way to fire a Random Tracks play command to the LMS server. Add the following script as /home/tc/randomplay:
    Code:
    #/bin/sh
    PLAYER=$(hostname)
    LMSIP=$(netstat -nt 2>&1 | grep :3483 | grep ESTABLISHED | uniq -f 4 | awk '{ print $5 }' | grep :3483 | awk -F: '{ print $1 }')
    wget -T 5 -q -O- --post-data='{"id":1,"method":"slim.request","params":["'$PLAYER'",["randomplay","tracks"]]}' --header 'Content-Type: application/json' http://$LMSIP:9000/jsonrpc.js
    Make sure it's executable: chmod +x /home/tc/randomplay
    Now, if you SSH to your PCP and ./randomplay, you'll kick off a new random playlist.
    hi Braklet,

    I know this was months ago and I haven't read the entire thread. Are you aware of $ pcp rand ?

    piCorePlayer Command Line Interface (CLI)

    regards
    Greg

  4. #214
    Quote Originally Posted by Greg Erskine View Post
    hi Braklet,

    I know this was months ago and I haven't read the entire thread. Are you aware of $ pcp rand ?
    Hi Greg, I had absolutely no clue about "pcp rand," which is why I resorted to reverse engineering my random track script from the LMS interface.

    Thanks much for the link to the PCP API, I will give it a much closer eye now, maybe I can come up with some additional goodies for my remote.

    Am glad to contribute to such a great project as PCP, thanks again.

  5. #215
    Junior Member
    Join Date
    Aug 2016
    Posts
    25

    Remote IR Control codes

    I have been testing an IR remote control on picoreplayer (Release 6) and with standard remote codes it works just fine.
    I am now trying to get the apple remote A1156 working but I do not succeed.

    Using this config file https://gist.github.com/hartzell/209...36890806211da3

    begin codes
    KEY_UP 0x50
    KEY_DOWN 0x30
    KEY_LEFT 0x90
    KEY_RIGHT 0x60
    KEY_PAUSE 0xA0
    KEY_ESC 0xC0
    end codes

    When I check with Putty I can see IR signals are received.

    The "Pauze/Start" is working fine
    When I change the KEY-RIGHT to 0xB0 it functions. Hence wrong code configurations for some keys.
    However, then the KEY-RIGHT functions, the KEY_PAUSE does not anymore?

    Anyone experience with this one?
    Is it possible to read the raw codes and convert them to hexadecimal?

    Thanks!

  6. #216
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,855
    Quote Originally Posted by jags View Post
    I have been testing an IR remote control on picoreplayer (Release 6) and with standard remote codes it works just fine.
    I am now trying to get the apple remote A1156 working but I do not succeed.

    Using this config file https://gist.github.com/hartzell/209...36890806211da3

    begin codes
    KEY_UP 0x50
    KEY_DOWN 0x30
    KEY_LEFT 0x90
    KEY_RIGHT 0x60
    KEY_PAUSE 0xA0
    KEY_ESC 0xC0
    end codes

    When I check with Putty I can see IR signals are received.

    The "Pauze/Start" is working fine
    When I change the KEY-RIGHT to 0xB0 it functions. Hence wrong code configurations for some keys.
    However, then the KEY-RIGHT functions, the KEY_PAUSE does not anymore?

    Anyone experience with this one?
    Is it possible to read the raw codes and convert them to hexadecimal?

    Thanks!
    Looks like you're trying to control jivelite with the apple remote, but to you'd specify. Controlling squeezelite vs jivelite usually requires a different lircd config file.

    Ideally you should try to create your own config file as detailed. What does irw show for the "broken" keys?

    I've attached the lircd config file that I use for mine, but it's a different model. The Enter and Pause keys generate 2 values.

    Note that you need to use different key symbols for OK/Enter and Pause for navigation to work correctly with the limited keys on that remote and jivelite.
    Code:
    KEY_L                    0xBA 0x20    # (go) Enter
    KEY_C                    0x7A 0x20    # (pause) Play/Pause
    Attached Files Attached Files
    Last edited by ralphy; 2021-02-21 at 05:11.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

Posting Permissions

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