mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
73_km200: Update: Improving error message in state
git-svn-id: https://svn.fhem.de/fhem/trunk@9442 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0f247a1276
commit
0b64f165a4
@ -1,4 +1,4 @@
|
|||||||
# $Id: 73_km200.pm 0054 2015-10-09 16:30:00Z Matthias_Deeke $
|
# $Id: 73_km200.pm 0055 2015-10-11 10:45:00Z Matthias_Deeke $
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
#
|
#
|
||||||
# 73_km200.pm
|
# 73_km200.pm
|
||||||
@ -212,7 +212,8 @@
|
|||||||
# 0053 15.07.2015 Sailor km200_ParseHttpResponseInit Static Service deleted
|
# 0053 15.07.2015 Sailor km200_ParseHttpResponseInit Static Service deleted
|
||||||
# 0053 15.07.2015 Sailor km200_GetStatService Deleted
|
# 0053 15.07.2015 Sailor km200_GetStatService Deleted
|
||||||
# 0053 15.07.2015 Sailor km200_ParseHttpResponseStat Deleted
|
# 0053 15.07.2015 Sailor km200_ParseHttpResponseStat Deleted
|
||||||
# 0053 09.10.2015 Sailor km200_ParseHttpResponseInit Adding a timer to restart Initialisation process if first contact failed.
|
# 0054 09.10.2015 Sailor km200_ParseHttpResponseInit Adding a timer to restart Initialisation process if first contact failed.
|
||||||
|
# 0055 09.10.2015 Sailor km200_ParseHttpResponseInit Setting state accordingly if connection is failed
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
|
|
||||||
@ -281,7 +282,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 = "0054";
|
my $ModuleVersion = "0055";
|
||||||
|
|
||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
$hash->{STATE} = "define";
|
$hash->{STATE} = "define";
|
||||||
@ -2076,19 +2077,19 @@ sub km200_ParseHttpResponseInit($)
|
|||||||
my $type;
|
my $type;
|
||||||
my $json ->{type} = "";
|
my $json ->{type} = "";
|
||||||
|
|
||||||
|
|
||||||
### Log entries for debugging purposes
|
|
||||||
# Log3 $name, 5, $name. " : km200_ParseHttpResponseInit: Try to parse : " .$Service;
|
|
||||||
### Log entries for debugging purposes
|
|
||||||
|
|
||||||
|
|
||||||
if($err ne "")
|
if($err ne "")
|
||||||
{
|
{
|
||||||
|
### Create Log entry
|
||||||
Log3 $name, 2, $name . " : km200_ParseHttpResponseInit - ERROR - Service: ".$Service. ": No proper Communication with Gateway: " .$err;
|
Log3 $name, 2, $name . " : km200_ParseHttpResponseInit - ERROR - Service: ".$Service. ": No proper Communication with Gateway: " .$err;
|
||||||
if ($hash->{CONSOLEMESSAGE} == true) {print("km200_ParseHttpResponseInit ERROR: $err\n");}
|
if ($hash->{CONSOLEMESSAGE} == true) {print("km200_ParseHttpResponseInit ERROR: $err\n");}
|
||||||
|
|
||||||
|
### Set status of km200 fhem module
|
||||||
|
$hash->{STATE} = "ERROR - Initial Connection failed... Try to re-connect in 10s";
|
||||||
|
|
||||||
### Start the timer for polling again but wait 10s
|
### Start the timer for polling again but wait 10s
|
||||||
InternalTimer(gettimeofday()+10, "km200_GetInitService", $hash, 0);
|
InternalTimer(gettimeofday()+10, "km200_GetInitService", $hash, 0);
|
||||||
|
|
||||||
|
### Create Log entry
|
||||||
Log3 $name, 2, $name . " : km200_ParseHttpResponseInit - ERROR - Timer restarted to try again in 10s";
|
Log3 $name, 2, $name . " : km200_ParseHttpResponseInit - ERROR - Timer restarted to try again in 10s";
|
||||||
|
|
||||||
return "ERROR";
|
return "ERROR";
|
||||||
@ -3229,9 +3230,9 @@ sub km200_ParseHttpResponseDyn($)
|
|||||||
<ul><ul>
|
<ul><ul>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top"><code><option></code> : </td><td align="left" valign="top">Das optionelle Argument fð² ¤ie Ausgabe des get-Befehls Z.B.: "<code>json</code>"<BR>
|
<td align="right" valign="top"><code><option></code> : </td><td align="left" valign="top">Das optionelle Argument fie Ausgabe des get-Befehls Z.B.: "<code>json</code>"<BR>
|
||||||
Folgende Optionen sind verf𧢡r:<BR>
|
Folgende Optionen sind verf𧢡r:<BR>
|
||||||
json - Gibt anstelle des Wertes, die gesamte Json Antwort des KMxxx als String zur𣫮
|
json - Gibt anstelle des Wertes, die gesamte Json Antwort des KMxxx als String zur𣫮
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -3314,7 +3315,7 @@ sub km200_ParseHttpResponseDyn($)
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<tr><td align="right" valign="top"><li><code>ReadBackDelay</code> : </li></td><td align="left" valign="top">Ein gültiger Zeitwert in Mllisekunden [ms] für die Pause zwischen schreiben und zur𣫬esen des Wertes durch den "set" - Befehl. Der Wert muss >=0ms sein.<BR>
|
<tr><td align="right" valign="top"><li><code>ReadBackDelay</code> : </li></td><td align="left" valign="top">Ein gültiger Zeitwert in Mllisekunden [ms] für die Pause zwischen schreiben und zur𣫬esen des Wertes durch den "set" - Befehl. Der Wert muss >=0ms sein.<BR>
|
||||||
Der Default-Wert ist 100 = 100ms = 0,1s.<BR>
|
Der Default-Wert ist 100 = 100ms = 0,1s.<BR>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user