diff --git a/fhem/contrib/1-Wire/00_OWX.pm b/fhem/contrib/1-Wire/00_OWX.pm index eec1118f5..4a5ee3a8e 100644 --- a/fhem/contrib/1-Wire/00_OWX.pm +++ b/fhem/contrib/1-Wire/00_OWX.pm @@ -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); diff --git a/fhem/contrib/1-Wire/21_OWAD.pm b/fhem/contrib/1-Wire/21_OWAD.pm index 1b52697f5..0e90ffa50 100644 --- a/fhem/contrib/1-Wire/21_OWAD.pm +++ b/fhem/contrib/1-Wire/21_OWAD.pm @@ -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. 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"); diff --git a/fhem/contrib/1-Wire/21_OWID.pm b/fhem/contrib/1-Wire/21_OWID.pm index fdd2354df..a30111cc3 100644 --- a/fhem/contrib/1-Wire/21_OWID.pm +++ b/fhem/contrib/1-Wire/21_OWID.pm @@ -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 OWID + #-- define OWID 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"; diff --git a/fhem/contrib/1-Wire/21_OWTEMP.pm b/fhem/contrib/1-Wire/21_OWTEMP.pm index 295eca97a..f4b65981c 100644 --- a/fhem/contrib/1-Wire/21_OWTEMP.pm +++ b/fhem/contrib/1-Wire/21_OWTEMP.pm @@ -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. 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]; }