habs nun zum laufen gebracht use IO::LCDproc;
use IO::Socket;
use strict;
&usage if (! $ARGV[0]);
my $client = IO::LCDproc::Client->new(host => "localhost", name => "MYNAME", port => "13666");
my $screen = IO::LCDproc::Screen->new(name => "screen");
my $title = IO::LCDproc::Widget->new( name => "date", type => "string");
my $first = IO::LCDproc::Widget->new(
name => "first", align => "center", type => "string", xPos => 1, yPos => 1
);
my $second = IO::LCDproc::Widget->new(
name => "second", align => "center", type => "string", xPos => 1, yPos => 2
);
my $third = IO::LCDproc::Widget->new(
name => "third", align => "center", type => "string", xPos => 1, yPos => 4
);
$client->add ( $screen );
$screen->add ( $title, $first, $second, $third);
$client->connect() or die "Cannot Connect: $!";
$client->initialize();
#$title->set( data => "$ARGV[1]" );
$first->set( data => "$ARGV[0]");
$second->set( data => "$ARGV[1]" );
#$third->set( data => "$ARGV[5]" );
sleep 5;
exit 1;
sub usage {
print <<USAGE;
LCDproc Client for Splunk
Mark Cohen
Usage: ./splunk2lcd2.pl ARGV0 ARGV1 ARGV2
USAGE
exit 1;
}
Wenn ich es nun von der command line mit "perl fhem2lcdd.pl "eins und" zwei" starte zeigt es zentriert:
eins und
zwei
Aber leider zus. in der ersten Zeile den Heartbeat habe schon einiges Versucht ich verstehe nicht wo und wie ich die "Option" heartbeat => 0 in das Skript einbauen muss.
Den Einbau in die 99_MyUtils.pm schaue ich mir erstmal im Wiki an.
Noch mal vielen Dank Klaus