mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 19:32:42 +00:00
76_SMAPortal: contrib 3.4.0
git-svn-id: https://svn.fhem.de/fhem/trunk@22564 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f400c60112
commit
c00fb037d0
@ -600,37 +600,10 @@ return;
|
||||
###############################################################
|
||||
sub DbLog_split {
|
||||
my ($event, $device) = @_;
|
||||
my $devhash = $defs{$device};
|
||||
my ($reading, $value, $unit);
|
||||
|
||||
if($event =~ m/[_\-fd]Consumption|Quote/x) {
|
||||
$event =~ /^L(.*):\s(.*)\s(.*)/x;
|
||||
if($1) {
|
||||
$reading = "L".$1;
|
||||
$value = $2;
|
||||
$unit = $3;
|
||||
}
|
||||
}
|
||||
if($event =~ m/Power|PV|FeedIn|SelfSupply|Temperature|Total|Energy|Hour:|Hour(\d\d):/x) {
|
||||
$event =~ /^L(.*):\s(.*)\s(.*)/x;
|
||||
if($1) {
|
||||
$reading = "L".$1;
|
||||
$value = $2;
|
||||
$unit = $3;
|
||||
}
|
||||
}
|
||||
if($event =~ m/Next04Hours-IsConsumption|RestOfDay-IsConsumption|Tomorrow-IsConsumption|Battery/x) {
|
||||
$event =~ /^L(.*):\s(.*)\s(.*)/x;
|
||||
if($1) {
|
||||
$reading = "L".$1;
|
||||
$value = $2;
|
||||
$unit = $3;
|
||||
}
|
||||
}
|
||||
if($event =~ m/summary/x && $event =~ /(.*):\s(.*)\s(.*)/x) {
|
||||
$reading = $1;
|
||||
$value = $2;
|
||||
$unit = $3;
|
||||
|
||||
if($event =~ /\s(Wh|W|kWh|%|h)$/xms) {
|
||||
($reading, $value, $unit) = $event =~ /(.*):\s(.*)\s(.*)/x;
|
||||
}
|
||||
|
||||
return ($reading, $value, $unit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user