diff --git a/fhem/CHANGED b/fhem/CHANGED
index 746ab0f10..81197e0df 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -335,3 +335,4 @@
- feature: added EM1010PC/EM1000WZ/EM1000EM support
- bugfix: undefined messages for unknown HMS devs (Peter, 8.6)
- bugfix: em1010 and %oldvalue bugs (Peter, 9.6)
+ - bugfix: SCIVT solar controller (peterp, 1.7)
diff --git a/fhem/FHEM/00_FHZ.pm b/fhem/FHEM/00_FHZ.pm
index 25282deee..d6a40155b 100755
--- a/fhem/FHEM/00_FHZ.pm
+++ b/fhem/FHEM/00_FHZ.pm
@@ -12,7 +12,6 @@ sub FHZ_ReadAnswer($$);
sub FhzCrc(@);
sub CheckFhzCrc($);
-my $fhzdata = "";
my $msgstart = pack('H*', "81");# Every msg starts wit this
my %gets = (
@@ -236,6 +235,7 @@ FHZ_Define($$)
$hash->{PortObj} = $po;
$hash->{FD} = $po->FILENO;
$hash->{DeviceName} = $dev;
+ $hash->{PARTIAL} = "";
DoInit($a[0]);
return undef;
@@ -461,6 +461,7 @@ FHZ_Read($)
}
}
+ my $fhzdata = $hash->{PARTIAL};
Log 5, "FHZ/RAW: " . unpack('H*',$buf) .
" (Unparsed: " . unpack('H*', $fhzdata) . ")";
$fhzdata .= $buf;
@@ -568,6 +569,7 @@ NEXTMSG:
}
}
+ $hash->{PARTIAL} = $fhzdata;
}
1;
diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html
index 290ad46d5..0efdee1b6 100644
--- a/fhem/docs/commandref.html
+++ b/fhem/docs/commandref.html
@@ -334,23 +334,27 @@ split in multiple lines
/var/log/fht1-%Y-%U.log
ks300_1
- Plots the temperature and humidity of a ks300. The
- corresponding filelog definitions (for the KS300 device named
- ks300) looks like:
+ Plots the temperature and rain (per hour and per day) of a
+ ks300. The corresponding filelog definitions (for the KS300
+ device named ks300) looks like:
define FileLog ks300log ks300:.*H:.*
/var/log/ks300-%Y-%U.log
ks300_2
- Plots the rain (per hour and per day) and wind values of a
+ Plots the humidity and wind values of a
ks300. The corresponding filelog definition is the same as
above, both programs evaluate the same log.
+ text
+ Shows the logfile as it is (plain text).
+
- The corresponding gnuplot files must be installed, see the fhemweb.pl
- configuration for the destination directory.
+ The corresponding gnuplot files (up to the "text" one) must be
+ installed, see the fhemweb.pl configuration for the destination
+ directory.
Example:
- attr fhtlog1 logtype ks300_1:Temp/Hum,ks300_2:Rain/Wind
+ attr fhtlog1 logtype ks300_1:Temp/Rain,ks300_2:Hum/Wind,text:Raw-data
@@ -705,6 +709,29 @@ split in multiple lines
+
+ Type SCIVT
+
+ define <name> SCIVT <SCD-device>
+
+
+ Define a SCD series solar controler device. Details see here.
+ You probably need a Serial to USB controller like the PL2303.
+
+ Defining an SCIVT device will schedule an internal task, which reads the
+ status of the device every 5 minutes, and triggers notify/filelog commands.
+
Note: Currently this device does not support a "set" function, only
+ a single get function which reads the device status immediately.
+
+
+ Example:
+
+ define scd SCIVT /dev/ttyUSB2
+
+
+
+
Type FileLog
diff --git a/fhem/docs/fhem.html b/fhem/docs/fhem.html
index e97bb9d2d..291fc0914 100644
--- a/fhem/docs/fhem.html
+++ b/fhem/docs/fhem.html
@@ -10,8 +10,8 @@
FHEM
-GPL'd FHZ, FS20, FHT, HMS, KS300 and WS300 server for linux, formerly known as
-fhz1000.pl
+GPL'd server to access devices like FHZ1000/FHZ1300,EM1010PC,WS300,SCIVT.
+Formerly known as fhz1000.pl
News (as of =DATE=, Version =VERS=)
@@ -30,14 +30,19 @@ program or TCP/IP directly, like the supplied web frontends do.
Currently implemented features:
- - reading and sending FS20 events (on/off/dimming, timer commands, etc)
- - support of FS20 address features function group, local and global master
-
- reading and changing FHT80b parameters (temp, actuator, etc).
- The FHT8b seems to work too. Note: the FHT8 wont work.
- - reading HMS data (HMS100-T,-TF,-WD,-MG,-TFK and RM100-2)
- - reading KS300 data
- - reading WS300 data
- - reading EM1010PC/EM1000WZ data
+ - Via the FHZ module (with access to one or more FHZ1000/FHZ1300 device):
+
+ - reading and sending FS20 events (on/off/dimming, timer commands)
+ - support of FS20 address features function group, local and global master
+
- reading and changing FHT80b parameters (temp, actuator, etc).
+ The FHT8b seems to work too. Note: the FHT8 wont work.
+ - reading HMS data (HMS100-T,-TF,-WD,-MG,-TFK and RM100-2)
+ - reading KS300 data
+
+
+ - reading WS300 data, and up to 9 attached devices
+ - reading EM1000WZ/EM1000EM data via an attached EM1010PC
+ - reading an attached SCIVT device
- logging events to files (or database), with regexp filters
- notifying external programs or internal modules when receiving certain
events
diff --git a/fhem/fhem.pl b/fhem/fhem.pl
index 2aa07f411..176a991ff 100755
--- a/fhem/fhem.pl
+++ b/fhem/fhem.pl
@@ -135,6 +135,7 @@ my %intAt; # Internal at timer hash.
my $intAtCnt=0;
my $reread_active = 0;
my $AttrList = "room comment";
+my $cvsid = '$Id: fhem.pl,v 1.21 2007-07-01 07:30:48 rudolfkoenig Exp $';
$init_done = 0;
@@ -1648,5 +1649,5 @@ doGlobalDef($)
CommandAttr(undef, "global verbose 3");
CommandAttr(undef, "global configfile $arg");
CommandAttr(undef, "global logfile -");
- CommandAttr(undef, "global version =VERS= from =DATE=");
+ CommandAttr(undef, "global version =VERS= from =DATE= ($cvsid)");
}
diff --git a/fhem/test/fhem.cfg b/fhem/test/fhem.cfg
index 25337df3f..62ad6fa10 100644
--- a/fhem/test/fhem.cfg
+++ b/fhem/test/fhem.cfg
@@ -1,27 +1,22 @@
+#Sun Jun 24 13:03:37 2007
+
attr global logfile -
-attr global port 7072 global
-attr global verbose 3
-attr global statefile test/fhem.save
attr global modpath .
+attr global port 7072 global
+attr global statefile test/fhem.save
+attr global verbose 3
define FHZ FHZ none
-define floor.lamp FS20 1234 00
-define window.lamp FS20 1234 02
-define marqee FS20 1234 07
-define cellar FS20 1234 13
-define btn4 FS20 1234 03
-
-define wz FHT 1235
+defattr
+define btn4 FS20 1234 03
+define cellar FS20 1234 13
define fl FHT 1236
-
-define tf1 HMS 1237
-
-def ks1 KS300 1238
-
-# The path must be absolute, else it won't work appear in fhemweb.pl (webpgm2)
-define fllog FileLog /tmp/fhem/test/fl-%Y-%U.log fl:.*(temp|actuator).*
-define wzlog FileLog /tmp/fhem/test/wz-%Y-%U.log wz:.*(temp|actuator).*
-define outlog FileLog /tmp/fhem/test/out-%Y-%U.log out1:.*(H:).*
-
+define floor.lamp FS20 1234 00
+define marqee FS20 1234 07
define n_btn4 notify btn4 /usr/local/bin/shared/setroll "%"
+define tf1 HMS 1237
+define window.lamp FS20 1234 02
+define wz FHT 1235
+define x SCIVT none
+defattr
diff --git a/fhem/test/fhem.save b/fhem/test/fhem.save
index 6f54532a3..fd7f07d2b 100644
--- a/fhem/test/fhem.save
+++ b/fhem/test/fhem.save
@@ -1,4 +1,4 @@
-#Sat Jun 9 10:53:09 2007
+#Sun Jun 24 13:09:02 2007
setstate FHZ fhtbuf: 1c
setstate FHZ 2006-02-12 14:03:39 fhtbuf 23
setstate FHZ 2006-03-26 08:47:36 init2 deadbeefdeadbe
@@ -32,13 +32,11 @@ setstate fl 2006-03-26 08:50:55 unknown_85 4
setstate fl 2006-03-26 08:50:46 wed-from1 06:00
setstate fl 2006-03-26 08:50:46 wed-to1 23:00
setstate fl 2006-03-26 08:50:55 windowopen-temp 12.0 (Celsius)
-setstate fllog active
setstate floor.lamp ???
setstate global
setstate marqee on
setstate marqee 2006-04-01 12:46:02 state on
setstate n_btn4 disabled
-setstate outlog active
setstate tf1 T: 20.3 H: 31.3 Bat: ok
setstate tf1 2006-04-11 09:48:48 battery Bat: ok
setstate tf1 2006-04-11 09:48:48 humidity 31.3 (%)
@@ -70,4 +68,12 @@ setstate wz 2006-03-26 08:52:31 unknown_85 4
setstate wz 2006-03-26 08:50:36 wed-from1 06:00
setstate wz 2006-03-26 08:50:36 wed-to1 23:00
setstate wz 2006-03-26 08:52:31 windowopen-temp 12.0 (Celsius)
-setstate wzlog active
+setstate x R:13,66; 0,0;30;13,62;15,09;- 0,2; 2,8;
+
+setstate x 2007-06-24 13:08:30 Is 0,0
+setstate x 2007-06-24 13:08:30 Temp 30
+setstate x 2007-06-24 13:08:30 Vs 13,66
+setstate x 2007-06-24 13:08:30 maxI 2,8
+setstate x 2007-06-24 13:08:30 maxV 15,09
+setstate x 2007-06-24 13:08:30 minI - 0,2
+setstate x 2007-06-24 13:08:30 minV 13,62
diff --git a/fhem/webfrontend/pgm2/em.gplot b/fhem/webfrontend/pgm2/em.gplot
index 852f30801..6be117003 100644
--- a/fhem/webfrontend/pgm2/em.gplot
+++ b/fhem/webfrontend/pgm2/em.gplot
@@ -3,7 +3,7 @@
-=================
+#=================
set terminal png
set output '.png'
set xdata time
diff --git a/fhem/webfrontend/pgm2/ks300_1.gplot b/fhem/webfrontend/pgm2/ks300_1.gplot
index 9315476b5..b3ddb23e3 100644
--- a/fhem/webfrontend/pgm2/ks300_1.gplot
+++ b/fhem/webfrontend/pgm2/ks300_1.gplot
@@ -14,6 +14,7 @@ set title ''
set grid
set ylabel "Temperature (Celsius)"
-set y2label "Humidity (%)"
+set y2label "Rain (l/m2)"
plot "" using 1:4 axes x1y1 title 'Temperature' with lines,\
- "" using 1:6 axes x1y2 title 'Rel. Humidity (%)' with lines
+ " | perl -ane '@a = split(\"[_:]\", $F[0]); if(defined($lh) && $lh ne $a[1]) { printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; } if($lv) { $hv += ($F[9]-$lv); } $lh = $a[1]; $ld = $a[0]; $lv = $F[9]; END { printf(\"${ld}_$lh:30:00 %f\n\", $hv) }'" using 1:2 axes x1y2 title 'Rain/h' with histeps,\
+ " | perl -ane '@a = split(\"[_]\", $F[0]); if(defined($ld) && $ld ne $a[0]) { printf(\"${ld}_12:00:00 %f\n\", $dv); $dv = 0; } if($lv) { $dv += ($F[9]-$lv); } $ld = $a[0]; $lv = $F[9]; END {printf(\"${ld}_12:00:00 %f\n\", $dv)}'" using 1:2 axes x1y2 title 'Rain/day' with histeps
diff --git a/fhem/webfrontend/pgm2/ks300_2.gplot b/fhem/webfrontend/pgm2/ks300_2.gplot
index 06e51f036..6e7588559 100644
--- a/fhem/webfrontend/pgm2/ks300_2.gplot
+++ b/fhem/webfrontend/pgm2/ks300_2.gplot
@@ -14,7 +14,6 @@ set title ''
set grid
set ylabel "Wind (Km/h)"
-set y2label "Rain (l/m2)"
+set y2label "Humidity (%)"
plot "" using 1:8 axes x1y1 title 'Wind' with lines,\
- " | perl -ane '@a = split(\"[_:]\", $F[0]); if(defined($lh) && $lh ne $a[1]) { printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; } if($lv) { $hv += ($F[9]-$lv); } $lh = $a[1]; $ld = $a[0]; $lv = $F[9]; END { printf(\"${ld}_$lh:30:00 %f\n\", $hv) }'" using 1:2 axes x1y2 title 'Rain/h' with histeps,\
- " | perl -ane '@a = split(\"[_]\", $F[0]); if(defined($ld) && $ld ne $a[0]) { printf(\"${ld}_12:00:00 %f\n\", $dv); $dv = 0; } if($lv) { $dv += ($F[9]-$lv); } $ld = $a[0]; $lv = $F[9]; END {printf(\"${ld}_12:00:00 %f\n\", $dv)}'" using 1:2 axes x1y2 title 'Rain/day' with histeps
+ "" using 1:6 axes x1y2 title 'Rel. Humidity (%)' with lines