mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 17:12:32 +00:00
Some minor bugfixes / Ein paar kleine Fehler beseitigt
git-svn-id: https://svn.fhem.de/fhem/trunk@1708 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a8fb3e1e25
commit
e73000c71f
@ -9,7 +9,7 @@
|
|||||||
# Internally these interfaces are vastly different, read the corresponding Wiki pages
|
# Internally these interfaces are vastly different, read the corresponding Wiki pages
|
||||||
# http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire
|
# http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire
|
||||||
#
|
#
|
||||||
# Version 2.1 - July, 2012
|
# Version 2.11 - July, 2012
|
||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
#
|
#
|
||||||
# OWAD.pm
|
# OWAD.pm
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# TODO: Alarm limits ergeben "invalid page write attempt"
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FHEM module to commmunicate with 1-Wire A/D converters DS2450
|
# FHEM module to commmunicate with 1-Wire A/D converters DS2450
|
||||||
#
|
#
|
||||||
# Attention: This module may communicate with the OWX module,
|
# Attention: This module may communicate with the OWX module,
|
||||||
@ -18,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
# Version 2.1 - July, 2012
|
# Version 2.11 - July, 2012
|
||||||
#
|
#
|
||||||
# Setup bus device in fhem.cfg as
|
# Setup bus device in fhem.cfg as
|
||||||
#
|
#
|
||||||
@ -971,7 +967,7 @@ sub OWXAD_SetPage($$) {
|
|||||||
my ($i,$j,$k);
|
my ($i,$j,$k);
|
||||||
|
|
||||||
#=============== set the alarm values ===============================
|
#=============== set the alarm values ===============================
|
||||||
if ( $page eq "test" ) {
|
if ( $page eq "alarm" ) {
|
||||||
#-- issue the match ROM command \x55 and the set alarm page command
|
#-- issue the match ROM command \x55 and the set alarm page command
|
||||||
# \x55\x10\x00 reading 8 data bytes and 2 CRC bytes
|
# \x55\x10\x00 reading 8 data bytes and 2 CRC bytes
|
||||||
$select="\x55\x10\x00";
|
$select="\x55\x10\x00";
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
# Attention: This module may communicate with the OWX module,
|
# Attention: This module may communicate with the OWX module,
|
||||||
# but currently not with the 1-Wire File System OWFS
|
# but currently not with the 1-Wire File System OWFS
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# SO FAR ONLY external counter inputs A,B are available ! Neither memory content, nor internal counters are questioned.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Prefixes for subroutines of this module:
|
# Prefixes for subroutines of this module:
|
||||||
# OW = General 1-Wire routines Peter Henning)
|
# OW = General 1-Wire routines Peter Henning)
|
||||||
# OWX = 1-Wire bus master interface (Peter Henning)
|
# OWX = 1-Wire bus master interface (Peter Henning)
|
||||||
@ -18,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
# Version 2.1 - July, 2012
|
# Version 2.11 - July, 2012
|
||||||
#
|
#
|
||||||
# Setup bus device in fhem.cfg as
|
# Setup bus device in fhem.cfg as
|
||||||
#
|
#
|
||||||
@ -354,7 +350,7 @@ sub OWCOUNT_FormatValues($) {
|
|||||||
my ($sec,$min,$hour,$day,$month,$year,$wday,$yday,$isdst) = localtime(time);
|
my ($sec,$min,$hour,$day,$month,$year,$wday,$yday,$isdst) = localtime(time);
|
||||||
if( $day!=$dayo ){
|
if( $day!=$dayo ){
|
||||||
my $dt = ((24-$houro)*3600 -$mino*60 - $seco)/( ($hour+24-$houro)*3600 + ($min-$mino)*60 + ($sec-$seco) );
|
my $dt = ((24-$houro)*3600 -$mino*60 - $seco)/( ($hour+24-$houro)*3600 + ($min-$mino)*60 + ($sec-$seco) );
|
||||||
$midnight = $oldval*(1-$dt)+$vval*$dt;
|
$midnight += $oldval*(1-$dt)+$vval*$dt;
|
||||||
OWXCOUNT_SetPage($hash,14+$i,sprintf("%f",$midnight));
|
OWXCOUNT_SetPage($hash,14+$i,sprintf("%f",$midnight));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
# Version 2.1 - July, 2012
|
# Version 2.11 - July, 2012
|
||||||
#
|
#
|
||||||
# Setup bus device in fhem.cfg as
|
# Setup bus device in fhem.cfg as
|
||||||
#
|
#
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# Attention: This module may communicate with the OWX module,
|
# Attention: This module may communicate with the OWX module,
|
||||||
# but currently not with the 1-Wire File System OWFS
|
# but currently not with the 1-Wire File System OWFS
|
||||||
#
|
#
|
||||||
|
# TODO: Kanalattribute ändern zur Laufzeit.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Prefixes for subroutines of this module:
|
# Prefixes for subroutines of this module:
|
||||||
@ -16,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
# Version 2.1 - July, 2012
|
# Version 2.11 - July, 2012
|
||||||
#
|
#
|
||||||
# Setup bus device in fhem.cfg as
|
# Setup bus device in fhem.cfg as
|
||||||
#
|
#
|
||||||
@ -177,12 +178,12 @@ sub OWSWITCH_Define ($$) {
|
|||||||
|
|
||||||
#-- 1-Wire ROM identifier in the form "FF.XXXXXXXXXXXX.YY"
|
#-- 1-Wire ROM identifier in the form "FF.XXXXXXXXXXXX.YY"
|
||||||
# determine CRC Code - only if this is a direct interface
|
# determine CRC Code - only if this is a direct interface
|
||||||
$crc = defined($hash->{IODev}->{INTERFACE}) ? sprintf("%02x",OWX_CRC("1D.".$id."00")) : "00";
|
$crc = defined($hash->{IODev}->{INTERFACE}) ? sprintf("%02x",OWX_CRC("3A.".$id."00")) : "00";
|
||||||
|
|
||||||
#-- Define device internals
|
#-- Define device internals
|
||||||
$hash->{ROM_ID} = "1D.".$id.$crc;
|
$hash->{ROM_ID} = "3A.".$id.$crc;
|
||||||
$hash->{OW_ID} = $id;
|
$hash->{OW_ID} = $id;
|
||||||
$hash->{OW_FAMILY} = "1D";
|
$hash->{OW_FAMILY} = "3A";
|
||||||
$hash->{PRESENT} = 0;
|
$hash->{PRESENT} = 0;
|
||||||
$hash->{INTERVAL} = $interval;
|
$hash->{INTERVAL} = $interval;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user