Unterstützung Homematic HB-Geräte

Begonnen von Horti, 15 März 2020, 19:29:03

Vorheriges Thema - Nächstes Thema

maclovlin

#30
Habe einen kleinen Erfolg zu verzeichnen, die Attribute "Icon, Icon Farbig, Text Fett, Text Farbig, Linie nach Zeile" können über regBulk gesetzt werden.
Wie hier im Screenshot zu sehen ist: https://homematic-forum.de/forum/viewtopic.php?f=76&t=50160&p=503115#p503115

Beispiel, Icon mit der ID 3 setzen:
set HM_F34502_Dis_01 regBulk 01 92:03

01 --> Reglist
92 --> Register
03 --> ID des Icons

Beispiel, Linie nach Zeile:
set HM_F34502_Dis_01 regBulk 01 90:01

01 --> Reglist
90 --> Register
01 --> Register

Hier der aufbereitet Ausschnitt ausm SRC:
bool showLine (uint8_t value) const { return this->writeRegister(0x90, 0x01, 0, value & 0xff); }
    bool showLine () const { return this->readRegister(0x90, 0x01, 0, false); }

    bool textColored (uint8_t value) const { return this->writeRegister(0x90, 0x02, 0, value & 0xff); }
    bool textColored () const { return this->readRegister(0x90, 0x02, 0, false); }

    bool iconColored (uint8_t value) const { return this->writeRegister(0x90, 0x04, 0, value & 0xff); }
    bool iconColored () const { return this->readRegister(0x90, 0x04, 0, false); }

    bool textBold (uint8_t value) const { return this->writeRegister(0x90, 0x08, 0, value & 0xff); }
    bool textBold () const { return this->readRegister(0x90, 0x08, 0, false); }

    bool iconNumber (uint8_t value) const { return this->writeRegister(0x92, value & 0xff); }

maclovlin

Die Konfigdatei hat sich auch ein wenig geändert, hatte keinen "text" Befehl an den Tastern 10-12:
$HMConfig::culHmModel{"F345"} = {name=>"HB-RC-12-EP-C",st=>'display',cyc=>'',rxt=>'c',lst=>'1,p',chn=>"Dis:1:12"};
$HMConfig::culHmRegModel{"HB-RC-12-EP-C"} = { intKeyVisib     =>1,transmDevTryMax =>1
                         ,powerSupply     =>1,localResDis     =>1,wakeupBehavior  =>1
                         ,wakeupBehavMsg  =>1,wakeupBehavMsg_R=>1,statMsgTxtAlign =>1
                         ,displayInvert   =>1};
$HMConfig::culHmChanSets{"HB-RC-12-EP-C01"} = { 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-RC-12-EP-C02"} = { 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-RC-12-EP-C03"} = { 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-RC-12-EP-C04"} = { 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-RC-12-EP-C05"} = { 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-RC-12-EP-C06"} = { 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-RC-12-EP-C07"} = { 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-RC-12-EP-C08"} = { 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-RC-12-EP-C09"} = { 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-RC-12-EP-C0A"} = { 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-RC-12-EP-C0B"} = { 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-RC-12-EP-C0C"} = { 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-RC-12-EP-C01"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C02"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C03"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C04"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C05"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C06"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C07"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C08"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C09"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0A"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0B"} = $HMConfig::culHmRegType{remote};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0C"} = $HMConfig::culHmRegType{remote};

Horti

#32
Guten Abend,

kann nun auch einen Erfolg mit meinem HB-DIS-EP-42BW vermelden. Nachdem ich den FrequenzTest-Scetch für den 1284p angepasst und laufen lassen habe, kann nun auch mein FHEM mit dem Ding kommunizieren. (Komischerweise habe ich Berichte gelesen, dass CCU eher Probleme mit den fehlerhaften CC1101-Modulen hatte und FHEM toleranter war, bei mir war es genau umgekehrt)

Nun ja, richtig weit bin ich damit noch nicht, Pairing und getConfig geht, ich kann nun auch mit
set HB-DIS-EP-42BW_01 text Fenster\_auf Fenster\_zu
Fixtexte setzen. Wie man andere Formattierungen anpasst, hat ja maclovlin mit seinen Register-Hacks schon rausgefunden, aktuell kämpfe ich aber noch mit der Anzeige von Texten, das Perl-Script aus dem Wiki-Artikel zu dem verwandten HM-Dis-WM55 ist für mich noch ein böhmisches Dorf. Aber vielleicht können wir ja auch TomMajors Script hierfür irgendwie adaptieren.

P.S.: ohne viel Ahnung von tcl und rega zu haben dürften doch nur die Zeilen 179 und 180 im Script von TomMajor CCU-spezifisch sein und sollten sich einfach an FHEM adaptieren lassen?  ??? Naja, leider habe ich von Perl nicht viel mehr Ahnung, aber ich vermute, dass zumindest die Zeilen
$HMConfig::culHmChanSets{"HB-DIS-EP-42BW01"} = { 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-..." };

noch angepasst werden müssen?
Für mich macht zumindest "[long|short|help]" und "color1" keinen Sinn, auch wenn "[long|short|help]" optional sein dürfte. Wenn mir jemand folgen kann und schneller beim Programmieren/Lernen als ich ist, wäre ich für Tips/Vorschläge sehr dankbar  ;D

Horti

Guten Abend,

ich habe gerade mit meinen neu gewonnenen Kenntnissen noch mal den ganzen Thread durchgelesen, und stelle fest, dass meine Erkenntnisse gar nicht so neu sind. So schrieb ja schon Tom Major:

Zitat von: Tom Major am 25 März 2020, 22:36:22
ich hatte letztes Jahr einen ScriptHelper geschrieben um Texte möglichst einfach aus HM Script ans Display zu senden
https://github.com/TomMajor/SmartHome/blob/master/HB-Dis-EP-42BW/Script_Helper/epaper42.tcl

Eventuell reicht es, die Zeilen

append rega_cmd "dom.GetObject('BidCos-RF.$SERIAL:11.SUBMIT').State('$displayCmd');"
array set regaRet [rega_script $rega_cmd]


durch ein entsprechendes Interface bei FHEM zum Senden von raw bytes (falls vorhanden?) zu ersetzen, in displayCmd steht die payload drin die ans Display geht.

und maclovlin
Zitat von: maclovlin am 10 April 2020, 21:21:36
Habe heute noch ein wenig an der Konfig rumgespielt, was ich absolut nicht hinbekomme ist das ich dynamisch oder überhaupt Icons setzen kann, so wie
es überall auf den Screenshots zu sehen ist.

So hatte ich es versucht:
set HM_F34502_Dis_02 displayWM short line1 an red closed

Hat jemand nen Tipp?

"set displayWM" passt schlicht nicht zu den beiden Geräten HB-DIS-EP-42BW und HB-RC-12-EP. Genau so wie es ein "set displayWM" für HM-Dis-WM55 und "set displayEP" für HM-Dis-EP-WM55 gibt, brauchen wir noch ein set-Befehl für die beiden neuen Device-Typen oder vielleicht auch je Device-Typ. Aber im Prinzip muss man ja "nur" das Script von Tom Major von tcl nach perl konvertieren und die passende Anweisung für die Übermittlung des Befehls per Funk aufrufen. Ich habe mir mal, größenwahnsinnig wie ich bin, dazu CUL_HM.pl angeschaut und sofort jegliche Hoffnung verloren, da je durchzusteigen. martinp876, wenn Du das lesen solltest, bitte schau mal, ob Du das nicht einbauen kannst. Wie gesagt, eigentlich läuft das Display bei mir mit HMCCU, aber mit CUL_HM wäre das noch viel cooler 8)

papa

Es gint nur ein "normales" display Kommando bei der HM-RC-19 - vielleicht ist das ja kompatibel. Ich denke Jermoe hat sich da nichts neues ausgedacht, sondern auf etwas bestehendes gesetzt.
display        => "-text- [comma|no] [unit] [off|1|2|3] [off|on|slow|fast] -symbol-"
Aber wirkliche Ahnung habe ich davon nicht.
BananaPi + CUL868 + CUL433 + HM-UART + 1Wire

maclovlin

Tach,

ich habe es aufgegeben...

und bin auf Debmatic mit HMCCU umgestiegen.

Die Erfahrung ist recht positiv, subjektiv scheinen die Homemmatic Geräte mit Debmatic problemloser zu laufen, z.B das pairing.

Da ich mehr Geräte von Jerome habe, bleibe ich vorerst bei dieser Lösung.

Horti

Schade, ein Mitstreiter weniger :(

Mit meiner piVCCU läuft das Ding ja auch ohne Probleme, nur die Funkabdeckung ist halt bescheiden, weil ich nicht sämtliche IO-Devices doppelt haben will. Allerdings habe ich das Display per HMCCU gar nicht in FHEM eingebunden und rufe nur das tcl-Script von Tom Major per HMCCU auf. Funktioniert prima, aber die Tasterkanäle lassen sich so nicht nutzen.

Aber ich habe die Hoffnung noch nicht ganz aufgegeben, vielleicht schaffe ich es noch, dem Display FHEM beizubringen oder umgekehrt :)

Loctotex

Hallo Zusammen.
Ich hab das bei mir wie folgt geändert:

# HB-RC-12-EP
$HMConfig::culHmRegDefine{"iconHBRC"}         = {a=>146,   s=>1,   l=>1,  min=>00, max=>40,   c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"Icon"};
$HMConfig::culHmRegDefine{"showLineHBRC"}     = {a=>144.0, s=>0.1, l=>1,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"show Line"};
$HMConfig::culHmRegDefine{"textColoredHBRC"}  = {a=>144.1, s=>0.1, l=>1,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"text colored"};
$HMConfig::culHmRegDefine{"iconColoredHBRC"}  = {a=>144.2, s=>0.1, l=>1,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"Icon colored"};
$HMConfig::culHmRegDefine{"textBoldHBRC"}     = {a=>144.3, s=>0.1, l=>1,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"text Bold"};
$HMConfig::culHmRegDefine{"invertDisplayHBRC"}= {a=>6.0,   s=>0.1, l=>0,  min=>0,  max=>1,    c=>'',   p=>'n', f=>'',  u=>'',    d=>0,  t=>"invert Display"};


for my $readingRemote0 (keys %{$HMConfig::culHmRegType{remote}}) {
    $HMConfig::culHmRegType{custom_remoteHBRC}{$readingRemote0} = 1;
}
$HMConfig::culHmRegType{custom_remoteHBRC}{iconHBRC} = 1;
$HMConfig::culHmRegType{custom_remoteHBRC}{showLineHBRC} = 1;
$HMConfig::culHmRegType{custom_remoteHBRC}{textColoredHBRC} = 1;
$HMConfig::culHmRegType{custom_remoteHBRC}{iconColoredHBRC} = 1;
$HMConfig::culHmRegType{custom_remoteHBRC}{textBoldHBRC} = 1;

$HMConfig::culHmModel{"F345"} = {name=>"HB-RC-12-EP-C",st=>'display',cyc=>'',rxt=>'c',lst=>'1',chn=>"Dis:1:12"};
$HMConfig::culHmRegModel{"HB-RC-12-EP-C"} = { invertDisplayHBRC => 1};
$HMConfig::culHmChanSets{"HB-RC-12-EP-C01"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]",
                                                text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C02"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C03"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C04"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C05"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C06"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C07"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C08"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C09"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C0A"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C0B"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };
$HMConfig::culHmChanSets{"HB-RC-12-EP-C0C"} = { peerChan  =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
                        ,text      =>"-txt1- -txt2-..." };


$HMConfig::culHmRegChan {"HB-RC-12-EP-C01"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C02"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C03"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C04"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C05"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C06"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C07"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C08"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C09"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0A"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0B"} = $HMConfig::culHmRegType{custom_remoteHBRC};
$HMConfig::culHmRegChan {"HB-RC-12-EP-C0C"} = $HMConfig::culHmRegType{custom_remoteHBRC};


Läuft bei mir bis jetzt ganz gut. Kann gern getestet werden.