2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

88_xs1Bridge.pm: small fix

git-svn-id: https://svn.fhem.de/fhem/trunk@16189 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
HomeAuto_User 2018-02-15 21:04:57 +00:00
parent 6b4edc5c8d
commit 2b6db22379

View File

@ -64,12 +64,15 @@ sub xs1Bridge_Define($$) {
return "Your IP is not valid. Please Check!" if not($arg[2] =~ /[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/s);
return "Cannot define xs1Bridge device. Perl modul ${missingModul}is missing." if ( $missingModul );
my $xs1check;
my $p = Net::Ping->new("tcp", 2);
if(!($p->ping("$arg[2]", 2))) {
return "Your IP is not reachable. Please Check!";
$xs1check = 1 ;
}
$p->close();
return "Your IP is not reachable. Please Check!" if ($xs1check == 1);
# Parameter Define
my $xs1_ip = $arg[2]; ## Zusatzparameter 1 bei Define - ggf. nur in Sub
$hash->{xs1_ip} = $xs1_ip;