Ubuntu VDR DVB-S2 mittels Xine und VDPAU - IRTrans Infrared Control System

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(IRTrans Server starten und Verbindungstest durchführen)
(IRTrans Server starten und Verbindungstest durchführen)
Zeile 19: Zeile 19:
  
 
'''Beispiel:'''
 
'''Beispiel:'''
 +
Init Server Socket done
 +
Init Events done
 +
Opening Device: /dev/ttyUSB0
 
  IRTRans Send Done: 1
 
  IRTRans Send Done: 1
 
  Name  :  
 
  Name  :  
Zeile 24: Zeile 27:
 
  FW SNo : 14035
 
  FW SNo : 14035
 
  Capab  : Power On;  
 
  Capab  : Power On;  
  FW Cap : 3964953
+
  FW Cap : 0x3c8019
 
  USB SNo:  
 
  USB SNo:  
  Node  : /dev/ttyUSB0  
+
  Node  : /dev/ttyUSB0
 
   
 
   
  IRServer Version 5.9.07
+
Init communication ...
 +
  IRServer Version 6.02.23
 
  [ 0]:                      D5.08.10    SN: 14035
 
  [ 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 ccf                  compiled:    20 Timings -    20 Commands
  Remote dbox2                compiled:    1 Timings -     26 Commands
+
  Remote                     compiled:    0 Timings -     0 Commands
 
  Remote dream                compiled:    0 Timings -    36 Commands
 
  Remote dream                compiled:    0 Timings -    36 Commands
 
  Remote irtrans              compiled:    1 Timings -    33 Commands
 
  Remote irtrans              compiled:    1 Timings -    33 Commands
  Remote mce-keyboard        compiled:    1 Timings -    76 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 mce-mouse            compiled:    1 Timings -      1 Commands
 
  Remote mediacenter          compiled:    1 Timings -    49 Commands
 
  Remote mediacenter          compiled:    1 Timings -    49 Commands
 
  Remote pace                compiled:    2 Timings -    38 Commands
 
  Remote pace                compiled:    2 Timings -    38 Commands
 
  Remote sky-digital          compiled:    1 Timings -    31 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.1:  ccf.2  ccf.3  ccf.4
 
  Duplicate Commands for 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 ccf.3:  ccf.4
 
  Duplicate Commands for pace.0:  pace.0-
 
  Duplicate Commands for pace.0:  pace.0-
  Total:   9 Remotes  -  28 Timings -  310 Commands -    0 Calib. Commands
+
  Total: 12 Remotes  -  31 Timings -  388 Commands -    0 Calib. Commands
        19 CCF Data -  0 CCF RAW -    0 CCF Error
+
          0 Togglec. -  19 CCF Data -  0 CCF RAW -    1 CCF Error
 
  IRTRans Send Done: 1
 
  IRTRans Send Done: 1
 
  IRTRans Send Done: 1
 
  IRTRans Send Done: 1
+
  [0.0] up ttbudget
+
  [0.0] ok ttbudget
  [0.0]: 11010101000011 14
+
  [0.0] down ttbudget
  [0.0]: 11010101000100 14
+
 
  [0.0]: 11010101000101 14
+
  
 
====IRTrans Server als Daemon starten====
 
====IRTrans Server als Daemon starten====

Version vom 2. September 2009, 21:22 Uhr

Inhaltsverzeichnis

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
./install.sh

IRTrans Server starten und Verbindungstest durchführen

cd /usr/local/irtrans/
./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/
./irserver -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/
./irclient localhost

Konfigurationsdatei für Fernbedienung erstellen

Hier wird eine passende Konfigurationsdatei für eure Fernbedienung erstellt. Falls Ihr ebenfalls die Standard Technotrend Fernbedienung 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. Ich verwende die Standard Technotrend Budget Fernbedienung.

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: ttbudget
  • 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: [ttbudget]

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
ttbudget.rem Konfigurationsdatei

Die Datei wird erstellt und automatisch unter folgendem Verzeichnis abgelegt:

/usr/local/irtrans/remotes/ttbudget.rem
[REMOTE]
 [NAME]ttbudget

[TIMING]
 [0][N]0[RC]2[RP]87[FREQ]36[RC5]

[COMMANDS]
 [Power][T]0[D]11010101000001
 [Mute][T]0[D]11010101011000
 [1][T]0[D]11010101000011
 [2][T]0[D]11010101000100
 [3][T]0[D]11010101000101
 [4][T]0[D]11010101000110
 [5][T]0[D]11010101000111
 [6][T]0[D]11010101001000
 [7][T]0[D]11010101001001
 [8][T]0[D]11010101001010
 [9][T]0[D]11010101001011
 [0][T]0[D]11010101001100
 [Volume-][T]0[D]11010101100110
 [Volume+][T]0[D]11010101100101
 [Menu][T]0[D]11010101011001
 [Channel-][T]0[D]11010101100100
 [Channel+][T]0[D]11010101100011
 [Back][T]0[D]11010101010011
 [Red][T]0[D]11010101010100
 [Green][T]0[D]11010101010101
 [Yellow][T]0[D]11010101010110
 [Blue][T]0[D]11010101010111
 [Record][T]0[D]11010101111010
 [Play][T]0[D]11010101111011
 [Info][T]0[D]11010101010010
 [FastRew][T]0[D]11010101111101
 [Pause][T]0[D]11010101111110
 [FastFwd][T]0[D]11010101111111
 [Up][T]0[D]11010101001101
 [Down][T]0[D]11010101010001
 [Left][T]0[D]11010101001110
 [Right][T]0[D]11010101010000
 [Ok][T]0[D]11010101001111

VDR remote.conf anlegen

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      back
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.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/
vi irtrans
#!/bin/sh
### BEGIN INIT INFO
# Provides:          irtrans
# Required-Start:    $ehd
# Required-Stop:     $ehd
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Description:       Start, Stop or Restart the IRTrans Server
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
. /etc/rc.status

# Reset status of this service
rc_reset

# 
case "$1" in
    start)
        echo -n "Starting IRTrans Server "
        cd /usr/local/irtrans/
        ./irserver -daemon -logfile /usr/local/irtrans/irserver.log /dev/ttyUSB0 

        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down IRTRans Server "
        killall irserver64

        # Remember status and be verbose
        rc_status -v
        ;;
    restart)
        echo -n "Restart IRTrans Server "
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac
rc_exit

Skript ausführbar machen

cd /etc/init.d
chmod +x irtrans

IRTrans in den Autostart aufnehmen

chkconfig irtrans 35

System neu starten

Nach dem Neustart sollte der VDR sich mittels Fernbedienung steuern lassen.

init 6

Links

  1. IRTrans Homepage