mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 17:04:59 +00:00
SCIVT by peterp.
git-svn-id: https://svn.fhem.de/fhem/trunk@79 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3fea70d919
commit
73a8e8a91a
@ -335,3 +335,4 @@
|
|||||||
- feature: added EM1010PC/EM1000WZ/EM1000EM support
|
- feature: added EM1010PC/EM1000WZ/EM1000EM support
|
||||||
- bugfix: undefined messages for unknown HMS devs (Peter, 8.6)
|
- bugfix: undefined messages for unknown HMS devs (Peter, 8.6)
|
||||||
- bugfix: em1010 and %oldvalue bugs (Peter, 9.6)
|
- bugfix: em1010 and %oldvalue bugs (Peter, 9.6)
|
||||||
|
- bugfix: SCIVT solar controller (peterp, 1.7)
|
||||||
|
@ -12,7 +12,6 @@ sub FHZ_ReadAnswer($$);
|
|||||||
sub FhzCrc(@);
|
sub FhzCrc(@);
|
||||||
sub CheckFhzCrc($);
|
sub CheckFhzCrc($);
|
||||||
|
|
||||||
my $fhzdata = "";
|
|
||||||
my $msgstart = pack('H*', "81");# Every msg starts wit this
|
my $msgstart = pack('H*', "81");# Every msg starts wit this
|
||||||
|
|
||||||
my %gets = (
|
my %gets = (
|
||||||
@ -236,6 +235,7 @@ FHZ_Define($$)
|
|||||||
$hash->{PortObj} = $po;
|
$hash->{PortObj} = $po;
|
||||||
$hash->{FD} = $po->FILENO;
|
$hash->{FD} = $po->FILENO;
|
||||||
$hash->{DeviceName} = $dev;
|
$hash->{DeviceName} = $dev;
|
||||||
|
$hash->{PARTIAL} = "";
|
||||||
|
|
||||||
DoInit($a[0]);
|
DoInit($a[0]);
|
||||||
return undef;
|
return undef;
|
||||||
@ -461,6 +461,7 @@ FHZ_Read($)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $fhzdata = $hash->{PARTIAL};
|
||||||
Log 5, "FHZ/RAW: " . unpack('H*',$buf) .
|
Log 5, "FHZ/RAW: " . unpack('H*',$buf) .
|
||||||
" (Unparsed: " . unpack('H*', $fhzdata) . ")";
|
" (Unparsed: " . unpack('H*', $fhzdata) . ")";
|
||||||
$fhzdata .= $buf;
|
$fhzdata .= $buf;
|
||||||
@ -568,6 +569,7 @@ NEXTMSG:
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$hash->{PARTIAL} = $fhzdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -334,23 +334,27 @@ split in multiple lines<br><br>
|
|||||||
/var/log/fht1-%Y-%U.log
|
/var/log/fht1-%Y-%U.log
|
||||||
</li>
|
</li>
|
||||||
<li>ks300_1<br>
|
<li>ks300_1<br>
|
||||||
Plots the temperature and humidity of a ks300. The
|
Plots the temperature and rain (per hour and per day) of a
|
||||||
corresponding filelog definitions (for the KS300 device named
|
ks300. The corresponding filelog definitions (for the KS300
|
||||||
ks300) looks like:<br>
|
device named ks300) looks like:<br>
|
||||||
define FileLog ks300log ks300:.*H:.*
|
define FileLog ks300log ks300:.*H:.*
|
||||||
/var/log/ks300-%Y-%U.log
|
/var/log/ks300-%Y-%U.log
|
||||||
</li>
|
</li>
|
||||||
<li>ks300_2<br>
|
<li>ks300_2<br>
|
||||||
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
|
ks300. The corresponding filelog definition is the same as
|
||||||
above, both programs evaluate the same log.
|
above, both programs evaluate the same log.
|
||||||
</li>
|
</li>
|
||||||
|
<li>text<br>
|
||||||
|
Shows the logfile as it is (plain text).
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
The corresponding gnuplot files must be installed, see the fhemweb.pl
|
The corresponding gnuplot files (up to the "text" one) must be
|
||||||
configuration for the destination directory.<br>
|
installed, see the fhemweb.pl configuration for the destination
|
||||||
|
directory.<br>
|
||||||
|
|
||||||
Example:<br>
|
Example:<br>
|
||||||
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
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
|
||||||
@ -705,6 +709,29 @@ split in multiple lines<br><br>
|
|||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<a name="SCIVT"></a>
|
||||||
|
<h4>Type SCIVT</h4>
|
||||||
|
<ul>
|
||||||
|
<code>define <name> SCIVT <SCD-device></code>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Define a SCD series solar controler device. Details see <a
|
||||||
|
href="http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_118">here</a>.
|
||||||
|
You probably need a Serial to USB controller like the PL2303.
|
||||||
|
<br>
|
||||||
|
Defining an SCIVT device will schedule an internal task, which reads the
|
||||||
|
status of the device every 5 minutes, and triggers notify/filelog commands.
|
||||||
|
<br>Note: Currently this device does not support a "set" function, only
|
||||||
|
a single get function which reads the device status immediately.
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Example:
|
||||||
|
<ul>
|
||||||
|
<code>define scd SCIVT /dev/ttyUSB2</code><br>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="FileLog"></a>
|
<a name="FileLog"></a>
|
||||||
<h4>Type FileLog</h4>
|
<h4>Type FileLog</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<h1>FHEM</h1>
|
<h1>FHEM</h1>
|
||||||
GPL'd FHZ, FS20, FHT, HMS, KS300 and WS300 server for linux, formerly known as
|
GPL'd server to access devices like FHZ1000/FHZ1300,EM1010PC,WS300,SCIVT.
|
||||||
fhz1000.pl
|
Formerly known as fhz1000.pl
|
||||||
|
|
||||||
<h2>News (as of =DATE=, Version =VERS=)</h2>
|
<h2>News (as of =DATE=, Version =VERS=)</h2>
|
||||||
|
|
||||||
@ -30,14 +30,19 @@ program or TCP/IP directly, like the supplied web frontends do.<br> <br>
|
|||||||
|
|
||||||
Currently implemented features:<br>
|
Currently implemented features:<br>
|
||||||
<ul>
|
<ul>
|
||||||
<li>reading and sending FS20 events (on/off/dimming, timer commands, etc)<br>
|
<li>Via the FHZ module (with access to one or more FHZ1000/FHZ1300 device):
|
||||||
<li>support of FS20 address features function group, local and global master
|
<ul>
|
||||||
<li>reading and changing FHT80b parameters (temp, actuator, etc).<br>
|
<li>reading and sending FS20 events (on/off/dimming, timer commands)<br>
|
||||||
The FHT8b seems to work too. <b>Note:</b> the FHT8 wont work.</li>
|
<li>support of FS20 address features function group, local and global master
|
||||||
<li>reading HMS data (HMS100-T,-TF,-WD,-MG,-TFK and RM100-2)</li>
|
<li>reading and changing FHT80b parameters (temp, actuator, etc).<br>
|
||||||
<li>reading KS300 data</li>
|
The FHT8b seems to work too. <b>Note:</b> the FHT8 wont work.</li>
|
||||||
<li>reading WS300 data</li>
|
<li>reading HMS data (HMS100-T,-TF,-WD,-MG,-TFK and RM100-2)</li>
|
||||||
<li>reading EM1010PC/EM1000WZ data</li>
|
<li>reading KS300 data</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>reading WS300 data, and up to 9 attached devices</li>
|
||||||
|
<li>reading EM1000WZ/EM1000EM data via an attached EM1010PC</li>
|
||||||
|
<li>reading an attached SCIVT device</li>
|
||||||
<li>logging events to files (or database), with regexp filters</li>
|
<li>logging events to files (or database), with regexp filters</li>
|
||||||
<li>notifying external programs or internal modules when receiving certain
|
<li>notifying external programs or internal modules when receiving certain
|
||||||
events</li>
|
events</li>
|
||||||
|
@ -135,6 +135,7 @@ my %intAt; # Internal at timer hash.
|
|||||||
my $intAtCnt=0;
|
my $intAtCnt=0;
|
||||||
my $reread_active = 0;
|
my $reread_active = 0;
|
||||||
my $AttrList = "room comment";
|
my $AttrList = "room comment";
|
||||||
|
my $cvsid = '$Id: fhem.pl,v 1.21 2007-07-01 07:30:48 rudolfkoenig Exp $';
|
||||||
|
|
||||||
$init_done = 0;
|
$init_done = 0;
|
||||||
|
|
||||||
@ -1648,5 +1649,5 @@ doGlobalDef($)
|
|||||||
CommandAttr(undef, "global verbose 3");
|
CommandAttr(undef, "global verbose 3");
|
||||||
CommandAttr(undef, "global configfile $arg");
|
CommandAttr(undef, "global configfile $arg");
|
||||||
CommandAttr(undef, "global logfile -");
|
CommandAttr(undef, "global logfile -");
|
||||||
CommandAttr(undef, "global version =VERS= from =DATE=");
|
CommandAttr(undef, "global version =VERS= from =DATE= ($cvsid)");
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,22 @@
|
|||||||
|
#Sun Jun 24 13:03:37 2007
|
||||||
|
|
||||||
attr global logfile -
|
attr global logfile -
|
||||||
attr global port 7072 global
|
|
||||||
attr global verbose 3
|
|
||||||
attr global statefile test/fhem.save
|
|
||||||
attr global modpath .
|
attr global modpath .
|
||||||
|
attr global port 7072 global
|
||||||
|
attr global statefile test/fhem.save
|
||||||
|
attr global verbose 3
|
||||||
|
|
||||||
define FHZ FHZ none
|
define FHZ FHZ none
|
||||||
|
|
||||||
define floor.lamp FS20 1234 00
|
defattr
|
||||||
define window.lamp FS20 1234 02
|
define btn4 FS20 1234 03
|
||||||
define marqee FS20 1234 07
|
define cellar FS20 1234 13
|
||||||
define cellar FS20 1234 13
|
|
||||||
define btn4 FS20 1234 03
|
|
||||||
|
|
||||||
define wz FHT 1235
|
|
||||||
define fl FHT 1236
|
define fl FHT 1236
|
||||||
|
define floor.lamp FS20 1234 00
|
||||||
define tf1 HMS 1237
|
define marqee FS20 1234 07
|
||||||
|
|
||||||
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 n_btn4 notify btn4 /usr/local/bin/shared/setroll "%"
|
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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#Sat Jun 9 10:53:09 2007
|
#Sun Jun 24 13:09:02 2007
|
||||||
setstate FHZ fhtbuf: 1c
|
setstate FHZ fhtbuf: 1c
|
||||||
setstate FHZ 2006-02-12 14:03:39 fhtbuf 23
|
setstate FHZ 2006-02-12 14:03:39 fhtbuf 23
|
||||||
setstate FHZ 2006-03-26 08:47:36 init2 deadbeefdeadbe
|
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-from1 06:00
|
||||||
setstate fl 2006-03-26 08:50:46 wed-to1 23: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 fl 2006-03-26 08:50:55 windowopen-temp 12.0 (Celsius)
|
||||||
setstate fllog active
|
|
||||||
setstate floor.lamp ???
|
setstate floor.lamp ???
|
||||||
setstate global <no definition>
|
setstate global <no definition>
|
||||||
setstate marqee on
|
setstate marqee on
|
||||||
setstate marqee 2006-04-01 12:46:02 state on
|
setstate marqee 2006-04-01 12:46:02 state on
|
||||||
setstate n_btn4 disabled
|
setstate n_btn4 disabled
|
||||||
setstate outlog active
|
|
||||||
setstate tf1 T: 20.3 H: 31.3 Bat: ok
|
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 battery Bat: ok
|
||||||
setstate tf1 2006-04-11 09:48:48 humidity 31.3 (%)
|
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-from1 06:00
|
||||||
setstate wz 2006-03-26 08:50:36 wed-to1 23: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 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
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
=================
|
#=================
|
||||||
set terminal png
|
set terminal png
|
||||||
set output '<OUT>.png'
|
set output '<OUT>.png'
|
||||||
set xdata time
|
set xdata time
|
||||||
|
@ -14,6 +14,7 @@ set title '<IN>'
|
|||||||
set grid
|
set grid
|
||||||
|
|
||||||
set ylabel "Temperature (Celsius)"
|
set ylabel "Temperature (Celsius)"
|
||||||
set y2label "Humidity (%)"
|
set y2label "Rain (l/m2)"
|
||||||
plot "<IN>" using 1:4 axes x1y1 title 'Temperature' with lines,\
|
plot "<IN>" using 1:4 axes x1y1 title 'Temperature' with lines,\
|
||||||
"<IN>" using 1:6 axes x1y2 title 'Rel. Humidity (%)' with lines
|
"<grep -v avg_ <IN> | 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,\
|
||||||
|
"<grep -v avg_ <IN> | 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
|
||||||
|
@ -14,7 +14,6 @@ set title '<IN>'
|
|||||||
set grid
|
set grid
|
||||||
|
|
||||||
set ylabel "Wind (Km/h)"
|
set ylabel "Wind (Km/h)"
|
||||||
set y2label "Rain (l/m2)"
|
set y2label "Humidity (%)"
|
||||||
plot "<IN>" using 1:8 axes x1y1 title 'Wind' with lines,\
|
plot "<IN>" using 1:8 axes x1y1 title 'Wind' with lines,\
|
||||||
"<grep -v avg_ <IN> | 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,\
|
"<IN>" using 1:6 axes x1y2 title 'Rel. Humidity (%)' with lines
|
||||||
"<grep -v avg_ <IN> | 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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user