multi-room-hifi/build2_picoreplayer/lirc_apple_remote
Jeremy Kidwell b9d17b6712 added files
2022-10-01 13:43:36 +01:00
..
.lircrc-A1156 added files 2022-10-01 13:43:36 +01:00
.lircrc-A1294 added files 2022-10-01 13:43:36 +01:00
lircd.conf-A1156 added files 2022-10-01 13:43:36 +01:00
lircd.conf-A1294 added files 2022-10-01 13:43:36 +01:00
README.md added files 2022-10-01 13:43:36 +01:00

Note: I've taken this, with thanks from @hartzell. All notes below are theirs:

Setup

This describes getting a silver apple remote (A1294) working with a headless piCorePlayer. It requires v5.0.0, which includes fixes for how squeezelite is called so that it finds the ~tc/.lircrc file.

I'm using it with an IQaudio DAC+ with a 3-pin header soldered into the appropriate holes.

LIRC has a git repository, lirc git repo, but unfortunately its web-based git browser isn't working. If you clone the repo, you'll find a configuration document that's interesting reading.

The LIRC project web site includes a database of lircd.conf files for various remotes that includes entries for the silver and white apple remotes. BUT, they're for an older version of LIRC and don't work with the piCorePlayer version. I found functional versions on the net for the A1294 and the [A1156][lirc-1156] (*untested).

Squeezelite uses the lirc_client API to interact with LIRC. It compares events that it receives with a set of cmds from the "squeezeplayer" remote and then from a table populated from a .lircrc file. When piCorePlayer has LIRC installed and you've uploaded a custom lircrc file, squeezeplayer is run with the -i /home/tc/.lircrc option.

Debugging

  1. use sudo mode2 -d /dev/lirc0 to see the raw events coming from LIRC. This is the lowest-ish level and will confirm that you have the kernel bits in place and the hardware wired up correctly.
  2. use irw to dump the higher level events (e.g. KEY_OK), which confirms that you have a lircd.conf file that works for your device.
  3. enable ir debug (or sdebug?) output in the piCorePlayer squeezelite page and watch the log file (e.g. ssh into the pi at tc and tail -f /var/log/pcp_squeezelite.log) to see what squeezelite is doing with the events.