Documentation

How does Irreco control things?

Irreco has a backend plugin system which allows Irreco to support several different device control systems. Currently Irreco supports:

The specific way a certain control system works depends on the system, but because N800 or N810 does not have IR LEDs, in practice all systems must connect to some external device using WLAN.

Also note that even though Irreco is mainly developed for IR device control, nothing in Irreco design reguires that the backend must handle IR devices, it is possible to write backends for all kinds of services and applications. MythTV is a good example of this.

Irreco themes

Generally irreco buttons and background-images are inside themes. Theme consist at least one button. Background-image is optional. Installed themes can be found on /usr/lib/irreco/themes. Or if you are creating your own theme, you can just create irreco/theme_name folder on a memory card and Irreco will read your theme from there, when prorgram is starting. The folder name is case sensitive, so make sure it is in lower case.

Theme hierarchy is following:

theme_name/theme.conf
theme_name/bg/bg_name/bg.conf
theme_name/bg/bg_name/image.png
theme_name/buttons/button_name/button.conf
theme_name/buttons/button_name/unpressed.png
theme_name/buttons/button_name/pressed.png

You can download the complete theme example from here.

A theme.conf file basically just defines name of the theme, and a source field

Fields

FieldRequired Explanation
nameYes Name of theme
sourceYes Must be user.
authorNoTheme author name
preview-buttonNoPreview button name.
commentNoTheme comments.
(Preview button and comments can be set when uploading.)

Example

Here is the theme.conf example.

[theme]
name=Example theme
source=user
author=Juan Bablo Hoses
preview-button=Black Round
comment=This is my first theme and it shows

Theme backgrounds

Irreco uses backgrounds from themes. Background-image width is 800 pixels and height is 480 pixels

A bg.conf file defines name of the image, and the image file

FieldRequired Explanation
nameYes Name of background-image, which is shown in background-dialog
imageYes image filename

Example

Here is the bg.conf example

[theme-bg]
name=Example image
image=image.png

Theme buttons

All Irreco button styles consist of normal *.png (although they can also be in jpg or gif format) images stored on your internet tablet. Basically you should have two images, UP image and DOWN image. Up image is being displayed when the button is in its default state. Down image will be displayer while the user presses the button.

Button styles used by Irreco are defined in button.conf configuration files. There is one button.conf file for each style and each style is in own folder.

A button.conf file basically just defines name of the button style, and the image files to use when displaying the button.

Fields

FieldRequired Explanation
nameYes Name of button, which is shown in Stylebrowser-dialog
upYes Up image filename
downNo Down image filename
allow-textNo If this is set to false, Irreco will not draw text ontop of the button images.
text-format-upNo Text format when displaying the Up image. %s is replaced with button name.
text-format-downNo Text format when displaying the Down image. %s is replaced with button name.
text-paddingNo Space between text and image borders.
text-h-alignNo Horizontal text position in button
text-v-alignNo Vertical text position in button

Example

Here is the button.conf example

[theme-button]
up=unpressed.png
down=pressed.png
name=Example Button
allow-text=true
text-format-up=<span foreground="black">%s</span>
text-format-down=<span foreground="grey">%s</span>
text-padding=5
text-h-align=0.5
text-v-align=0.3

LIRC

LIRC - Linux Infrared Remote Control, is a system for controlling IR transceivers with a Linux PC. Irreco can use the LIRC daemon, lircd, to control consumer electronics. These instructions tell you how to setup LIRC for use with Irreco in Ubuntu Linux. These instructions will probably work with other Linux distributions, but the location and names of configuration files may be different.

Basic installation

  1. Install LIRC to your PC:
    sudo apt-get install lirc
  2. APT will ask you what kind of IR transceiver you have. Select the correct type, or select None if you cant find the right one.
  3. Open hardware.conf for editing:
    sudo nano /etc/lirc/hardware.conf
  4. Add listen option LIRCD_ARGS variable inside hardware.conf so lircd daemon will listen for network connections.
    # Arguments which will be used when launching lircd
    LIRCD_ARGS="--listen"

Custom LIRC driver setup

  1. See list of drivers from LIRC website and check if your transceiver is supported.
  2. Check what drivers are currently installed to you PC.
    lircd --driver=help
  3. Open hardware.conf for editing:
    sudo nano /etc/lirc/hardware.conf
  4. Add driver name to DRIVER variable inside hardware.conf so LIRC knows what driver to use. For example if you want to use the driver logitech:
    DRIVER="logitech"

Recording and installing IR codes

  1. Get your remote.
  2. Run irrecord command in terminal. irrecord will ask you several questions about your remote.
    irrecord my-remote.conf
  3. Install your configuration file so that lircd daemon will use it.
    sudo cp -v my-remote.conf /etc/lirc/lircd.conf
  4. Restart lircd daemon so it will read your configuration file.
    sudo /etc/init.d/lirc restart

IRTrans

Checklist

  • First of all, please make sure you have installed the IRTrans package. After that Irreco should be able to use IRTrans Transceivers.
  • Make sure that your N800 / N810 is connected to the same network as IRTrans Transceiver. If possible connect IRTrans Transceiver directly to your WLAN base station.
  • If IRTrans Transceiver is not directly connected to your WLAN base station you should make sure that NAT is disabled in your WLAN base station.
  • Take a look at IRTrans homepage and read their documentation.

Adding IRTrans Transceiver to Irreco

  1. Select: New remote or Edit remote
  2. Select: Device Controllers
  3. Select: New
  4. Select: IRTrans Transceiver
  5. A list of IRTrans Transceiver currently present on the network should be found in the Module IP-address combobox. Select the correct one.
  6. Select: OK and OK
  7. You can now teach new devices in the Devices menu.

Manually detecting IRTrans Transceiver IP Address

  1. Open the X-terminal of your N800 device.
  2. Type the following command to the terminal: irserver -deviceinfo
  3. This should give you a list of all IRTrans devices on the network.
  4. When you're aware of IRTrans module's IP-address, you can configure it, for example by internet-browser. Usually login is admin and password is IRTrans.

Telnet backend

With telnet backend user can use Irreco for controlling mediaplayers and other software that can be controlled via telnet. Telnet backend comes with default telnet commands for MPD, Foobar, MythTV, VLC and Winamp.

Telnet backend is compatible with following telnet plugins:

Foobar2000 - foo_controlserver
Winamp - Yann's telnetd winamp plugin
MPD has a native telnet support
MythTV has a native telnet support
VLC Start VLC in commandline for example with:

vlc -I rc --rc-host :4443 --extraintf wx

Checklist

  • Make sure you have installed telnet backend to irreco. Irreco meta package contains it automatically.
  • Make sure you can connect directly to computer running program you want to control. Easiest way to achieve this is to be at same subnet, e.g. same WLAN base station.
  • If computer is not directly connected to your WLAN base station, you should make sure that NAT is disabled in your WLAN base station. You can also do this with correct port forwarding.

Adding Telnet controller to Irreco

  1. Select: New remote or Edit remote
  2. Select: Device Controllers
  3. Select: New
  4. Select: Telnet
  5. Select: OK
  6. Type: Host (Put your computer IP here.)
  7. Choose: Port (Put here the port number that your program uses e.g. "3333")
  8. Choose: Type (e.g. "Foobar")
  9. Select: OK and OK
  10. You can now create buttons in the New button menu.

Commandline Backend

Irreco commandline backend allows running commandline commands and shellscripts from Irreco. With commandline backend user can launch web browser from Irreco for example to see the tv schedule.

Web Browser backend

With Web Browser backend user can launch web browser from Irreco. It supports wget-feature also.