Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
c6b6a12e47 | |||
b57f538bc3 | |||
464ba0bec3 | |||
2b96be4e6e | |||
d07297bcd8 | |||
af786290bc | |||
478c4a3159 | |||
6a38b446a9 | |||
00c0a2a87e | |||
0a47226436 | |||
e9fb9357a9 | |||
ce875a8beb | |||
d0157fb2c7 | |||
eb134a19e9 | |||
cfd255569f | |||
b1de4b52da | |||
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 |
1289
CHANGELOG.md
1289
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1100
FHEM/59_Weather.pm
1100
FHEM/59_Weather.pm
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
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 2025-02-04_20:57:25 25848 FHEM/59_Weather.pm
|
||||
UPD 2025-02-04_20:58:03 34419 lib/FHEM/Core/Weather.pm
|
||||
UPD 2025-02-04_20:58:29 33780 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
|
||||
UPD 2025-02-04_20:57:50 38751 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',
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
#
|
||||
# Developed with VSCodium and richterger perl plugin
|
||||
#
|
||||
# (c) 2019-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# (c) 2019-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# All rights reserved
|
||||
#
|
||||
# Special thanks goes to:
|
||||
@ -423,7 +423,7 @@ sub _ProcessingRetrieveData {
|
||||
_ErrorHandling( $self,
|
||||
'OpenWeatherMap Weather decode JSON err ' . $@ );
|
||||
}
|
||||
elsif (defined( $data->{cod} )
|
||||
elsif ( defined( $data->{cod} )
|
||||
&& $data->{cod}
|
||||
&& $data->{cod} != 200
|
||||
&& defined( $data->{message} )
|
||||
@ -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,8 +671,9 @@ sub _FillSelfHashWithWeatherResponseForForecastHourly {
|
||||
),
|
||||
'cloudCover' => $data->{list}->[$i]->{clouds}->{all},
|
||||
'code' => $codes{ $data->{list}->[$i]->{weather}->[0]->{id} },
|
||||
'iconAPI' => $data->{list}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
'owmAPICode' => $data->{list}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{list}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
$data->{list}->[$i]->{rain}->{'1h'}
|
||||
? $data->{list}->[$i]->{rain}->{'1h'}
|
||||
: 0
|
||||
@ -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,8 +837,9 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
|
||||
$data->{daily}->[$i]->{weather}->[0]->{description}
|
||||
),
|
||||
'code' => $codes{ $data->{daily}->[$i]->{weather}->[0]->{id} },
|
||||
'iconAPI' => $data->{daily}->[$i]->{weather}->[0]->{icon},
|
||||
'pressure' => int(
|
||||
'owmAPICode' => $data->{daily}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{daily}->[$i]->{weather}->[0]->{icon},
|
||||
'pressure' => int(
|
||||
sprintf( "%.1f", $data->{daily}->[$i]->{pressure} ) + 0.5
|
||||
),
|
||||
'wind' => int(
|
||||
@ -853,8 +858,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
|
||||
sprintf( "%.1f", ( $data->{daily}->[$i]->{wind_deg} ) )
|
||||
),
|
||||
'cloudCover' => $data->{daily}->[$i]->{clouds},
|
||||
'code' => $codes{ $data->{daily}->[$i]->{weather}->[0]->{id} },
|
||||
'rain' => (
|
||||
'rain' => (
|
||||
$data->{daily}->[$i]->{rain} ? $data->{daily}->[$i]->{rain}
|
||||
: 0
|
||||
),
|
||||
@ -920,8 +924,9 @@ sub _FillSelfHashWithWeatherResponseForOnecallHourly {
|
||||
'wind_direction' => $data->{hourly}->[$i]->{wind_deg},
|
||||
'cloudCover' => $data->{hourly}->[$i]->{clouds},
|
||||
'code' => $codes{ $data->{hourly}->[$i]->{weather}->[0]->{id} },
|
||||
'iconAPI' => $data->{hourly}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
'owmAPICode' => $data->{hourly}->[$i]->{weather}->[0]->{id},
|
||||
'iconAPI' => $data->{hourly}->[$i]->{weather}->[0]->{icon},
|
||||
'rain1h' => (
|
||||
$data->{hourly}->[$i]->{rain}->{'1h'}
|
||||
? $data->{hourly}->[$i]->{rain}->{'1h'}
|
||||
: 0
|
||||
@ -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,
|
||||
|
File diff suppressed because one or more lines are too long
1159
lib/FHEM/Core/Weather.pm
Normal file
1159
lib/FHEM/Core/Weather.pm
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user