Ubuntu HD VDR mittels Xine und VDPAU - IRTrans Infrared Control System
Inhaltsverzeichnis |
Vorwort
In meinem verwendeten Gehäuse ist bereits ein Infrarot Empfänger verbaut. Dieser kann mit der irtrans Software eingerichtet und verwendet werden.
Installationsdateien herunterladen
cd /data/installfiles/ mkdir irtrans cd irtrans/ wget http://www.irtrans.de/download/Server/Linux/irserver.tar.gz
IRTrans Installieren
cd /tmp mkdir irtrans cd irtrans/ tar -xzf /data/installfiles/irtrans/irserver.tar.gz
sudo su -
cd /tmp/irtrans/ ./install.sh
exit
IRTrans Server starten und Verbindungstest durchführen
cd /usr/local/irtrans/ sudo ./irserver64 -loglevel 4 -debug_code /dev/ttyUSB0
Nach dem starten des IRTrans Servers kann mittels drücken einer beliebigen Taste auf der Fernbedienung der Infrarotempfang getestet werden.
Beispiel:
Init Server Socket done
Init Events done
Opening Device: /dev/ttyUSB0
IRTRans Send Done: 1
Name :
Version: D5.08.10
FW SNo : 14035
Capab : Power On;
FW Cap : 0x3c8019
USB SNo:
Node : /dev/ttyUSB0
Init communication ...
IRServer Version 6.02.23
[ 0]: D5.08.10 SN: 14035
Chdir to DB OK
Read routing OK
Read Switches OK
Open DIR: 12
Get Dirent: 512
**** CCF Error: ac1 [See below for Remote name]
Remote ccf compiled: 20 Timings - 20 Commands
Remote compiled: 0 Timings - 0 Commands
Remote dream compiled: 0 Timings - 36 Commands
Remote irtrans compiled: 1 Timings - 33 Commands
Remote kathrein-ufs compiled: 2 Timings - 36 Commands
Remote mce-keyboard compiled: 1 Timings - 77 Commands
Remote mce-mouse compiled: 1 Timings - 1 Commands
Remote mediacenter compiled: 1 Timings - 49 Commands
Remote pace compiled: 2 Timings - 38 Commands
Remote sky-digital compiled: 1 Timings - 31 Commands
Remote sky-hd compiled: 1 Timings - 34 Commands
Remote ttbudget compiled: 1 Timings - 33 Commands
Get Dirent: 0
Duplicate Commands for ccf.1: ccf.2 ccf.3 ccf.4
Duplicate Commands for ccf.2: ccf.3 ccf.4
Duplicate Commands for ccf.3: ccf.4
Duplicate Commands for pace.0: pace.0-
Total: 12 Remotes - 31 Timings - 388 Commands - 0 Calib. Commands
0 Togglec. - 19 CCF Data - 0 CCF RAW - 1 CCF Error
IRTRans Send Done: 1
IRTRans Send Done: 1
[0.0] up ttbudget
[0.0] ok ttbudget
[0.0] down ttbudget
IRTrans Server als Daemon starten
cd /usr/local/irtrans/ sudo ./irserver64 -daemon -logfile /usr/local/irtrans/irserver.log /dev/ttyUSB0
IRTrans Client starten und Konfigurationsdatei (rem) für die Fernbedienung erstellen
IRTrans Client starten
cd /usr/local/irtrans/ sudo ./irclient64 localhost
Konfigurationsdatei für Fernbedienung erstellen
Hier wird eine passende Konfigurationsdatei für eure Fernbedienung erstellt. Falls Ihr ebenfalls wie ich eine Logitech Harmony 885 verwendet könnt Ihr einfach die untige Konfiguration kopieren.
- Learn
1 - Send 2 - Learn 3 - Status 99 - Exit Select command 2
- Select remote
Hier wird ein Name für die Konfigurationsdatei vergeben.
Selected Remote: [] 1 - Select remote 2 - Learn Timing 3 - Learn Command [Based on timing] 4 - Learn Command [Command with timing] 5 - Learn Command [RAW Data] 99 - Exit Select command 1 Enter Remote Name: harmony885
- Learn Command [Command with timing]
Hier werden die einzelnen Tasten der Fernbedienung angelernt. Es wird erst der Name der Taste festgelegt und danach wird man aufgefordert die Taste auf der Fernbedienung zu drücken. Einfach alle Tasten der Fernbedienung wie im untigen Beispiel durchgehen.
Selected Remote: [harmony885] 1 - Select remote 2 - Learn Timing 3 - Learn Command [Based on timing] 4 - Learn Command [Command with timing] 5 - Learn Command [RAW Data] 99 - Exit Select command 4 Command Name: Power Press Remote Button to learn ....OK
harmony885.rem Konfigurationsdatei
Die Datei wird erstellt und automatisch unter folgendem Verzeichnis abgelegt:
/usr/local/irtrans/remotes/harmony885.rem
[REMOTE] [NAME]harmony885 [TIMING] [0][N]0[RC]2[RP]87[FREQ]36[RC5] [COMMANDS] [Power][T]0[D]11000000111110 [Mute][T]0[D]11011110000000 [Prev][T]0[D]11000000000101 [Volume+][T]0[D]11000000000001 [Volume-][T]0[D]11000000000010 [Channel+][T]0[D]11000000000100 [Channel-][T]0[D]11000000000011 [Red][T]0[D]11000000100011 [Green][T]0[D]11000000100100 [Yellow][T]0[D]11000000100101 [Blue][T]0[D]11000000100110 [Up][T]0[D]11000000000110 [Down][T]0[D]11000000000111 [Left][T]0[D]11000000001000 [Right][T]0[D]11000000001001 [OK][T]0[D]11000000001010 [Menu][T]0[D]11000000001011 [Exit][T]0[D]11000000001100 [Guide][T]0[D]11000000001101 [Info][T]0[D]11000000001110 [Stop][T]0[D]11000000001111 [Replay][T]0[D]11000000010000 [Skip][T]0[D]11000000010001 [Play][T]0[D]11000000010010 [Rec][T]0[D]11000000010011 [Rew][T]0[D]11000000010100 [Fwd][T]0[D]11000000010101 [Pause][T]0[D]11000000010110 [1][T]0[D]11000000010111 [2][T]0[D]11000000011000 [3][T]0[D]11000000011001 [4][T]0[D]11000000011010 [5][T]0[D]11000000011011 [6][T]0[D]11000000011100 [7][T]0[D]11000000011101 [8][T]0[D]11000000011110 [9][T]0[D]11000000011111 [0][T]0[D]11000000100001 [Clear][T]0[D]11000000100000 [Enter][T]0[D]11000000100010
VDR remote.conf erweitern
Hier werden den VDR-LIRC Kommandos die Tasten aus der obigen Konfigurationsdatei zugeordnet. Achtung! Die Namen sind Case Sensitive.
cd /etc/vdr vi remote.conf
LIRC.Up up LIRC.Down down LIRC.Menu menu LIRC.Ok ok LIRC.Back exit LIRC.Left left LIRC.Right right LIRC.Red red LIRC.Green green LIRC.Yellow yellow LIRC.Blue blue LIRC.0 0 LIRC.1 1 LIRC.2 2 LIRC.3 3 LIRC.4 4 LIRC.5 5 LIRC.6 6 LIRC.7 7 LIRC.8 8 LIRC.9 9 LIRC.Info info LIRC.Play play LIRC.Pause pause LIRC.Stop stop LIRC.Record rec LIRC.FastFwd fwd LIRC.FastRew rew LIRC.Next skip LIRC.Prev replay LIRC.Power power LIRC.Channel+ channel+ LIRC.Channel- channel- LIRC.Volume+ volume+ LIRC.Volume- volume- LIRC.Mute mute
IRTRans in den Autostart
Skript erstellen
cd /etc/init.d/ sudo vi irtrans
#! /bin/sh
### BEGIN INIT INFO
# Provides: irserver
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: IRTrans Infrared Control
# Description: Starts the IRTrans Infrared Control Server.
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="IRTrans Infrared Control Server"
NAME=irserver
SCRIPTNAME=/etc/init.d/$NAME
d_start() {
sudo /usr/local/irtrans/irserver64 -daemon -logfile /var/log/irserver.log /dev/ttyUSB0
}
d_stop() {
killall irserver64
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop}" >&2
exit 1
;;
esac
exit 0
Skript ausführbar machen
cd /etc/init.d sudo chmod +x irtrans
IRTrans in den Autostart aufnehmen
sudo update-rc.d irtrans defaults
IRTrans aus dem Autostart entfernen
sudo update-rc.d -f irtrans remove
IRTrans als root starten
Damit der vdruser das Skript ausführen kann benötigt dieser root Rechte. Achtung! Der untiger Eintrag muss als letzte Zeile hinzugefügt werden.
sudo visudo vdruser ALL=(ALL) NOPASSWD: /usr/local/irtrans/irserver64
System neu starten
Nach dem Neustart sollte der VDR sich mittels Fernbedienung steuern lassen.
sudo init 6