HomeMatic Statusanzeige HM-Dis-WM55
Es wurde meines wissens im Ursprüng hier entwickelt von DrTop:
http://homematic-forum.de/forum/viewtop ... M+DIS+WM55
Ich habe es dann für meine Zwecke auf TMP Variablen umgeschrieben und möchte das auch gerne posten. Ich will aber hier nicht vorenthalten das dasselbe für eine andere Variante auch schon gemacht wurde für ähnliche Zwecke von AndiN. Wer damals das zuerst gemacht hat weiß ich nicht mehr. Hier auf jeden Fall beide Scripte, beide sind sehr ähnlich.
Ich glaube das fehlt noch in der Liste und ist ne gute Ergänzung.
Code: Alles auswählen
! ### Homatic-Statusanzeige HM-Dis-WM55 ####
! ### Stausanzeige 2 , Vers. 1.0;
! ### Anzeige zustand der Alarmanlage, Lichter, Fenster
!! Universalprogramm zum Füllen
!! (c) DrTob
!! optimized by thkl
!! changed by wortmann30
!! changed to tmp-variablen by wortmann30
!! Das Script holt sich jetzt die Seriennummer des Displays selbst aus der Auslösebedinung des Programms
! Farben
! 0x80 weiß
! 0x81 rot
! 0x82 orange
! 0x83 gelb
! 0x84 gruen
! 0x85 blau
! Symbole
! 0x80 AUS
! 0x81 EIN
! 0x82 OFFEN
! 0x83 geschlossen
! 0x84 fehler
! 0x85 alles ok
! 0x86 information
! 0x87 neue nachricht
! 0x88 servicemeldung
! 0x89 Signal grün
! 0x8A Signal gelb
! 0x8B Signal rot
! Zugriff auf vordefinierte Texte
!
! 0x80 Text 0 (Kanal 1 Text Zeile 1)
! 0x81 Text 1 (Kanal 1 Text Zeile 2)
! 0x82 Text 2 (Kanal 2 Text Zeile 3)
! 0x83 Text 3 (Kanal 2 Text Zeile 4)
! 0x84 Text 4 (Kanal 3 Text Zeile 5)
! 0x85 Text 5 (Kanal 3 Text Zeile 6)
! 0x86 Text 6 (Kanal 4 Text Zeile 7)
! 0x87 Text 7 (Kanal 4 Text Zeile 8)
! 0x88 Text 8 (Kanal 5 Text Zeile 9)
! 0x89 Text 9 (Kanal 5 Text Zeile 10)
! 0x8A Text 10 (Kanal 6 Text Zeile 11)
! 0x8B Text 11 (Kanal 6 Text Zeile 12)
! 0x8C Text 12 (Kanal 7 Text Zeile 13)
! 0x8D Text 13 (Kanal 7 Text Zeile 14)
! 0x8E Text 14 (Kanal 8 Text Zeile 15)
! 0x8F Text 15 (Kanal 8 Text Zeile 16)
! 0x90 Text 16 (Kanal 9 Text Zeile 17)
! 0x91 Text 17 (Kanal 9 Text Zeile 18)
! 0x92 Text 18 (Kanal 10 Text Zeile 19)
! 0x93 Text 19 (Kanal 10 Text Zeile 20)
string tmpA = "Zeile 1";
string tmpF = "0x80";
string tmpM = "";
string tmpB = "Zeile 2";
string tmpG = "0x80";
string tmpN = "";
string tmpC = "Zeile 3";
string tmpH = "0x80";
string tmpO = "";
string tmpD = "Zeile 4";
string tmpI = "0x80";
string tmpP = "";
string tmpE = "Zeile 5";
string tmpJ = "0x80";
string tmpQ = "";
string tmpL = "Zeile 6";
string tmpK = "0x80";
string tmpR = "";
! --------- Anfang Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
! #### Alarmanlage Zustand? #######
! ## Einlesen der Sys-Var Alarmanlage
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 1 , Textfarbe Blau, Icon Information
tmpA = "Alarmanlage";
tmpM = "0x86";
tmpF ="0x85";
var tmpS = dom.GetObject("Alarmanlage");
if (tmpS.State()==0){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 2 , Textfarbe Grün, Icon Fehler
tmpB = "Unscharf";
tmpN = "0x84";
tmpG ="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 2 , Textfarbe Rot, Icon Alles ok
tmpB = "SCHARF";
tmpG = "0x81";
tmpN = "0x85";
}
! #### Alle Fenster zu ? #######
! ## Einlesen der Sys-Var Fensteroffen
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 3 , Textfarbe Blau, Icon Information
tmpC = "Fenster";
tmpO = "0x86";
tmpH ="0x85";
var tmpS = dom.GetObject("Fensteroffen");
if (tmpS.State()==1){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 4 , Textfarbe Grün/Rot, Icon Geöffnet/Geschlossen
tmpD = "Geschlossen";
tmpP = "0x83";
tmpI ="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 1 , Textfarbe Rot, Icon Offen
tmpD = "Offen";
tmpI = "0x81";
tmpP = "0x82";
}
! #### Alle Lichter aus ? #######
! ## Einlesen der Sys-Var Licht
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 5 , Textfarbe Blau, Icon Information
tmpE = "Lichter";
tmpQ = "0x86";
tmpJ ="0x85";
var tmpS = dom.GetObject("Licht");
if (tmpS.State()==0){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 6 , Textfarbe Grün, Icon An
tmpL = "Aus";
tmpR = "0x80";
tmpK ="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 6 , Textfarbe Rot, Icon Aus
tmpL = "An";
tmpK = "0x81";
tmpR = "0x81";
}
! --------- Ende Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! System Routine do not change anything below !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
string tmpT="|";
string tmpU = tmpA # tmpT # tmpF # tmpT # tmpM # "\t";
tmpU = tmpU # tmpB # tmpT # tmpG # tmpT # tmpN # "\t";
tmpU = tmpU # tmpC # tmpT # tmpH # tmpT # tmpO # "\t";
tmpU = tmpU # tmpD # tmpT # tmpI # tmpT # tmpP # "\t";
tmpU = tmpU # tmpE # tmpT # tmpJ # tmpT # tmpQ # "\t";
tmpU = tmpU # tmpL # tmpT # tmpK # tmpT # tmpR;
string tmpV = "A,0x41\tB,0x42\tC,0x43\tD,0x44\tE,0x45\tF,0x46\tG,0x47\tH,0x48\tI,0x49\tJ,0x4A\tK,0x4B\tL,0x4C\tM,0x4D\tN,0x4E\tO,0x4F\tP,0x50\tQ,0x51\tR,0x52\tS,0x53\tT,0x54\tU,0x55\tV,0x56\tW,0x57\tX,0x58\tY,0x59\tZ,0x5A";
tmpV = tmpV # "\ta,0x61\tb,0x62\tc,0x63\td,0x64\te,0x65\tf,0x66\tg,0x67\th,0x68\ti,0x69\tj,0x6A\tk,0x6B\tl,0x6C\tm,0x6D\tn,0x6E\to,0x6F\tp,0x70\tq,0x71\tr,0x72\ts,0x73\tt,0x74\tu,0x75\tv,0x76\tw,0x77\tx,0x78\ty,0x79\tz,0x7A";
tmpV = tmpV # "\t0,0x30\t1,0x31\t2,0x32\t3,0x33\t4,0x34\t5,0x35\t6,0x36\t7,0x37\t8,0x38\t9,0x39\t ,0x20\t!,0x21\t\",0x22\t%,0x25\t&,0x26\t=,0x27\t(,0x28\t),0x29\t*,0x2A\t+,0x2B\t,,0x2C\t-,0x2D\t.,0x2E\t/,0x2F";
tmpV = tmpV # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E";
string tmpW;
string tmpX;
integer tmpY;
string tmpZ;
string tmpA1;
string tmpB1;
string tmpC1 = "0x02";
foreach(tmpW, tmpU) {
tmpA1 = tmpW.StrValueByIndex(tmpT, 0);
tmpB1 = tmpW.StrValueByIndex(tmpT, 2);
if ((tmpA1 <> "") || (tmpB1 <> "")) {
tmpC1 = tmpC1 # ",0x12";
if ((tmpA1.Substr(0,2) == "0x") && (tmpA1.Length() == 4)) {
tmpC1 = tmpC1 # "," # tmpA1;
tmpY = 12;
}
else {
tmpY = 0;
}
while ((tmpY < tmpA1.Length()) && (tmpY < 12)) {
tmpZ = tmpA1.Substr(tmpY, 1);
foreach(tmpX, tmpV){
if (tmpZ == tmpX.Substr(0,1)){tmpC1 = tmpC1 # tmpX.Substr(1,5);}
}
tmpY = tmpY + 1;
}
tmpC1 = tmpC1 # ",0x11," # tmpW.StrValueByIndex(tmpT, 1);
if (tmpB1 <> "") {
tmpC1 = tmpC1 # ",0x13," # tmpB1;
}
}
tmpC1 = tmpC1 # ",0x0A";
}
tmpC1 = tmpC1 # ",0x03";
dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(tmpC1);
! ##### FERTIG #####
Und das von AndiN
Code: Alles auswählen
! ### Homatic-Statusanzeige HM-Dis-WM55 ####
! ### Stausanzeige 2 , Vers. 1.0;
! ### Anzeige der Zysternen Füllstand, Zysternen Filter stand, AußentmpVeratur, Status der Türen, Fenster und Lichter
!! Universalprogramm zum Füllen
!! (c) DrTob
!! optimized by thkl
!! changed by wortmann30
! auf tmp-Variablen umgeschrieben von AndiN
!! Das Script holt sich jetzt die Seriennummer des Displays selbst aus der Auslösebedinung des Programms
! Farben
! 0x80 weiß
! 0x81 rot
! 0x82 orange
! 0x83 gelb
! 0x84 gruen
! 0x85 blau
! Symbole
! 0x80 AUS
! 0x81 EIN
! 0x82 OFFEN
! 0x83 geschlossen
! 0x84 fehler
! 0x85 alles ok
! 0x86 information
! 0x87 neue nachricht
! 0x88 servicemeldung
! 0x89 Signal grün
! 0x8A Signal gelb
! 0x8B Signal rot
! Zugriff auf vordefinierte Texte
!
! 0x80 Text 0 (Kanal 1 Text Zeile 1)
! 0x81 Text 1 (Kanal 1 Text Zeile 2)
! 0x82 Text 2 (Kanal 2 Text Zeile 3)
! 0x83 Text 3 (Kanal 2 Text Zeile 4)
! 0x84 Text 4 (Kanal 3 Text Zeile 5)
! 0x85 Text 5 (Kanal 3 Text Zeile 6)
! 0x86 Text 6 (Kanal 4 Text Zeile 7)
! 0x87 Text 7 (Kanal 4 Text Zeile 8)
! 0x88 Text 8 (Kanal 5 Text Zeile 9)
! 0x89 Text 9 (Kanal 5 Text Zeile 10)
! 0x8A Text 10 (Kanal 6 Text Zeile 11)
! 0x8B Text 11 (Kanal 6 Text Zeile 12)
! 0x8C Text 12 (Kanal 7 Text Zeile 13)
! 0x8D Text 13 (Kanal 7 Text Zeile 14)
! 0x8E Text 14 (Kanal 8 Text Zeile 15)
! 0x8F Text 15 (Kanal 8 Text Zeile 16)
! 0x90 Text 16 (Kanal 9 Text Zeile 17)
! 0x91 Text 17 (Kanal 9 Text Zeile 18)
! 0x92 Text 18 (Kanal 10 Text Zeile 19)
! 0x93 Text 19 (Kanal 10 Text Zeile 20)
string tmpA = "Zeile 1";
string tmpF = "0x80";
string tmpM = "";
string tmpB = "Zeile 2";
string tmpG = "0x80";
string tmpN = "";
string tmpC = "Zeile 3";
string tmpH = "0x80";
string tmpO = "";
string tmpD = "Zeile 4";
string tmpI = "0x80";
string tmpP = "";
string tmpE = "Zeile 5";
string tmpJ = "0x80";
string tmpQ = "";
string tmpU = "Zeile 6";
string tmpK = "0x80";
string tmpR = "";
! --------- Anfang Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
! #### Alle Fenster zu ? #######
! ## Einlesen der Sys-Var Fenster
var tmpS = dom.GetObject("Fenster");
if (tmpS.State()==1){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 1 , Textfarbe Weiß, Icon geschlossen
tmpA = "Fenster";
tmpM = "0x83";
tmpF="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 1 , Textfarbe Rot, Icon OFFEN
tmpA = "Fenster";
tmpF = "0x81";
tmpM = "0x82";
}
! #### Alle Lichter aus ? #######
! ## Einlesen der Sys-Var Licht
var tmpS = dom.GetObject("Licht");
if (tmpS.State()==0){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 2 , Textfarbe Grün, Icon AUS
tmpB = "Lichter";
tmpN = "0x80";
tmpG="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 2 , Textfarbe Rot, Icon EIN
tmpB = "Lichter";
tmpG = "0x81";
tmpN = "0x81";
}
! ## AußentmpVeratur
var tmpT="LEQ0644331";
var tmpW=dom.GetObject("BidCos-RF."#tmpT#":1.TEMPERATURE");
var tmpV = tmpW.Value();
if (tmpV > -10.0)
{ tmpV = tmpV.ToString(1);
tmpC = "Außen "#tmpV#" C";
}
else
{ tmpV = tmpV.ToString(1);
tmpC = "Außen"#tmpV#" C";
}
tmpH = "0x85";
tmpO = "0x86";
!##Füllstand
tmpD ="Füllstand";
tmpI = "0x82";
tmpP = "0x86";
tmpE = dom.GetObject("BidCos-RF.MEQ0690230:1.FILLING_LEVEL").State().ToString() # "%";
tmpJ = "0x82";
tmpQ = "0x86";
var tmpS = dom.GetObject("Zisterne Filter");
if (tmpS.State()==0){
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 6 , Textfarbe Weiß, Icon Ok
tmpU = "Sauber";
tmpR= "0x85";
tmpK="0x84";
}
else
{
! ## Kanal : HM-Dis-WM55 :1 -> Text Zeile 6 , Textfarbe Rot, Icon Signal Rot
tmpU = "Verschmutzt";
tmpK = "0x81";
tmpR = "0x8B";
}
! --------- Ende Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! System Routine do not change anything below !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
string tmpX="|";
string tmpZ = tmpA # tmpX # tmpF # tmpX # tmpM # "\t";
tmpZ = tmpZ # tmpB # tmpX # tmpG # tmpX # tmpN # "\t";
tmpZ = tmpZ # tmpC # tmpX # tmpH # tmpX # tmpO # "\t";
tmpZ = tmpZ # tmpD # tmpX # tmpI # tmpX # tmpP # "\t";
tmpZ = tmpZ # tmpE # tmpX # tmpJ # tmpX # tmpQ # "\t";
tmpZ = tmpZ # tmpU # tmpX # tmpK # tmpX # tmpR;
string tmpA1 = "A,0x41\tB,0x42\tC,0x43\tD,0x44\tE,0x45\tF,0x46\tG,0x47\tH,0x48\tI,0x49\tJ,0x4A\tK,0x4B\tL,0x4C\tM,0x4D\tN,0x4E\tO,0x4F\tP,0x50\tQ,0x51\tR,0x52\tS,0x53\tT,0x54\tU,0x55\tV,0x56\tW,0x57\tX,0x58\tY,0x59\tZ,0x5A";
tmpA1 = tmpA1 # "\ta,0x61\tb,0x62\tc,0x63\td,0x64\te,0x65\tf,0x66\tg,0x67\th,0x68\ti,0x69\tj,0x6A\tk,0x6B\tl,0x6C\tm,0x6D\tn,0x6E\to,0x6F\tp,0x70\tq,0x71\tr,0x72\ts,0x73\tt,0x74\tu,0x75\tv,0x76\tw,0x77\tx,0x78\ty,0x79\tz,0x7A";
tmpA1 = tmpA1 # "\t0,0x30\t1,0x31\t2,0x32\t3,0x33\t4,0x34\t5,0x35\t6,0x36\t7,0x37\t8,0x38\t9,0x39\t ,0x20\t!,0x21\t\",0x22\t%,0x25\t&,0x26\t=,0x27\t(,0x28\t),0x29\t*,0x2A\t+,0x2B\t,,0x2C\t-,0x2D\t.,0x2E\t/,0x2F";
tmpA1 = tmpA1 # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E";
string tmpB1;
string tmpC1;
integer tmpG1;
string tmpD1;
string tmpE1;
string tmpY;
string tmpF1 = "0x02";
foreach(tmpB1, tmpZ) {
tmpE1 = tmpB1.StrValueByIndex(tmpX, 0);
tmpY = tmpB1.StrValueByIndex(tmpX, 2);
if ((tmpE1 <> "") || (tmpY <> "")) {
tmpF1 = tmpF1 # ",0x12";
if ((tmpE1.Substr(0,2) == "0x") && (tmpE1.Length() == 4)) {
tmpF1 = tmpF1 # "," # tmpE1;
tmpG1 = 12;
}
else {
tmpG1 = 0;
}
while ((tmpG1 < tmpE1.Length()) && (tmpG1 < 12)) {
tmpD1 = tmpE1.Substr(tmpG1, 1);
foreach(tmpC1, tmpA1){
if (tmpD1 == tmpC1.Substr(0,1)){tmpF1 = tmpF1 # tmpC1.Substr(1,5);}
}
tmpG1 = tmpG1 + 1;
}
tmpF1 = tmpF1 # ",0x11," # tmpB1.StrValueByIndex(tmpX, 1);
if (tmpY <> "") {
tmpF1 = tmpF1 # ",0x13," # tmpY;
}
}
tmpF1 = tmpF1 # ",0x0A";
}
tmpF1 = tmpF1 # ",0x03";
dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(tmpF1);
! ##### FERTIG #####