/tvctl

A solution which allows you to rule your PC/laptop/mediabox/other by any IR remote control.

Primary LanguageC++

What?

A solution which allows you to rule your PC/laptop/mediabox/other by any IR remote control. It consists of two parts:

  1. 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.

  2. tvctl - A daemon which receives key codes from Arduino and emulates keyboard actions according to a config file.

Requirements

For running:

For building:

Prepare hardware

  1. Attach IR sensor (HX1838/TL1838/VS1838) to Arduino Nano:

    • Output to D2;
    • GND to GND;
    • Vcc to +5V;
  2. Connect Arduino to a PC;

  3. Build and flash the firwmare:

    just flash

Prepare software

  1. Build and install tvctl daemon:

    just install $DESTDIR
    

    Where $DESTDIR is the destination directory.

  2. Copy config template:

    cp /usr/share/tvctl/example.conf ~/.config/tvctl.conf

  3. Enable the daemon:

    systemctl --user enable tvctl.service

Configure

  1. Open the config ~/.config/tvctl.conf in your favorite editor. Setup port acquired by Arduino and save the config.

  2. Start the daemon in a debug mode:

    tvctl -debug

  3. Edit the config pressing buttons on a remote control and mapping them to keyboard shortcuts.

  4. Start the daemon in background mode:

    systemctl --user start tvctl.service

License

GPL.