Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 10 123 ... LastLast
Results 1 to 10 of 95
  1. #1
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794

    lirc rpi gpio IR support for picoreplayer

    This section is for squeezelite ONLY. See post #2 for Jivelite configuration.

    https://github.com/ralph-irving/tcz-lirc

    audible feedback only, no visuals.

    Supported "blind actions" are;

    Power
    Play
    Pause
    Next Track
    Previous Track
    Volume Up
    Volume Down

    The packages come with support for a logitech/slimdevices remote already configured and working.
    To use a different remote you need to obtain/create an lircd.conf file for said remote and an .lircrc key mapping file.
    There is a plethora of info available to do this, research it yourself, I won't do it for you.

    I will be happy to include additional remote configurations in the tcz file.

    For installation details see the README.md

    We are planning to integrate lirc support into picoreplayer when we have a working jivelite solution as well.

    I'm using these 38 kHz TSOP4838 DIP-3 IR Receiver Modules.

    Check out this video for info on creating a solderless harness to connect an IR receiver directly to the rpi.

    There's a pic of my B+ with IR connected to the IQaudIO DAC+ IR header. The cable is long enough to expose the IR diode when I finally put the rpi behind the stereo. I used a no solder solution, except to join the 2 connectors and I had to bend the pins on the diode a bit to keep them snug in the connector. The range is amazing with the IR floating like that. We'll see what it's like when I hide it.

    Name:  rpiir.jpg
Views: 2930
Size:  74.2 KB
    Last edited by ralphy; 2016-02-06 at 06:29. Reason: No longer just for squeezelite
    Ralphy

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

  2. #2
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    LIRC IR Jivelite Setup

    Add the lirc-rpi module to /mnt/mmcblk0p1/config.txt

    sudo mount /mnt/mmcblk0p1

    dtoverlay=lirc-rpi,gpio_in_pin=27

    sudo umount /mnt/mmcblk0p1

    I'm using gpio 27. Change the "27" to the gpio in pin you have your IR receiver diode connected.

    Copy these files to /mnt/mmcblk0p2/tce/optional

    For For piCorePlayer < 2.04

    irda-4.1.13-piCore+.tcz
    irda-4.1.13-piCore+.tcz.md5.txt
    irda-4.1.13-piCore_v7+.tcz
    irda-4.1.13-piCore_v7+.tcz.md5.txt

    For piCorePlayer >= 2.04

    irda-4.1.20-piCore+.tcz
    irda-4.1.20-piCore+.tcz.md5.txt
    irda-4.1.20-piCore_v7+.tcz
    irda-4.1.20-piCore_v7+.tcz.md5.txt

    For all piCorePlayer versions

    lirc.tcz
    lirc.tcz.dep
    lirc.tcz.md5.txt

    If you don't have shairport-sync enabled you also need to install

    http://ralph_irving.users.sourceforg...co/libcofi.tcz
    http://ralph_irving.users.sourceforg...fi.tcz.md5.txt

    Add lirc.tcz to the end of /mnt/mmcblk0p2/tce/onboot.lst

    Copy the lircd-jivelite from git to /usr/local/etc/lirc/lircd.conf on picoreplayer or create/modify your own.

    The lircd-jivelite config file is only for a squeezebox3, classic, or touch slimdevices/logitech remote. I've also included a lircd-jivelite-RMTD116A config file which is for a Sony RMT-D116A remote.

    Add usr/local/etc/lirc/lircd.conf to the end of the file /opt/.filetool.lst

    Add to one of the User commands fields on the tweaks page in the web gui.

    /usr/local/sbin/lircd --device=/dev/lirc0 --uinput

    Save your configuration and reboot

    To create a lircd.conf for a different remote, see jivekeys.csv for the key symbols, that work with jivelite, during your irrecord session.

    lircd v0.9.0 does not support keyboard modifiers, like SHIFT, CONTROL, ALT so you cannot use any of the shifted keys. ie Upper case letters! Key symbols postfixed with (NEW) require a new jivelite.tcz build, which is not yet released. Needs more testing.
    Last edited by ralphy; 2016-03-29 at 04:31. Reason: Updated for pcp 2.04 kernel modules
    Ralphy

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

  3. #3
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,209
    hi ralphy,

    Thanks for doing all the work.

    I was meaning to do it months ago but after looking at what you had to do... I would not have succeeded.

    I just followed your instructions to the letter and it worked.

    One thing I did find is that I needed to restart squeezelite after a reboot. I assume this means lircd needs to be started before squeezelite?

    A word of warning to others: I had a couple of different IR Receiver Modules on hand and they have different pin outs. Check the datasheets.

    For debugging I needed to confirm that the IR Receiver was working. The mode2 command shows the IR hardware/wiring and drivers are working.

    Code:
    $sudo mode2 -d /dev/lirc0
    
    pulse 584
    space 1658
    pulse 626
    space 1607
    pulse 610
    space 1654
    pulse 590
    space 512
    pulse 608
    space 1661
    pulse 582
    space 1656
    pulse 652
    space 512
    pulse 547
    space 1668
    pulse 617
    space 505
    pulse 587
    space 527
    pulse 601
    space 547
    pulse 616
    The irw command shows the remote is recognised as a Squeezebox remote.

    Code:
    $irw
    00000000768920df 00 KEY_PAUSE Slim_Devices_Squeezebox3
    00000000768920df 01 KEY_PAUSE Slim_Devices_Squeezebox3
    00000000768920df 02 KEY_PAUSE Slim_Devices_Squeezebox3
    00000000768910ef 00 KEY_PLAY Slim_Devices_Squeezebox3
    00000000768910ef 01 KEY_PLAY Slim_Devices_Squeezebox3
    00000000768910ef 02 KEY_PLAY Slim_Devices_Squeezebox3
    000000007689a05f 00 KEY_FORWARD Slim_Devices_Squeezebox3
    000000007689a05f 01 KEY_FORWARD Slim_Devices_Squeezebox3
    000000007689a05f 02 KEY_FORWARD Slim_Devices_Squeezebox3
    000000007689c03f 00 KEY_REWIND Slim_Devices_Squeezebox3
    000000007689c03f 01 KEY_REWIND Slim_Devices_Squeezebox3
    000000007689807f 00 KEY_VOLUMEUP Slim_Devices_Squeezebox3
    000000007689807f 01 KEY_VOLUMEUP Slim_Devices_Squeezebox3
    000000007689807f 02 KEY_VOLUMEUP Slim_Devices_Squeezebox3
    00000000768900ff 00 KEY_VOLUMEDOWN Slim_Devices_Squeezebox3
    00000000768900ff 01 KEY_VOLUMEDOWN Slim_Devices_Squeezebox3
    00000000768900ff 02 KEY_VOLUMEDOWN Slim_Devices_Squeezebox3
    This is exactly what I need as most of my piCorePlayers are headless. I am looking forward to having IR included in piCorePlayer.

    regards
    Greg

  4. #4
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Thanks for posting the additional setup details.

    If you are not using a slimdevices remote, you do need to restart lircd as squeezelite is started before the user commands are run and lircd needs to already be running. I just discovered this as well, when I created lircd.conf and .lircrc configuration files for an old Sony RMT-116A dvd remote I had kicking around. I've added the config files to the git repo as an example.

    I updated the lirc-squeezebox to match the name of the squeezelite binary on pcp. The prog = section for each code. Needed for non SD remotes.
    Code:
    -       prog = squeezelite
    +       prog = squeezelite-armv6hf
    I also added to the bottom of the README.md a youtube video describing how to modify the lircd.conf when the remote sends the key many times when you only press it once.

    I've updated the default lircd.conf file for watch worked for me.

    Code:
    --- a/lircd.conf
    +++ b/lircd.conf
    @@ -24,6 +24,8 @@ begin remote
       pre_data_bits   16
       pre_data       0x7689
       gap          107995
    +  min_repeat   1
    +  suppress_repeat 3
       toggle_bit      0
    The programs have not changed in lirc.tcz, only the default configuration files.

    I have managed to get lirc working with jivelite, but I can't get all the remote buttons to be recognized yet.

    Here's my pcp touch IR setup using gpio 27.
    Code:
    $ grep -i ir /mnt/mmcblk0p1/config.txt
    # Enable IR receiver
    dtoverlay=lirc-rpi,gpio_in_pin=27
    I connected velcro straps to the screw hold mounts on the screen and just popped the IR receiver above the screen.

    Name:  rpiirt.jpg
Views: 2825
Size:  30.7 KB
    Name:  gpio27.jpg
Views: 2820
Size:  165.5 KB
    Ralphy

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

  5. #5
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,209
    Hi ralphy,

    I have been trying to get the remote to work via irexec rather than squeezelite. I would like to be able to control piCorePlayer directly, rather than go thru squeezelite or jivelite.

    Anyway, I copied .lircrc to my home directory and changed POWER_DOWN to irexec and shutdown. I initially tried echo command for testing but could not work out exactly where the output would go. I unsuccessfully tried outputting to the console and the ssh terminal window.

    The funny thing is, if I use the "ircat irexec" and "ircat squeezelite" I get the right command shown on screen but the SHUTDOWN button always does then squeezelite command rather than the irexec command no matter what.

    I am guessing that the default directory for the ".lircrc" may be different depending on application or I am doing something stupid.

    regards
    Greg

  6. #6
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Quote Originally Posted by Greg Erskine View Post
    Hi ralphy,

    I have been trying to get the remote to work via irexec rather than squeezelite. I would like to be able to control piCorePlayer directly, rather than go thru squeezelite or jivelite.

    Anyway, I copied .lircrc to my home directory and changed POWER_DOWN to irexec and shutdown. I initially tried echo command for testing but could not work out exactly where the output would go. I unsuccessfully tried outputting to the console and the ssh terminal window.

    The funny thing is, if I use the "ircat irexec" and "ircat squeezelite" I get the right command shown on screen but the SHUTDOWN button always does then squeezelite command rather than the irexec command no matter what.

    I am guessing that the default directory for the ".lircrc" may be different depending on application or I am doing something stupid.

    regards
    Greg
    The lirc tools use /usr/local/etc/lirc/lircrc for the default configuration file.

    Squeezelite uses $HOME/.lircrc if you don't include the file path with the -i option.
    Ralphy

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

  7. #7
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    863
    Does anyone know what chip / protocol is used in the SB3 remote ?

    These genuine remotes are no longer available and having searched for decent remotes to use with squeeze/jive lite thought it maybe easier to recreate one.

    Jeff
    Players: SliMP3,Squeezebox3 x3,Receiver,SqueezePlayer,PiCorePlayer x3,Wandboard
    Server: LMS Version: 7.9.1 - 1503129892 on Centos 7 VM on ESXi 6.5.0U1 on Dell T320
    Plugins: AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud
    Remotes: iPeng8/Orangesqueeze/PC/Jivelite
    Music: 383GB,1269 albums 17756 songs 4381 artists mostly FLACs

    Want a webapp ? See http://forums.slimdevices.com/showth...Webapp-for-LMS

  8. #8
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Quote Originally Posted by Jeff07971 View Post
    Does anyone know what chip / protocol is used in the SB3 remote ?

    These genuine remotes are no longer available and having searched for decent remotes to use with squeeze/jive lite thought it maybe easier to recreate one.

    Jeff
    Hi Jeff,

    Perhaps it might be easier to pick up a used Sony RMT-D116A or RMT-D117A. These remotes can be had on ebay for as little as 4 quid.

    I have both these remotes and have created configurations for both squeezelite and jivelite and keep them in the lirc tcz github repository.

    It's also quite easy to create a config for any remote. Youtube is great for this. It took me about an hour to create the initial config for the sony. Still tweaking it however. There are a couple of keys which use a different protocol it seems and don't work with my configs. I've put comments in the config files for the key mappings.
    Ralphy

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

  9. #9
    Senior Member sckramer's Avatar
    Join Date
    Oct 2008
    Posts
    284
    @Greg

    Did you add this to 2.02, since config.txt has some IR_ options?

    Thanks!
    Scott Kramer - AudioSystem - YouTube - Twitter

  10. #10
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,209
    Quote Originally Posted by sckramer View Post
    @Greg

    Did you add this to 2.02, since config.txt has some IR_ options?

    Thanks!
    Hi sckramer,

    No, it's not there yet. We are working on it!! Maybe pCP2.04 or pCP2.05.

    regards
    Greg

Posting Permissions

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