A solution which allows you to rule your PC/laptop/mediabox/other by any IR remote control. It consists of two parts:
-
Arduino Nano with an IR sensor. It reads key codes from a remote control and sends them to a PC which Arduino is connected to.
-
tvctl
- A daemon which receives key codes from Arduino and emulates keyboard actions according to a config file.
For running:
For building:
- Go >= 1.19;
- just;
- PlatformIO;
-
Attach IR sensor (HX1838/TL1838/VS1838) to Arduino Nano:
- Output to D2;
- GND to GND;
- Vcc to +5V;
-
Connect Arduino to a PC;
-
Build and flash the firwmare:
just flash
-
Build and install
tvctl
daemon:just install $DESTDIR
Where
$DESTDIR
is the destination directory. -
Copy config template:
cp /usr/share/tvctl/example.conf ~/.config/tvctl.conf
-
Enable the daemon:
systemctl --user enable tvctl.service
-
Open the config
~/.config/tvctl.conf
in your favorite editor. Setup port acquired by Arduino and save the config. -
Start the daemon in a debug mode:
tvctl -debug
-
Edit the config pressing buttons on a remote control and mapping them to keyboard shortcuts.
-
Start the daemon in background mode:
systemctl --user start tvctl.service
GPL.