From ebcf52843bf619862e6d0455f16e1a4acab5ed7b Mon Sep 17 00:00:00 2001 From: igami Date: Thu, 13 Apr 2017 03:29:18 +0000 Subject: [PATCH] 59_LuftdatenInfo: changed request URL to prevent forwarding git-svn-id: https://svn.fhem.de/fhem/trunk@13981 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_LuftdatenInfo.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/59_LuftdatenInfo.pm b/fhem/FHEM/59_LuftdatenInfo.pm index 4507819ba..2afc4edc5 100644 --- a/fhem/FHEM/59_LuftdatenInfo.pm +++ b/fhem/FHEM/59_LuftdatenInfo.pm @@ -195,7 +195,7 @@ sub LuftdatenInfo_GetHttpResponse($$) { if($connection eq "remote"){ my $param = { - url => "http://api.luftdaten.info/v1/sensor/$id", + url => "http://api.luftdaten.info/v1/sensor/$id/", timeout => $timeout, hash => $hash, method => "GET", @@ -301,7 +301,9 @@ sub LuftdatenInfo_ParseHttpResponse($) { } } - readingsBulkUpdateIfChanged($hash, "latitude", $latitude); readingsBulkUpdateIfChanged($hash, "longitude", $longitude); readingsBulkUpdate($hash, "state", "active"); + readingsBulkUpdateIfChanged($hash, "latitude", $latitude); + readingsBulkUpdateIfChanged($hash, "longitude", $longitude); + readingsBulkUpdate($hash, "state", "active"); readingsEndUpdate($hash, 1); my $SENSORID2 = InternalVal($SELF, "SENSORID2", undef); @@ -369,7 +371,7 @@ sub LuftdatenInfo_ParseHttpResponse($) { readingsBulkUpdate($hash, "signal", $1); } } - + readingsBulkUpdate($hash, "state", "active"); readingsEndUpdate($hash, 1); } @@ -420,9 +422,12 @@ sub LuftdatenInfo_statusRequest($) { (en | de)