2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

00_OWX.pm: Version 7.11 mit Fix für neuen DS2438

11_OWX_SER.pm: Anpassung Versionsnummer
11_OWX_TCP.pm: Anpassung Versionsnummer
11_OWX_FRM.pm: Anpassung Versionsnummer
11_OWX_CCC.pm: Fix für CUBE Device
21_OWMULTI.pm: Fix für neuen DS2438

git-svn-id: https://svn.fhem.de/fhem/trunk@16671 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
phenning 2018-04-29 05:06:35 +00:00
parent 7a3832982e
commit 90aa1e6174
6 changed files with 41 additions and 20 deletions

View File

@ -74,6 +74,7 @@ use vars qw{%owg_family %gets %sets $owx_version $owx_debug};
"3B" => ["DS1825","OWID 3B"],
"7E" => ["OW-ENV","OWID 7E"], #Environmental sensor
"81" => ["DS1420","OWID 81"],
"A6" => ["DS2438","OWMULTI DS2438a"],
"FF" => ["LCD","OWLCD"]
);
@ -98,7 +99,7 @@ use vars qw{%owg_family %gets %sets $owx_version $owx_debug};
);
#-- some globals needed for the 1-Wire module
$owx_version="7.10";
$owx_version="7.11";
#-- debugging now verbosity, this is just for backward compatibility
$owx_debug=0;

View File

@ -31,7 +31,7 @@
########################################################################################
#
# $hash->{DeviceName} =
# $hash->{INTERFACE} = "COC/CUNO";
# $hash->{INTERFACE} = "COC/CUNO/CUBE";
# $hash->{HWDEVICE} =
# $hash->{TYPE} = "OWX";
#
@ -54,7 +54,7 @@ sub new($) {
return bless {
hash => $hash,
#-- module version
version => "7.10"
version => "7.11"
}, $class;
}
@ -76,7 +76,7 @@ sub Define($) {
#-- check syntax
if(int(@a) < 3){
return "OWX_CCC::Define Syntax error - must be define <name> OWX <cuno/coc-device>"
return "OWX_CCC::Define Syntax error - must be define <name> OWX <cuno/coc/cube-device>"
}
my $name = $a[0];
@ -85,7 +85,7 @@ sub Define($) {
$hash->{DeviceName} = $dev;
#-- Second step in case of CUNO: See if we can open it
my $msg = "OWX_CCC::Define COC/CUNO device $dev";
my $msg = "OWX_CCC::Define COC/CUNO/CUBE device $dev";
#-- hash des COC/CUNO
my $hwdevice = $main::defs{$dev};
if(!$hwdevice){
@ -98,7 +98,7 @@ sub Define($) {
#-- store with OWX device
$hash->{DeviceName} = $dev;
$hash->{ASYNCHRONOUS} = 0;
$hash->{INTERFACE} = "COC/CUNO";
$hash->{INTERFACE} = "COC/CUNO/CUBE";
$hash->{HWDEVICE} = $hwdevice;
#-- loop for some time until the state is "Initialized"
@ -108,7 +108,7 @@ sub Define($) {
select(undef,undef,undef,3);
}
main::Log(1, "OWX_CCC::Define Can't open ".$dev) if( $hwdevice->{STATE} ne "Initialized");
#-- reset the 1-Wire system in COC/CUNO
#-- reset the 1-Wire system in COC/CUNO/CUBE
main::CUL_SimpleWrite($hwdevice, "Oi");
main::Log3 $name,1,"OWX_CCC::Define warning: version ".$self->{version}." not identical to OWX version ".$main::owx_version
@ -160,6 +160,11 @@ sub Detect () {
$interface="CUNO";
$ress .= "DS2482 / CUNO detected in $hwdevice->{NAME}";
$ret=1;
#-- CUBE
}elsif( $ob =~ m/.*CUBE.*/){
$interface="CUBE";
$ress .= "DS2482 / CUBE detected in $hwdevice->{NAME}";
$ret=1;
#-- something else
} else {
$ret=0;
@ -423,7 +428,7 @@ sub Read(@) {
}
}
if( $numget >= $numexp){
main::OWX_WDBGL($name,1,"OWX_CCC::Read from CUNO with error=$err: ",$buffer);
main::OWX_WDBGL($name,4,"OWX_CCC::Read from CUNO with error=$err: ",$buffer);
return $buffer
#-- ultimate failure
}else{
@ -642,3 +647,4 @@ See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
<a href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire">Deutsche Dokumentation im Wiki</a> vorhanden, die englische Version gibt es hier: <a href="/fhem/docs/commandref.html#OWX">OWX</a>
</ul>
=end html_DE
=cut

View File

@ -58,7 +58,7 @@ sub new($) {
return bless {
hash => $hash,
#-- module version
version => "7.10"
version => "7.11"
}, $class;
}
@ -714,3 +714,4 @@ See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
<a href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire">Deutsche Dokumentation im Wiki</a> vorhanden, die englische Version gibt es hier: <a href="/fhem/docs/commandref.html#OWX">OWX</a>
</ul>
=end html_DE
=cut

View File

@ -59,7 +59,7 @@ sub new($) {
#-- OWX device
hash => $hash,
#-- module version
version => "7.08",
version => "7.11",
#-- baud rate serial interface
baud => 9600,
#-- 16 byte search string
@ -97,7 +97,7 @@ sub Define ($) {
$hash->{ASYNCHRONOUS} = 0;
main::Log3 $hash->{NAME},1,"OWX_SER::Define warning: version ".$self->{version}." not identical to OWX version ".$main::owx_version
if( $hash->{version} ne $main::owx_version);
if( $self->{version} ne $main::owx_version);
#-- call low level init function for the device
$self->Init();
@ -927,3 +927,4 @@ See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
<a href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire">Deutsche Dokumentation im Wiki</a> vorhanden, die englische Version gibt es hier: <a href="/fhem/docs/commandref.html#OWX">OWX</a>
</ul>
=end html_DE
=cut

View File

@ -60,7 +60,7 @@ sub new($) {
#-- OWX device
hash => $hash,
#-- module version
version => "7.08",
version => "7.11",
#-- 16 byte search string
search => [0,0,0,0 ,0,0,0,0, 0,0,0,0, 0,0,0,0],
ROM_ID => [0,0,0,0 ,0,0,0,0],
@ -96,8 +96,8 @@ sub Define ($) {
$hash->{DeviceName} = $ip.":".$port;
$hash->{ASYNCHRONOUS} = 0;
main::Log3 $hash->{NAME},1,"OWX_TCP::Define warning: version ".$hash->{version}." not identical to OWX version "..$main::owx_version
if( $hash->{version} ne $main::owx_version );
main::Log3 $hash->{NAME},1,"OWX_TCP::Define warning: version ".$self->{version}." not identical to OWX version "..$main::owx_version
if( $self->{version} ne $main::owx_version );
#-- call low level init function for the device
$self->Init();
@ -897,3 +897,4 @@ See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
<a href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire">Deutsche Dokumentation im Wiki</a> vorhanden, die englische Version gibt es hier: <a href="/fhem/docs/commandref.html#OWX">OWX</a>
</ul>
=end html_DE
=cut

View File

@ -46,7 +46,7 @@ no warnings 'deprecated';
sub Log($$);
my $owx_version="7.01";
my $owx_version="7.02";
#-- flexible channel name
my ($owg_channel,$owg_schannel);
@ -200,6 +200,9 @@ sub OWMULTI_Define ($$) {
if( $fam eq "26" ){
$model = "DS2438";
CommandAttr (undef,"$name model DS2438");
}elsif( $fam eq "A6" ){
$model = "DS2438a";
CommandAttr (undef,"$name model DS2438a");
}else{
return "OWMULTI: Wrong 1-Wire device family $fam";
}
@ -211,6 +214,9 @@ sub OWMULTI_Define ($$) {
if( $model eq "DS2438" ){
$fam = "26";
CommandAttr (undef,"$name model DS2438");
}elsif( $model eq "DS2438a" ){
$fam = "A6";
CommandAttr (undef,"$name model DS2438a");
}else{
return "OWMULTI: Wrong 1-Wire device model $model";
}
@ -842,6 +848,7 @@ sub OWXMULTI_BinValues($$$$$$$) {
#-- this must be different for the different device types
# family = 26 => DS2438
# family = A6 => DS2438a
#-- transform binary rep of VDD
if( $context eq "ds2438.getvdd") {
#-- possible addtional check: $data[0] must be 08
@ -1349,6 +1356,7 @@ sub OWXMULTI_PT_SetValues($@) {
<a name="OWMULTI"></a>
<h3>OWMULTI</h3>
<ul>
<p>FHEM module to commmunicate with 1-Wire multi-sensors, currently the DS2438 smart battery
monitor<br /> <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
(prerequisite: Add this module's name to the list of clients in OWServer).
@ -1376,6 +1384,9 @@ sub OWXMULTI_PT_SetValues($@) {
<li>model DS2438 with family id 26 (default if the model parameter is omitted).
Measured is a temperature value, an external voltage and the current supply
voltage</li>
<li>model DS2438a with family id A6.
Measured is a temperature value, an external voltage and the current supply
voltage</li>
</ul>
</li>
<li>
@ -1452,6 +1463,6 @@ sub OWXMULTI_PT_SetValues($@) {
<br />unit of measurement (temperature scale), default is Celsius = &deg;C </li>
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
</ul>
</ul>
=end html
=cut