add change remoteServer with port
This commit is contained in:
parent
9050157edd
commit
d2873d1418
@ -74,7 +74,7 @@ eval "use Encode qw(encode encode_utf8);1" or $missingModul .= "Encode ";
|
||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||
|
||||
|
||||
my $modulversion = "4.1.99.23";
|
||||
my $modulversion = "4.1.99.24";
|
||||
my $flowsetversion = "4.1.99.3";
|
||||
|
||||
|
||||
@ -277,7 +277,7 @@ sub AMADCommBridge_Write($@) {
|
||||
|
||||
|
||||
my $logtext = "AMADCommBridge ($name) - Send with remoteServer: $remoteServer URL: $param->{url}, HEADER: $param->{header}, METHOD: $method";
|
||||
$logtext .= ", DATA: $param->{data}" if( $remoteServer ne 'Automagic';
|
||||
$logtext .= ", DATA: $param->{data}" if( $remoteServer ne 'Automagic' );
|
||||
Log3 $name, 5, "$logtext";
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ eval "use Encode qw(encode encode_utf8);1" or $missingModul .= "Encode ";
|
||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||
|
||||
|
||||
my $modulversion = "4.1.99.25";
|
||||
my $modulversion = "4.1.99.27";
|
||||
my $flowsetversion = "4.1.99.3";
|
||||
|
||||
|
||||
@ -233,7 +233,28 @@ sub AMADDevice_Attr(@) {
|
||||
|
||||
my $orig = $attrVal;
|
||||
|
||||
if( $attrName eq "disable" ) {
|
||||
if( $attrName eq "remoteServer" ) {
|
||||
if( $cmd eq "set" ) {
|
||||
if( $attrVal eq "Automagic" ) {
|
||||
$hash->{PORT} = 8090;
|
||||
Log3 $name, 3, "AMADDevice ($name) - set remoteServer to Automagic";
|
||||
|
||||
} elsif( $attrVal eq "Autoremote" ) {
|
||||
$hash->{PORT} = 1817;
|
||||
Log3 $name, 3, "AMADDevice ($name) - set remoteServer to Autoremote";
|
||||
|
||||
} elsif( $attrVal eq "TNES" ) {
|
||||
$hash->{PORT} = 8765;
|
||||
Log3 $name, 3, "AMADDevice ($name) - set remoteServer to TNES";
|
||||
|
||||
} elsif( $attrVal eq "other" ) {
|
||||
$hash->{PORT} = 1111;
|
||||
Log3 $name, 3, "AMADDevice ($name) - set remoteServer to other";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elsif( $attrName eq "disable" ) {
|
||||
if( $cmd eq "set" ) {
|
||||
if( $attrVal eq "0" ) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user