change from GET to POST

This commit is contained in:
Marko Oldenburg 2017-12-15 12:10:02 +01:00
parent 5a69a54059
commit 7d3873d0b2
2 changed files with 6 additions and 3 deletions

View File

@ -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.13";
my $modulversion = "4.1.99.15";
my $flowsetversion = "4.0.11";

View File

@ -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.13";
my $modulversion = "4.1.99.15";
my $flowsetversion = "4.0.11";
@ -363,7 +363,10 @@ sub AMADDevice_statusRequest($) {
my $bport = $hash->{IODev}->{PORT};
$header .= "\r\nfhemip: $fhemip\r\nfhemdevice: $name\r\nactivetask: $activetask\r\napssid: $apssid\r\nbport: $bport\r\nuserflowstate: $userFlowState\r\namadid: $amad_id\r\nfhemctlmode: $fhemCtlMode";
$method = "GET";
$method = "GET" AttrVal($name,'remoteServer','Automagic') eq 'Automagic';
$method = "POST" AttrVal($name,'remoteServer','Automagic') ne 'Automagic';
$path ="/fhem-amad/deviceInfo/"; # Pfad muß so im Automagic als http request Trigger drin stehen
readingsSingleUpdate( $hash, "lastSetCommand", $path, 1 );