ITach

Aus FHEMWiki
Version vom 8. Juli 2013, 09:41 Uhr von Rince (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== iTach == BenWend hat [http://forum.fhem.de/index.php?t=msg&goto=82502&rid=1421&srch=itach#msg_82502 im Forum] den Code gepostet, wie man iTach Devices steue…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

iTach

BenWend hat im Forum den Code gepostet, wie man iTach Devices steuern kann.

iTach sind LAN / IR Gateways, man kann also über das Netzwerk Infrarotbefehle schicken.


Der Code

itach.pl

use IO::Socket::INET;

my ($socket,$client_socket);
$socket = new IO::Socket::INET (
    PeerHost => '192.168.178.51',
    PeerPort => '4998',
    Proto => 'tcp',
) or die "ERROR in Socket Creation : $!\n";

# send itach command
$data = $ARGV[0]."\r\n";
$socket->send($data);
sleep (1);

$socket->close();

fhem.cfg

#---- itach ATV Schlafzimmer
define ATVSZ dummy
attr ATVSZ room itach
attr ATVSZ setList up down left right play menu select
attr ATVSZ webCmd up:down:left:right:play:menu:select

define ATVSZ_up notify ATVSZ:up.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,38000,1,1,348,171,21,22,21,64,21,64,21,64,21,22,21,64,21,64,21,64,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,64,21,64,21,64,21,22,21,64,21,22,21,22,21,22,21,22,21,22,21,64,21,22,21,64,21,22,21,64,21,22,21,64,21,1467,347,86,21,760");;}

define ATVSZ_down notify ATVSZ:down.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,39000,1,1,348,172,21,22,21,63,21,63,21,63,21,22,21,63,21,63,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,63,21,63,21,22,21,63,21,63,21,22,21,22,21,22,21,22,21,22,21,63,21,22,21,63,21,22,21,63,21,22,21,63,21,1472,347,86,21,780");;}

define ATVSZ_left notify ATVSZ:left.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,39000,1,1,341,173,21,22,21,65,21,65,21,65,21,22,21,65,21,65,21,65,21,65,21,65,21,65,21,22,21,22,21,22,21,22,21,65,21,22,21,22,21,22,21,65,21,22,21,22,21,22,21,22,21,22,21,65,21,22,21,65,21,22,21,65,21,22,21,65,21,1562,347,86,21,780");;}

define ATVSZ_right notify ATVSZ:right.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,39000,1,1,348,172,21,22,21,63,21,63,21,63,21,22,21,63,21,63,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,22,21,22,21,63,21,22,21,63,21,22,21,63,21,22,21,63,21,1472,347,87,21,780");;}

define ATVSZ_play notify ATVSZ:play.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,38000,1,1,348,171,21,22,21,64,21,64,21,64,21,22,21,64,21,64,21,64,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,64,21,22,21,64,21,64,21,64,21,64,21,22,21,64,21,22,21,22,21,64,21,22,21,64,21,22,21,64,21,22,21,64,21,760");;}

define ATVSZ_menu notify ATVSZ:menu.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,39000,1,1,348,172,21,22,21,63,21,63,21,63,21,22,21,63,21,63,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,63,21,22,21,63,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,63,21,22,21,63,21,22,21,63,21,22,21,63,21,1559,347,86,21,780");;}

define ATVSZ_select notify ATVSZ:select.* {system("perl /opt/fhem/FHEM/itach.pl sendir,1:2,1,39000,1,1,348,172,21,22,21,63,21,63,21,63,21,22,21,63,21,63,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,63,21,63,21,22,21,63,21,63,21,63,21,22,21,63,21,22,21,22,21,63,21,22,21,63,21,22,21,63,21,22,21,63,21,1391,348,172,21,22,21,63,21,63,21,63,21,22,21,63,21,63,21,63,21,63,21,63,21,63,21,22,21,22,21,22,21,22,21,63,21,22,21,22,21,63,21,22,21,22,21,22,21,22,21,22,21,22,21,63,21,22,21,63,21,22,21,63,21,22,21,63,21,780");;}


Links

BenWends Code für die Steuerung

Hersteller