Compare commits
49 Commits
v2.2.20
...
6b6c066a9b
Author | SHA1 | Date | |
---|---|---|---|
6b6c066a9b | |||
530fc01d57 | |||
7d7cbef4ed | |||
8b9bbd4f98 | |||
2a06821252 | |||
9868f74a86 | |||
d2e93a6d5a | |||
c27d51534c | |||
5bfd1c49d9 | |||
0f1af75a9e | |||
70a402f096 | |||
245fc455e1 | |||
1683fab2d4 | |||
33763032c6 | |||
2afb98f9b9 | |||
38091aacd1 | |||
30dd03cbea | |||
43e3fcb237 | |||
5f611555e3 | |||
a3fa194cdd | |||
baa48a79a4 | |||
2601a42643 | |||
cfd8ff9ea1 | |||
be3352e462 | |||
fb5087803b | |||
e3b9f512b9 | |||
99b46338ca | |||
a78a1a986d | |||
62df910faa | |||
f96c557a22 | |||
4eeb71e8bc | |||
eeea03d2df | |||
2e8acfff0b | |||
c29f48a282 | |||
185a7bbc91 | |||
0a2f755324 | |||
b6ecd73be9 | |||
4e666112b5 | |||
394c038e5c | |||
e96fb55f90 | |||
a330aec9d7 | |||
fc08db02eb | |||
f8b12ba1a7 | |||
908773420b | |||
cef2455448 | |||
e237018aad | |||
c7f7066b31 | |||
363e862244 | |||
8659585952 |
1202
CHANGELOG.md
1202
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1097
FHEM/59_Weather.pm
1097
FHEM/59_Weather.pm
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
UPD 2023-01-07_13:28:16 57768 FHEM/59_Weather.pm
|
||||
UPD 2023-01-07_13:28:44 49884 lib/FHEM/APIs/Weather/DarkSkyAPI.pm
|
||||
UPD 2023-01-07_13:28:59 33258 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
|
||||
UPD 2023-01-07_13:29:12 36090 lib/FHEM/APIs/Weather/wundergroundAPI.pm
|
||||
UPD 2023-01-29_16:14:48 25809 FHEM/59_Weather.pm
|
||||
UPD 2023-06-06_07:31:00 34254 lib/FHEM/Core/Weather.pm
|
||||
UPD 2023-01-29_16:14:48 50106 lib/FHEM/APIs/Weather/DarkSkyAPI.pm
|
||||
UPD 2023-07-11_14:08:00 33779 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
|
||||
UPD 2023-06-02_05:03:58 36607 lib/FHEM/APIs/Weather/wundergroundAPI.pm
|
||||
|
@ -5,6 +5,7 @@ use POSIX qw(strftime);
|
||||
use strict;
|
||||
|
||||
my @filenames = ( 'FHEM/59_Weather.pm',
|
||||
'lib/FHEM/Core/Weather.pm',
|
||||
'lib/FHEM/APIs/Weather/DarkSkyAPI.pm',
|
||||
'lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm',
|
||||
'lib/FHEM/APIs/Weather/wundergroundAPI.pm',
|
||||
|
@ -699,7 +699,7 @@ sub _CallWeatherCallbackFn {
|
||||
my $self = shift;
|
||||
|
||||
# ## Aufruf der callbackFn
|
||||
return ::Weather_RetrieveCallbackFn( $self->{devName} );
|
||||
return FHEM::Core::Weather::RetrieveCallbackFn( $self->{devName} );
|
||||
}
|
||||
|
||||
sub _ErrorHandling {
|
||||
@ -709,8 +709,7 @@ sub _ErrorHandling {
|
||||
my $err = shift;
|
||||
|
||||
$self->{cached}->{current_date_time} =
|
||||
__strftimeWrapper( "%a, %e %b %Y %H:%M",
|
||||
localtime( $self->{fetchTime} ) );
|
||||
_strftimeWrapper( "%a, %e %b %Y %H:%M", localtime( $self->{fetchTime} ) );
|
||||
$self->{cached}->{status} = $err;
|
||||
$self->{cached}->{validity} = 'stale';
|
||||
|
||||
@ -726,9 +725,9 @@ sub _CreateForecastRef {
|
||||
{
|
||||
lat => $self->{lat},
|
||||
long => $self->{long},
|
||||
apiMaintainer => 'Marko Oldenburg ('
|
||||
. $META->{x_fhem_maintainer}[0] . ')',
|
||||
apiVersion => version->parse( __PACKAGE__->VERSION() )->normal,
|
||||
apiMaintainer => $META->{author}[0],
|
||||
apiVersion => version->parse( __PACKAGE__->VERSION() )->normal . '-'
|
||||
. $META->{release_status},
|
||||
}
|
||||
);
|
||||
|
||||
@ -773,12 +772,19 @@ sub _strftimeWrapper {
|
||||
"abstract": "Wetter API für Weather DarkSky"
|
||||
}
|
||||
},
|
||||
"version": "v1.2.10",
|
||||
"keywords": [
|
||||
"fhem-mod-device",
|
||||
"Weather",
|
||||
"API"
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v1.2.12",
|
||||
"author": [
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
"x_fhem_maintainer": [
|
||||
"CoolTux"
|
||||
"<a href=https://forum.fhem.de/index.php?action=profile;u=13684>CoolTux</a>"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"CoolTuxNet"
|
||||
@ -786,8 +792,9 @@ sub _strftimeWrapper {
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
"FHEM": 5.00918799,
|
||||
"HttpUtils": 5.023,
|
||||
"FHEM::Meta": 0,
|
||||
"HttpUtils": 0,
|
||||
"strict": 0,
|
||||
"warnings": 0,
|
||||
"constant": 0,
|
||||
|
@ -591,6 +591,7 @@ sub _FillSelfHashWithWeatherResponseForWeatherCurrent {
|
||||
'wind_direction' => $data->{wind}->{deg},
|
||||
'cloudCover' => $data->{clouds}->{all},
|
||||
'code' => $codes{ $data->{weather}->[0]->{id} },
|
||||
'owmAPICode' => $data->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{weather}->[0]->{icon},
|
||||
'sunsetTime' => _strftimeWrapper(
|
||||
"%a, %e %b %Y %H:%M",
|
||||
@ -670,6 +671,7 @@ sub _FillSelfHashWithWeatherResponseForForecastHourly {
|
||||
),
|
||||
'cloudCover' => $data->{list}->[$i]->{clouds}->{all},
|
||||
'code' => $codes{ $data->{list}->[$i]->{weather}->[0]->{id} },
|
||||
'owmAPICode' => $data->{list}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{list}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
$data->{list}->[$i]->{rain}->{'1h'}
|
||||
@ -688,7 +690,7 @@ sub _FillSelfHashWithWeatherResponseForForecastHourly {
|
||||
),
|
||||
'snow3h' => (
|
||||
$data->{list}->[$i]->{snow}->{'3h'}
|
||||
? $data->{list}->[$i]->{snow}->{'1h'}
|
||||
? $data->{list}->[$i]->{snow}->{'3h'}
|
||||
: 0
|
||||
),
|
||||
}
|
||||
@ -732,6 +734,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallCurrent {
|
||||
'rain_1h' => ( $data->{rain}->{'1h'} ? $data->{rain}->{'1h'} : 0 ),
|
||||
'cloudCover' => $data->{current}->{clouds},
|
||||
'code' => $codes{ $data->{current}->{weather}->[0]->{id} },
|
||||
'owmAPICode' => $data->{current}->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{current}->{weather}->[0]->{icon},
|
||||
'condition' =>
|
||||
encode_utf8( $data->{current}->{weather}->[0]->{description} ),
|
||||
@ -788,6 +791,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
|
||||
'moonset' => strftime(
|
||||
"%a, %H:%M", localtime( $data->{daily}->[$i]->{moonset} )
|
||||
),
|
||||
'summary' => $data->{daily}->[$i]->{summary},
|
||||
'temperature' =>
|
||||
int( sprintf( "%.0f", $data->{daily}->[$i]->{temp}->{day} ) ),
|
||||
'temperature_morn' => int(
|
||||
@ -833,6 +837,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
|
||||
$data->{daily}->[$i]->{weather}->[0]->{description}
|
||||
),
|
||||
'code' => $codes{ $data->{daily}->[$i]->{weather}->[0]->{id} },
|
||||
'owmAPICode' => $data->{daily}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{daily}->[$i]->{weather}->[0]->{icon},
|
||||
'pressure' => int(
|
||||
sprintf( "%.1f", $data->{daily}->[$i]->{pressure} ) + 0.5
|
||||
@ -853,7 +858,6 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
|
||||
sprintf( "%.1f", ( $data->{daily}->[$i]->{wind_deg} ) )
|
||||
),
|
||||
'cloudCover' => $data->{daily}->[$i]->{clouds},
|
||||
'code' => $codes{ $data->{daily}->[$i]->{weather}->[0]->{id} },
|
||||
'rain' => (
|
||||
$data->{daily}->[$i]->{rain} ? $data->{daily}->[$i]->{rain}
|
||||
: 0
|
||||
@ -920,6 +924,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallHourly {
|
||||
'wind_direction' => $data->{hourly}->[$i]->{wind_deg},
|
||||
'cloudCover' => $data->{hourly}->[$i]->{clouds},
|
||||
'code' => $codes{ $data->{hourly}->[$i]->{weather}->[0]->{id} },
|
||||
'owmAPICode' => $data->{hourly}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{hourly}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
$data->{hourly}->[$i]->{rain}->{'1h'}
|
||||
@ -951,7 +956,7 @@ sub _CallWeatherCallbackFn {
|
||||
|
||||
# print 'Dumperausgabe: ' . Dumper $self;
|
||||
### Aufruf der callbackFn
|
||||
return ::Weather_RetrieveCallbackFn( $self->{devName} );
|
||||
return FHEM::Core::Weather::RetrieveCallbackFn( $self->{devName} );
|
||||
}
|
||||
|
||||
sub _ErrorHandling {
|
||||
@ -977,9 +982,9 @@ sub _CreateForecastRef {
|
||||
{
|
||||
lat => $self->{lat},
|
||||
long => $self->{long},
|
||||
apiMaintainer => 'Marko Oldenburg ('
|
||||
. $META->{x_fhem_maintainer}[0] . ')',
|
||||
apiVersion => version->parse( __PACKAGE__->VERSION() )->normal,
|
||||
apiMaintainer => $META->{author}[0],
|
||||
apiVersion => version->parse( __PACKAGE__->VERSION() )->normal . '-'
|
||||
. $META->{release_status},
|
||||
}
|
||||
);
|
||||
|
||||
@ -1024,7 +1029,14 @@ sub _strftimeWrapper {
|
||||
"abstract": "Wetter API für OpenWeatherMap"
|
||||
}
|
||||
},
|
||||
"version": "v3.2.5",
|
||||
"keywords": [
|
||||
"fhem-mod-device",
|
||||
"Weather",
|
||||
"API"
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v3.2.7",
|
||||
"author": [
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
@ -1037,8 +1049,9 @@ sub _strftimeWrapper {
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
"FHEM": 5.00918799,
|
||||
"HttpUtils": 5.023,
|
||||
"FHEM::Meta": 0,
|
||||
"HttpUtils": 0,
|
||||
"strict": 0,
|
||||
"warnings": 0,
|
||||
"constant": 0,
|
||||
|
@ -542,6 +542,16 @@ sub _ProcessingRetrieveData {
|
||||
)
|
||||
)
|
||||
),
|
||||
'temperature' => int(
|
||||
sprintf(
|
||||
"%.1f",
|
||||
(
|
||||
$data->{temperatureMax}[$i]
|
||||
? $data->{temperatureMax}[$i]
|
||||
: 0
|
||||
)
|
||||
) + 0.5
|
||||
),
|
||||
'low_c' => int(
|
||||
sprintf( "%.1f",
|
||||
$data->{temperatureMin}[$i] ) + 0.5
|
||||
@ -733,7 +743,7 @@ sub _CallWeatherCallbackFn {
|
||||
my $self = shift;
|
||||
|
||||
# ## Aufruf der callbackFn
|
||||
return ::Weather_RetrieveCallbackFn( $self->{devName} );
|
||||
return FHEM::Core::Weather::RetrieveCallbackFn( $self->{devName} );
|
||||
}
|
||||
|
||||
sub _ErrorHandling {
|
||||
|
1153
lib/FHEM/Core/Weather.pm
Normal file
1153
lib/FHEM/Core/Weather.pm
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user