HB-Dis-EP-42BW

Begonnen von Loctotex, 15 Juli 2020, 20:26:00

Vorheriges Thema - Nächstes Thema

Loctotex

Hallo,

hat jemand das HB-Dis-EP-42BW von https://github.com/jp112sdl/HB-Dis-EP-42BW bei sich implementiert?

Ich hab in der hmconfig_asksinppcustom.pm folgendes angelegt:

$HMConfig::culHmModel{"F343"} = {name=>"HB-DIS-EP-BW",st=>'display',cyc=>'',rxt=>'c,w,b,f',lst=>'1',chn=>"Dis:1:10"};
$HMConfig::culHmRegModel{"HB-DIS-EP-BW"} = {  };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW01"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmRegChan {"HB-DIS-EP-BW01"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW02"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW03"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW04"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW05"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW06"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW07"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW08"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW09"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW0A"} = { displayWM =>"[long|short|help] -lineX- -textNo1- -color1- -icon1- [-textNo2- -color2- -icon2-] ...[-textNo6- -color6- -icon6-] "
                                                ,peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };


Damit funktionieren schon mal die Tasten. "displayWM" und "text" funktioniert leider gar nicht. Vermutlich mus hier etwas neues her. Es gibt auch noch ein 11. Kanal.

tndx

Willkommen im Club. S. auch hier:
https://forum.fhem.de/index.php/topic,109254.0.html
https://forum.fhem.de/index.php/topic,109968.0.html

Ich behelfe mir halt wie im 2.Thread zu sehen mit hmscript, aber das Abfangen der Verbindungsstörungen habe ich noch nicht vernüftig hingekriegt.

Loctotex

Danke für die Antwort.
Das Script funktioniert aber nicht mit der vccu oder?

zap

Nein, das ist ein CCU Script.
2xCCU3, Fenster, Rollläden, Themostate, Stromzähler, Steckdosen ...)
Entwicklung: FHEM auf AMD NUC (Ubuntu)
Produktiv inzwischen auf Home Assistant gewechselt.
Maintainer: FULLY, Meteohub, HMCCU, AndroidDB

Loctotex

Ich komme der Sache näher: 

in der 10_CUL_HM.pl habe ich nach dem elsif($cmd eq "displayEP" ) Block das cmd displayEP42 hinzugefügt:
elsif($cmd eq "displayEP42" ) { ###############################################
    $state = "displayEP42";
    RemoveInternalTimer($name.":reWriteDisplay");# just in case param reWriteDisplay used
    my %disp_icons = (
       off    => '80', on => '81', open => '82', closed => '83'
      ,error  => '84', ok => '85', info => '86', newmsg => '87'
      ,svcmsg => '88'
      ,none   => '255'
    );   

    # msg: 'text,color,icon,color:text,color,icon,color'
    Log3 $name,3,"a: @a";
    my ($msg) = @a[2..$#a];
    Log3 $name,3,"Msg: $msg";
    # set defaults
    $msg   = ''    if (!defined ($msg));
 

    if($msg eq 'help'){ # display command info
      return      "command options:"
                 ."\n  line1,icon1:line2,icon2:line3,icon3 "
                 ."\n  line: 12 char text to be dispalyed. No change if empty."
                 ."\n  icon: icon per line: ".join(" ",keys(%disp_icons))
                 ."\n "
                 ."\n  check for param reWriteDisplayxx: "
                 ."\n  translate chars: "
                 ."\n    [ => Ä"     
                 ."\n    # => Ö"     
                 ."\n    $ => Ü"     
                 ."\n    { => ä"     
                 ."\n    | => ö"     
                 ."\n    } => ü"     
                 ."\n    _ => ß"     
                 ."\n    ] => &"     
                 ."\n    ' => ="     
                 ."\n    @ => ∨"     
                 ."\n    > => ∧"     
                 ."\n    ; => Sandwatch"
                 ;
    }
    my $snd = '02';
    # Lines are separated by semicolon, empty lines are supported
    my @disp_lines = (split (':', $msg."::::::::::"),"","");# at least 3 entries - loop will use first 3
    my $lineNr=1;
    $evtDly = 1;
    foreach my $line (@disp_lines[0..9]) {# only 3 lines
      # Split line into text and icon part separated by comma

      my ($text,$textColor, $icon, $iconColor); # add separator in case Icon is dismissed
      if (!defined $line || $line eq '') {
        $text =  ReadingsVal($name,"line${lineNr}_text","");
        $icon = ReadingsVal($name,"line${lineNr}_icon","off");
        $textColor =  ReadingsVal($name,"line${lineNr}_textColor","0");
        $iconColor =  ReadingsVal($name,"line${lineNr}_iconColor","0");
      }
      else{
        ($text,$textColor, $icon, $iconColor) = split (',', $line.","); # add separator in case Icon is dismissed
      }
       
      Log3 $name,3,"Line: $lineNr Text: $text color: $textColor Icon: $icon Color: $iconColor";
      $snd .= ($textColor eq "1")?'16':'12';
      # Hex code
      if ($text =~ /^0x[0-9A-F]{2}$/) {
        $snd .= substr($text,2,2);
      }
      # Predefined text code text0-9
      elsif ($text =~ /^text([0-9])$/) {
        $snd .= sprintf ("8%1X", $1);
      }
      # Convert string to hex codes
      else {
        $text =~ s/\\_/ /g;
        foreach my $ch (split ('', substr ($text, 0, 12))) {
          $snd .= sprintf ("%02X", ord ($ch));
        }
      }
   
      my $iconStart = '13';
      my $offset = '4';
      $iconStart = $iconStart + $offset if ($iconColor eq '1');
      $snd .= $iconStart.$disp_icons{$icon} if ($disp_icons{$icon});
      $snd .= '0A';
     
      CUL_HM_UpdtReadBulk($hash,0,"line${lineNr}_text:$text"
                                 ,"line${lineNr}_icon:$icon"
                                 ,"line${lineNr}_textColor:$textColor"
                                 ,"line${lineNr}_iconColor:$iconColor");
      $lineNr++;
    }       
    $snd .= '14'.'03'; 
   
    CUL_HM_pushEvnts();

    CUL_HM_PushCmdStack($hash,"++${flag}11$id${dst}80${chn}$_") foreach (unpack('(A28)*',$snd));
  }   


in der hmconfig_asksinppcustom.pm:

$HMConfig::culHmModel{"F343"} = {name=>"HB-DIS-EP-BW",st=>'display',cyc=>'',rxt=>'c,b',lst=>'1',chn=>"Dis:1:11"};
$HMConfig::culHmRegModel{"HB-DIS-EP-BW"} = {  intKeyVisib     =>1,transmDevTryMax =>1
                         ,powerSupply     =>1,localResDis     =>1,wakeupBehavior  =>1
                         ,wakeupBehavMsg  =>1,wakeupBehavMsg_R=>1,statMsgTxtAlign =>1
                         ,displayInvert   =>1};
$HMConfig::culHmChanSets{"HB-DIS-EP-BW01"} = { peerChan    =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]",
                                               text        =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW02"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW03"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW04"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW05"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW06"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW07"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW08"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW09"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW0A"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-BW0B"} = { displayEP42   =>"text1,color,icon1,color:text2,color,icon2,color:text3,color,icon3,color:text4,color,icon4,color ... "};


Damit lassen sich im 11. Kanal Texte und Icons für alle 10 Zeilen setzen. Farbe sollte auch gehen.

Beispiel:
displayEP42 aaa,0,on,0:bbb,1,on,1

Zeigt in der ersten Zeile aaa mit Icon alles in schwarz an.
In der Zweiten Zeile bbb mit Icon alles in Farbe an.

Ist noch nicht fertig, wer mag kann es aber schon mal testen. Das Help command ist noch nicht angepasst.


Loctotex

Kleines Update:

elsif($cmd eq "displayEP42" ) { ###############################################
    $state = "displayEP42";
    RemoveInternalTimer($name.":reWriteDisplay");# just in case param reWriteDisplay used
    my %disp_icons = (
       off    => '80', on => '81', open => '82', closed => '83'
      ,error  => '84', ok => '85', info => '86', newmsg => '87'
      ,svcmsg => '88', icon10 => '89',icon11 => '8A',icon12 => '8B'
      ,icon13 => '8C',icon14 => '8D',icon15 => '8E',icon16 => '8F'
      ,icon17 => '90',icon18 => '91',icon19 => '92',icon20 => '93'
      ,icon21 => '94',icon22 => '95',icon23 => '96',icon24 => '97'
      ,icon25 => '98',icon26 => '99',icon27 => '9A',icon28 => '9B'
      ,none   => 'FF'
    );   

    # msg: 'text,color,icon,color:text,color,icon,color'
    Log3 $name,3,"a: @a";
    my ($msg) = @a[2..$#a];
    Log3 $name,3,"Msg: $msg";
    # set defaults
    $msg   = ''    if (!defined ($msg));
 

    if($msg eq 'help'){ # display command info
      return      "command options:"
                 ."\n  line1,line1Color,icon1,icon0Clolor:line2,line2Color,icon2,icon2Color:..."
                 ."\n  line: 16 char text to be dispalyed. No change if empty."
                 ."\n  color => '' = black, '1' = colored. "
                 ."\n  icon: icon per line: ".join(" ",keys(%disp_icons))
                 ."\n "
                 ."\n  check for param reWriteDisplayxx: "
                 ."\n  translate chars: "
                 ."\n    [ => Ä"     
                 ."\n    # => Ö"     
                 ."\n    $ => Ü"     
                 ."\n    { => ä"     
                 ."\n    | => ö"     
                 ."\n    } => ü"     
                 ."\n    _ => ß"     
                 ."\n    ] => &"     
                 ."\n    ' => ="     
                 ."\n    @ => ∨"     
                 ."\n    > => ∧"     
                 ."\n    ; => Sandwatch"
                 ;
    }
    my $snd = '02';
    # Lines are separated by semicolon, empty lines are supported
    my @disp_lines = (split (':', $msg."::::::::::"),"","");# at least 3 entries - loop will use first 3
    my $lineNr=1;
    $evtDly = 1;
    foreach my $line (@disp_lines[0..9]) {# only 3 lines
      # Split line into text and icon part separated by comma

      my ($text,$textColor, $icon, $iconColor); # add separator in case Icon is dismissed
      if (!defined $line || $line eq '') {
        $text =  ReadingsVal($name,"line${lineNr}_text","");
        $icon = ReadingsVal($name,"line${lineNr}_icon","off");
        $textColor =  ReadingsVal($name,"line${lineNr}_textColor","0");
        $iconColor =  ReadingsVal($name,"line${lineNr}_iconColor","0");
      }
      else{
        ($text,$textColor, $icon, $iconColor) = split (',', $line.","); # add separator in case Icon is dismissed
      }
       
      Log3 $name,3,"Line: $lineNr Text: $text color: $textColor Icon: $icon Color: $iconColor";
      $snd .= ($textColor eq "c")?'16':'12';
      # Hex code
      if ($text =~ /^0x[0-9A-F]{2}$/) {
        $snd .= substr($text,2,2);
      }
      # Predefined text code text0-9
      elsif ($text =~ /^text([0-9])$/) {
        $snd .= sprintf ("8%1X", $1);
      }
      # Convert string to hex codes
      else {
        $text =~ s/\\_/ /g;
        foreach my $ch (split ('', substr ($text, 0, 12))) {
          $snd .= sprintf ("%02X", ord ($ch));
        }
      }
   
      my $iconStart = '13';
      my $offset = '4';
      $iconStart = $iconStart + $offset if ($iconColor eq '1');
      $snd .= $iconStart.$disp_icons{$icon} if ($disp_icons{$icon});
      $snd .= '0A';
     
      CUL_HM_UpdtReadBulk($hash,0,"line${lineNr}_text:$text"
                                 ,"line${lineNr}_icon:$icon"
                                 ,"line${lineNr}_textColor:$textColor"
                                 ,"line${lineNr}_iconColor:$iconColor");
      $lineNr++;
    }       
    $snd .= '14'.'03'; 
   
    CUL_HM_pushEvnts();

    CUL_HM_PushCmdStack($hash,"++${flag}11$id${dst}80${chn}$_") foreach (unpack('(A28)*',$snd));
  }   


# HB-Dis-EP-42BW
$HMConfig::culHmRegDefine{"invertDisplayEP42"}          = {a=>6.0,   s=>0.1, l=>0,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>1,  t=>"invert Display"};
$HMConfig::culHmRegDefine{"displayRefreshWaitTimeEP42"} = {a=>7.0,   s=>1.0, l=>0,  min=>0,  max=>255,  c=>'',   p=>'n', f=>'',  u=>'',    d=>1,  t=>"displayRefreshWaitTimeEP im ms"};
$HMConfig::culHmRegDefine{"powerUpModeEP42"}            = {a=>52.2,  s=>0.1, l=>0,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>1,  t=>"powerUpMode"};
#$HMConfig::culHmRegDefine{"powerUpKeyEP42"}             = {a=>52.10,  s=>0.1, l=>0,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"powerUpKey"};
$HMConfig::culHmRegDefine{"critBatLimitEP42"}            = {a=>53.0, s=>1, l=>0,  min=>0,  max=>255,    c=>'',   p=>'n', f=>'',  u=>'',    d=>1,  t=>"critBatLimit"};

$HMConfig::culHmRegDefine{"showLineEP42"}     = {a=>144.0, s=>0.1, l=>1,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>1,  t=>"show Line"};
$HMConfig::culHmRegDefine{"alignmentEP42"}     = {a=>145.0, s=>1  , l=>1,  min=>0,  max=>3,    c=>'lit',p=>'n', f=>'',  u=>'',    d=>1,  t=>"Alignment", lit => {AlignRight => 0, AlignCenterIconRight => 1, AlignCenterIconLeft => 3, AlignLeft => 2}};

$HMConfig::culHmRegType{custom_Display_42BW}{alignmentEP42} = 1;
$HMConfig::culHmRegType{custom_Display_42BW}{showLineEP42} = 1;

$HMConfig::culHmModel{"F343"} = {name=>"HB-DIS-EP-42BW",st=>'display',cyc=>'',rxt=>'c,b',lst=>'1',chn=>"Dis:1:11"};
$HMConfig::culHmRegModel{"HB-DIS-EP-42BW"} = { powerUpModeEP42 =>1, displayRefreshWaitTimeEP42 =>1, invertDisplayEP42 =>1,critBatLimitEP42 =>1 };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW01"} = { peerChan    =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]",
                                               text        =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW02"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW03"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW04"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW05"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW06"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW07"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW08"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW09"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW0A"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW0B"} = { displayEP42   =>"text1,icon1:text2,icon2:text3,icon3:text4,icon4:text5,icon5:text6,icon6:text7,icon7:text8,icon8,:text9,icon9:text1,icon10 ... "};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW01"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW02"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW03"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW04"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW05"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW06"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW07"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW08"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW09"} = $HMConfig::culHmRegType{custom_Display_42BW};
$HMConfig::culHmRegChan {"HB-DIS-EP-42BW0A"} = $HMConfig::culHmRegType{custom_Display_42BW};


Damit sollten nun auch alle Register setzbar sein.

Horti

Hallelujah  ;D

Ich hatte die Hoffnung schon aufgegeben.

Ich kann mir das wahrscheinlich erst nächste Woche im Detail ansehen, aber schon mal eine Frage vorab: unterstützt die Funktion "displayEP42" alle Optionen, wie Tom Majors Helper Script? Wäre es viel Aufwand für Dich, die Syntax anzugleichen oder so eine Art überladene Funktion mit Tom Majors Syntax, die dann Deine Funktion aufruft?

Wie auch immer, Danke schon mal vorab für Deine Arbeit!

papa

Sehr cool.
Aber 10_CUL_HM.pl ändern ist natürlich blöd. Man bräuchte irgendwie die Möglichkeit neue Commands per Erweiterung anzumelden.
BananaPi + CUL868 + CUL433 + HM-UART + 1Wire

Horti

Genau, das war auch mein nächster Gedanke :)

Loctotex

Zitat von: papa am 16 Juli 2020, 20:38:47
Sehr cool.
Aber 10_CUL_HM.pl ändern ist natürlich blöd. Man bräuchte irgendwie die Möglichkeit neue Commands per Erweiterung anzumelden.

Neue Commands per Erweiterung wär eine tolle Sache. Die displayEP42 ist sehr an die displayEP angelehnt. Es werden 10 Zeilen gesendet. Für jede Zeile den Text und das Icon. Im StartKey ist noch die Info, ob farblich oder nicht. Ausrichtung, Fettschrift, Feste Texte und die Striche werden in den einzelnen Kanal Registern gesetzt. Das Script habe ich mir noch nicht genauer angesehen, aber da kann ich bestimmt was in der MyUtils machen.

martinp876

Für neue devices hatte ich schon interfaces vorgesehen. Ich werde diese überprüfen.... Es läuft zwar bei mir, habe es aber lange nicht angeschaut.
Ein interface für kommandos ist nicht enthalten, muss noch nachgsreicht werden....

martinp876

so, hier ein Prototyp.
Set Kommandos funktionieren schon - allerdings habe ich es nicht gesendet, nur simuliert.

Get habe ich noch nicht eingebaut.

Also CUL_HM einspielen und das zusätzliche HMConfig in FHEM kopieren  - los gehts


martinp876


Loctotex

#13
Danke, das ging schnell. Komme leider erst morgen zum Testen.

Loctotex

#14
[code
2020.07.22 21:37:56 1: PERL WARNING: Useless use of a constant ("HB-DIS-EP-42BW01") in void context at ./FHEM/HMConfig_HBdis.pm line 50, <$fh> line 194.
2020.07.22 21:37:56 1: PERL WARNING: Useless use of a constant ("display42") in void context at ./FHEM/HMConfig_HBdis.pm line 55, <$fh> line 194.
2020.07.22 21:37:56 1: PERL WARNING: Useless use of a constant ("HB-DIS-EP-42BW") in void context at ./FHEM/HMConfig_HBdis.pm line 58, <$fh> line 194.
2020.07.22 21:37:56 1: Error loading file: ./FHEM/HMConfig_HBdis.pm:
Illegal declaration of subroutine main::CUL_HM_Set at ./FHEM/HMConfig_HBdis.pm line 61, <$fh> line 194.




sub CUL_HM_Set displayEP42(@) müsste sub CUL_HM_SetdisplayEP42(@) heißen, damit läuft es dann.

Nur das hier versteh ich noch nicht so ganz:
$HMConfig::culHmChanGets = (
                      "HB-DIS-EP-42BW01"      =>{ "disp42Channel01" =>"[on|off|6.0..30.0]"
                                               }
                 );
$HMConfig::culHmSubTypeGets      = (# channels of this subtype
                      display42        =>{ "disp42_1" =>"-ontime-"
                                          ,"disp42_2"      =>""
                                         }
                         );
$HMConfig::culHmModelGets = (# channels of this subtype-------------
                      "HB-DIS-EP-42BW"         =>{ disp42ModelCmd       =>"[off|0.0..99.0]"}
                      );