Home of the Squeezebox™ & Transporter® network music players.
Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 51
  1. #41
    Senior Member
    Join Date
    May 2009
    Location
    Switzerland
    Posts
    115
    Quote Originally Posted by ralphy View Post
    If you are using the FLIRC usb dongle, it works the same as in previous piCorePlayer releases..
    Hi Ralphy,
    I just got my FLIRC usb dongle (v2) but cannot get it to work on pCP 6.1.0. Can you pls let me know where I can find these instructions (been surfing forums for hours so far...).
    Many thanks in advance.
    Last edited by Supertramp; 2020-07-29 at 07:38.

  2. #42
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,523
    Quote Originally Posted by Supertramp View Post
    Hi Ralphy,
    I just got my FLIRC usb dongle (v2) but cannot get it to work on pCP 6.1.0. Can you pls let me know where I can find these instructions (been surfing forums for hours so far...).
    Many thanks in advance.
    Picoreplayer only supports the flirc usb dongle with jivelite by default.

    However, it is possible to control squeezelite with a usb device that mimics a keyboard, like the flirc dongle using inputlircd if you manually install the pcp-lirc extension. That being said, it's not an simple setup.

    If you enabled lirc through tweaks, pcp will launch lircd at startup which conflicts with inputlircd. So you must disable IR remote control in the web tweaks tab and reboot before proceeding.

    Next, install pcp-lircd from the extensions webgui and put /usr/local/sbin/inputlircd in one of the user commands. Next add -i to squeezelite various options field on the squeezelite tab.

    You will likely need to create a mapping file (-t) and you might need to add -m 0 and -r 300 in addition to the input device your usb device is sending key events on.

    See the inputlircd manpage for option details.
    Ralphy

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

  3. #43
    Senior Member
    Join Date
    May 2009
    Location
    Switzerland
    Posts
    115
    Quote Originally Posted by ralphy View Post
    Picoreplayer only supports the flirc usb dongle with jivelite by default.

    However, ...
    Many thanks for your reply.

    “You will likely need to create a mapping file (-t) and you might need to add -m 0 and -r 300 in addition to the input device your usb device is sending key events on.”

    Being a Linux dummy, what does such a file look like and where would I need to store it?

    Alternatively, would the default way (jivelite) on a headless player be a possible, simpler and better solution? I have been experimenting with the related tweaks before, but no success.

    Hope you can help me further...
    Last edited by Supertramp; 2020-07-30 at 11:52.

  4. #44
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,523

    Using inputlircd and a flirc to control squeezelite

    First you must disable IR remote control in the web tweaks tab and reboot before proceeding.

    Next, install pcp-lirc.tcz from the command line.
    Code:
    $ tce-load -wi pcp-lirc.tcz
    Next, ensure squeezelite is stopped.

    Code:
    $ sudo /usr/local/etc/init.d/squeezelite stop
    Plug in your FLIRC and find the name.

    Code:
    $ cat /proc/bus/input/devices
    
    I: Bus=0003 Vendor=20a0 Product=0001 Version=0101
    N: Name="flirc.tv flirc"
    P: Phys=usb-20980000.usb-1.3/input0
    S: Sysfs=/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:20A0:0001.0001/input/input0
    U: Uniq=
    H: Handlers=sysrq kbd event0 
    B: PROP=0
    B: EV=10001f
    B: KEY=3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 130c13 b17c000 267bfa d941dfed e09effdf 1cfffff ffffffff fffffffe
    B: REL=40
    B: ABS=1 0
    B: MSC=10
    Start inputlircd from the command line while testing. I've found the following options work best.

    Code:
    $ sudo /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 500
    Run irw and press each key. Note what keycode is generated for each key.

    Code:
    $ irw
    29 0 KEY_C /dev/input/event0
    19 0 KEY_P /dev/input/event0
    For example my slimdevices remote PAUSE key sends KEY_C and PLAY sends KEY_P. The codes from your flirc will likely be different as I'm using an old flirc config which I created for use with jivelite on my wandboard, and don't want to reprogram my flirc.

    Stop irw by pressing control-C

    Create a file mapping of the keycode from your remote to a corresponding keycode squeezelite operation.

    For example:

    Code:
    $ cat /home/tc/inputlircd.keymap
    KEY_C = KEY_PAUSE
    KEY_P = KEY_PLAY
    The list of squeezelite IR keycodes can be found here

    Kill and restart inputlircd from the command line adding the mapping file to test.

    Code:
    $ sudo pkill inputlircd
    $ sudo /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 500 -t /home/tc/inputlircd.keymap
    Start squeeelite with the -i option and -d ir=debug to test if the keys work. You can ignore the error reading the ir config. It's not needed for inputlircd
    Note that you need at least squeezelite version 1.9.7-1237 for this to work.

    Code:
    $ squeezelite -d ir=debug -i
    [11:28:55.788622] load_lirc:242 loaded liblirc_client.so.0
    [11:28:55.791797] ir_init:261 error reading config: ~/.lircrc
    [11:28:57.951369] ir_thread:199 ir lirc: KEY_PLAY [0] -> 768910ef
    [11:29:05.246239] ir_thread:199 ir lirc: KEY_PAUSE [0] -> 768920df

    Once you're happy with the key map file, backup your pcp config and confirm the mapping file is in the backup.

    Code:
    $ tar -tvf /mnt/mmcblk0p2/tce/mydata.tgz | grep input
    -rw-r--r-- ralphy/users        35 2020-08-01 11:20:21 home/tc/inputlircd.keymap
    Now in the webgui.

    Put /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 500 -t /home/tc/inputlircd.keymap in one of the user commands on the tweaks tab and add -i to squeezelite various options field on the squeezelite tab.

    Backup your config once more and reboot.
    Last edited by ralphy; 2020-08-05 at 09:52. Reason: Removed -c squeezelite ignores shifted keys and increased repeat delay.
    Ralphy

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

  5. #45
    Senior Member
    Join Date
    May 2009
    Location
    Switzerland
    Posts
    115
    Many thanks for these great detailed instructions, Ralphy.

    I have no physical access to my pCP in the next couple of weeks. I will try this once I am back home and report back.

    Many thanks again!!

  6. #46
    Senior Member
    Join Date
    Jan 2008
    Posts
    402
    Perfect! I just had the idea of setting up my FLIRC again and here is the guide. Thank you!

    So I managed to get it to work with my old Squeezebox remote, through FLIRC into PCP6.1 in the way that you have described.

    Now, the basic keys work ok (power, play, pause, shuffle, repeat, vollume up/down). However, as far as I can tell, KEY_NEXT and KEY_FORWARD have exactly the same actions: they move to the next track in the currently playing playlist. Same goes for KEY_BACK and KEY_REWIND: they skip the beginning of the current track, and then to the previous one. I was thinking that FORWARD/REWIND would skip within the track and NEXT/BACK would skip to the next/previous track. Is this something I can configure somewhere?

    Also, how can I configure the numeric buttons to launch particular favourites? Right now KEY_1 etc do nothing apart from registering in Squeezelite.

    Thanks!

  7. #47
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,523
    Quote Originally Posted by Wigster View Post
    Now, the basic keys work ok (power, play, pause, shuffle, repeat, vollume up/down). However, as far as I can tell, KEY_NEXT and KEY_FORWARD have exactly the same actions: they move to the next track in the currently playing playlist. Same goes for KEY_BACK and KEY_REWIND: they skip the beginning of the current track, and then to the previous one. I was thinking that FORWARD/REWIND would skip within the track and NEXT/BACK would skip to the next/previous track. Is this something I can configure somewhere?
    This required a change to squeezelite to enable repeat for those keys. Update squeezelite to 1.9.7-1270 from the picoreplayer webgui main tab. Then pressing the key momentarily skips to the next/prev track and if you hold either one LMS "scans" forward/back within the current track.

    Quote Originally Posted by Wigster View Post
    Also, how can I configure the numeric buttons to launch particular favourites? Right now KEY_1 etc do nothing apart from registering in Squeezelite.
    You can push the "Favorites" button, then enter the number of a favorite (something between 1 and 99), and then hit "Play" and squeezelite will start playing the favorite.

    Another option is to create a /home/tc/.lircrc file to map the KEY_1 to KEY_6 to presets.

    Code:
    begin
            button = KEY_1
            repeat = 1
            prog = squeezelite
            config = preset_1
    end
    begin
            button = KEY_2
            repeat = 1
            prog = squeezelite
            config = preset_2
    end
    begin
            button = KEY_3
            repeat = 1
            prog = squeezelite
            config = preset_3
    end
    begin
            button = KEY_4
            repeat = 1
            prog = squeezelite
            config = preset_4
    end
    begin
            button = KEY_5
            repeat = 1
            prog = squeezelite
            config = preset_5
    end
    begin
            button = KEY_6
            repeat = 1
            prog = squeezelite
            config = preset_6
    end
    Pressing 1..6 will play the preset and holding the key will set the currently playing track/stream to the preset. You can also use the Presets Editor in the player settings.
    There are no Slim_Devices_Remote IR codes in LMS for presets 7-10.

    Also, note that I've removed the -c from the inputlircd command lines in my instructions as I found squeezelite ignores "shifted" key codes.
    Attached Files Attached Files
    Last edited by ralphy; 2020-08-06 at 06:24.
    Ralphy

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

  8. #48
    Senior Member
    Join Date
    Jan 2008
    Posts
    402
    Quote Originally Posted by ralphy View Post
    This required a change to squeezelite to enable repeat for those keys. Update squeezelite to 1.9.7-1270 from the picoreplayer webgui main tab. Then pressing the key momentarily skips to the next/prev track and if you hold either one LMS "scans" forward/back within the current track.
    This doesn't seem to be available as of right now (1256 is the latest from the WEBGUI), while Sourceforge contains 1269. I presume that it's just a question of time and not anything more serious.

    Quote Originally Posted by ralphy View Post
    Another option is to create a /home/tc/.lircrc file to map the KEY_1 to KEY_6 to presets.
    This works. Great! Thank you.

  9. #49
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,523
    Quote Originally Posted by Wigster View Post
    This doesn't seem to be available as of right now (1256 is the latest from the WEBGUI), while Sourceforge contains 1269. I presume that it's just a question of time and not anything more serious.
    Should be there now. Sorry, I uploaded the older version yesterday.

    Code:
    [ INFO ] Stopping Squeezelite player: Squeezelite...
    [ INFO ] Current Squeezelite version: 1.9.7-1269-pCP
    [ INFO ] Waiting for Squeezelite to complete shutdown...
    [ INFO ] Removing old Squeezelite extension...
    [ INFO ] Updating Squeezelite extension...
    Downloading: pcp-squeezelite.tcz
       Checking MD5 of: pcp-squeezelite.tcz.....OK
    All files tested good.
    [ INFO ] Reloading Squeezelite extension...
    All files tested good.
    pcp-squeezelite.tcz: OK
    [ INFO ] Current Squeezelite version: 1.9.7-1270-pCP
    [ INFO ] Starting Squeezelite player: Squeezelite...
    Ralphy

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

  10. #50
    Senior Member
    Join Date
    Jan 2008
    Posts
    402
    Hmm, I still have

    Code:
    [ INFO ] Stopping Squeezelite player: Squeezelite...
    [ INFO ] Checking for Updates from: https://repo.picoreplayer.org/repo
    
    [ INFO ] Checking: pcp-squeezelite.tcz                      Extension version Matches
    while the squeezelite version is Squeezelite v1.9.7-1256-pCP. I'm on an RPI 2B if that is important.
    Last edited by Wigster; 2020-08-06 at 08:12.

Posting Permissions

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