2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 08:11:44 +00:00

47_OBIS: New "ignoreUnknown"-Attribute

git-svn-id: https://svn.fhem.de/fhem/trunk@11475 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
icinger 2016-05-18 04:12:51 +00:00
parent 2f7eeb0e4a
commit de1095dce2

View File

@ -76,7 +76,7 @@ sub OBIS_Initialize($)
$hash->{UndefFn} = "OBIS_Undef"; $hash->{UndefFn} = "OBIS_Undef";
$hash->{AttrFn} = "OBIS_Attr"; $hash->{AttrFn} = "OBIS_Attr";
$hash->{AttrList}= "do_not_notify:1,0 interval offset_feed offset_energy IODev channels directions alignTime pollingMode:on,off unitReadings:on,off ". $hash->{AttrList}= "do_not_notify:1,0 interval offset_feed offset_energy IODev channels directions alignTime pollingMode:on,off unitReadings:on,off ignoreUnknown:on,off ".
$readingFnAttributes; $readingFnAttributes;
} }
@ -407,7 +407,7 @@ sub OBIS_Parse($$)
$rmsg=~/^((?:\d{1,3}-\d{1,3}:)?\d{1,3}.\d{1,3}.\d{1,3})(?:\*\d{1,3})?(?:\(.*?\))?\((.*?)(?:\*.*)?\)/; $rmsg=~/^((?:\d{1,3}-\d{1,3}:)?\d{1,3}.\d{1,3}.\d{1,3})(?:\*\d{1,3})?(?:\(.*?\))?\((.*?)(?:\*.*)?\)/;
my $chan=$hash->{helper}{Channels}{$channel} //$hash->{helper}{Channels}{$1} // $OBIS_channels{$1} //$channel;; my $chan=$hash->{helper}{Channels}{$channel} //$hash->{helper}{Channels}{$1} // $OBIS_channels{$1} //$channel;;
if (length $2) { if (length $2) {
readingsBulkUpdate($hash, $chan ,$2); if (AttrVal($name,"ignoreUnknown","off") eq "off" || $chan ne $channel) {readingsBulkUpdate($hash, $chan ,$2);}
} }
} }
} }
@ -701,6 +701,8 @@ sub OBIS_decodeTL($){
Reduces CPU-load. Reduces CPU-load.
<code>unitReadings</code><br> <code>unitReadings</code><br>
Adds the units to the readings like w, wH, A etc. Adds the units to the readings like w, wH, A etc.
<code>ignoreUnknown</code><br>
Ignores unknown OBIS-Data
</li> </li>
<br> <br>
@ -768,8 +770,9 @@ sub OBIS_decodeTL($){
kann das zu einer spürbaren Senkung der Prozessorleistung führen. kann das zu einer spürbaren Senkung der Prozessorleistung führen.
<code>unitReadings</code><br> <code>unitReadings</code><br>
Hängt bei den Readings auch die Einheiten an, zB w, wH, A usw. Hängt bei den Readings auch die Einheiten an, zB w, wH, A usw.
<code>ignoreUnknown</code><br>
Ignoriert unbekannte OBIS-Datensätze
</li> </li>
<br>
</ul> </ul>
=end html_DE =end html_DE