mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
47_OBIS: Fixed bug in reading-names
git-svn-id: https://svn.fhem.de/fhem/trunk@11473 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3655b8efc5
commit
a07722767d
@ -332,6 +332,8 @@ sub OBIS_Parse($$)
|
||||
Log3 $hash,5,"OBIS ($name) - Msg-Parse: $rmsg";
|
||||
if($rmsg=~/\/.*|^((?:\d{1,3}-\d{1,3}:)?\d{1,3}.\d{1,3}.\d{1,3})(?:\*\d{1,3})?(?:\(.*?\))?\(.*?\)|!/) { # old regex: \/.*|\d-\d{1,3}:\d{1,3}.\d{1,3}.\d{1,3}\*\d{1,3}\(.*?\)|!
|
||||
my $channel=$1;
|
||||
$channel=~s/:/\./;
|
||||
$channel=~s/-/\./;
|
||||
if ($hash->{MeterType} eq "Unknown") {$hash->{MeterType}="Standard"}
|
||||
if($rmsg=~/^([23456789]+)-.*/) {
|
||||
Log3 $hash,3,"OBIS ($name) - Unknown OBIS-Device, please report: $rmsg".chr(13).chr(10)."Please report to User icinger at forum.fhem.de";
|
||||
@ -393,6 +395,7 @@ sub OBIS_Parse($$)
|
||||
$data=$SML_specialities{"TIME"}[1]->($1)
|
||||
}
|
||||
my $chan=$code//$OBIS_channels{$channel} //$channel;
|
||||
$chan=$hash->{helper}{Channels}{$channel} //$hash->{helper}{Channels}{$1} // $OBIS_channels{$1} //$channel;;
|
||||
readingsBulkUpdate($hash, $chan ,$data);
|
||||
}
|
||||
$found=1;
|
||||
@ -402,8 +405,9 @@ sub OBIS_Parse($$)
|
||||
}
|
||||
if ($found==0) {
|
||||
$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;;
|
||||
if (length $2) {
|
||||
readingsBulkUpdate($hash, $channel ,$2);
|
||||
readingsBulkUpdate($hash, $chan ,$2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user