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 HTTP::Request;
|
||||||
use HTML::Parser;
|
use HTML::Parser;
|
||||||
|
|
||||||
# Modul Version for remote debugging
|
|
||||||
my $MODUL = "OPENWEATHER";
|
my $MODUL = "OPENWEATHER";
|
||||||
my $modulVersion = '# $Id$';
|
|
||||||
|
|
||||||
sub OPENWEATHER_Log($$$);
|
sub OPENWEATHER_Log($$$);
|
||||||
sub OPENWEATHER_Start($);
|
sub OPENWEATHER_Start($);
|
||||||
@ -194,8 +192,7 @@ OPENWEATHER_Define($$)
|
|||||||
# Get first data after 7 seconds
|
# Get first data after 7 seconds
|
||||||
InternalTimer(gettimeofday() + 7, "OPENWEATHER_Start", $hash, 0) if $interval > 0;
|
InternalTimer(gettimeofday() + 7, "OPENWEATHER_Start", $hash, 0) if $interval > 0;
|
||||||
|
|
||||||
$hash->{fhem}{modulVersion} = '# $ID: $';
|
$hash->{fhem}{modulVersion} = '$Date$';
|
||||||
OPENWEATHER_Log $hash, 5, "OPENWEATHER.pm version is " . $hash->{fhem}{modulVersion};
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
} #end OPENWEATHER_Define
|
} #end OPENWEATHER_Define
|
||||||
|
@ -331,7 +331,6 @@ use vars qw($readingFnAttributes);
|
|||||||
|
|
||||||
use vars qw(%defs);
|
use vars qw(%defs);
|
||||||
my $MODUL = "PROPLANTA";
|
my $MODUL = "PROPLANTA";
|
||||||
my $modulVersion = '# $Id$';
|
|
||||||
|
|
||||||
my %url_template_1 =( "de" => "http://www.proplanta.de/Wetter/LOKALERORT-Wetter.html"
|
my %url_template_1 =( "de" => "http://www.proplanta.de/Wetter/LOKALERORT-Wetter.html"
|
||||||
, "at" => "http://www.proplanta.de/Agrarwetter-Oesterreich/LOKALERORT/"
|
, "at" => "http://www.proplanta.de/Agrarwetter-Oesterreich/LOKALERORT/"
|
||||||
@ -397,7 +396,7 @@ sub PROPLANTA_Define($$)
|
|||||||
$hash->{STATE} = "Initializing";
|
$hash->{STATE} = "Initializing";
|
||||||
$hash->{LOCAL} = 0;
|
$hash->{LOCAL} = 0;
|
||||||
$hash->{INTERVAL} = 3600;
|
$hash->{INTERVAL} = 3600;
|
||||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
$hash->{fhem}{modulVersion} = '$Date$';
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
|
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
#
|
#
|
||||||
# 70_JSONMETER.pm
|
# 70_JSONMETER.pm
|
||||||
#
|
#
|
||||||
# Copyright notice
|
|
||||||
#
|
|
||||||
# (c) 2014 Torsten Poitzsch < torsten . poitzsch at gmx . de >
|
# (c) 2014 Torsten Poitzsch < torsten . poitzsch at gmx . de >
|
||||||
#
|
#
|
||||||
# This module reads data from devices that provide OBIS compatible data
|
# This module reads data from devices that provide OBIS compatible data
|
||||||
# in json format (e.g. power meters)
|
# in json format (e.g. power meters)
|
||||||
#
|
#
|
||||||
|
# Copyright notice
|
||||||
|
#
|
||||||
# This script is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
@ -60,8 +60,7 @@ sub JSONMETER_doStatisticMinMax ($$$);
|
|||||||
sub JSONMETER_doStatisticMinMaxSingle ($$$$);
|
sub JSONMETER_doStatisticMinMaxSingle ($$$$);
|
||||||
sub JSONMETER_doStatisticDelta ($$$$$);
|
sub JSONMETER_doStatisticDelta ($$$$$);
|
||||||
sub JSONMETER_doStatisticDeltaSingle ($$$$$$);
|
sub JSONMETER_doStatisticDeltaSingle ($$$$$$);
|
||||||
# Modul Version for remote debugging
|
|
||||||
my $modulVersion = "2014-04-29";
|
|
||||||
my $MODUL = "JSONMETER";
|
my $MODUL = "JSONMETER";
|
||||||
##############################################################
|
##############################################################
|
||||||
# Syntax: meterType => port URL-Path
|
# Syntax: meterType => port URL-Path
|
||||||
@ -200,8 +199,7 @@ JSONMETER_Define($$)
|
|||||||
#Reset temporary values
|
#Reset temporary values
|
||||||
$hash->{fhem}{jsonInterpreter} = "";
|
$hash->{fhem}{jsonInterpreter} = "";
|
||||||
|
|
||||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
$hash->{fhem}{modulVersion} = '$Date$';
|
||||||
JSONMETER_Log $hash, 5, "JSONMETER.pm version is $modulVersion.";
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
} #end JSONMETER_Define
|
} #end JSONMETER_Define
|
||||||
@ -906,6 +904,7 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
|||||||
|
|
||||||
<a name="JSONMETER"></a>
|
<a name="JSONMETER"></a>
|
||||||
<h3>JSONMETER</h3>
|
<h3>JSONMETER</h3>
|
||||||
|
<div style="width:800px">
|
||||||
<ul>
|
<ul>
|
||||||
This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
|
This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
|
||||||
<br>
|
<br>
|
||||||
@ -918,17 +917,14 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
|||||||
|
|
||||||
<b>Define</b>
|
<b>Define</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<br>
|
||||||
<code>define <name> JSONMETER <deviceType> [<ip address>] [poll-interval]</code>
|
<code>define <name> JSONMETER <deviceType> [<ip address>] [poll-interval]</code>
|
||||||
<br>
|
<br>
|
||||||
Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
|
Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
|
||||||
<br>
|
<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>
|
<li><code><deviceType></code>
|
||||||
<br>
|
<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>
|
<br>
|
||||||
The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
|
The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
|
||||||
<br>
|
<br>
|
||||||
@ -944,6 +940,14 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
|||||||
<li><b>url</b> - use the URL defined via the attributes 'pathString' and 'port'</li>
|
<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>
|
<li><b>file</b> - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)</li>
|
||||||
</ul>
|
</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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -1023,13 +1027,14 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
|||||||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
=end html
|
=end html
|
||||||
|
|
||||||
=begin html_DE
|
=begin html_DE
|
||||||
|
|
||||||
<a name="JSONMETER"></a>
|
<a name="JSONMETER"></a>
|
||||||
<h3>JSONMETER</h3>
|
<h3>JSONMETER</h3>
|
||||||
|
<div style="width:800px">
|
||||||
<ul>
|
<ul>
|
||||||
Dieses Modul liest Daten von Messgeräten (z.B. Stromzähler, Gaszähler oder Wärmezähler, so genannte Smartmeter),
|
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.
|
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>
|
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
=end html_DE
|
=end html_DE
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
@ -53,7 +53,6 @@ sub statistics_maxDecPlaces($$);
|
|||||||
sub statistics_UpdateDevReading($$$$);
|
sub statistics_UpdateDevReading($$$$);
|
||||||
|
|
||||||
# Modul Version for remote debugging
|
# Modul Version for remote debugging
|
||||||
my $modulVersion = "2014-07-06";
|
|
||||||
my $MODUL = "statistics";
|
my $MODUL = "statistics";
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
@ -147,7 +146,7 @@ statistics_Define($$)
|
|||||||
$hash->{DEV_REGEXP} = $devName;
|
$hash->{DEV_REGEXP} = $devName;
|
||||||
|
|
||||||
$hash->{STATE} = "Waiting for notifications";
|
$hash->{STATE} = "Waiting for notifications";
|
||||||
$hash->{fhem}{modulVersion} = $modulVersion;
|
$hash->{fhem}{modulVersion} = '$Date$';
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
|
|
||||||
@ -1117,7 +1116,7 @@ statistics_UpdateDevReading($$$$)
|
|||||||
Allows the correct timely assignment within plots, can be adapted to CPU load.
|
Allows the correct timely assignment within plots, can be adapted to CPU load.
|
||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</i></code>
|
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</code>
|
||||||
<ul>
|
<ul>
|
||||||
<li>statTypes: Min|Avg|Max|Delta|Duration|<span style="color:blue;">Tendency</span></li>
|
<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>
|
<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