[PLUGIN] IR Remote Controller feedback thread

Yes. GPIO 25 (i.e. physical pin 22 of the header) should work. If you use a HiFiBerry DAC+ Pro, GPIO 25 would at least not be occupied by the DAC.

I have took snapshots of these

![1.PNG|690x329]
So, i just set the IR remote profile and save.
As for the GPIO configuration, do I just set the GPIO pi of the IR Receiver to #25 and on the board, I just connect the Signal on the IR sensor to the GPIO25 pin on the Raspberry Pi 4 and no worry about config since Volumio has the IR receiver plugin

Exactly.

Of course the IR sensor has to be connected not only to physical header pin 22 (representing GPIO 25), but to GND and Power (3.3V), too.

EDIT: Corrected physical pin number of GPIO 25 (it’s pin 22, not 12)!

Capture

Signal GPIO25
Volt 3.3v
Ground
The way i see it, after setting the GPIO pin to 25 of the IR receiver on the volumio plugin
I can connect the 3.3v and ground and still be able to connect my RemotePi board

first 12pins for the RemotePi board
what is this pin 12

Sorry, GPIO 25 is physical pin 22 of the header. I corrected my post above. The pin is highlighted in this scheme.

Do you have a RemotePi board installed?

If you want to use a RemotePi board and therefore install the remotePi plugin, you will not have the option to select the GPIO on the configuration page of the IR Controller plugin.

This is because the remotePi plugin assumes that you will use the IR sensor built into the RemotePi board and already loads the gpio-ir overlay configured either for GPIO 17 or GPIO 18. Reason is that the built in IR sensor of the RemotePi board is designed to receive IR signals either on GPIO 18 (default) or GPIO 17 (after a small hardware modification).

When using a RemotePi board alongside a HiFiBerry DAC+ Pro, the RemotePi board has to be modified to use GPIO 17 as described here (see paragraph “Changing the GPIO port for the RemotePi Board IR Receiver from 18 to 17”). Accordingly on the remotePi plugin’s configuration page the toggle for using GPIO 17 has to be set.

So: If you use a RemotePi board don’t install another IR sensor but utilize the one that comes with / on the RemotePi board.

I found your other thread where your RemotePi board is visible. Looking at your pictures in that thread the RemotePi you have doesn’t seem to be the model shown in post #223, but this model with external IR and LED.

This variant of the RemotePi board comes with external IR receiver and LED cable assembly which appears to be connected on the picture you posted. So you should already be ready to go hardware wise - at least if you have done the mentioned hardware modification to the RemotePi board.

On the software side you would only have to

  1. install the remotePi plugin, enable “Use GPIO port 17 for IR receiver” and reboot.

  2. install the IR Controller plugin and choose your remote control.

Maybe i got better news. I have

went here and set the GPIO pin of the Receiver to GPIO24 and then used a raspberryPi 4 GPIO chart to see what pin to locate and connected the IR sensor to GPIO24 and once it The IR sensor was connect and the GPIO configuration was set to 24 i restarted the system and then tried the remote. For a few second, i tried volume button up/down and that worked there for a second and once more i reconnected the power cord let it boot and tried the up/down vol and it work, but only for a few second and stops no more and anything else.
So i restarted Volumio when setting the GPIO pin number on the configuration and connected the IR sensor to the same pin and restarted it all, that when i thought i had it. the volume only work there for a second and stopped.

I assume currently you don’t have the RemotePi board installed. Is that correct?

To check if IR signals are still received when volume control cuts out, run

cat /dev/lirc0

Pressing keys on the remote control should generate weird looking signs.

You can also run

irw

When you press a key on the remote control, the button name assigned to this key in the lircd.conf for the particluar remote control should show up. E.g. for volume up on the JustBoom remote the output should contain “Volume-Up”.

Thoughts appreciated.

I bought some IR sensors in a pack, the Apple A1294 remote, and a GPIO extension.

I’m using a HiFiBerry DAC+ and also the official 7” touchscreen.

The HiFiBerry uses GPIOs 18-22.

I decided to remove the wires connecting the screen to the PI and power both via MicroUSB. To try and simplify, and I also removed the HiGiBerry for the same reason, and changed the audio to use the headphone out.

I wired the IR sensors ground w a black wire, the v3 with red and the out with brown.

Then I ran the Red wire to a 3.3v and later a 5v connector. I hooked the ground up to one of the grounds, and tried both GPIO 25 and also GPIO 12 with the remote and no go. I even swapped in a new battery to the A1294.

Each time I would

  1. Turn on the pi
  2. Change GPIO in the software
  3. Do a restart via settings
  4. Try remote.

Here is where the wiring is at the current time:

Anyone have an idea why it might not be working?

The Pi is 3.3V device, so 5V could damage the Pi’s GPIO inputs. According to the data sheet the max. voltage on the IR receiver’s output is Vs +0.3V, i.e. 5.3V, if you use 5V to power the receiver. So I would use only 3.3V to power the IR receiver or one would have to add an appropriate resistor between the IR receicers output and the Pi’s input it is connected to.

I suggest to connect the IR receiver to 3.3V again and its output to another GPIO, e.g. GPIO 17. Set this input on the config page of the IR Controller plugin and test.

If it doesn’t work check with

cat /dev/lirc0

if IR signals are received at all.

Possibly try another IR remote control as well.

Thanks for the suggestions. Here is what I did.

  1. Went back to using the pi power supply shown below
  2. Connected it directly to the Pi
  3. Adjusted the Out (brown) of the IR sensor to Pin 17 as suggested
  4. Adjusted the Power (red) to a 3.3v pin as suggested
  5. Wired the touchscreen to the GPI pins directly (5v and ground)

This resulted in the following wiring.

  1. I then logged into the settings and changed the remote to Xbox360 remote
  2. System → Restart
  3. Tried both these remotes. Neither worked
  4. Changed it back to Apple A1294 SSH’d into the device and used your command and hit a few buttons on the Apple remote. It appears there is something happening as I got scribbly scrawl

This is where I currently am stuck. Any suggestions welcomed.

Also should mention that on the chance I’d fried the 1st IR Sensor, I swapped in a new one at the start. I also am using the most recent version of the Volumio software.

No, the sensor can take 5V, but not the Pi’s input. :wink:

This shows the remote control as well as the IR sensor are working.

To check if the signals received from the remote control are interpreted as the buttons assigned in the lird.conf file of the “Apple Remote A1294” profile you can run

irw

and watch the output while pressing buttons on the remote.

But I suspect, you will see no output. IIRC Apple A1294 remotes are known to not all work with the profile that is present in the selection of the IR Controller plugin.

Does to all thank you for your extremely helpful information. I tried what you suggested and saw exactly what you anticipated… Nothing :slightly_smiling_face:

ir3

So you would suggest returning the A1294 and getting the other Apple remote from the dropdown?

Or just ditching the Apple remotes entirely and going with another one of those listed

Maybe, but the A1156 has/had the same issue that not all of them work with the same profile - that’s the reason why there is already an alternative profile :wink:

You could also try to create an alternative profile for the A1294 where you use a copy of the “lircrc” file from the current profile and a new “lircd.conf” file with the following content:

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Thu Jun 20 13:41:14 2019
#
# contributed by
#
# brand:                       /home/volumio/A1294_lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

  name  /home/volumio/A1294_lircd.conf
  flags RAW_CODES|CONST_LENGTH
  eps 30
  aeps          100

  gap          108050

      begin raw_codes

          name KEY_UP
             9126    4408     567     558     571    1707
              521    1705     513    1685     543     555
              574    1705     513    1684     544    1708
              520    1706     522    1703     515    1711
              517     554     566     557     571     552
              567     556     573    1705     513    1686
              542    1683     545     553     566    1711
              517     554     565     558     572     552
              567     556     573     550     569    1708
              520     551     568     555     574     549
              572     551     566     556     574    1719
              519

          name KEY_DOWN
             9126    4411     573     552     567    1710
              518    1708     520    1706     512     559
              570    1707     521    1705     513    1712
              516    1710     518    1707     521    1704
              514     557     572     552     567     555
              574     549     570    1682     546    1705
              513     558     571    1707     521    1703
              515     557     573     549     571     553
              565     558     571     552     569    1683
              544     566     553     557     572     550
              569     555     575     548     570    1699
              540

          name KEY_LEFT
             9129    4406     568     556     574    1704
              513    1712     516    1709     519     553
              567    1711     517    1709     519    1705
              512    1714     515    1710     518    1707
              521     550     569     554     565     558
              571     552     567    1686     542     555
              565     558     571     552     567    1685
              543     554     565     558     572     552
              567     556     573     550     569    1683
              546     551     568     556     573     550
              569     554     565     558     572    1696
              542

          name KEY_RIGHT
             9130    4407     567     558     571    1707
              521    1704     514    1712     516     555
              574    1704     514    1710     518    1707
              521    1705     515    1710     516    1709
              518     553     566     560     570     550
              569     554     569    1687     538    1708
              519    1706     522    1703     515     556
              573     550     569     553     566     557
              572     551     568     555     575    1677
              541     556     573     549     570     554
              565     558     571     551     568    1711
              538

          name KEY_PLAY
             9120    4412     572     553     566    1712
              516    1655     573    1653     565     559
              570    1707     521    1651     567    1711
              517    1656     572    1706     526    1646
              567     558     572     551     568     555
              574     550     569    1708     520     551
              568    1710     518    1707     521    1704
              513    1712     516     555     574    1703
              515     556     573     550     570    1707
              521     550     569     554     565     558
              571     552     567     556     573    1721
              517

          name KEY_MENU
             9130    4406     569     554     575    1651
              567    1659     569    1657     571     552
              567    1659     569    1656     572    1653
              575    1652     566    1660     568    1657
              571     553     566     557     572     551
              568     556     574    1703     515     557
              573    1653     574     550     569     554
              575     549     570     553     566     557
              573     550     569     555     574    1703
              515     557     572     551     568     555
              574     549     570     554     565    1728
              521

          name KEY_OK
             9128    4408     576     549     570    1708
              520    1706     522    1547     671     557
              572    1706     523    1703     514    1713
              515    1657     571    1708     520    1653
              575     549     570     553     566     557
              572     552     567    1711     517    1708
              520     552     567    1684     544    1708
              520    1653     575     548     571    1681
              547     549     570     553     566    1686
              542     554     565     559     571     552
              567     556     573     549     570    1697
              541

      end raw_codes

end remote

This has been posted in June 2019 by @ezaul. I have no Apple remotes so I can’t comment on if it would work.

For additional information on placing your own remote control profiles have a look at post #195.

Edit: Added “end remote” at the end of the code block, which appears to be missing also in the original post of ezaul where I copied it from

Edit 2: Added link to ezaul’s post. Don’t use the commands you find in that post below the lircd.conf code block. They are not necessary using the IR Controller plugin and the new option to place custom profiles in “/data/INTERNAL/ir_controller/configurations”.

Just found a post of @illtrick reporting a working “lircd.conf” file for the A1294.

I have copied the content of the “lircd.conf” file linked in that post and adapted some button names so it fits the “lircrc” of the current A1294 profile:

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(default) on Tue Jun  2 22:56:05 2015
#
# contributed by DBMandrake
#
# brand:                       Apple
# model no. of remote control: A1294 (silver)
# devices being controlled by this remote:
#

begin remote

  name  Apple_A1294
  bits            8
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       9140  4510
  one           633  1666
  zero          633   537
  ptrail        631
  repeat       9137  2220
  pre_data_bits   16
  pre_data       0x77E1
  post_data_bits  8
  post_data      0x2C
  gap          108756
  toggle_bit_mask 0x0
  ignore_mask 0x80ff

      begin codes
          KEY_UP                   0x50
          KEY_DOWN                 0x30
          KEY_LEFT                 0x90
          KEY_RIGHT                0x60
          KEY_ENTER                0x3A 0xA0
          KEY_MENU                 0xC0
          KEY_PLAY                 0xFA 0xA0
      end codes

end remote

Thanks @gvolt.

I spent a ton of time yesterday trying to creat my own confit for the remote and I think I did it.

For giggles I will compare my file to this one. I did find differences with my version compared to the existing file.

:+1: If you find your config working, would you mind to post it here? I could possibly create a PR on Volumio’s Github pages for an alternative A1294 profile.

Of course :grinning_face_with_smiling_eyes:.

No problem making it available at all!

With my luck I anticipate it won’t work but you never know lol.

I assumed that the profile works on your system. If that’s correct your “lircd.conf” file might not work for all A1294 remotes but at least for some of them - just like the “lircd.conf” of the current A1294 profile. :wink:

I was able to get it registering the keys correctly when SSH’d into the device. Code proof below :grinning:

root@pistreamer:/home/volumio# irw
0000000000000007 00 KEY_MENU /home/volumio/A1294_lircd.conf
0000000000000001 00 KEY_PLAY /home/volumio/A1294_lircd.conf
0000000000000004 00 KEY_DOWN /home/volumio/A1294_lircd.conf
0000000000000003 00 KEY_UP /home/volumio/A1294_lircd.conf
0000000000000006 00 KEY_RIGHT /home/volumio/A1294_lircd.conf
0000000000000005 00 KEY_LEFT /home/volumio/A1294_lircd.conf
0000000000000002 00 KEY_ENTER /home/volumio/A1294_lircd.conf

My wife has been heckling me for the last few hours about wanting to set this up, when I have a touchscreen and it sits on my desk lol… Thankfully there is a bit of overlap with my job so its actually helping me learn more about other operating systems (I mainly work on Windows based machines)

A big shout out :+1: to @Old_Duffer for a large amount of assistance.

I ended up recording my own custom configuration, spending the better part of 8 hours yesterday and a couple tonight. All other configurations, including the file from 2019 did not work…

Here is my lircd.conf file, which is located in data/plugins/accessory/ir_controller/configurations (I just replaced the existing lircd.conf file in the existing A1294 folder with the text below.)

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Mon Oct 11 23:58:40 2021
#
# contributed by 
#
# brand:                      /home/volumio/A1294_lircd.conf
# model no. of remote control: A1294
# devices being controlled by this remote:
#

begin remote

  name  /home/volumio/A1294_lircd.conf
  flags RAW_CODES
  eps            30
  aeps          100

  repeat       9010  2213
  gap          95762
  repeat_gap   95747

      begin raw_codes
      
          name KEY_PLAY
              9035    4443     566     553     568    1648
              574    1641     571    1645     566     553
              568    1648     574    1642     569    1647
              575    1641     570    1646     566    1650
              572     547     574     545     566     553
              568     550     571    1645     566    1650
              573    1643     568    1648     573    1644
              568    1648     574     546     575    1641
              570     552     570    1643     568     551
              570     549     573    1643     568    1648
              574     545     566    1650     571    1661
              572   33781    9017    4440     569     550
              571    1645     567    1650     571    1646
              566     552     569    1648     574    1642
              570    1646     575    1642     570    1647
              574    1642     570     549     572     547
              574     544     567     552     569    1647
              575    1642     569     550     571    1645
              567     552     569     550     572     547
              573     545     566     553     568    1648
              574     545     566     553     568    1648
              574    1642     570     549     572    1644
              567    1665     568   38065    9010    2220
              568

          name KEY_ENTER
             9033    4445     575     543     568    1648
              574    1642     570    1647     574     545
              568    1648     572    1645     567    1649
              574    1643     568    1648     574    1642
              569     551     571     548     573     545
              566     553     568    1648     574     546
              565     553     569    1647     575    1642
              570    1647     574     545     566    1650
              572     547     574    1641     571     549
              572     546     565    1651     572    1645
              566     552     569    1647     575    1658
              574   36028    9016    4440     569     550
              572    1644     567    1649     573    1643
              569     550     571    1645     567    1649
              573    1643     568    1647     575    1641
              571    1645     569     550     573     545
              573     544     567     552     569    1649
              563    1654     570     548     575    1642
              565     548     574     543     567     551
              571     548     574     545     567    1651
              568     547     575     544     566    1649
              573    1643     569     550     571    1644
              568    1663     569   38082    9009    2194
              593
              
          name KEY_UP
             9037    4445     575     544     566    1650
              572    1644     568    1649     573     546
              575    1641     570    1647     575    1642
              570    1646     575    1642     570    1646
              576     543     568     551     570     550
              571     546     575    1641     571     549
              572    1618     593     552     570    1646
              566     553     568     551     570     548
              573     546     575    1641     571     548
              573     546     564    1652     571    1620
              592     553     568    1648     574    1658
              574   38114    9016    2192     595

          name KEY_DOWN
             9037    4443     566     552     569    1648
              575    1641     570    1647     565     553
              568    1648     574    1642     569    1647
              575    1641     570    1647     575    1641
              571     548     573     546     565     554
              567     551     571    1619     592     553
              568     551     571    1645     566    1650
              572     546     575     544     567     552
              569     550     572    1644     567     552
              570     548     573    1644     567    1649
              573     546     575    1641     571    1662
              570   38139    9014    2219     569

          name KEY_LEFT
             9042    4441     569     550     571    1645
              567    1650     572    1661     554     549
              573    1646     573    1645     569    1652
              572    1645     569    1648     569    1639
              570     549     576     544     565     553
              568     550     571    1645     566    1649
              573     546     575     544     567    1649
              573     546     565     553     569     550
              571     548     573    1643     569     550
              571     548     574    1641     571    1645
              566     554     568    1647     574    1659
              573   38044    9037    2221     566

          name KEY_RIGHT
             9045    4444     564     551     568    1646
              573    1648     565    1652     571     544
              576    1645     566    1646     576    1641
              570    1647     575    1642     570    1647
              575     544     567     552     569     550
              571     548     574    1643     568     551
              571    1646     565    1651     571     549
              573     546     575     544     567     552
              569     550     571    1645     567     552
              569     550     572    1644     567    1650
              572     547     574    1643     569    1663
              569   38131    9021    2214     573
                
          name KEY_MENU
             9042    4437     572     547     575    1641
              570    1646     566    1651     571     548
              573    1642     570    1647     565    1651
              571    1645     567    1650     572    1645
              566     553     569     550     571     547
              574     545     566    1651     571    1645
              567    1649     573     546     565     553
              568     551     572     546     574     545
              566     552     569    1646     568     551
              568     551     571    1644     567    1648
              574     545     566    1650     572    1660
              573   38088    9014    2220     568

      end raw_codes

end remote

Here is my lircrc file

begin
prog = irexec
button = KEY_PLAY
config = /usr/local/bin/volumio toggle
end
begin
prog = irexec
button = KEY_ENTER
config = /usr/local/bin/volumio volume toggle
end
begin
prog = irexec
button = KEY_UP
config = /usr/local/bin/volumio volume plus
end
begin
prog = irexec
button = KEY_DOWN
config = /usr/local/bin/volumio volume minus
end
begin
prog = irexec
button = KEY_LEFT
config = /usr/local/bin/volumio previous
end
begin
prog = irexec
button = KEY_RIGHT
config = /usr/local/bin/volumio next
end
begin
prog = irexec
button = KEY_MENU
config = /usr/local/bin/volumio toggle
end

But like all good things, its still not totally done…

Pressing the menu button on the remote does the same thing as the play/pause button… but they both register as their own buttons when pressed.

Isnt the menu supposed to take me to the top level menu in the OS?