[PLUGIN] IR Remote Controller feedback thread

Today I used irrecord to generate an own configfile.
First attempt failed:
irrecord detects the “gap” and then collects data.
But the alignment to a button is not possible (after 30 trials irrecord gives up):

Something went wrong: Cannot decode data
Too many errors.
Or try using the -f option.
Unrecoverable error: Cannot decode data

Giving up

Then tried with “-f” option - this created a weird config file (which works partly) and is really different than the default file for Apple Remote.


# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.10.1(default) on Fri Feb 14 13:36:29 2025
# Command line used: -f -d /dev/lirc0 korell_remote_control.conf
# Kernel version (uname -r): 6.6.62-v7l+
#
# Remote name (as of config file): korellapple
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  korellapple
  flags RAW_CODES|CONST_LENGTH
  eps            30
  aeps          100

  gap          108009

      begin raw_codes

          name KEY_RIGHT
             9087    4447     579     542     579    1646
              577    1646     605    1617     579     543
              575    1649     574    1650     576    1645
              575    1648     571    1653     573    1650
              572     549     574     550     571     549
              572     550     571    1652     568    1654
              568    1655     566    1657     565     555
              563     558     564     558     535     584
              563     559     536     587     556     565
              559     564     531    1692     530     589
              534     589     531     590     531    1709
              529

          name KEY_LEFT
             9085    4447     583     540     579    1643
              583    1641     580    1643     582     540
              583    1642     583    1640     576    1647
              579    1644     580    1643     578    1645
              578     544     576     544     575     546
              576     545     571    1653     573     549
              565     558     567     554     570    1652
              567     554     567     554     566     556
              566     555     564     557     564     558
              538     583     564    1659     560     563
              560     560     536     587     560    1677
              559

          name KEY_PLAY
             9094    4442     586     535     587    1638
              582    1640     586     209     189     152
              196     889     584     538     585    1639
              583    1641     584    1640     582    1642
              577    1647     584    1639     585     538
              582     539     578     544     581     541
              575    1648     578     544     578    1647
              575    1646     575    1649     576    1647
              573     549     569    1655     571     550
              566     556     569     553     568     553
              568    1657     562     560     562     559
              566     555     563    1678     560

          name KEY_MENU
             9091    4449     581     540     586    1636
              585    1638     584    1640     583     538
              581    1641     583    1638     582    1640
              585    1638     580    1639     581    1641
              580     541     576     544     579     542
              582     538     580    1643     575     544
              582    1638     584     538     585     535
              582     539     578     544     577     542
              578     543     576     543     578     543
              577     544     576    1644     576     546
              578     544     578     544     576    1660
              576

          name KEY_DOWN
             9083    4450     583     537     581    1643
              581    1642     581    1643     578     544
              555    1668     580    1644     581    1642
              580    1643     583    1641     581    1644
              578     542     610     512     586     537
              579     543     578    1646     577    1646
              575     547     611    1613     579    1645
              575     546     578     544     581     541
              580     543     580     542     577     544
              581     542     577    1647     573     549
              575     546     576     546     575    1664
              572

          name KEY_UP
             9094    4438     589     531     592    1632
              591    1632     591    1634     589     532
              593    1631     589    1637     590    1632
              590    1634     618    1606     591    1635
              585     535     593     528     594     529
              590     531     589    1634     591    1634
              592    1633     592     530     591    1633
              589     531     593     530     591     530
              591     531     590     533     588     531
              588     534     589    1635     588     534
              589     533     590     531     587    1654
              586

      end raw_codes

end remote

Created a new directory in the user config directory and selected this as config in module.
Works “OK”.
Some inconsistancies when pressing buttons and menu triggers stop/start and stop/start triggers nothing.
At least I will try to change the raw blocks so that start/stop will work.
Warm regards,
Ralf

Nope, doesn’t work as expected.
Obviously it is no exact science to catch these IR codes…
So switching home with play/pause didn’t change anything.
It seems, play/pause button is not catched correctly.
Have just tried to record a new config but this went even worse, so I stay with the given config and given constraints therein.
Thanks so far for feedback.
Warm regards,
Ralf

Recording the IR signals and creating a new profile is exactly what I would have recommended. Too bad that the self-recorded file does not work (completely).

1 Like

You could try just recording the signal of a single (not yet working) key and then modify the previously recorded file with the code for the newly recorded key.

1 Like

Which steps did you follow, not want to be a smart ass, but just checking. As I did do a record yesterday for a crappy Chinese remote, which didn’t run into errors.

These 2 commands shouldn’t be necessary, but better safe then sorry:

sudo apt-get update && sudo apt-get install lirc
sudo service lirc stop
cd ~

Get the available buttons/key names:
irrecord --list-namespace

Check if the remote commands are received
sudo mode2 -d /dev/lirc0

Start recording:
irrecord -d /dev/lirc0 /home/volumio/appleA1294.conf

1 Like

Dear @gvolt , Yes - this is a nice idea - thanks for this!
Will eventually do this next weekend.
Tomorrow a BT device will arrive - will give this a try.
(The Apple Remote REALLY looks nice and smart - but the sensor hast to be visible to it - disadvantage because the pi in his final destination will be enclosed in a wardrobe.
I can imagine that BT will pass this and would be nicer.
(First try of pairing Amazon Fire Remote via BT failed as well, because I am not able to get a device dirver installed. BT remote IS connected, but I cannot find the device.
(Hope that this disappears with a BT device with an USB dongle).

Thanks anyway for your good idea and your effort.
Ralf

For BT, look at my post here:

1 Like

Dear @Wheaten , thanks for this.
indeed I have NOT done the apt-get update but the system seems to be at an actual state:

volumio@volumio:~$ sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [54.2 kB]
Hit:3 https://deb.nodesource.com/node_14.x buster InRelease
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [400 kB]
Fetched 469 kB in 1s (390 kB/s)
Reading package lists... Done
volumio@volumio:~$

same for installing latest lirc:

volumio@volumio:~$ sudo apt-get install lirc
Reading package lists... Done
Building dependency tree
Reading state information... Done
lirc is already the newest version (0.10.1-6.3~deb10u1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Really interesting - because you’ve advised this explicitely - I’ve defintively tried to stop the lirc service (as per somewhere found working instruction as well as you here).
But the service cannot be stopped:

sudo service lirc stop
Failed to stop lirc.service: Unit lirc.service not loaded.

so this is the only “difference” I’ve found - but for the recording the correct environment is present - lirc service is not running anyway…

As I wrote in my beginning post,

sudo mode2 -d /dev/lirc0

is advertising a LOT of stuff …

Thanks a lot for your thoughts and you effort!

Regards,
Ralf

Yes, found this post already, thanks - was base of my idea to use BT instead of IR.
Ralf

1 Like