diff --git a/fhem/CHANGED b/fhem/CHANGED index f1ddd3133..7b8e08840 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. + - bugfix: 98_Verkehrsinfo.pm: Fix state update, Hessenschau message - feature: 50_TelegramBot: msgForceReply, disable, keyboards in messages, inline keyboards and dialogs - bugfix: 74_NUKIDevice: Fix Problem with battery Reading diff --git a/fhem/FHEM/98_Verkehrsinfo.pm b/fhem/FHEM/98_Verkehrsinfo.pm index 48f7ba040..cbe164b28 100644 --- a/fhem/FHEM/98_Verkehrsinfo.pm +++ b/fhem/FHEM/98_Verkehrsinfo.pm @@ -25,6 +25,14 @@ ############################################################################ # # Changelog: +# 2016-12-26, v2.1 +# Bugfix: update state with readings update +# CHANGE: update commandref with link to readingFn-Attributen +# +# Changelog: +# 2016-12-13, v2.0RC1 +# Bugfix: Bugfix Hessenschau Message +# # 2016-11-17, v2.0 # CHANGE: Module change to HttpNonBlocking # CHANGE: remove requirement perl-module json @@ -153,7 +161,7 @@ sub Verkehrsinfo_Define($$) { InternalTimer(gettimeofday()+4, "Verkehrsinfo_GetUpdate", $hash, 0); - $hash->{STATE} = 'initialized'; + readingsSingleUpdate($hash, "state", 'initialized',1 ); return undef; } @@ -168,7 +176,7 @@ sub Verkehrsinfo_HttpNbDefineZone($) { if($err ne "") { Log3 $name, 3, "error while requesting ".$param->{url}." - $err"; - $hash->{STATE} = 'ERROR Update Zone ' . FmtDateTime(time()); + readingsSingleUpdate($hash, "state", 'ERROR Update Zone ' . FmtDateTime(time()), 1); } elsif($content ne "") @@ -233,7 +241,6 @@ sub Verkehrsinfo_Set($@) { if(!defined($Verkehrsinfo_gets{$opt})) { return "Unknown argument $opt, choose one of update:noArg"; } - $hash->{STATE} = $Verkehrsinfo_gets{$opt} = $value; if ($opt eq "update"){ Verkehrsinfo_GetUpdate($hash); @@ -283,7 +290,7 @@ sub Verkehrsinfo_HttpNbUpdateData ($) { if($err ne "") { Log3 $name, 3, "error while requesting ".$param->{url}." - $err"; - $hash->{STATE} = 'ERROR Update Readings ' . FmtDateTime(time()); + readingsSingleUpdate($hash, "state", 'ERROR Update Readings ' . FmtDateTime(time()), 1); } elsif($content ne "") @@ -392,6 +399,8 @@ sub Verkehrsinfo_HttpNbUpdateData ($) { } $dataarray->{'message'} = $message_head . ' ' . $message; + $dataarray->{'message'} =~ s/\//; + $dataarray->{'message'} =~ s/\<\/pre\>//; $dataarray->{'count'} = $i - 1; @@ -409,9 +418,8 @@ sub Verkehrsinfo_HttpNbUpdateData ($) { Log3 $hash, 4, "Verkehrsinfo: ($name) ReadingsUpdate: $readingName - ".$dataarray->{$readingName}; readingsBulkUpdate($hash,$readingName,$dataarray->{$readingName}); } - + readingsBulkUpdate($hash, "state", 'update ' . FmtDateTime(time())); readingsEndUpdate($hash, 1); - $hash->{STATE} = 'update ' . FmtDateTime(time()); } Log3 $hash, 4, "Verkehrsinfo: ($name) Verkehrsinfo_HttpNbUpdateData done"; @@ -580,6 +588,7 @@ sub Verkehrsinfo_hf_orderby ($@) { Multiple searching keywords can be seperated with the pipe "|".

  • msg_format [ road | head | both ] (Nur Verkehrsinfo.de)
    Using this parameter you can format the output, regarding streets, direction or both.

  • +
  • readingFnAttributes


  • @@ -705,6 +714,7 @@ sub Verkehrsinfo_hf_orderby ($@) { Mehrer Suchbegriffe können mit einer Pipe "|" getrennt werden.

  • msg_format [ road | head | both ] (Nur Verkehrsinfo.de)
    Über diesen Parameter kann die Meldung formatiert werden nach Strasse, Richtung oder beides

  • +
  • readingFnAttributes