diff --git a/fhem/FHEM/66_ECMD.pm b/fhem/FHEM/66_ECMD.pm index 5db0f41d6..de776a5ac 100644 --- a/fhem/FHEM/66_ECMD.pm +++ b/fhem/FHEM/66_ECMD.pm @@ -548,6 +548,17 @@ ECMD_Attr($@) } +##################################### +sub +ECMD_Reopen($) +{ + my ($hash) = @_; + ECMD_CloseDev($hash); + ECMD_OpenDev($hash, 1); + + return undef; +} + ##################################### sub ECMD_Set($@) @@ -556,7 +567,11 @@ ECMD_Set($@) my $name = $a[0]; # usage check - my $usage= "Usage: set $name classdef "; + my $usage= "Usage: set $name classdef OR set $name reopen"; + if((@a == 2) && ($a[1] eq "reopen")) { + return ECMD_Reopen($hash); + } + return $usage if(@a != 4); return $usage if($a[1] ne "classdef"); diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index b3ee6c1df..d6d390d5f 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -3717,6 +3717,11 @@ Attributes:
define AVRNETIO classdef /etc/fhem/ADC.classdef

+ set <name> reopen +

+ Closes and reopens the device. Could be handy if connection is lost and cannot be + reestablished automatically. +

@@ -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.
  • 42_RFXMETER.pm (see device RFXMETER): Process RFXCOM RFXMeter devices.
  • -
  • 43_RFXX10REC.pm (see device RFXX10REC): Process X10 security and X10 lightning devices.
  • -
  • 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.
  • +
  • 43_RFXX10REC.pm (see device RFXX10REC): Process X10 security and X10 lightning devices.
  • +
  • 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.


  • @@ -4672,42 +4677,42 @@ The one byte hex string is generated by the Oregon sensor when is it powered on. define <name> RFXX10REC <type> <deviceid> <devicelog> [<deviceid> <devicelog>]

    <type> -
      +
        specifies the type of the X10 device:
        X10 security devices: -
          +
          • ds10a (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].)
          • ms10a (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))
          • sd90 (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)
          • kr18 (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )
          X10 lightning devices: -
            +
            • ms14a (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor))
            • x10 (All other x10 devices. Report [on|off] on both deviceids.)

          - <deviceid> -
            - 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"). + <deviceid> +
              + 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"). -
            +

          - <devicelog> -
            + <devicelog> +
              is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90. -
            +

          - <deviceid2> -
            - 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. -
          + <deviceid2> +
            + 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. +

          - <devicelog2> -
            + <devicelog2> +
              is optional for the name used for the Reading of <deviceid2>. -
            +

          Example:
          define livingroom_window RFXX10REC ds10a 72cd Window