mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
WS3600: Enhancement for WS-3080 (uv and illuminance)
git-svn-id: https://svn.fhem.de/fhem/trunk@13550 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6be9dfa2ea
commit
83964408ab
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- update: 70_WS3600.pm extension for UV and illuminance
|
||||||
- bugfix: 38_CO20.pm: fixed Device::USB init errors
|
- bugfix: 38_CO20.pm: fixed Device::USB init errors
|
||||||
- update: 93_DBLog: new Version 2.13.5, supports primary key now,
|
- update: 93_DBLog: new Version 2.13.5, supports primary key now,
|
||||||
set commands clearReadings and eraseReadings,
|
set commands clearReadings and eraseReadings,
|
||||||
|
@ -39,6 +39,7 @@ package main;
|
|||||||
# 27.08.2013 Josch Change to Log3, loglevel removed
|
# 27.08.2013 Josch Change to Log3, loglevel removed
|
||||||
# 02.10.2013 Josch check if rawreading defined (empty lines)
|
# 02.10.2013 Josch check if rawreading defined (empty lines)
|
||||||
# 22.10.2013 Josch update readings with readingsBulkUpdate()
|
# 22.10.2013 Josch update readings with readingsBulkUpdate()
|
||||||
|
# 22.01.2017 Josch Enhancement for WS-3080
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
#use Device::SerialPort;
|
#use Device::SerialPort;
|
||||||
@ -109,11 +110,14 @@ my %TranslatedCodes = (
|
|||||||
"DRPmin" => "rel-Pressure-min-DTime",
|
"DRPmin" => "rel-Pressure-min-DTime",
|
||||||
"DRPmax" => "rel-Pressure-max-DTime",
|
"DRPmax" => "rel-Pressure-max-DTime",
|
||||||
"Tendency"=> "Tendency",
|
"Tendency"=> "Tendency",
|
||||||
"Forecast"=> "Forecast",
|
|
||||||
#added for WS-0101 / WS-1080
|
#added for WS-0101 / WS-1080
|
||||||
"WG" => "Wind-Gust",
|
"WG" => "Wind-Gust",
|
||||||
"DIR" => "Wind-Dir",
|
"DIR" => "Wind-Dir",
|
||||||
"state" => "State",
|
"state" => "State",
|
||||||
|
#added for WS-3080
|
||||||
|
"IL" => "Illuminance",
|
||||||
|
"UV" => "UV-Index",
|
||||||
|
"ZCode" => "Zambretti-Code",
|
||||||
);
|
);
|
||||||
|
|
||||||
# Date/Time-Records
|
# Date/Time-Records
|
||||||
@ -140,6 +144,7 @@ my %TranslatedDateTimeCodes = (
|
|||||||
"DTRtot" => "Rain-total-DTime",
|
"DTRtot" => "Rain-total-DTime",
|
||||||
"DTRPmin" => "rel-Pressure-min-DTime",
|
"DTRPmin" => "rel-Pressure-min-DTime",
|
||||||
"DTRPmax" => "rel-Pressure-max-DTime",
|
"DTRPmax" => "rel-Pressure-max-DTime",
|
||||||
|
"Forecast" => "Forecast", # allows multiple words for forecast
|
||||||
);
|
);
|
||||||
|
|
||||||
# Time-Records (will be appended to Date-Record)
|
# Time-Records (will be appended to Date-Record)
|
||||||
@ -176,7 +181,7 @@ WS3600_Initialize($)
|
|||||||
|
|
||||||
# Consumer
|
# Consumer
|
||||||
$hash->{DefFn} = "WS3600_Define";
|
$hash->{DefFn} = "WS3600_Define";
|
||||||
$hash->{AttrList}= "model:WS3600,WS2300,WS1080";
|
$hash->{AttrList}= "model:WS3600,WS2300,WS1080,WS3080";
|
||||||
# $hash->{ReadFn} = "WS3600_Read";
|
# $hash->{ReadFn} = "WS3600_Read";
|
||||||
$hash->{UndefFn} = "WS3600_Undef";
|
$hash->{UndefFn} = "WS3600_Undef";
|
||||||
}
|
}
|
||||||
@ -188,7 +193,7 @@ WS3600_Define($$)
|
|||||||
my ($hash, $def) = @_;
|
my ($hash, $def) = @_;
|
||||||
my @a = split("\"", $def);
|
my @a = split("\"", $def);
|
||||||
my $dev;
|
my $dev;
|
||||||
my $Timer = 60; # call every 64 seconds; normal wireless update interval
|
my $Timer = 60; # call every 64 seconds; normal wireless update interval
|
||||||
# is 128 sec, on wind >10 m/s 32 sec. 64 sec should ensure
|
# is 128 sec, on wind >10 m/s 32 sec. 64 sec should ensure
|
||||||
# quite current data.
|
# quite current data.
|
||||||
|
|
||||||
@ -267,12 +272,10 @@ WS3600_Read($)
|
|||||||
|
|
||||||
foreach my $inputline ( @lines ) {
|
foreach my $inputline ( @lines ) {
|
||||||
$inputline =~ s/\s+$//;
|
$inputline =~ s/\s+$//;
|
||||||
my ($rawreading, $val, $val2) = split(/ /, $inputline);
|
my ($rawreading, $val, $val2) = split(/ /, $inputline, 3);
|
||||||
if(defined($rawreading)) {
|
if(defined($rawreading)) {
|
||||||
my $logmsg = "WS3600(Dbg): $name read $inputline|$rawreading|$val";
|
if(!defined($val2)) { $val2 = ""; }
|
||||||
$logmsg .= "|$val2" if(defined($val2));
|
Log3 $name, 4, "WS3600(Dbg): $name read $inputline|$rawreading|$val|$val2";
|
||||||
Log3 $name, 4, $logmsg;
|
|
||||||
# Log3 $name, 4, "WS3600(Dbg): $name read $inputline|$rawreading|$val|$val2";
|
|
||||||
if(defined($TranslatedCodes{$rawreading})) {
|
if(defined($TranslatedCodes{$rawreading})) {
|
||||||
$reading = $TranslatedCodes{$rawreading};
|
$reading = $TranslatedCodes{$rawreading};
|
||||||
readingsBulkUpdate($hash,$reading, $val);
|
readingsBulkUpdate($hash,$reading, $val);
|
||||||
@ -319,6 +322,8 @@ WS3600_Read($)
|
|||||||
1;
|
1;
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item device
|
||||||
|
=item summary weatherstation queried by external program
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="WS3600"></a>
|
<a name="WS3600"></a>
|
||||||
@ -352,7 +357,7 @@ WS3600_Read($)
|
|||||||
<li>WS3600 series weather station (Europe Supplies, technotrade, etc;
|
<li>WS3600 series weather station (Europe Supplies, technotrade, etc;
|
||||||
refer to <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
|
refer to <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
|
||||||
(german) for details on this model) with fetch3600 from the
|
(german) for details on this model) with fetch3600 from the
|
||||||
toolchain <a href="http://open3600.fast-mail.nl/tiki-index.php">open3600</a>).
|
toolchain <a href="https://sourceforge.net/projects/open3600/">open3600</a>).
|
||||||
Fetch3600 delivers the current readings line by line as
|
Fetch3600 delivers the current readings line by line as
|
||||||
reading-value-pairs. These are read periodically and translated into
|
reading-value-pairs. These are read periodically and translated into
|
||||||
more readable names for FHEM by the module WS3600.pm. </li>
|
more readable names for FHEM by the module WS3600.pm. </li>
|
||||||
@ -361,7 +366,7 @@ WS3600_Read($)
|
|||||||
because it is rather similar to the WS3600.</li>
|
because it is rather similar to the WS3600.</li>
|
||||||
<li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
|
<li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
|
||||||
(and other stations which come with the EasyWeather windows
|
(and other stations which come with the EasyWeather windows
|
||||||
application) with <a href="https://code.google.com/p/fowsr/">fowsr</a>
|
application) with <a href="https://github.com/ajauberg/fowsr/">fowsr</a>
|
||||||
(version 2.0 or above)</li>
|
(version 2.0 or above)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -460,6 +465,13 @@ DRPmax 11-09-2009
|
|||||||
Tendency Falling
|
Tendency Falling
|
||||||
Forecast Cloudy</pre>
|
Forecast Cloudy</pre>
|
||||||
</div>
|
</div>
|
||||||
|
The following extensions are also supported now:<br>
|
||||||
|
<div>
|
||||||
|
<pre>IL 0.0
|
||||||
|
UV 8
|
||||||
|
Forecast Rain at times, worse later
|
||||||
|
ZCode U</pre>
|
||||||
|
</div>
|
||||||
There is no expectation on the readings received from the fetch3600
|
There is no expectation on the readings received from the fetch3600
|
||||||
binary; so, in essence, if you have a similar setup (unsupported,
|
binary; so, in essence, if you have a similar setup (unsupported,
|
||||||
attached weather station and a means to get it's reading into an output
|
attached weather station and a means to get it's reading into an output
|
||||||
@ -497,12 +509,13 @@ Forecast Cloudy</pre>
|
|||||||
<a name="WS3600attr"></a> <b>Attributes</b>
|
<a name="WS3600attr"></a> <b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#model">model</a> WS3600, WS2300,
|
<li><a href="#model">model</a> WS3600, WS2300,
|
||||||
WS1080 (not used for anything, yet)</li>
|
WS1080, WS3080 (not used for anything, yet)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
=end html
|
=end html
|
||||||
|
=item summary_DE Wetterstation, die mittels externem Programm ausgelesen wird
|
||||||
=begin html_DE
|
=begin html_DE
|
||||||
|
|
||||||
<a name="WS3600"></a>
|
<a name="WS3600"></a>
|
||||||
@ -536,7 +549,7 @@ Forecast Cloudy</pre>
|
|||||||
<ul>
|
<ul>
|
||||||
<li>WS3600 Serie (Europe Supplies, technotrade, usw.; s.a. <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
|
<li>WS3600 Serie (Europe Supplies, technotrade, usw.; s.a. <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
|
||||||
(deutsch) für Details) in Verbindung mit fetch3600 aus dem Paket <a
|
(deutsch) für Details) in Verbindung mit fetch3600 aus dem Paket <a
|
||||||
href="http://open3600.fast-mail.nl/tiki-index.php">open3600</a>).
|
href="https://sourceforge.net/projects/open3600/">open3600</a>).
|
||||||
Fetch3600 liefert die aktuellen Werte zeilenweise als
|
Fetch3600 liefert die aktuellen Werte zeilenweise als
|
||||||
Name-Wert-Paare. Diese werden durch FHEM zyklisch eingelesen, mit
|
Name-Wert-Paare. Diese werden durch FHEM zyklisch eingelesen, mit
|
||||||
besser lesbaren Bezeichnungen versehen und als Readings zur
|
besser lesbaren Bezeichnungen versehen und als Readings zur
|
||||||
@ -546,7 +559,7 @@ Forecast Cloudy</pre>
|
|||||||
(ähnlich zu open3600).</li>
|
(ähnlich zu open3600).</li>
|
||||||
<li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
|
<li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
|
||||||
(und andere Stationen, die mit der Windows-Software "Easy Weather"
|
(und andere Stationen, die mit der Windows-Software "Easy Weather"
|
||||||
ausgeliefert werden) in Verbindung mit <a href="https://code.google.com/p/fowsr/">fowsr</a>
|
ausgeliefert werden) in Verbindung mit <a href="https://github.com/ajauberg/fowsr/">fowsr</a>
|
||||||
(ab Version 2.0)</li>
|
(ab Version 2.0)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -643,6 +656,13 @@ TRPmax 09:19
|
|||||||
DRPmax 11-09-2009
|
DRPmax 11-09-2009
|
||||||
Tendency Falling
|
Tendency Falling
|
||||||
Forecast Cloudy</pre>
|
Forecast Cloudy</pre>
|
||||||
|
</div>
|
||||||
|
Zusätzlich werden folgende Erweiterungen (für WS3080) unterstützt:<br>
|
||||||
|
<div>
|
||||||
|
<pre>IL 0.0
|
||||||
|
UV 8
|
||||||
|
Forecast Zeitweise Regen, später zunehmend
|
||||||
|
ZCode U</pre>
|
||||||
</div>
|
</div>
|
||||||
Welche der vorgenannten Wertepaare durch <wsreaderprog>
|
Welche der vorgenannten Wertepaare durch <wsreaderprog>
|
||||||
geliefert werden, ist egal. Jedes bekannte wird übersetzt (z.B. <code>Ti</code>
|
geliefert werden, ist egal. Jedes bekannte wird übersetzt (z.B. <code>Ti</code>
|
||||||
@ -679,7 +699,7 @@ Forecast Cloudy</pre>
|
|||||||
<a name="WS3600attr"></a> <b>Attributes</b>
|
<a name="WS3600attr"></a> <b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#model">model</a> WS3600, WS2300,
|
<li><a href="#model">model</a> WS3600, WS2300,
|
||||||
WS1080 (z.Zt (noch) ohne Wirkung)</li>
|
WS1080, WS3080 (z.Zt (noch) ohne Wirkung)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user