mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
47_OBIS: Fixed "Undefined subroutine &main::myOBIS_Set called at fhem.pl line 3488."
git-svn-id: https://svn.fhem.de/fhem/trunk@15773 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
73f8cb0c4c
commit
b98ef5478e
@ -76,12 +76,10 @@ sub OBIS_Initialize($)
|
||||
$hash->{ReadyFn} = "OBIS_Ready";
|
||||
$hash->{DefFn} = "OBIS_Define";
|
||||
$hash->{ParseFn} = "OBIS_Parse";
|
||||
# $hash->{SetFn} = "OBIS_Set";
|
||||
$hash->{SetFn} = "myOBIS_Set";
|
||||
$hash->{GetFn} = "OBIS_Get";
|
||||
$hash->{UndefFn} = "OBIS_Undef";
|
||||
$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 ignoreUnknown:on,off valueBracket:first,second,both createPreValues:on,off ".
|
||||
$hash->{AttrList}= "do_not_notify:1,0 interval offset_feed offset_energy IODev channels directions alignTime pollingMode:on,off ExtChannels:on,off unitReadings:on,off ignoreUnknown:on,off valueBracket:first,second,both createPreValues:on,off ".
|
||||
$readingFnAttributes;
|
||||
}
|
||||
|
||||
@ -151,9 +149,6 @@ sub OBIS_Define($$)
|
||||
$devs{$type}[1] = $hash->{helper}{DEVICES}[1] // $devs{$type}[1];
|
||||
$hash->{helper}{DEVICES} =$devs{$type};
|
||||
$hash->{helper}{TRIGGERTIME}=gettimeofday();
|
||||
# if( !$init_done ) {
|
||||
# $attr{$name}{"event-on-change-reading"} = ".*";
|
||||
# }
|
||||
my $t=OBIS_adjustAlign($hash,AttrVal($name,"alignTime",undef),$hash->{helper}{DEVICES}[1]);
|
||||
Log3 ($hash,5,"OBIS ($name) - Internal timer set to ".FmtDateTime($t)) if ($hash->{helper}{DEVICES}[1]>0);
|
||||
InternalTimer($t, "GetUpdate", $hash, 0) if ($hash->{helper}{DEVICES}[1]>0);
|
||||
@ -507,6 +502,7 @@ sub OBIS_Parse($$)
|
||||
$rmsg =~ $OBIS_codes{$code};
|
||||
my $L=$hash->{helper}{Channels}{$channel} //$hash->{helper}{Channels}{$1.".".$2} // $OBIS_channels{$1.".".$2} // $channel;
|
||||
my $chan=$3+0 > 0 ? "_Ch$3" : "";
|
||||
# if (AttrVal($name,"ExtChannels","off") eq "on") {$chan.=".$4";}
|
||||
if (AttrVal($name,"ignoreUnknown","off") eq "off" || $L ne $channel) {
|
||||
if($1==1) {
|
||||
Log3($hash,4,"Set ".$L.$chan." to ".((looks_like_number($3) ? $5+0 : $5) +AttrVal($name,"offset_energy",0)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user