mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
openweather: date
git-svn-id: https://svn.fhem.de/fhem/trunk@6964 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
73cfab96e8
commit
420f5d7e44
@ -119,9 +119,7 @@ use LWP::UserAgent;
|
||||
use HTTP::Request;
|
||||
use HTML::Parser;
|
||||
|
||||
# Modul Version for remote debugging
|
||||
my $MODUL = "OPENWEATHER";
|
||||
my $modulVersion = '# $Id$';
|
||||
|
||||
sub OPENWEATHER_Log($$$);
|
||||
sub OPENWEATHER_Start($);
|
||||
@ -194,8 +192,7 @@ OPENWEATHER_Define($$)
|
||||
# Get first data after 7 seconds
|
||||
InternalTimer(gettimeofday() + 7, "OPENWEATHER_Start", $hash, 0) if $interval > 0;
|
||||
|
||||
$hash->{fhem}{modulVersion} = '# $ID: $';
|
||||
OPENWEATHER_Log $hash, 5, "OPENWEATHER.pm version is " . $hash->{fhem}{modulVersion};
|
||||
$hash->{fhem}{modulVersion} = '$Date$';
|
||||
|
||||
return undef;
|
||||
} #end OPENWEATHER_Define
|
||||
|
@ -331,7 +331,6 @@ use vars qw($readingFnAttributes);
|
||||
|
||||
use vars qw(%defs);
|
||||
my $MODUL = "PROPLANTA";
|
||||
my $modulVersion = '# $Id$';
|
||||
|
||||
my %url_template_1 =( "de" => "http://www.proplanta.de/Wetter/LOKALERORT-Wetter.html"
|
||||
, "at" => "http://www.proplanta.de/Agrarwetter-Oesterreich/LOKALERORT/"
|
||||
@ -397,7 +396,7 @@ sub PROPLANTA_Define($$)
|
||||
$hash->{STATE} = "Initializing";
|
||||
$hash->{LOCAL} = 0;
|
||||
$hash->{INTERVAL} = 3600;
|
||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
||||
$hash->{fhem}{modulVersion} = '$Date$';
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
#
|
||||
# 70_JSONMETER.pm
|
||||
#
|
||||
# Copyright notice
|
||||
#
|
||||
# (c) 2014 Torsten Poitzsch < torsten . poitzsch at gmx . de >
|
||||
#
|
||||
# This module reads data from devices that provide OBIS compatible data
|
||||
# in json format (e.g. power meters)
|
||||
#
|
||||
# Copyright notice
|
||||
#
|
||||
# This script is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
@ -60,8 +60,7 @@ sub JSONMETER_doStatisticMinMax ($$$);
|
||||
sub JSONMETER_doStatisticMinMaxSingle ($$$$);
|
||||
sub JSONMETER_doStatisticDelta ($$$$$);
|
||||
sub JSONMETER_doStatisticDeltaSingle ($$$$$$);
|
||||
# Modul Version for remote debugging
|
||||
my $modulVersion = "2014-04-29";
|
||||
|
||||
my $MODUL = "JSONMETER";
|
||||
##############################################################
|
||||
# Syntax: meterType => port URL-Path
|
||||
@ -200,8 +199,7 @@ JSONMETER_Define($$)
|
||||
#Reset temporary values
|
||||
$hash->{fhem}{jsonInterpreter} = "";
|
||||
|
||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
||||
JSONMETER_Log $hash, 5, "JSONMETER.pm version is $modulVersion.";
|
||||
$hash->{fhem}{modulVersion} = '$Date$';
|
||||
|
||||
return undef;
|
||||
} #end JSONMETER_Define
|
||||
@ -906,6 +904,7 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
|
||||
<a name="JSONMETER"></a>
|
||||
<h3>JSONMETER</h3>
|
||||
<div style="width:800px">
|
||||
<ul>
|
||||
This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
|
||||
<br>
|
||||
@ -918,17 +917,14 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
|
||||
<b>Define</b>
|
||||
<ul>
|
||||
<br>
|
||||
<code>define <name> JSONMETER <deviceType> [<ip address>] [poll-interval]</code>
|
||||
<br>
|
||||
Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
|
||||
<br>
|
||||
<li><code>[poll-interval]</code>
|
||||
<br>
|
||||
Default is 300 seconds. Smallest possible value is 10. With 0 it will only update on "manual" request.
|
||||
</li><br>
|
||||
<li><code><deviceType></code>
|
||||
<br>
|
||||
Used to define the path and port to extract the json file.
|
||||
Mandatory. Used to define the path and port to extract the json file.
|
||||
<br>
|
||||
The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
|
||||
<br>
|
||||
@ -944,6 +940,14 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<li><b>url</b> - use the URL defined via the attributes 'pathString' and 'port'</li>
|
||||
<li><b>file</b> - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)</li>
|
||||
</ul>
|
||||
</li><br>
|
||||
<li><code>[<ip address>]</code>
|
||||
<br>
|
||||
IP address of the phyisical device. (not needed for 'url' and 'file')
|
||||
</li><br>
|
||||
<li><code>[poll-interval]</code>
|
||||
<br>
|
||||
Optional. Default is 300 seconds. Smallest possible value is 10. With 0 it will only update on "manual" request.
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
@ -991,45 +995,46 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<a name="JSONMETERattr"></a>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li><code>alwaysAnalyse < 0 | 1 ></code>
|
||||
<br>
|
||||
Repeats by each update the json analysis - use if structure of json data changes
|
||||
<br>
|
||||
Normally the once analysed structure is saved to reduce CPU load.
|
||||
</li><br>
|
||||
<li><code>doStatistics < 0 | 1 ></code>
|
||||
<br>
|
||||
Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
|
||||
<br>
|
||||
Logging and visualisation of the statistics should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
|
||||
</li><br>
|
||||
<li><code>pathString <string></code>
|
||||
<ul>
|
||||
<li>if deviceType = 'file': specifies the local file name and path</li>
|
||||
<li>if deviceType = 'url': specifies the url path</li>
|
||||
<li>other deviceType: can be used to add login information to the url path of predefined devices</li>
|
||||
</ul>
|
||||
</li><br>
|
||||
<li><code>port <number></code>
|
||||
<br>
|
||||
Specifies the IP port for the deviceType 'url' (default is 80)
|
||||
</li><br>
|
||||
<li><code>timeOut <seconds></code>
|
||||
<br>
|
||||
Specifies the timeout for the reading of the raw data. (default is 10)
|
||||
<br>
|
||||
The run time of the reading process can be measured via "get <device> jsonFile".
|
||||
</li><br>
|
||||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||
<li><code>alwaysAnalyse < 0 | 1 ></code>
|
||||
<br>
|
||||
Repeats by each update the json analysis - use if structure of json data changes
|
||||
<br>
|
||||
Normally the once analysed structure is saved to reduce CPU load.
|
||||
</li><br>
|
||||
<li><code>doStatistics < 0 | 1 ></code>
|
||||
<br>
|
||||
Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
|
||||
<br>
|
||||
Logging and visualisation of the statistics should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
|
||||
</li><br>
|
||||
<li><code>pathString <string></code>
|
||||
<ul>
|
||||
<li>if deviceType = 'file': specifies the local file name and path</li>
|
||||
<li>if deviceType = 'url': specifies the url path</li>
|
||||
<li>other deviceType: can be used to add login information to the url path of predefined devices</li>
|
||||
</ul>
|
||||
</li><br>
|
||||
<li><code>port <number></code>
|
||||
<br>
|
||||
Specifies the IP port for the deviceType 'url' (default is 80)
|
||||
</li><br>
|
||||
<li><code>timeOut <seconds></code>
|
||||
<br>
|
||||
Specifies the timeout for the reading of the raw data. (default is 10)
|
||||
<br>
|
||||
The run time of the reading process can be measured via "get <device> jsonFile".
|
||||
</li><br>
|
||||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
=end html
|
||||
|
||||
=begin html_DE
|
||||
|
||||
<a name="JSONMETER"></a>
|
||||
<h3>JSONMETER</h3>
|
||||
<div style="width:800px">
|
||||
<ul>
|
||||
Dieses Modul liest Daten von Messgeräten (z.B. Stromzähler, Gaszähler oder Wärmezähler, so genannte Smartmeter),
|
||||
welche <a href="http://de.wikipedia.org/wiki/OBIS-Kennzahlen">OBIS</a> kompatible Daten im JSON-Format auf einem Webserver oder auf dem FHEM-Dateisystem zur Verfügung stellen.
|
||||
@ -1146,7 +1151,7 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
=end html_DE
|
||||
|
||||
=cut
|
||||
|
@ -53,7 +53,6 @@ sub statistics_maxDecPlaces($$);
|
||||
sub statistics_UpdateDevReading($$$$);
|
||||
|
||||
# Modul Version for remote debugging
|
||||
my $modulVersion = "2014-07-06";
|
||||
my $MODUL = "statistics";
|
||||
|
||||
##############################################################
|
||||
@ -147,7 +146,7 @@ statistics_Define($$)
|
||||
$hash->{DEV_REGEXP} = $devName;
|
||||
|
||||
$hash->{STATE} = "Waiting for notifications";
|
||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
||||
$hash->{fhem}{modulVersion} = '$Date$';
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
|
||||
@ -1019,7 +1018,7 @@ statistics_UpdateDevReading($$$$)
|
||||
|
||||
<a name="statistics"></a>
|
||||
<h3>statistics</h3>
|
||||
<div style="width:800px">
|
||||
<div style="width:800px">
|
||||
<ul>
|
||||
This modul calculates for certain readings of given devices statistical values and adds them to the devices.
|
||||
<br>
|
||||
@ -1117,7 +1116,7 @@ statistics_UpdateDevReading($$$$)
|
||||
Allows the correct timely assignment within plots, can be adapted to CPU load.
|
||||
<br>
|
||||
</li><br>
|
||||
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</i></code>
|
||||
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</code>
|
||||
<ul>
|
||||
<li>statTypes: Min|Avg|Max|Delta|Duration|<span style="color:blue;">Tendency</span></li>
|
||||
<li>period: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user