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