Home of the Squeezebox™ & Transporter® network music players.
Page 22 of 24 FirstFirst ... 122021222324 LastLast
Results 211 to 220 of 237
  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: 551
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,380
    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,941
    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.

  7. #217
    Junior Member
    Join Date
    May 2021
    Posts
    2
    Hi all,

    could you please help me out here? On a headless system (no jivelite) I would like to use the apple A1156 remote. I wired the IR receiver (TSOP38238) on the rpi, installed the LIRC extension on pcp. Then, set the IR device settings to the wired GPIO pin (25 in, 17 out).

    Now, I'm not sure how to proceed. This:
    https://gist.github.com/hartzell/209...rcd-conf-a1156
    seems the be the right config file, which I need to upload /tmp and run the custom command, right? But, the note says that I need also a lircrc file on a headless system. From where do I get this file?
    Last edited by aspik; 2021-05-09 at 13:46. Reason: link

  8. #218
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,941
    Quote Originally Posted by aspik View Post
    Hi all,

    could you please help me out here? On a headless system (no jivelite) I would like to use the apple A1156 remote. I wired the IR receiver (TSOP38238) on the rpi, installed the LIRC extension on pcp. Then, set the IR device settings to the wired GPIO pin (25 in, 17 out).

    Now, I'm not sure how to proceed. This:
    https://gist.github.com/hartzell/209...rcd-conf-a1156
    seems the be the right config file, which I need to upload /tmp and run the custom command, right? But, the note says that I need also a lircrc file on a headless system. From where do I get this file?
    You will need to be running squeezelite on the rpi and that's the only player you can control with the IR remote.

    The key symbols need to be changed in that linked lircd.conf file and you don't need to have an lircrc file unless you want access to an action that's not available as a key symbol, for example a mute button.

    These are the most useful key symbols.

    KEY_VOLUMEDOWN
    KEY_VOLUMEUP
    KEY_REWIND
    KEY_FORWARD
    KEY_PAUSE
    KEY_PLAY
    KEY_POWER

    Take a look at the squeezelite ir.c source file for a complete keysym and lircrc actions list.
    Ralphy

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

  9. #219
    Junior Member
    Join Date
    May 2021
    Posts
    2
    Sorry for the late reply. I tried what you described, but it was still not working. After some time I solved it. I unnecessary set the LIRC GPIO out number (IR transmitter), which resulted in two lirc devices (/dev/lirc0 and /dev/lirc1). Somehow lirc was picking the wrong one and no code worked. After clearing the lirc GPIO out number, everything is working as it should

    BTW: great piece of software! It truly follows the principle: do only one thing and do it right!
    Last edited by aspik; 2021-05-16 at 14:52.

  10. #220

    Power On/Off Script Example

    I would like to setup some separate on/off IR output command sequences in the Power On/Off script. Is it possible with one script?
    Last edited by pmendiuk; 2021-09-23 at 02:07.

Posting Permissions

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