diff --git a/fhem/FHEM/59_OPENWEATHER.pm b/fhem/FHEM/59_OPENWEATHER.pm index 59cf5b0fd..e38ffe6d4 100644 --- a/fhem/FHEM/59_OPENWEATHER.pm +++ b/fhem/FHEM/59_OPENWEATHER.pm @@ -234,7 +234,7 @@ OPENWEATHER_Set($$@) my ($hash, $name, $cmd, $val) = @_; my $resultStr = ""; - if($cmd eq 'update') + if(lc $cmd eq 'update') { $hash->{LOCAL} = 1; OPENWEATHER_Start($hash); @@ -254,7 +254,7 @@ OPENWEATHER_Get($@) my $result; my $message; - if ($cmd eq "apiResponse") + if (lc $cmd eq "apiresponse") { my $time = gettimeofday(); $result = OPENWEATHER_Run $name; @@ -276,20 +276,6 @@ OPENWEATHER_Get($@) return $message; } - # elsif ($cmd eq "jsonAnalysis") { - # my $time = gettimeofday(); - # $hash->{fhem}{jsonInterpreter} = ""; - # $result = OPENWEATHER_Run $name; - # my @a = split /\|/, $result; - # if ($a[1]==0) { return $a[2]; } - - # $result = OPENWEATHER_Done $result; - # my @a = split /\|/, $result; - # $time = gettimeofday() - $time; - # $message = sprintf( "Runtime: %.2f s\n_________________\n\n", $time); - # $message .= decode_base64($result); #$a[2]); - # return $message; - # } my $list = "apiResponse:noArg"; return "Unknown argument $cmd, choose one of $list"; @@ -432,7 +418,7 @@ OPENWEATHER_UpdateAborted($)
It requires a registration on this website to obtain the necessary parameters.
- It requires the perl moduls HTTP::Request, LWP::UserAgent, HTML::Parse and Digest::MD5. + It uses the perl moduls HTTP::Request, LWP::UserAgent, HTML::Parse and Digest::MD5.

Define @@ -440,26 +426,28 @@ OPENWEATHER_UpdateAborted($)
define <name> OPENWEATHER <project> <cityCode> <apiKey>
- Example: define wetter OPENWEATHER beispielprojekt DE0001020 3c551bc20819c19ee88c9ec94280a61d -
  - To obtain the below parameter a requistration of a personal project is necessary on www.wetter.com. + Example:
+ define wetter OPENWEATHER projectx DE0001020 3c551bc20819c19ee88d +

+ To obtain the below parameter you have to create a new project on www.wetter.com. +

  • <project>
    - Name of the users 'openweather' project (create with a user account on the website). + Name of the 'openweather' project (create with a user account on wetter.com).

  • <cityCode>
    - Code of the location for which the forecast is requested. Can be obtained from the URL of the weather forecast page of the concerned city. + Code of the location for which the forecast is requested. + The code is part of the URL of the weather forecast page. For example DE0009042 in:
    - For example DE0009042 from http://www.wetter.com/wetter_aktuell/aktuelles_wetter/deutschland/rostock/DE0009042.html + http://www.wetter.com/wetter_aktuell/aktuelles_wetter/deutschland/rostock/DE0009042.html

  • <apiKey>
    - Secret key the can be obtain after the users 'openweather' project is created on the web site. + Secret key that is provided when the user creates a 'openweather' project on wetter.com.

  • -
    Set @@ -475,7 +463,7 @@ OPENWEATHER_UpdateAborted($) Get