diff --git a/fhem/FHEM/73_km200.pm b/fhem/FHEM/73_km200.pm
index 14127688e..e9b6a1728 100644
--- a/fhem/FHEM/73_km200.pm
+++ b/fhem/FHEM/73_km200.pm
@@ -50,6 +50,7 @@ package main;
use strict;
use warnings;
use Blocking;
+use FHEM::Meta;
use Time::HiRes qw(gettimeofday sleep usleep);
use Digest::MD5 qw(md5 md5_hex md5_base64);
use base qw( Exporter );
@@ -88,6 +89,7 @@ sub km200_Initialize($)
"DoNotPoll " .
"ReadBackDelay " .
$readingFnAttributes;
+ return FHEM::Meta::InitMod( __FILE__, $hash );
}
####END####### Initialize module ###############################################################################END#####
@@ -333,7 +335,7 @@ sub km200_DbLog_splitFn($$)
### Log entries for debugging
Log3 $name, 5, $name. " : km200_DbLog_splitFn - Content of event : " . $event;
Log3 $name, 5, $name. " : km200_DbLog_splitFn - Content of argument[0] : " . $argument[0];
- Log3 $name, 5, $name. " : km200_DbLog_splitFn - Content of argument[1] : " . $argument[1];
+# Log3 $name, 5, $name. " : km200_DbLog_splitFn - Content of argument[1] : " . $argument[1];
### If the service to be changed is identical to the one where the unit received from
if ($argument[0] = $hash->{temp}{ServiceDbLogSplitHash}{id})
@@ -1071,6 +1073,9 @@ sub km200_PostSingleService($)
$JsonContent =~ s/{"switchPoints"://;
$JsonContent =~ s/]}/]/g;
+ ### Log file entry for debugging
+ Log3 $name, 5, $name. "km200_Set - JsonContent : " . $JsonContent;
+
### Encrypt
$hash->{temp}{jsoncontent} = $JsonContent;
$data = km200_Encrypt($hash);
@@ -2950,356 +2955,201 @@ sub km200_ParseHttpResponseDyn($)
=item summary Connects fhem to Buderus KM300, KM200, KM100, KM50
=item summary_DE Verbindet fhem mit Buderus KM300, KM200, KM100, KM50
-
=begin html
KM200
-
-
-
- The Buderus KM200, KM100 or KM50 (hereafter described as KMxxx) is a communication device to establish a connection between the Buderus central heating control unit and the internet.
- It has been designed in order to allow the inhabitants accessing their heating system via his Buderus App EasyControl.
- Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.
- The km200 fhem-module enables read/write access to these parameters.
-
- In order to use the KMxxx with fhem, you must define the private password with the Buderus App EasyControl first.
-
- Remark:
- Despite the instruction of the Buderus KMxxx Installation guide, the ports 5222 and 5223 should not be opened and allow access to the KMxxx module from outside.
- You should configure (or leave) your internet router with the respective settings.
- 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.
-
- As soon the module has been defined within the fhem.cfg, the module is trying to obtain all known/possible services.
- 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).
- This two different set of values can be bound to an individual polling interval. Refer to Attributes
-
- |
-
-
-
-
-
-define <name> km200 <IPv4-address> <GatewayPassword> <PrivatePassword>
|
-
-
-
- <name> : | The name of the device. Recommendation: "myKm200". |
- <IPv4-address> : | A valid IPv4 address of the KMxxx. You might look into your router which DHCP address has been given to the KMxxx. |
- <GatewayPassword> : | The gateway password which is provided on the type sign of the KMxxx. |
- <PrivatePassword> : | The private password which has been defined by the user via EasyControl. |
-
-
-
-
-
-
- Set |
-
-
- The set function is able to change a value of a service which has the "writeable" - tag within the KMxxx service structure.
- Most of those values have an additional list of allowed values which are the only ones to be set.
- Other floatable type values can be changed only within their range of minimum and maximum value.
-
- |
-
-
-
-
-
-
- <service> : | The name of the service which value shall be set. E.g.: "/heatingCircuits/hc1/operationMode "
|
- <value> : | A valid value for this service.
|
-
-
-
-
-
-
- Get |
-
-
- The get function is able to obtain a value of a service within the KMxxx service structure.
- The additional list of allowed values or their range of minimum and maximum value will not be handed back.
-
- |
-
-
-
-
-
-
-
- <service> : | The name of the service which value shall be obtained. E.g.: "/heatingCircuits/hc1/operationMode "
- It returns only the value but not the unit or the range or list of allowed values possible.
- |
-
-
-
-
-
-
-
- <option> : | The optional Argument for the result of the get-command e.g.: "json "
- The following options are available:
- json - Returns the raw json-answer from the KMxxx as string.
- |
-
-
-
-
-
-
-
-
- Attributes |
-
-
- The following user attributes can be used with the km200 module in addition to the global ones e.g. room.
-
- |
-
-
-
- |
IntervalDynVal : | A valid polling interval for the dynamically changing values of the KMxxx. The value must be >=20s to allow the km200 module to perform a full polling procedure.
- The default value is 300s.
- |
+ The Buderus KM200, KM100 or KM50 (hereafter described as KMxxx) is a communication device to establish a connection between the Buderus central heating control unit and the internet.
+ It has been designed in order to allow the inhabitants accessing their heating system via his Buderus App EasyControl.
+ Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.
+ The km200 fhem-module enables read/write access to these parameters.
+
+ In order to use the KMxxx with fhem, you must define the private password with the Buderus App EasyControl first.
+
+ Remark:
+ Despite the instruction of the Buderus KMxxx Installation guide, the ports 5222 and 5223 should not be opened and allow access to the KMxxx module from outside.
+ You should configure (or leave) your internet router with the respective settings.
+ 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.
+
+ As soon the module has been defined within the fhem.cfg, the module is trying to obtain all known/possible services.
+ 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).
+ This two different set of values can be bound to an individual polling interval. Refer to Attributes
+
-
-
-
+
-
-
- |
PollingTimeout : | A valid time in order to allow the module to wait for a response of the KMxxx. Usually this value does not need to be changed but might in case of slow network or slow response.
- The default and minimum value is 5s.
- |
-
-
+ Define |
+ define <name> km200 <IPv4-address> <GatewayPassword> <PrivatePassword>
|
+ | The name of the device. Recommendation: "myKm200". |
+ | A valid IPv4 address of the KMxxx. You might look into your router which DHCP address has been given to the KMxxx. |
+ | The gateway password which is provided on the type sign of the KMxxx. |
+ | The private password which has been defined by the user via EasyControl. |
-
+
-
-
-
- |
DoNotPoll : | A list of services separated by blanks which shall not be downloaded due to repeatable crashes or irrelevant values.
- The list can be filled with the name of the top - hierarchy service, which means everything below that service will also be ignored.
- The default value (empty) therefore nothing will be ignored.
- |
-
-
+ Set |
+ The set function is able to change a value of a service which has the "writeable" - tag within the KMxxx service structure. Most of those values have an additional list of allowed values which are the only ones to be set. Other floatable type values can be changed only within their range of minimum and maximum value.
|
+ |
+ | The name of the service which value shall be set. E.g.: "/heatingCircuits/hc1/operationMode "
|
+ | A valid value for this service.
|
-
-
-
+
-
-
- |
ReadBackDelay : | A valid time in milliseconds [ms] for the delay between writing and re-reading of values after using the "set" - command. The value must be >=0ms.
- The default value is 100 = 100ms = 0,1s.
- |
-
-
+ Get |
+ The get function is able to obtain a value of a service within the KMxxx service structure. The additional list of allowed values or their range of minimum and maximum value will not be handed back.
|
+ |
+ | The name of the service which value shall be obtained. E.g.: "/heatingCircuits/hc1/operationMode " It returns only the value but not the unit or the range or list of allowed values possible.
|
+ | The optional Argument for the result of the get-command e.g.: "json " The following options are available: json - Returns the raw json-answer from the KMxxx as string.
|
-
+
-
-
-
- |
disable : | Stops the device from further pollings and deletes the existing readings.
- The default value is 0 = activated
- |
-
-
+ Attributes |
+ The following user attributes can be used with the km200 module in addition to the global ones e.g. room.
|
+
+
+ IntervalDynVal : A valid polling interval for the dynamically changing values of the KMxxx. The value must be >=20s to allow the km200 module to perform a full polling procedure. The default value is 300s.
|
+ PollingTimeout : A valid time in order to allow the module to wait for a response of the KMxxx. Usually this value does not need to be changed but might in case of slow network or slow response. The default and minimum value is 5s.
|
+ DoNotPoll : A list of services separated by blanks which shall not be downloaded due to repeatable crashes or irrelevant values. The list can be filled with the name of the top - hierarchy service, which means everything below that service will also be ignored. The default value (empty) therefore nothing will be ignored.
|
+ ReadBackDelay : A valid time in milliseconds [ms] for the delay between writing and re-reading of values after using the "set" - command. The value must be >=0ms. The default value is 100 = 100ms = 0,1s.
|
+ disable : Stops the device from further pollings and deletes the existing readings. The default value is 0 = activated
|
-
-
=end html
-
=begin html_DE
KM200
-
-
-
- Das Buderus KM200, KM100 or KM50 (ab hier als KMxxx beschrieben) ist eine Schnittstelle zwischen der Buderus Zentralheizungssteuerung un dem Internet.
- Es wurde entwickelt um den Bewohnern den Zugang zu Ihrem Heizungssystem durch die Buderus App EasyControl zu erlauben..
- Darüber hinaus erlaubt es nach vorheriger Freigabe dem Heizungs- bzw. Wartungsbetrieb die Heizungsanlage von aussen zu warten und Werte zu verändern.
- Das km200 fhem-Modul erlaubt den Lese-/Schreibzugriff dieser Parameter durch fhem.
-
- Um das KMxxx Gerät mit fhem nutzen zu können, muß zunächst ein privates Passwort mit der Buderus Buderus App EasyControl - App gesetzt werden.
-
- Anmerkung:
- Unabhängig der Installationsanleitung des Buderus KMxxx Geräts, sollten die Ports 5222 und 5223 am Router geschlossen bleiben um keinen Zugriff von außen auf das Gerät zu erlauben.
- Der Router sollte entsprechend Konfiguriert bzw. so belassen werden.
- Wenn der Lese-/Schreibzugriff von aussen gewünscht ist, so sollte man ausschließlich über das fhem-System auf die Zentralheizung zugreifen.
-
- 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.
- 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).
- Diese beiden Sätze an Services können mir einem individuellen Abfrageintervall versehen werden. Siehe Attributes
-
- |
-
-
-
-
-
-define <name> km200 <IPv4-address> <GatewayPassword> <PrivatePassword>
|
-
-
-
- <name> : | Der Name des Gerätes. Empfehlung: "myKm200". |
- <IPv4-address> : | Eine gültige IPv4 Adresse des KM200. Eventuell im Router nachschauen welche DHCP - Addresse dem KM200/KM50 vergeben wurde. |
- <GatewayPassword> : | Das gateway Passwort, welches auf dem Typenschild des KM200/KM50 zu finden ist. |
- <PrivatePassword> : | Das private Passwort, welches durch den User mit Hilfe der EasyControl - App vergeben wurde. |
-
-
-
-
-
-
- Set |
-
-
- Die set Funktion ändert die Werte der Services welche das Flag "schreibbar" innerhalb der KMxxx Service Struktur besitzen.
- Die meisten dieser beschreibbaren Werte haben eine exklusive Liste von möglichen Werten innerhalb dessen sich der neue Wert bewegen muss.
- Andere Fließkomma Werte haben einen maximum und minumum Wert, in dessen sich der neue Wert bewegen muß.
-
- |
-
-
-
-
-
-
- <service> : | Der Name des Service welcher gesetzt werden soll. Z.B.: "/heatingCircuits/hc1/operationMode "
|
- <value> : | Ein gültiger Wert für diesen Service.
|
-
-
-
-
-
-
- Get |
-
-
- Die get-Funktion ist in der Lage einen Wert eines Service innerhalb der KMxxx Service Struktur auszulesen.
- Die zusätzliche Liste von erlaubten Werten oder der Wertebereich zwischen Minimum und Maximum wird nicht zurück gegeben.
-
- |
-
-
-
-
-
-
-
- <service> : | Der Name des Service welcher ausgelesen werden soll. Z.B.: "/heatingCircuits/hc1/operationMode "
- Es gibt nur den Wert, aber nicht die Werteliste oder den möglichen Wertebereich zurück.
- |
-
-
-
-
-
-
-
- <option> : | Das optionelle Argument für Ausgabe des get-Befehls Z.B.: "json "
- Folgende Optionen sind verfügbar:
- json - Gibt anstelle des Wertes, die gesamte Json Antwort des KMxxx als String zurück
- |
-
-
-
-
-
-
-
- Attributes |
-
-
- Die folgenden Modul-spezifischen Attribute können neben den bekannten globalen Attributen gesetzt werden wie z.B.: room.
-
- |
-
-
-
- |
IntervalDynVal : | Ein gültiges Abfrageintervall für die sich ständig verändernden - dynamischen Werte der KMxxx Services. Der Wert muss größer gleich >=20s sein um dem Modul genügend Zeit einzuräumen eine volle Abfrage auszuführen bevor die nächste Abfrage startet.
- Der Default-Wert ist 300s.
- |
+ Das Buderus KM200, KM100 or KM50 (ab hier als KMxxx beschrieben) ist eine Schnittstelle zwischen der Buderus Zentralheizungssteuerung un dem Internet.
+ Es wurde entwickelt um den Bewohnern den Zugang zu Ihrem Heizungssystem durch die Buderus App EasyControl zu erlauben..
+ Darüber hinaus erlaubt es nach vorheriger Freigabe dem Heizungs- bzw. Wartungsbetrieb die Heizungsanlage von aussen zu warten und Werte zu verändern.
+ Das km200 fhem-Modul erlaubt den Lese-/Schreibzugriff dieser Parameter durch fhem.
+
+ Um das KMxxx Gerät mit fhem nutzen zu können, muß zunächst ein privates Passwort mit der Buderus Buderus App EasyControl - App gesetzt werden.
+
+ Anmerkung:
+ Unabhängig der Installationsanleitung des Buderus KMxxx Geräts, sollten die Ports 5222 und 5223 am Router geschlossen bleiben um keinen Zugriff von außen auf das Gerät zu erlauben.
+ Der Router sollte entsprechend Konfiguriert bzw. so belassen werden.
+ Wenn der Lese-/Schreibzugriff von aussen gewünscht ist, so sollte man ausschließlich über das fhem-System auf die Zentralheizung zugreifen.
+
+ 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.
+ 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).
+ Diese beiden Sätze an Services können mir einem individuellen Abfrageintervall versehen werden. Siehe Attributes
+
-
-
-
+
-
-
- |
PollingTimeout : | Ein gültiger Zeitwert um dem KMxxx genügend Zeit zur Antwort einzelner Werte einzuräumen. Normalerweise braucht dieser Wert nicht verändert werden, muss jedoch im Falle eines langsamen Netzwerks erhöht werden
- Der Default-Wert ist 5s.
- |
-
-
+ Define |
+ define <name> km200 <IPv4-address> <GatewayPassword> <PrivatePassword>
|
+ | Der Name des Gerätes. Empfehlung: "myKm200". |
+ | Eine gültige IPv4 Adresse des KM200. Eventuell im Router nachschauen welche DHCP - Addresse dem KM200/KM50 vergeben wurde. |
+ | Das gateway Passwort, welches auf dem Typenschild des KM200/KM50 zu finden ist. |
+ | Das private Passwort, welches durch den User mit Hilfe der EasyControl - App vergeben wurde. |
-
-
-
+
-
-
- |
DoNotPoll : | Eine durch Leerzeichen (Blank) getrennte Liste von Services welche von der Abfrage aufgrund irrelevanter Werte oder fhem - Abstürzen ausgenommen werden sollen.
- Die Liste kann auch Hierarchien von services enthalten. Dies bedeutet, das alle Services unterhalb dieses Services ebenfalls gelöscht werden.
- Der Default Wert ist (empty) somit werden alle bekannten Services abgefragt.
- |
-
-
+ Set |
+ Die set Funktion ändert die Werte der Services welche das Flag "schreibbar" innerhalb der KMxxx Service Struktur besitzen. Die meisten dieser beschreibbaren Werte haben eine exklusive Liste von möglichen Werten innerhalb dessen sich der neue Wert bewegen muss. Andere Fließkomma Werte haben einen maximum und minumum Wert, in dessen sich der neue Wert bewegen muß.
|
+ |
+ | Der Name des Service welcher gesetzt werden soll. Z.B.: "/heatingCircuits/hc1/operationMode "
|
+ | Ein gültiger Wert für diesen Service.
|
-
-
-
+
-
-
- |
ReadBackDelay : | Ein gültiger Zeitwert in Mllisekunden [ms] für die Pause zwischen schreiben und zurücklesen des Wertes durch den "set" - Befehl. Der Wert muss >=0ms sein.
- Der Default-Wert ist 100 = 100ms = 0,1s.
- |
-
-
+ Get |
+ Die get-Funktion ist in der Lage einen Wert eines Service innerhalb der KMxxx Service Struktur auszulesen. Die zusätzliche Liste von erlaubten Werten oder der Wertebereich zwischen Minimum und Maximum wird nicht zurück gegeben.
|
+ |
+ | Der Name des Service welcher ausgelesen werden soll. Z.B.: "/heatingCircuits/hc1/operationMode " Es gibt nur den Wert, aber nicht die Werteliste oder den möglichen Wertebereich zurück.
|
+ | Das optionelle Argument für Ausgabe des get-Befehls Z.B.: "json " Folgende Optionen sind verfügbar: json - Gibt anstelle des Wertes, die gesamte Json Antwort des KMxxx als String zurück
|
-
-
-
+
-
-
- |
disable : | Deaktiviert das Device und löscht alle bestehenden Readings.
- Der Default-Wert ist 0 = aktiviert
- |
-
-
+ Attributes |
+ Die folgenden Modul-spezifischen Attribute können neben den bekannten globalen Attributen gesetzt werden wie z.B.: room.
|
+
+
+ IntervalDynVal : Ein gültiges Abfrageintervall für die sich ständig verändernden - dynamischen Werte der KMxxx Services. Der Wert muss größer gleich >=20s sein um dem Modul genügend Zeit einzuräumen eine volle Abfrage auszuführen bevor die nächste Abfrage startet. Der Default-Wert ist 300s.
|
+ PollingTimeout : Ein gültiger Zeitwert um dem KMxxx genügend Zeit zur Antwort einzelner Werte einzuräumen. Normalerweise braucht dieser Wert nicht verändert werden, muss jedoch im Falle eines langsamen Netzwerks erhöht werden Der Default-Wert ist 5s.
|
+ DoNotPoll : Eine durch Leerzeichen (Blank) getrennte Liste von Services welche von der Abfrage aufgrund irrelevanter Werte oder fhem - Abstürzen ausgenommen werden sollen. Die Liste kann auch Hierarchien von services enthalten. Dies bedeutet, das alle Services unterhalb dieses Services ebenfalls gelöscht werden. Der Default Wert ist (empty) somit werden alle bekannten Services abgefragt.
|
+ ReadBackDelay : Ein gültiger Zeitwert in Mllisekunden [ms] für die Pause zwischen schreiben und zurücklesen des Wertes durch den "set" - Befehl. Der Wert muss >=0ms sein. Der Default-Wert ist 100 = 100ms = 0,1s.
|
+ disable : Deaktiviert das Device und löscht alle bestehenden Readings. Der Default-Wert ist 0 = aktiviert.
|
-
-
-=end html_DE
\ No newline at end of file
+=end html_DE
+
+=for :application/json;q=META.json 73_km200.pm
+{
+ "abstract": "Connects fhem to Buderus KM300, KM200, KM100, KM50
",
+ "description": "The Buderus KM200, KM100 or KM50 (hereafter described as KMxxx) is a communication device to establish a connection between the Buderus central heating control unit and the internet.
It has been designed in order to allow the inhabitants accessing their heating system via his Buderus App EasyControl.
Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.
The km200 fhem-module enables read/write access to these parameters.
",
+ "x_lang": {
+ "de": {
+ "abstract": "Verbindet fhem mit Buderus KM300, KM200, KM100, KM50
",
+ "description": "Das Buderus KM200, KM100 or KM50 (ab hier als KMxxx beschrieben) ist eine Schnittstelle zwischen der Buderus Zentralheizungssteuerung un dem Internet.
Es wurde entwickelt um den Bewohnern den Zugang zu Ihrem Heizungssystem durch die Buderus App EasyControl zu erlauben.
Darüber hinaus erlaubt es nach vorheriger Freigabe dem Heizungs- bzw. Wartungsbetrieb die Heizungsanlage von aussen zu warten und Werte zu verändern.
Das km200 fhem-Modul erlaubt den Lese-/Schreibzugriff dieser Parameter durch fhem.
"
+ }
+ },
+ "author": [
+ "I am the maintainer matthias.deeke@deeke.eu"
+ ],
+ "x_fhem_maintainer": [
+ "Sailor"
+ ],
+ "keywords": [
+ "Buderus",
+ "Bosch",
+ "KM50",
+ "KM100",
+ "KM200",
+ "KM300",
+ "communication",
+ "network"
+ ],
+ "prereqs": {
+ "runtime": {
+ "requires": {
+ "FHEM": 5.00918623,
+ "FHEM::Meta": 0.001006,
+ "HttpUtils": 0,
+ "JSON": 0,
+ "perl": 5.014
+ },
+ "recommends": {
+ },
+ "suggests": {
+ }
+ }
+ },
+ "resources": {
+ "x_support_community": {
+ "rss": "https://forum.fhem.de/index.php/topic,25540.msg",
+ "web": "https://forum.fhem.de/index.php/topic,25540.msg",
+ "subCommunity" : {
+ "rss" : "https://forum.fhem.de/index.php/topic,25540.msg",
+ "title" : "This sub-board will be first contact point",
+ "web" : "https://forum.fhem.de/index.php/topic,25540.msg"
+ }
+ },
+ "x_wiki" : {
+ "title" : "FHEM Wiki: Buderus Web Gateway",
+ "web" : "https://wiki.fhem.de/wiki/Buderus_Web_Gateway"
+ }
+ },
+ "x_support_status": "supported"
+}
+=end :application/json;q=META.json
+
+=cut
\ No newline at end of file