mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 14:04:15 +00:00
98_Verkehrsinfo.pm: add attribut disable
git-svn-id: https://svn.fhem.de/fhem/trunk@18521 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
527c361696
commit
d1cfa20b02
@ -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.
|
||||||
|
- feature: 98_Verkehrsinfo.pm: add attribut timeout
|
||||||
- feature: 12_HProtocolGateway: added 843 protocol for PMS-IB P20
|
- feature: 12_HProtocolGateway: added 843 protocol for PMS-IB P20
|
||||||
- feature: 12_HProtocolTank: added Product to calculate 15 degrees volume
|
- feature: 12_HProtocolTank: added Product to calculate 15 degrees volume
|
||||||
- new: 70_ZoneMinder: fetching Event-Details via API after event received
|
- new: 70_ZoneMinder: fetching Event-Details via API after event received
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Changelog:
|
# Changelog:
|
||||||
|
# 2019-02-07, v2.5
|
||||||
|
# Feature: Attribut timeout added
|
||||||
|
#
|
||||||
# 2019-01-12, v2.4
|
# 2019-01-12, v2.4
|
||||||
# Bugfix: Attribut disable InternalTimer parameter 4 = 0, nonblocking
|
# Bugfix: Attribut disable InternalTimer parameter 4 = 0, nonblocking
|
||||||
# Bugfix: Verkehrsinfo_GetUpdate, skip InternalTimer start if the Attribut disable != 0
|
# Bugfix: Verkehrsinfo_GetUpdate, skip InternalTimer start if the Attribut disable != 0
|
||||||
@ -126,7 +129,7 @@ sub Verkehrsinfo_Initialize($) {
|
|||||||
$hash->{AttrList} =
|
$hash->{AttrList} =
|
||||||
"filter_exclude filter_include orderby "
|
"filter_exclude filter_include orderby "
|
||||||
. "msg_format:road,head,both "
|
. "msg_format:road,head,both "
|
||||||
. "disable:1,0 "
|
. "disable:1,0 timeout "
|
||||||
. $readingFnAttributes;
|
. $readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +165,7 @@ sub Verkehrsinfo_Define($$) {
|
|||||||
if ($hash->{url} =~ /verkehrsinfo.de/i){
|
if ($hash->{url} =~ /verkehrsinfo.de/i){
|
||||||
my $param = {
|
my $param = {
|
||||||
url => "https://www.verkehrsinfo.de/httpsmobil/index.php?c=1&lat=&lon=",
|
url => "https://www.verkehrsinfo.de/httpsmobil/index.php?c=1&lat=&lon=",
|
||||||
timeout => 5,
|
timeout => AttrVal($hash->{name},"timeout","5"),
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
callback => \&Verkehrsinfo_HttpNbDefineZone
|
callback => \&Verkehrsinfo_HttpNbDefineZone
|
||||||
};
|
};
|
||||||
@ -300,6 +303,11 @@ sub Verkehrsinfo_Attr(@) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
elsif($attr_name eq "timeout" && ($attr_value !~ /\d+/ || $attr_value eq "0")) {
|
||||||
|
my $err = "Verkehrsinfo: Ungültiger timeout in attr $name $attr_name $attr_value: $@";
|
||||||
|
Log3 $name, 3, $err;
|
||||||
|
return $err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elsif ( $cmd eq "del" ) {
|
elsif ( $cmd eq "del" ) {
|
||||||
if ( $attr_name eq "disable" ) {
|
if ( $attr_name eq "disable" ) {
|
||||||
@ -577,7 +585,7 @@ sub Verkehrsinfo_GetUpdate($) {
|
|||||||
|
|
||||||
my $param = {
|
my $param = {
|
||||||
url => $hash->{url},
|
url => $hash->{url},
|
||||||
timeout => 5,
|
timeout => AttrVal($name,"timeout","5"),
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
callback => \&Verkehrsinfo_HttpNbUpdateData
|
callback => \&Verkehrsinfo_HttpNbUpdateData
|
||||||
};
|
};
|
||||||
@ -733,6 +741,8 @@ sub Verkehrsinfo_hf_orderby ($@) {
|
|||||||
Using this parameter you can format the output, regarding streets, direction or both.<br><br></li>
|
Using this parameter you can format the output, regarding streets, direction or both.<br><br></li>
|
||||||
<li><i>disable</i><br>
|
<li><i>disable</i><br>
|
||||||
1 = inactive and 0 = active<br><br></li>
|
1 = inactive and 0 = active<br><br></li>
|
||||||
|
<li><i>timeout</i><br>
|
||||||
|
Timeout for web request<br><br></li>
|
||||||
<li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
|
<li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
@ -864,6 +874,8 @@ sub Verkehrsinfo_hf_orderby ($@) {
|
|||||||
Über diesen Parameter kann die Meldung formatiert werden nach Strasse, Richtung oder beides<br><br></li>
|
Über diesen Parameter kann die Meldung formatiert werden nach Strasse, Richtung oder beides<br><br></li>
|
||||||
<li><i>disable</i><br>
|
<li><i>disable</i><br>
|
||||||
1 = inactive and 0 = active<br><br></li>
|
1 = inactive and 0 = active<br><br></li>
|
||||||
|
<li><i>timeout</i><br>
|
||||||
|
Timeout für Webabfrage<br><br></li>
|
||||||
<li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
|
<li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user