[gelöst] probleme bei cmds "set raw" und "set regBulk"

Begonnen von frank, 04 Mai 2021, 10:05:10

Vorheriges Thema - Nächstes Thema

frank

hallo martin,


1. set raw

ich habe es nur geschafft einzelne cmds in den cmdstack zu übergeben.
die in der commandref erwähnte "liste" von cmds bekomme ich nicht übergeben.
mit der gezeigten änderung kann ich auch eine leerzeichen-getrennte liste von cmds übergeben.

        Debugging:
        <ul>
          <li><B>raw &lt;data&gt; ...</B><br>
              Only needed for experimentation.
              send a list of "raw" commands. The first command will be
              immediately sent, the next one after the previous one is acked by
              the target.  The length will be computed automatically, and the
              message counter will be incremented if the first two charcters are
              ++. Example (enable AES):
           <pre>
             set hm1 raw ++A001F100001234560105000000001\
                ++A001F10000123456010802010AF10B000C00\
                ++A001F1000012345601080801\
                ++A001F100001234560106</pre>
          </li>
        </ul>

  if   ($cmd eq "raw") {  #####################################################
    return "Usage: set $a[0] $cmd data [data ...]" if(@a < 3);
    $state = "";
#    my $msg = $a[2];
#    foreach my $sub (@a[3..$#a]) {
#      last if ($sub !~ m/^[A-F0-9]*$/);
#      $msg .= $sub;     
#    }
#    CUL_HM_PushCmdStack($hash, $msg);
    CUL_HM_PushCmdStack($hash, $_) foreach(@a[2..$#a]);
  }



2. set regBulk

regBulk verlangt immer mindestens 2 register/value pärchen.
bei der angabe von nur einem pärchen erscheint die fehlermeldung:

param 2:'-addr2:data2-' => is required but missing
regBulk: -list-.-peerChn- -addr1:data1- -addr2:data2-...
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

martinp876

set raw kann nur ein Kommando. Ich haben die Beschreibung geändert.

regBulk ist korrigiert  update HMConfig