mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@1329 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8dd8f494aa
commit
44f0e8bc58
@ -6,7 +6,7 @@
|
||||
# via an active DS2480/DS2490/DS9097U bus master interface or
|
||||
# via a passive DS9097 interface
|
||||
#
|
||||
# Version 1.05 - March, 2012
|
||||
# Version 1.06 - March, 2012
|
||||
#
|
||||
# Prof. Dr. Peter A. Henning, 2012
|
||||
#
|
||||
@ -503,7 +503,7 @@ sub OWX_Discover ($) {
|
||||
CommandDefine(undef,"$name OWTEMP DS1822 $owx_rnf");
|
||||
#-- All unknown families are ID only
|
||||
} else {
|
||||
CommandDefine(undef,"$name OWID $owx_f $owx_rnf");
|
||||
CommandDefine(undef,"$name OWID $owx_f $owx_rnf");
|
||||
}
|
||||
#-- yes, it is on the bus and therefore present
|
||||
push(@owx_names,$name);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#
|
||||
# Prof. Dr. Peter A. Henning, 2012
|
||||
#
|
||||
# Version 1.05 - March, 2012
|
||||
# Version 1.06 - March, 2012
|
||||
#
|
||||
# Setup bus device in fhem.cfg as
|
||||
#
|
||||
@ -175,13 +175,13 @@ sub OWAD_Define ($$) {
|
||||
if(int(@a) < 2 || int(@a) > 5);
|
||||
|
||||
#-- check if this is an old style definition, e.g. <model> is missing
|
||||
my $a2 = lc($a[2]);
|
||||
my $a3 = defined($a[3]) ? lc($a[3]) : "";
|
||||
if( $a2 =~ m/^[0-9|a-f]{12}$/ ) {
|
||||
my $a2 = $a[2];
|
||||
my $a3 = defined($a[3]) ? $a[3] : "";
|
||||
if( $a2 =~ m/^[0-9|a-f|A-F]{12}$/ ) {
|
||||
$model = "DS2450";
|
||||
$id = $a[2];
|
||||
if(int(@a)>=4) { $interval = $a[3]; }
|
||||
} elsif( $a3 =~ m/^[0-9|a-f]{12}$/ ) {
|
||||
} elsif( $a3 =~ m/^[0-9|a-f|A-F]{12}$/ ) {
|
||||
$model = $a[2];
|
||||
return "OWAD: Wrong 1-Wire device model $model"
|
||||
if( $model ne "DS2450");
|
||||
|
@ -12,7 +12,7 @@
|
||||
#
|
||||
# Prof. Dr. Peter A. Henning, 2012
|
||||
#
|
||||
# Version 1.05 - March, 2012
|
||||
# Version 1.06 - March, 2012
|
||||
#
|
||||
# Setup bus device in fhem.cfg as
|
||||
#
|
||||
@ -99,7 +99,7 @@ sub OWID_Initialize ($) {
|
||||
sub OWID_Define ($$) {
|
||||
my ($hash, $def) = @_;
|
||||
|
||||
#-- define <name> OWID <id>
|
||||
#-- define <name> OWID <FAM_ID> <ROM_ID>
|
||||
my @a = split("[ \t][ \t]*", $def);
|
||||
|
||||
my ($name,$fam,$id,$crc,$ret);
|
||||
@ -113,12 +113,12 @@ sub OWID_Define ($$) {
|
||||
if(int(@a) !=4 );
|
||||
|
||||
#-- check id
|
||||
if( $a[2] =~ m/^[0-9|a-f]{2}$/ ) {
|
||||
if( $a[2] =~ m/^[0-9|a-f|A-F]{2}$/ ) {
|
||||
$fam = $a[2];
|
||||
} else {
|
||||
return "OWID: $a[0] ID $a[2] invalid, specify a 2 digit value";
|
||||
return "OWID: $a[0] family id $a[2] invalid, specify a 2 digit value";
|
||||
}
|
||||
if( $a[3] =~ m/^[0-9|a-f]{12}$/ ) {
|
||||
if( $a[3] =~ m/^[0-9|a-f|A-F]{12}$/ ) {
|
||||
$id = $a[3];
|
||||
} else {
|
||||
return "OWID: $a[0] ID $a[3] invalid, specify a 12 digit value";
|
||||
|
@ -16,7 +16,7 @@
|
||||
# Martin Fischer, 2011
|
||||
# Prof. Dr. Peter A. Henning, 2012
|
||||
#
|
||||
# Version 1.05 - March, 2012
|
||||
# Version 1.06 - March, 2012
|
||||
#
|
||||
# Setup bus device in fhem.cfg as
|
||||
#
|
||||
@ -123,7 +123,7 @@ sub OWTEMP_Initialize ($) {
|
||||
$hash->{SetFn} = "OWTEMP_Set";
|
||||
#offset = a temperature offset added to the temperature reading for correction
|
||||
#scale = a unit of measure: C/F/K/R
|
||||
$hash->{AttrList}= "IODev do_not_notify:0,1 showtime:0,1 model:DS18S20 loglevel:0,1,2,3,4,5 ".
|
||||
$hash->{AttrList}= "IODev do_not_notify:0,1 showtime:0,1 loglevel:0,1,2,3,4,5 ".
|
||||
"tempOffset tempUnit:Celsius,Fahrenheit,Kelvin,Reaumur";
|
||||
}
|
||||
|
||||
@ -155,17 +155,17 @@ sub OWTEMP_Define ($$) {
|
||||
if(int(@a) < 2 || int(@a) > 6);
|
||||
|
||||
#-- check if this is an old style definition, e.g. <model> is missing
|
||||
my $a2 = lc($a[2]);
|
||||
my $a3 = defined($a[3]) ? lc($a[3]) : "";
|
||||
my $a2 = $a[2];
|
||||
my $a3 = defined($a[3]) ? $a[3] : "";
|
||||
if( ($a2 eq "none") || ($a3 eq "none") ) {
|
||||
return "OWTEMP: ID = none is obsolete now, please redefine";
|
||||
} elsif( $a2 =~ m/^[0-9|a-f]{12}$/ ) {
|
||||
} elsif( $a2 =~ m/^[0-9|a-f|A-F]{12}$/ ) {
|
||||
$model = "DS1820";
|
||||
$id = $a[2];
|
||||
if(int(@a)>=4) { $interval = $a[3]; }
|
||||
Log 1, "OWTEMP: Parameter [alarminterval] is obsolete now - must be set with I/O-Device"
|
||||
if(int(@a) == 5);
|
||||
} elsif( $a3 =~ m/^[0-9|a-f]{12}$/ ) {
|
||||
} elsif( $a3 =~ m/^[0-9|a-f|A-F]{12}$/ ) {
|
||||
$model = $a[2];
|
||||
$id = $a[3];
|
||||
if(int(@a)>=5) { $interval = $a[4]; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user