Apple White Remote (A1156) lircd.conf file

Here’s a copy of the contents of a lircd.conf file that I created for the older white Apple TV remotes:

# 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 Thu May 21 20:03:05 2015

#
# contributed by ENT
#
# brand: Apple TV White Remote A1156
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

  name  Apple TV White Remote A1156
  flags RAW_CODES|CONST_LENGTH
  eps            30
  aeps          100

  gap          108679

      begin raw_codes

          name KEY_UP
             9096    4507     594     570     624    1664
              624    1665     598    1692     595     571
              623    1666     628    1663     625    1661
              604    1688     621    1669     619    1671
              621     541     599     570     621     542
              602     568     620    1680     619    1666
              626    1664     598     571     620    1672
              621     540     598     574     619     543
              625     543     596    1695     621    1666
              626     541     623    1669     619     543
              604    1695     591     569     626     538
              602

          name KEY_DOWN
             9074    4534     620     540     601    1690
              627    1662     601    1695     621     544
              595    1696     592    1696     595    1695
              595    1694     596    1698     598    1691
              597     569     625     539     602     568
              594     572     621    1675     625    1665
              598     568     596    1696     593    1694
              598     570     623     541     628     540
              596     574     619    1671     621    1669
              620     542     626    1667     597     571
              595    1696     619     546     598     572
              620

          name KEY_LEFT
             9104    4506     623     545     593    1694
              602    1688     602    1691     597     570
              620    1665     625    1665     625    1671
              619    1670     621    1667     622    1670
              623     542     628     543     624     539
              623     540     628    1673     624     545
              598     570     621     541     627    1664
              625     544     624     544     598     569
              621     543     628    1664     625    1666
              624     543     627    1667     622     541
              602    1690     624     545     619     549
              620

          name KEY_RIGHT
             9074    4533     593     571     593    1697
              595    1694     596    1695     593     570
              594    1697     594    1696     596    1695
              596    1698     625    1664     590    1691
              596     575     593     575     593     570
              594     576     622    1675     597    1689
              593    1697     593    1697     619     546
              596     570     594     574     594     570
              595     572     623    1669     596    1695
              619     544     594    1697     621     545
              598    1697     592     569     595     578
              592

          name KEY_OK
             9088    4518     625     541     600    1692
              598    1693     621    1669     621     541
              625    1667     598    1692     595    1694
              622    1669     619    1671     620    1669
              623     540     625     545     598     566
              624     544     624    1677     622     543
              627     539     625    1662     600     564
              627     540     628     544     621     540
              625     545     624    1666     620    1668
              623     541     626    1667     624     541
              627    1665     626     541     599     570
              595

          name KEY_BACK
             9111    4508     613     540     601    1691
              620    1672     620    1669     620     546
              597    1690     597    1694     625    1663
              600    1692     598    1692     621    1669
              621     541     602     568     620     545
              631     538     619    1675     626     541
              626    1668     619     542     634     540
              593     576     622     536     604     564
              624     541     624    1664     600    1692
              596     571     623    1664     624     545
              598    1693     619     547     624     545
              624

      end raw_codes

end remote

Create a file called /etc/lirc/apple-white-A1156-lircd.conf and then copy the contents above into it. When you run the OSMC config app to chose a remote, the new file will be listed.

Cheers,
Ian

This will vary because AppleTV remotes don’t have a fixed configuration. In fact I think you can hold two buttons to change the key so that multiple ones do not overlap in the same household, so this configuration is probably only useful to you.

Sam

It looks like you’re right Sam. How did you manage to get past this limitation with Crystalbuntu?

CB doesn’t use LIRC, but rather atvclient. atvclient is specifically purpose built for the Apple TV integrated IR receiver, whereas LIRC simply is a socket based listener that will (attempt) to listen to any connected peripherals.

S

It this the same case for the silver remote?

I’ve noted that the Apple Silver remote conf file in OSMC contains multiple remote entries.

Cheers,
Ian

Yes, it is the same case. I think multiple entries is to ‘cover all basis’, but I don’t know to what extent this is successful. I only have the original AppleTV remote

Sam

I’ve been able to confirm that adding multiple “White” remote entries in a single config file results in the Vero supporting all of the remotes. It seems that every one of my white remotes has a different set of codes so it’s not perfect but it works.

Cheers,
Ian

I think there are 256 different possibilities for each apple remote so they will never all be covered in the conf files, the existing entries should be used as an example/guide to learning your individual apple remote

@Karnage can a note be added to the remote module for these remotes??

Hi Ian,

As @Dilligaf says, there are 256 different prefixes for Apple remotes to allow a mac to identify one remote from another and “pair” to that remote, hence most Apple remotes have different codes. It’s possible to change the code of a remote by holding down Play and Right (from memory) but as there are 256 possible combinations you could be there a while. :smile:

I don’t suppose you could upload your lirc file which you have created with multiple apple remote entries in it ? You could do this with:

paste-log filename.conf

I’m researching the possibility of tweaking the lirc profile for the Apple remote to ignore the prefix bits - thus supporting all Apple remotes from one profile. In theory it should be possible if the lirc configuration file format is flexible enough.

Unfortunately I only have one apple remote (the old white kind) and I haven’t seen it since before we moved house recently… :slight_smile:

Ok, my file has been uploaded:

http://paste.osmc.io/ovijahepus

It contains config info for 4 white remotes. I can add another if I can find it.

Cheers,
Ian

One thing I should mention is that the remote behaves a little differently on OSMC than CrystalBuntu. The IR driver in CB had the ability to detect “long presses” of the Ok and Back buttons but LIRC doesn’t, or at least I haven’t found a way to get it to do that yet.

Yes, long presses are not supported at the moment, but it’s something we hope to add at a later date.

I think I’ve figured out how to get one profile working with all Apple remotes thanks to discovering an undocumented feature in the lircd.conf file format. Can you give this file a try with your different remotes please ?

http://paste.osmc.io/viboyoxafo

You could download the raw version of the file directly to your Pi using:

wget http://paste.osmc.io/raw/viboyoxafo

Then select it as a custom remote profile. Do you have only the white remotes or do you have a silver one you can test as well ? I found my white remote and tested it on this file successfully even after changing the identifier code of the remote. (holding menu+Play/pause for 5 seconds)

I don’t have a silver remote so I’m not 100% sure of the mapping of the OK/Play buttons. (Anyone else able to test a silver remote ?)

Assuming this works OK for you it will be included in a future update.

Excellent work. I can confirm that this new config works with all 5 of my white remotes. I’m afraid that I don’t have a silver remote to test it with though.

Cheers,
Ian

Thanks for confirming that. :smile:

The secret sauce is the ignore_mask line - this undocumented option allows you to specify certain bits of the remote code to be ignored when matching the codes in the list.

Thus we tell it to ignore those bits that are unique to individual remotes, whilst still matching against the bits that are the same for all remotes and represent the button codes.

I also don’t have access to a silver remote to test with, but as you’ll see I have included the two codes which I think are the OK button (which sends a different code to the center button on the white remote) and the extra Play button.

So I believe this one conf file will be universal for all white and silver Apple remotes. (If anyone has a silver remote, please test this conf file and let me know if the central select/ok button and the play button work)

I’ll include this universal Apple remote conf file in the next update to the remotes package, which should be before the final 1.0 release.

I also spent a fair bit of time yesterday investigating ways to add long press support but unfortunately it looks like it is not possible with the current remote infrastructure we have in OSMC - at least not without some very ugly hacks that may cause problems for other remotes.

So while I would still like to implement this at some point long press support will have to go on the back burner for now.

I think that’s more than fair. Thanks!

Just following up on this…

I purchased a number of new Apple “Silver” remotes and they all work with the config file! The extra button should help me to make use of OSMC without having to worry about long press support.

Cheers,
Ian

I should clarify that I can only confirm that button presses on each of the new remotes are acknowledged by the Vero. I have yet to confirm that the button assignments are going to work.

Thanks for testing the silver remote - I don’t have one to test with so had to work blind so to speak, by finding the two button codes for the centre and play buttons online and merging it with my existing file.

In the end I realised that I can’t make a single profile that does both white and silver remotes but I think that’s an acceptable compromise if they support ALL silver and white apple remotes.

Regarding button assignments the intention is the centre button should act as an OK button and the play button should act as a play/pause button - can you confirm this ?

Hi,
Could you paste config file. I have the same problem with white remote. It doesn work on lirc config.