mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
FRM: Merge branch 'dev'
git-svn-id: https://svn.fhem.de/fhem/trunk@4167 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
32a3c3762f
commit
f584813c77
@ -1,6 +1,7 @@
|
||||
##############################################
|
||||
package main;
|
||||
|
||||
use vars qw{%attr %defs};
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@ -469,8 +470,12 @@ sub
|
||||
FRM_Client_AssignIOPort($)
|
||||
{
|
||||
my $hash = shift;
|
||||
AssignIoPort($main::defs{$hash->{NAME}});
|
||||
die "unable to assign IODev to '$hash->{NAME}'" unless defined ($hash->{IODev});
|
||||
my $name = $hash->{NAME};
|
||||
if (my $iodev = AttrVal($name,"IODev",undef)) {
|
||||
$hash->{IODev} = $defs{$iodev};
|
||||
}
|
||||
AssignIoPort($hash) unless defined($hash->{IODev});
|
||||
die "unable to assign IODev to '$name'" unless defined ($hash->{IODev});
|
||||
|
||||
$hash->{IODev} = $main::defs{$hash->{IODev}->{SNAME}} if (defined($hash->{IODev}->{SNAME}));
|
||||
|
||||
@ -673,7 +678,7 @@ sub FRM_OWX_firmata_to_device
|
||||
|
||||
sub FRM_OWX_Verify {
|
||||
my ($hash,$dev) = @_;
|
||||
foreach my $found ($hash->{DEVS}) {
|
||||
foreach my $found (@{$hash->{DEVS}}) {
|
||||
if ($dev eq $found) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -168,6 +168,9 @@ sub OWAD_Initialize ($) {
|
||||
$attlist .= " ".$owg_fixed[$i]."High";
|
||||
}
|
||||
$hash->{AttrList} = $attlist;
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
#########################################################################################
|
||||
|
@ -149,6 +149,9 @@ sub OWCOUNT_Initialize ($) {
|
||||
$attlist .= " ".$owg_fixed[$i]."Period:hour,minute,second";
|
||||
}
|
||||
$hash->{AttrList} = $attlist;
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
#########################################################################################
|
||||
@ -1074,7 +1077,7 @@ sub OWFSCOUNT_GetPage($$) {
|
||||
# $owg_str =~ /([\d\.]+)/;
|
||||
# a la truchsess
|
||||
$owg_str =~ s/[^\d\.]+//g;
|
||||
$owg_str = 0.0 if(!(defined($owg_str)));
|
||||
$owg_str = 0.0 if(!defined($owg_str) or $owg_str !~ /^\d+\.?\d*$/);
|
||||
$owg_str = int($owg_str*100)/100;
|
||||
$owg_midnight[0] = $owg_str;
|
||||
|
||||
@ -1093,7 +1096,7 @@ sub OWFSCOUNT_GetPage($$) {
|
||||
# $owg_str =~ /([\d\.]+)/;
|
||||
# a la truchsess
|
||||
$owg_str =~ s/[^\d\.]+//g;
|
||||
$owg_str = 0.0 if(!(defined($owg_str)));
|
||||
$owg_str = 0.0 if(!defined($owg_str) or $owg_str !~ /^\d+\.\d*$/);
|
||||
$owg_str = int($owg_str*100)/100;
|
||||
$owg_midnight[1] = $owg_str;
|
||||
}else {
|
||||
@ -1222,7 +1225,7 @@ sub OWXCOUNT_GetPage($$) {
|
||||
# $owg_str =~ /([\d\.]+)/;
|
||||
# a la truchsess
|
||||
$owg_str =~ s/[^\d\.]+//g;
|
||||
$owg_str = 0.0 if(!(defined($owg_str)));
|
||||
$owg_str = 0.0 if(!defined($owg_str) or $owg_str !~ /^\d+\.\d*$/);
|
||||
$owg_str = int($owg_str*100)/100;
|
||||
$owg_midnight[0] = $owg_str;
|
||||
}elsif( $page == 15) {
|
||||
@ -1231,7 +1234,7 @@ sub OWXCOUNT_GetPage($$) {
|
||||
# $owg_str =~ /([\d\.]+)/;
|
||||
# a la truchsess
|
||||
$owg_str =~ s/[^\d\.]+//g;
|
||||
$owg_str = 0.0 if(!(defined($owg_str)));
|
||||
$owg_str = 0.0 if(!defined($owg_str) or $owg_str !~ /^\d+\.\d*$/);
|
||||
$owg_str = int($owg_str*100)/100;
|
||||
$owg_midnight[1] = $owg_str;
|
||||
}
|
||||
|
@ -91,6 +91,9 @@ sub OWID_Initialize ($) {
|
||||
my $attlist = "IODev do_not_notify:0,1 showtime:0,1 model loglevel:0,1,2,3,4,5 ".
|
||||
$readingFnAttributes;
|
||||
$hash->{AttrList} = $attlist;
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
#########################################################################################
|
||||
|
@ -121,6 +121,9 @@ sub OWLCD_Initialize ($) {
|
||||
my $attlist = "IODev do_not_notify:0,1 showtime:0,1 loglevel:0,1,2,3,4,5 ".
|
||||
"";
|
||||
$hash->{AttrList} = $attlist;
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
#########################################################################################
|
||||
|
@ -124,7 +124,10 @@ sub OWMULTI_Initialize ($) {
|
||||
"tempOffset tempUnit:C,Celsius,F,Fahrenheit,K,Kelvin ".
|
||||
"VName VUnit VFunction ".
|
||||
$readingFnAttributes;
|
||||
}
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
#
|
||||
|
@ -144,6 +144,9 @@ sub OWSWITCH_Initialize ($) {
|
||||
}
|
||||
|
||||
$hash->{AttrList} = $attlist;
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
#########################################################################################
|
||||
|
@ -130,7 +130,10 @@ sub OWTHERM_Initialize ($) {
|
||||
"tempOffset tempUnit:C,Celsius,F,Fahrenheit,K,Kelvin ".
|
||||
"tempConv:onkick,onread tempLow tempHigh ".
|
||||
$readingFnAttributes;
|
||||
}
|
||||
|
||||
#make sure OWX is loaded so OWX_CRC is available if running with OWServer
|
||||
main::LoadModule("OWX");
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user