mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
73_km200.pm: Reading will be deleted after set by DoNotPoll attribute
git-svn-id: https://svn.fhem.de/fhem/trunk@7571 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5752b3a4d8
commit
8a55f1e21a
@ -1,10 +1,10 @@
|
|||||||
# $Id: 73_km200.pm 0036 2015-01-13 16:00:00Z Matthias_Deeke $
|
# $Id: 73_km200.pm 0037 2015-01-14 16:00:00Z Matthias_Deeke $
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
#
|
#
|
||||||
# 73_km200.pm
|
# 73_km200.pm
|
||||||
# Creates the possibility to access the Buderus central heating system via
|
# Creates the possibility to access the Buderus central heating system via
|
||||||
# Buderus KM200 or KM50 communication module. It uses HttpUtils_NonblockingGet
|
# Buderus KM200, KM100 or KM50 communication module. It uses HttpUtils_NonblockingGet
|
||||||
# from Rudolf Koenig to avoid a full blockage of the fhem main system during
|
# from Rudolf Koenig to avoid a full blockage of the fhem main system during the
|
||||||
# polling procedure.
|
# polling procedure.
|
||||||
#
|
#
|
||||||
# Author : Matthias Deeke
|
# Author : Matthias Deeke
|
||||||
@ -132,6 +132,9 @@
|
|||||||
# 0036 13.01.2015 Sailor km200_GetDynService Preparing DbLog Split
|
# 0036 13.01.2015 Sailor km200_GetDynService Preparing DbLog Split
|
||||||
# 0036 13.01.2015 Sailor km200_GetStatService Preparing DbLog Split
|
# 0036 13.01.2015 Sailor km200_GetStatService Preparing DbLog Split
|
||||||
# 0036 13.01.2015 Sailor =pod Correction of errors and German description added
|
# 0036 13.01.2015 Sailor =pod Correction of errors and German description added
|
||||||
|
# 0037 14.01.2015 Sailor km200_DbLog_splitFn Try-out DbLog Split
|
||||||
|
# 0037 14.01.2015 Sailor =pod Correction of errors
|
||||||
|
# 0037 14.01.2015 Sailor km200_Attr Readings are being deleted if set not to be polled by attribute
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +203,7 @@ sub km200_Define($$)
|
|||||||
my $url = $a[2];
|
my $url = $a[2];
|
||||||
my $km200_gateway_password = $a[3];
|
my $km200_gateway_password = $a[3];
|
||||||
my $km200_private_password = $a[4];
|
my $km200_private_password = $a[4];
|
||||||
my $ModuleVersion = "0036";
|
my $ModuleVersion = "0037";
|
||||||
|
|
||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
$hash->{STATE} = "define";
|
$hash->{STATE} = "define";
|
||||||
@ -533,7 +536,6 @@ sub km200_Define($$)
|
|||||||
|
|
||||||
|
|
||||||
###START###### For Debugging purpose only ##################################################################START####
|
###START###### For Debugging purpose only ##################################################################START####
|
||||||
if ($hash->{CONSOLEMESSAGE} == true) {print("\n");}
|
|
||||||
Log3 $name, 5, $name. " : km200 - Define H : " .$hash;
|
Log3 $name, 5, $name. " : km200 - Define H : " .$hash;
|
||||||
Log3 $name, 5, $name. " : km200 - Define D : " .$def;
|
Log3 $name, 5, $name. " : km200 - Define D : " .$def;
|
||||||
Log3 $name, 5, $name. " : km200 - Define A : " .@a;
|
Log3 $name, 5, $name. " : km200 - Define A : " .@a;
|
||||||
@ -591,8 +593,18 @@ sub km200_Define($$)
|
|||||||
sub km200_DbLog_split($)
|
sub km200_DbLog_split($)
|
||||||
{
|
{
|
||||||
my ($event) = @_;
|
my ($event) = @_;
|
||||||
|
# my $name = $event[0];
|
||||||
|
# my $hash = $defs{$name};
|
||||||
my ($reading, $value, $unit);
|
my ($reading, $value, $unit);
|
||||||
|
|
||||||
|
|
||||||
|
print("DbLog_splitFn - event : " . $event . "\n");
|
||||||
|
#print("DbLog_splitFn - event[0] : " . $event[0] . "\n");
|
||||||
|
#print("DbLog_splitFn - event[1] : " . $event[1] . "\n");
|
||||||
|
#print("DbLog_splitFn - event[2] : " . $event[2] . "\n");
|
||||||
|
|
||||||
|
#print("DbLog_splitFn - unit : " . $hash->{temp}{ServiceDbLogSplitHash}{unit} ."\n");
|
||||||
|
|
||||||
### Get values being changed from hash
|
### Get values being changed from hash
|
||||||
# $reading = $hash->{temp}{ServiceDbLogSplitHash}{id};
|
# $reading = $hash->{temp}{ServiceDbLogSplitHash}{id};
|
||||||
# $value = $hash->{temp}{ServiceDbLogSplitHash}{value};
|
# $value = $hash->{temp}{ServiceDbLogSplitHash}{value};
|
||||||
@ -723,6 +735,8 @@ sub km200_Attr(@)
|
|||||||
my @KM200_AllServices = @{$hash->{Secret}{KM200ALLSERVICES}};
|
my @KM200_AllServices = @{$hash->{Secret}{KM200ALLSERVICES}};
|
||||||
my @KM200_DONOTPOLL = ();
|
my @KM200_DONOTPOLL = ();
|
||||||
my @temp = @a;
|
my @temp = @a;
|
||||||
|
|
||||||
|
### Delete the first 3 items of the array
|
||||||
splice @temp, 0, 3;
|
splice @temp, 0, 3;
|
||||||
|
|
||||||
### Insert empty field as minimum entry
|
### Insert empty field as minimum entry
|
||||||
@ -744,7 +758,11 @@ sub km200_Attr(@)
|
|||||||
my $FoundPosition = first_index{ $_ eq $SearchWord }@KM200_AllServices;
|
my $FoundPosition = first_index{ $_ eq $SearchWord }@KM200_AllServices;
|
||||||
if ($FoundPosition >= 0)
|
if ($FoundPosition >= 0)
|
||||||
{
|
{
|
||||||
|
### Remove Service not to be polled from list of services
|
||||||
splice(@KM200_AllServices, $FoundPosition, 1);
|
splice(@KM200_AllServices, $FoundPosition, 1);
|
||||||
|
|
||||||
|
### Delete Reading
|
||||||
|
fhem( "deletereading $name $SearchWord" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@{$hash->{Secret}{KM200ALLSERVICES}} = @KM200_AllServices;
|
@{$hash->{Secret}{KM200ALLSERVICES}} = @KM200_AllServices;
|
||||||
@ -762,7 +780,6 @@ sub km200_Attr(@)
|
|||||||
{
|
{
|
||||||
Log3 $name, 2, $name. " : km200 - Unknown attribute: $a[2]";
|
Log3 $name, 2, $name. " : km200 - Unknown attribute: $a[2]";
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
####END####### Handle attributes after changes via fhem GUI ####################################################END#####
|
####END####### Handle attributes after changes via fhem GUI ####################################################END#####
|
||||||
@ -1165,7 +1182,7 @@ sub km200_GetInitService($)
|
|||||||
|
|
||||||
|
|
||||||
###START###### Subroutine to download complete initial data set from gateway ##################################START####
|
###START###### Subroutine to download complete initial data set from gateway ##################################START####
|
||||||
# For all existing known services try reading the respective values from gateway
|
# For all known, but not excluded services by attribute "DoNotPoll", try reading the respective values from gateway
|
||||||
sub km200_ParseHttpResponseInit($)
|
sub km200_ParseHttpResponseInit($)
|
||||||
{
|
{
|
||||||
my ($param, $err, $data) = @_;
|
my ($param, $err, $data) = @_;
|
||||||
@ -1795,21 +1812,21 @@ sub km200_ParseHttpResponseStat($)
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
The Buderus <a href="http://www.buderus.de/Logamatic_Web_KM200-4608125.html">KM200</a> or <a href="http://de.documents.buderus.com/sitemap/document/id/6720807675">KM50</a> is a communication device to establish a connection between the Buderus central heating control unit and the internet.<BR>
|
Das Buderus <a href="http://www.buderus.de/Logamatic_Web_KM200-4608125.html">KM200</a> or <a href="http://de.documents.buderus.com/sitemap/document/id/6720807675">KM50</a> ist eine Schnittstelle zwischen der Buderus Zentralheizungssteuerung un dem Internet.<BR>
|
||||||
It has been designed in order to allow the inhabitants accessing their heating system via his Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a>.<BR>
|
Es wurde entwickelt um den Bewohnern den Zugang zu Ihrem Heizungssystem durch die Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl zu erlauben.</a>.<BR>
|
||||||
Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.<BR>
|
Darüber hinaus erlaubt es nach vorheriger Freigabe dem Heizungs- bzw. Wartungsbetrieb die Heizungsanlage von aussen zu warten und Werte zu verändern.<BR>
|
||||||
The km200 module enables read/write access to these parameters.<BR>
|
Das km200 Modul erlaubt den Lese-/Schreibzugriff dieser Parameter durch fhem.<BR>
|
||||||
<BR>
|
<BR>
|
||||||
In order to use the KM200 or KM50 with fhem, you must define the private password with the Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a> first.<BR>
|
Um das KM200 oder KM50 Gerät mit fhem nutzen zu können, muß zunächst ein privates Passwort mit der Buderus Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a> - App gesetzt werden.<BR>
|
||||||
<BR>
|
<BR>
|
||||||
<font color="#FF0000"><b><u>Remark:</u></b><BR></font>
|
<font color="#FF0000"><b><u>Anmerkung:</u></b><BR></font>
|
||||||
Despite the instruction of the Buderus KM200 Installation guide, the ports 5222 and 5223 should not be opened and allow access to the KM200/KM50 module from outside.<BR>
|
Unabhängig der Installationsanleitung des Buderus KM200 Geräts, sollten die Ports 5222 und 5223 am Router geschlossen bleiben um keinen Zugriff von außen auf das Gerät zu erlauben.<BR>
|
||||||
You should configure (or leave) your internet router with the respective settings.<BR>
|
Der Router sollte entsprechend Konfiguriert bzw. so belassen werden.<BR>
|
||||||
If you want to read or change settings on the heating system, you should access the central heating control system via your fhem system only.<BR>
|
Wenn der Lese-/Schreibzugriff von aussen gewünscht ist, so sollte man ausschließlich über das fhem-System auf die Zentralheizung zugreifen.<BR>
|
||||||
<BR>
|
<BR>
|
||||||
As soon the module has been defined within the fhem.cfg, the module is trying to obtain all known/possible services. <BR>
|
Sobald das Modul in der fhem.cfg definiert ist, wird das Modul versuchen alle bekannten Services abzuklopfen ob diese in der angeschlossenen Konstellation überhaupt vorhanden sind.<BR>
|
||||||
After this initial contact, the module differs between a set of continuous (dynamically) changing values (e.g.: temperatures) and not changing static values (e.g.: Firmware version).<BR>
|
Nach diesem Initial-Kontakt unterscheidet das Modul zwisachen einem Satz an Services die sich ständig (dynamisch) ändern (z.B.: Vorlauftemperatur) sowie sich nicht ständig (statisch) ändernden Werten (z.B.: Firmware Version).<BR>
|
||||||
This two different set of values can be bound to an individual polling interval. Refer to <a href="#KM200Attr">Attributes</a><BR>
|
Diese beiden Sätze an Services können mir einem individuellen Abfrageintervall versehen werden. Siehe <a href="#KM200Attr">Attributes</a><BR>
|
||||||
<BR>
|
<BR>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1824,9 +1841,9 @@ sub km200_ParseHttpResponseStat($)
|
|||||||
<ul><ul>
|
<ul><ul>
|
||||||
<table>
|
<table>
|
||||||
<tr><td align="right" valign="top"><code><name></code> : </td><td align="left" valign="top">Der Name des Gerätes. Empfehlung: "myKm200".</td></tr>
|
<tr><td align="right" valign="top"><code><name></code> : </td><td align="left" valign="top">Der Name des Gerätes. Empfehlung: "myKm200".</td></tr>
|
||||||
<tr><td align="right" valign="top"><code><IPv4-address></code> : </td><td align="left" valign="top"Eine gültige IPv4 Adresse des KM200. Eventuell im router nachschauen welche DHCP - Addresse dem KM200/KM50 vergeben wurde.</td></tr>
|
<tr><td align="right" valign="top"><code><IPv4-address></code> : </td><td align="left" valign="top">Eine gültige IPv4 Adresse des KM200. Eventuell im Router nachschauen welche DHCP - Addresse dem KM200/KM50 vergeben wurde.</td></tr>
|
||||||
<tr><td align="right" valign="top"><code><GatewayPassword></code> : </td><td align="left" valign="top">Das gateway Passwort, welches au dem Typenschild des KM200/KM50 zu finden ist.</td></tr>
|
<tr><td align="right" valign="top"><code><GatewayPassword></code> : </td><td align="left" valign="top">Das gateway Passwort, welches auf dem Typenschild des KM200/KM50 zu finden ist.</td></tr>
|
||||||
<tr><td align="right" valign="top"><code><PrivatePassword></code> : </td><td align="left" valign="top">Das private Passwort, welches durch den user mit Hilfe der <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a> - App vergeben wurde.</td></tr>
|
<tr><td align="right" valign="top"><code><PrivatePassword></code> : </td><td align="left" valign="top">Das private Passwort, welches durch den User mit Hilfe der <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a> - App vergeben wurde.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul></ul>
|
</ul></ul>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user