mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
Added set reopen command to ECMD.
git-svn-id: https://svn.fhem.de/fhem/trunk@838 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9622cc4026
commit
73e0b9de9b
@ -548,6 +548,17 @@ ECMD_Attr($@)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
sub
|
||||||
|
ECMD_Reopen($)
|
||||||
|
{
|
||||||
|
my ($hash) = @_;
|
||||||
|
ECMD_CloseDev($hash);
|
||||||
|
ECMD_OpenDev($hash, 1);
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
sub
|
sub
|
||||||
ECMD_Set($@)
|
ECMD_Set($@)
|
||||||
@ -556,7 +567,11 @@ ECMD_Set($@)
|
|||||||
my $name = $a[0];
|
my $name = $a[0];
|
||||||
|
|
||||||
# usage check
|
# usage check
|
||||||
my $usage= "Usage: set $name classdef <classname> <filename> ";
|
my $usage= "Usage: set $name classdef <classname> <filename> OR set $name reopen";
|
||||||
|
if((@a == 2) && ($a[1] eq "reopen")) {
|
||||||
|
return ECMD_Reopen($hash);
|
||||||
|
}
|
||||||
|
|
||||||
return $usage if(@a != 4);
|
return $usage if(@a != 4);
|
||||||
return $usage if($a[1] ne "classdef");
|
return $usage if($a[1] ne "classdef");
|
||||||
|
|
||||||
|
@ -3717,6 +3717,11 @@ Attributes:<br>
|
|||||||
<code>define AVRNETIO classdef /etc/fhem/ADC.classdef</code><br>
|
<code>define AVRNETIO classdef /etc/fhem/ADC.classdef</code><br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
<code>set <name> reopen</code>
|
||||||
|
<br><br>
|
||||||
|
Closes and reopens the device. Could be handy if connection is lost and cannot be
|
||||||
|
reestablished automatically.
|
||||||
|
<br><br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@ -4582,8 +4587,8 @@ The one byte hex string is generated by the Oregon sensor when is it powered on.
|
|||||||
Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918N, THGR810, THR128, THWR288A, PCR800, WTGR800. It will probably work with many other Oregon sensors supported by RFXCOM receivers. Please give feedback if you use other sensors.<br>
|
Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918N, THGR810, THR128, THWR288A, PCR800, WTGR800. It will probably work with many other Oregon sensors supported by RFXCOM receivers. Please give feedback if you use other sensors.<br>
|
||||||
</li>
|
</li>
|
||||||
<li> 42_RFXMETER.pm (see device <a href="#RFXMETER">RFXMETER</a>): Process RFXCOM RFXMeter devices. </li>
|
<li> 42_RFXMETER.pm (see device <a href="#RFXMETER">RFXMETER</a>): Process RFXCOM RFXMeter devices. </li>
|
||||||
<li> 43_RFXX10REC.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10 security and X10 lightning devices. </li>
|
<li> 43_RFXX10REC.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10 security and X10 lightning devices. </li>
|
||||||
<li> 44_RFXELSE.pm: Process and display all other messages. This module shows you messages that could not be handled by the other modules. It is useful to see RF receiption problems.</li>
|
<li> 44_RFXELSE.pm: Process and display all other messages. This module shows you messages that could not be handled by the other modules. It is useful to see RF receiption problems.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
@ -4672,42 +4677,42 @@ The one byte hex string is generated by the Oregon sensor when is it powered on.
|
|||||||
<code>define <name> RFXX10REC <type> <deviceid> <devicelog> [<deviceid> <devicelog>] </code> <br>
|
<code>define <name> RFXX10REC <type> <deviceid> <devicelog> [<deviceid> <devicelog>] </code> <br>
|
||||||
<br>
|
<br>
|
||||||
<code><type></code>
|
<code><type></code>
|
||||||
<ul>
|
<ul>
|
||||||
specifies the type of the X10 device: <br>
|
specifies the type of the X10 device: <br>
|
||||||
X10 security devices:
|
X10 security devices:
|
||||||
<ul>
|
<ul>
|
||||||
<li> <code>ds10a</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
|
<li> <code>ds10a</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
|
||||||
<li> <code>ms10a</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
|
<li> <code>ms10a</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
|
||||||
<li> <code>sd90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
|
<li> <code>sd90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
|
||||||
<li> <code>kr18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
|
<li> <code>kr18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
|
||||||
</ul>
|
</ul>
|
||||||
X10 lightning devices:
|
X10 lightning devices:
|
||||||
<ul>
|
<ul>
|
||||||
<li> <code>ms14a</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
|
<li> <code>ms14a</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
|
||||||
<li> <code>x10</code> (All other x10 devices. Report [on|off] on both deviceids.)</li>
|
<li> <code>x10</code> (All other x10 devices. Report [on|off] on both deviceids.)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<code><deviceid></code>
|
<code><deviceid></code>
|
||||||
<ul>
|
<ul>
|
||||||
specifies the first device id of the device. X10 security have a a 16-Bit device id which has to be written as a hex-string (example "5a54").
|
specifies the first device id of the device. X10 security have a a 16-Bit device id which has to be written as a hex-string (example "5a54").
|
||||||
A X10 lightning device has a house code A..P followed by a unitcode 1..16 (example "B1").
|
A X10 lightning device has a house code A..P followed by a unitcode 1..16 (example "B1").
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<code><devicelog></code>
|
<code><devicelog></code>
|
||||||
<ul>
|
<ul>
|
||||||
is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90.
|
is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<code><deviceid2></code>
|
<code><deviceid2></code>
|
||||||
<ul>
|
<ul>
|
||||||
is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids. ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
|
is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids. ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<code><devicelog2></code>
|
<code><devicelog2></code>
|
||||||
<ul>
|
<ul>
|
||||||
is optional for the name used for the Reading of <code><deviceid2></code>.
|
is optional for the name used for the Reading of <code><deviceid2></code>.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
Example: <br>
|
Example: <br>
|
||||||
<code>define livingroom_window RFXX10REC ds10a 72cd Window</code>
|
<code>define livingroom_window RFXX10REC ds10a 72cd Window</code>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user