fix room and remoteServer Attribut
This commit is contained in:
parent
f8f74eabe1
commit
4ce293d0fc
@ -74,7 +74,7 @@ eval "use Encode qw(encode encode_utf8);1" or $missingModul .= "Encode ";
|
|||||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||||
|
|
||||||
|
|
||||||
my $modulversion = "4.1.99.1";
|
my $modulversion = "4.1.99.3";
|
||||||
my $flowsetversion = "4.0.11";
|
my $flowsetversion = "4.0.11";
|
||||||
|
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ sub AMADCommBridge_Define($$) {
|
|||||||
$hash->{VERSIONFLOWSET} = $flowsetversion;
|
$hash->{VERSIONFLOWSET} = $flowsetversion;
|
||||||
|
|
||||||
|
|
||||||
$attr{$name}{room} = "AMAD" if( !defined( $attr{$name}{room} ) );
|
CommandAttr(undef,"$name room AMAD") if(AttrVal($name,'room','none') eq 'none');
|
||||||
|
|
||||||
Log3 $name, 3, "AMADCommBridge ($name) - defined AMADCommBridge with Socketport $port";
|
Log3 $name, 3, "AMADCommBridge ($name) - defined AMADCommBridge with Socketport $port";
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ eval "use Encode qw(encode encode_utf8);1" or $missingModul .= "Encode ";
|
|||||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||||
|
|
||||||
|
|
||||||
my $modulversion = "4.1.99.1";
|
my $modulversion = "4.1.99.3";
|
||||||
my $flowsetversion = "4.0.11";
|
my $flowsetversion = "4.0.11";
|
||||||
|
|
||||||
|
|
||||||
@ -139,19 +139,19 @@ sub AMADDevice_Define($$) {
|
|||||||
my $iodev;
|
my $iodev;
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
|
|
||||||
|
######## Kann in kommenden Versionen gelöscht werden ###############
|
||||||
|
#foreach my $param ( @a ) {
|
||||||
|
# if( $param =~ m/IODev=([^\s]*)/ ) {
|
||||||
|
|
||||||
foreach my $param ( @a ) {
|
# $iodev = $1;
|
||||||
if( $param =~ m/IODev=([^\s]*)/ ) {
|
# splice( @a, $i, 3 );
|
||||||
|
# last;
|
||||||
|
# }
|
||||||
|
|
||||||
$iodev = $1;
|
# $i++;
|
||||||
splice( @a, $i, 4 );
|
#}
|
||||||
last;
|
|
||||||
}
|
|
||||||
|
|
||||||
$i++;
|
return "too few parameters: define <name> AMADDevice <HOST-IP> <amad_id> <remoteServer>" if( @a != 5 );
|
||||||
}
|
|
||||||
|
|
||||||
return "too few parameters: define <name> AMADDevice <HOST-IP> <amad_id> <remoteServer>" if( @a != 4 );
|
|
||||||
return "Cannot define a AMAD device. Perl modul $missingModul is missing." if ( $missingModul );
|
return "Cannot define a AMAD device. Perl modul $missingModul is missing." if ( $missingModul );
|
||||||
|
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ sub AMADDevice_Define($$) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CommandAttr(undef,$name . "room AMAD") if(AttrVal($name,'room','none') eq 'none';
|
CommandAttr(undef,"$name room AMAD") if(AttrVal($name,'room','none') eq 'none');
|
||||||
CommandAttr(undef,$name . "remoteServer $remoteServer") if(AttrVal($name,'remoteServer','none') eq 'none';
|
CommandAttr(undef,"$name remoteServer $remoteServer") if(AttrVal($name,'remoteServer','none') eq 'none');
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
readingsBulkUpdateIfChanged( $hash, "state", "initialized",1);
|
readingsBulkUpdateIfChanged( $hash, "state", "initialized",1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user