From e0ecea242eb77b39888623638979ba1b28f65837 Mon Sep 17 00:00:00 2001
From: mahowi <>
Date: Wed, 25 Mar 2020 11:43:40 +0000
Subject: [PATCH] 59_WUup: remove prototypes and HTML entitities
git-svn-id: https://svn.fhem.de/fhem/trunk@21511 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/CHANGED | 1 +
fhem/FHEM/59_WUup.pm | 102 +++++++++++++++++++------------------------
2 files changed, 46 insertions(+), 57 deletions(-)
diff --git a/fhem/CHANGED b/fhem/CHANGED
index 70e3fe8c3..0edb27b02 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - change: 59_WUup: remove prototypes and HTML entitities
- bugfix: 73_AutoShuttersControl: change default value for rain and wind
protection, add rain protection to commandref
- change: 73_AutoShuttersControl: remove prototyp, add weekendholiday for
diff --git a/fhem/FHEM/59_WUup.pm b/fhem/FHEM/59_WUup.pm
index fc4031379..24d68ae90 100644
--- a/fhem/FHEM/59_WUup.pm
+++ b/fhem/FHEM/59_WUup.pm
@@ -33,17 +33,7 @@ use HttpUtils;
use UConv;
use FHEM::Meta;
-my $version = "0.9.13";
-
-# Declare functions
-sub WUup_Initialize($);
-sub WUup_Define($$$);
-sub WUup_Undef($$);
-sub WUup_Set($@);
-sub WUup_Attr(@);
-sub WUup_stateRequestTimer($);
-sub WUup_send($);
-sub WUup_receive($);
+my $version = "0.9.14";
################################################################################
#
@@ -51,7 +41,7 @@ sub WUup_receive($);
#
################################################################################
-sub WUup_Initialize($) {
+sub WUup_Initialize {
my ($hash) = @_;
$hash->{DefFn} = "WUup_Define";
@@ -75,7 +65,7 @@ sub WUup_Initialize($) {
return FHEM::Meta::InitMod( __FILE__, $hash );
}
-sub WUup_Define($$$) {
+sub WUup_Define {
my ( $hash, $def ) = @_;
return $@ unless ( FHEM::Meta::SetInternals($hash) );
@@ -121,13 +111,13 @@ sub WUup_Define($$$) {
return undef;
}
-sub WUup_Undef($$) {
+sub WUup_Undef {
my ( $hash, $arg ) = @_;
RemoveInternalTimer($hash);
return undef;
}
-sub WUup_Set($@) {
+sub WUup_Set {
my ( $hash, $name, $cmd, @args ) = @_;
return "\"set $name\" needs at least one argument" unless ( defined($cmd) );
@@ -140,7 +130,7 @@ sub WUup_Set($@) {
}
}
-sub WUup_Attr(@) {
+sub WUup_Attr {
my ( $cmd, $name, $attrName, $attrVal ) = @_;
my $hash = $defs{$name};
@@ -191,7 +181,7 @@ sub WUup_Attr(@) {
return undef;
}
-sub WUup_stateRequestTimer($) {
+sub WUup_stateRequestTimer {
my ($hash) = @_;
my $name = $hash->{NAME};
@@ -219,7 +209,7 @@ sub WUup_stateRequestTimer($) {
"Sub WUup_stateRequestTimer ($name) - Request Timer is called";
}
-sub WUup_send($) {
+sub WUup_send {
my ($hash) = @_;
my $name = $hash->{NAME};
my $version = $hash->{VERSION};
@@ -312,9 +302,6 @@ sub WUup_send($) {
Log3 $name, 5, "WUup ($name) - full URL: $url";
HttpUtils_NonblockingGet($param);
- # my $response = GetFileFromURL($url);
- # readingsBulkUpdate( $hash, "response", $response );
- # Log3 $name, 4, "WUup ($name) - server response: $response";
}
else {
CommandDeleteReading( undef, "$name data" );
@@ -328,7 +315,7 @@ sub WUup_send($) {
return;
}
-sub WUup_receive($) {
+sub WUup_receive {
my ( $param, $err, $data ) = @_;
my $hash = $param->{hash};
my $name = $hash->{NAME};
@@ -379,6 +366,7 @@ sub WUup_receive($) {
# 2019-07-05 add Meta support
# 2019-07-09 add WIKI to Meta data
# 2020-03-12 use UConv to calculate solarradiation from lux to W/m²
+# 2020-03-25 remove prototypes
#
################################################################################
@@ -436,7 +424,7 @@ sub WUup_receive($) {
disable - disables the module
disabledForIntervals
unit_windspeed - change the units of your windspeed readings (m/s or km/h)
- unit_solarradiation - change the units of your solarradiation readings (lux or W/m²)
+ unit_solarradiation - change the units of your solarradiation readings (lux or W/m²)
round - round values to this number of decimals for calculation (default 4)
wu.... - Attribute name corresponding to
parameter name from api.
@@ -448,29 +436,29 @@ sub WUup_receive($) {
network as parameter "tempf" (which indicates current temperature)
Units get converted to angloamerican system automatically
- (°C -> °F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)
+ (°C -> °F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)
The following information is supported:
- - winddir - instantaneous wind direction (0-360) [°]
+ - winddir - instantaneous wind direction (0-360) [°]
- windspeedmph - instantaneous wind speed ·[mph]
- windgustmph - current wind gust, using software specific time period [mph]
- - windgustdir - current wind direction, using software specific time period [°]
+ - windgustdir - current wind direction, using software specific time period [°]
- windspdmph_avg2m - 2 minute average wind speed [mph]
- - winddir_avg2m - 2 minute average wind direction [°]
+ - winddir_avg2m - 2 minute average wind direction [°]
- windgustmph_10m - past 10 minutes wind gust [mph]
- - windgustdir_10m - past 10 minutes wind gust direction [°]
- - humidity - outdoor humidity (0-100) [%]
- - dewptf- outdoor dewpoint [F]
- - tempf - outdoor temperature [F]
+ - windgustdir_10m - past 10 minutes wind gust direction [°]
+ - humidity - outdoor humidity (0-100) [%]
+ - dewptf- outdoor dewpoint [°F]
+ - tempf - outdoor temperature [°F]
- rainin - rain over the past hour -- the accumulated rainfall in the past 60 min [in]
- dailyrainin - rain so far today in local time [in]
- baromin - barometric pressure [inHg]
- - soiltempf - soil temperature [F]
- - soilmoisture - soil moisture [%]
- - solarradiation - solar radiation[W/m²]
+ - soiltempf - soil temperature [°F]
+ - soilmoisture - soil moisture [%]
+ - solarradiation - solar radiation[W/m²]
- UV - [index]
- - AqPM2.5 - PM2.5 mass [µg/m³]
- - AqPM10 - PM10 mass [µg/m³]
+ - AqPM2.5 - PM2.5 mass [µg/m³]
+ - AqPM10 - PM10 mass [µg/m³]
@@ -541,40 +529,40 @@ sub WUup_receive($) {
unit_windspeed - gibt die Einheit der Readings für die
Windgeschwindigkeiten an (m/s oder km/h)
unit_solarradiation - gibt die Einheit der Readings für die
- Sonneneinstrahlung an (lux oder W/m²)
+ Sonneneinstrahlung an (lux oder W/m²)
round - Anzahl der Nachkommastellen zur Berechnung (Standard 4)
wu.... - Attributname entsprechend dem
Parameternamen aus der API.
- Jedes dieser Attribute enthält Informationen über zu sendende Wetterdaten
+ Jedes dieser Attribute enthält Informationen über zu sendende Wetterdaten
im Format sensorName:readingName
.
Beispiel: attr WUup wutempf outside:temperature
definiert
- das Attribut wutempf und sendet das Reading "temperature" vom Gerät "outside" als Parameter "tempf"
+ das Attribut wutempf und sendet das Reading "temperature" vom Gerät "outside" als Parameter "tempf"
(welches die aktuelle Temperatur angibt).
Einheiten werden automatisch ins anglo-amerikanische System umgerechnet.
- (°C -> °F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)
- Unterstützte Angaben
+ (°C -> °;F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)
+ Unterstützte Angaben
- - winddir - momentane Windrichtung (0-360) [°]
+ - winddir - momentane Windrichtung (0-360) [°]
- windspeedmph - momentane Windgeschwindigkeit [mph]
- - windgustmph - aktuelle Böe, mit Software-spezifischem Zeitraum [mph]
- - windgustdir - aktuelle Böenrichtung, mit Software-spezifischer Zeitraum [°]
+ - windgustmph - aktuelle Böe, mit Software-spezifischem Zeitraum [mph]
+ - windgustdir - aktuelle Böenrichtung, mit Software-spezifischer Zeitraum [°]
- windspdmph_avg2m - durchschnittliche Windgeschwindigkeit innerhalb 2 Minuten [mph]
- - winddir_avg2m - durchschnittliche Windrichtung innerhalb 2 Minuten [°]
- - windgustmph_10m - Böen der vergangenen 10 Minuten [mph]
- - windgustdir_10m - Richtung der Böen der letzten 10 Minuten [°]
- - humidity - Luftfeuchtigkeit im Freien (0-100) [%]
- - dewptf- Taupunkt im Freien [F]
- - tempf - Außentemperatur [F]
+ - winddir_avg2m - durchschnittliche Windrichtung innerhalb 2 Minuten [°]
+ - windgustmph_10m - Böen der vergangenen 10 Minuten [mph]
+ - windgustdir_10m - Richtung der Böen der letzten 10 Minuten [°]
+ - humidity - Luftfeuchtigkeit im Freien (0-100) [%]
+ - dewptf- Taupunkt im Freien [°F]
+ - tempf - Außentemperatur [°F]
- rainin - Regen in der vergangenen Stunde [in]
- dailyrainin - Regenmenge bisher heute [in]
- baromin - barometrischer Druck [inHg]
- - soiltempf - Bodentemperatur [F]
- - soilmoisture - Bodenfeuchtigkeit [%]
- - solarradiation - Sonneneinstrahlung [W/m²]
+ - soiltempf - Bodentemperatur [°F]
+ - soilmoisture - Bodenfeuchtigkeit [%]
+ - solarradiation - Sonneneinstrahlung [W/m²]
- UV - [Index]
- - AqPM2.5 - Feinstaub PM2,5 [µg/m³]
- - AqPM10 - Feinstaub PM10 [µg/m³]
+ - AqPM2.5 - Feinstaub PM2,5 [µg/m³]
+ - AqPM10 - Feinstaub PM10 [µg/m³]
@@ -592,7 +580,7 @@ sub WUup_receive($) {
- Die komplette API-Beschreibung findet sich
hier
- - Viel Spaß!
+ - Viel Spaß!
@@ -612,7 +600,7 @@ sub WUup_receive($) {
"license": [
"gpl_2"
],
- "version": "v0.9.12",
+ "version": "v0.9.14",
"release_status": "stable",
"author": [
"Manfred Winter "