From: Mario Höllein Date: Wed, 12 Jun 2019 17:12:51 +0000 (+0200) Subject: Teichpumpe hinzugefügt X-Git-Url: https://git.hoellein.online/?a=commitdiff_plain;h=f779b8bde38fec3d6e855d904115eb46c9f999bf;p=homematic Teichpumpe hinzugefügt --- diff --git a/programme/EGL_Display_Taste_oben_kurz.hm b/programme/EGL_Display_Taste_oben_kurz.hm index 218207c..bf3bfe1 100644 --- a/programme/EGL_Display_Taste_oben_kurz.hm +++ b/programme/EGL_Display_Taste_oben_kurz.hm @@ -1,161 +1,292 @@ -! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### -integer seitenzahl=5; -! ### Systemvariable seitenzaehler01 holen ### -var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); -var aktuelleSeite = seitenZaehler.Value(); - -if (aktuelleSeite == 2) { +! ### Homatic-Statusanzeige HM-Dis-WM55 #### +! 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) + + !jede Seite des Displays hat 6 Zeilen !hier legen wir die Variablen fest, die !wir auf jeder Seite nutzen können -var lampeLaube = dom.GetObject("Beleuchtung_Laube"); -lampeLaube.State(1); string zeile1 = ""; string color1 = "0x80"; string icon1 = ""; - + string zeile2 = ""; string color2 = "0x80"; string icon2 = ""; - + string zeile3 = ""; string color3 = "0x80"; string icon3 = ""; - + string zeile4 = ""; string color4 = "0x80"; string icon4 = ""; - + string zeile5 = ""; string color5 = "0x80"; string icon5 = ""; - + string zeile6 = ""; string color6 = "0x80"; string icon6 = ""; - zeile1 = ""; + +! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### +integer seitenzahl=6; +! ### Systemvariable seitenzaehler01 holen ### +var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); +var aktuelleSeite = seitenZaehler.Value(); +if (aktuelleSeite == seitenzahl ) +{ + seitenZaehler.State(1); +} +else +{ + aktuelleSeite = aktuelleSeite +1; + seitenZaehler.State(aktuelleSeite); +} +aktuelleSeite = seitenZaehler.Value(); +! ###################### Seite 1 ###################### +if (aktuelleSeite==1 ) { + var oSysvar = dom.GetObject("Alarmanlage"); + var obj = dom.GetObject("Fenster"); + string itemID; + var cntopen=0; + foreach(itemID, obj.EnumUsedIDs()) { + var item = dom.GetObject(itemID); + if(item.IsTypeOf(OT_CHANNEL)) { + var state=item.DPByHssDP("STATE"); + if(state.Value()!=0) { + cntopen=cntopen+1; + } + } + } +! #Kellertür Status holen +object kt= dom.GetObject("KG_XX_K2_TK_1"); +var kt_state=kt.DPByHssDP("STATE"); +var alarm_status; +var alarm_icon; +var alarm_color; + if (oSysvar.State()==1) { + alarm_status="an"; + alarm_icon=""; + alarm_color="0x82"; + } else { + alarm_status="aus"; + alarm_icon=""; + alarm_color="0x82"; +} + zeile1 = "Hausalarm"; + color1 = "0x82"; + icon1 = ""; + zeile2 = alarm_status; + color2 = alarm_color; + icon2 = alarm_icon; + zeile3 = ""; + color3="0x83"; + icon3 = ""; + zeile4 = ""; + color4 = "0x83"; + icon4 = ""; + + if (cntopen>0) { + zeile3 = cntopen # " Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "offen"; + color4 = "0x83"; + icon4 = ""; + } else { + zeile3 = "Alle Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "sind zu"; + color4 = "0x83"; + icon4 = ""; + } + var kt_zeile; + var kt_color; + var kt_icon; + if (kt_state == true ) { + kt_zeile="offen"; + kt_color="0x85"; + kt_icon=""; + } else { + kt_zeile="geschlossen"; + kt_color="0x85"; + kt_icon=""; + } + zeile5 = "Kellertür"; + color5 = "0x85"; + icon5 = ""; + zeile6 = kt_zeile; + color6 = kt_color; + icon6 = kt_icon; +} +! ###################### Seite 2 ###################### +! ###################### Licht Laube ################## +if (aktuelleSeite == 2 ) { + var an_aus_laube = dom.GetObject("Beleuchtung_Laube"); + var zustand_laube = an_aus_laube.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand_laube ) { + icon=""; + ausgabe_text="ein"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht Laube"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "ist"; + zeile3 = "Licht Laube"; + color3 = "0x83"; icon3 = ""; - color3 ="0x80"; - zeile4 = "ein"; - color4 = "0x81"; - icon4 = ""; + zeile4 = ausgabe_text; + color4 = color; + icon4 = icon; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if (aktuelleSeite == 3) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -var lampe = dom.GetObject("Beleuchtung_Esszimmer"); -lampe.State(1); -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +! #################### Seite 3 ##################### +! #################### Licht Esszimmer ############# +if (aktuelleSeite == 3 ) { + var an_aus = dom.GetObject("Beleuchtung_Esszimmer"); + var zustand_licht = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand_licht ) { + icon=""; + ausgabe_text="ein"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "Esszimmer"; + zeile3 = "Licht"; + color3 = "0x83"; icon3 = ""; - color3 ="0x80"; - zeile4 = "ist"; - color4 = "0x80"; + zeile4 = "Esszimmer"; + color4 = "0x83"; icon4 = ""; - zeile5 = "ein"; - color5 = "0x81"; - icon5 = ""; - zeile6 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } - -if (aktuelleSeite == 4) { -string alarm_zonen="Alarmzone_EGR_soll,Alarmzone_EGL_soll,Alarmzone_KEL_soll,Alarmzone_WKG_soll,Alarmzone_WDG_soll,Alarmzone_TKG_soll,Alarmzone_TEG_soll,Alarmzone_TDG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(true); +! #################### Seite 4 ##################### +! #################### Alarmanlage alle Zonen ###### +if (aktuelleSeite == 4 ) { + var an_aus = dom.GetObject("Alarmanlage"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; } - } -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = "Alarmanlage"; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = "ist"; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = "scharf"; -string color4 = "0x81"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Alarmanlage"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; } -!#### Seite 5 - Alarmanlage Kellergeschoss #### +! #################### Seite 5 ####################### +! #################### Alarmanlage Kellergeschoss #### if (aktuelleSeite == 5 ) { -string alarm_zonen="Alarmzone_KEL_soll,Alarmzone_WKG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(true); - } - } - var an_aus = dom.GetObject("Alarmanlage_Kellergeschoss"); - an_aus.State(true); + var zustand = an_aus.Value(); var ausgabe_text = ""; var icon = ""; - icon =""; - ausgabe_text="scharf"; - color = "0x84"; - zeile1 = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; zeile2 = ""; @@ -170,58 +301,75 @@ string zone; zeile5 = ausgabe_text; color5 = color; icon5 = icon; - zeile6 = ""; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; +} +! #################### Seite 6 ####################### +! #################### Teichpumpe #################### +if (aktuelleSeite == 6 ) { + var an_aus = dom.GetObject("GartenTeichPumpe"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="an"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Teichpumpe"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "Garten ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if ((aktuelleSeite != 2) && (aktuelleSeite !=3)&& (aktuelleSeite !=4)&& (aktuelleSeite !=5)) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +if ((aktuelleSeite == 0) ) { + var anzeige_text = ""; + var color = ""; + var icon = ""; + icon = "0x80"; + color = "0x84"; + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Funktion"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "nicht fertig"; - icon3 = "0x81"; - color3 = "0x81"; + zeile3 = aktuelleSeite; + color3 = "0x83"; + icon3 = ""; + zeile4 = ""; + icon4 = icon; + color4 =color; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! System Routine do not change anything below ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - + string splitter="|"; string msgBuffer = zeile1 # splitter # color1 # splitter # icon1 # "\t"; msgBuffer = msgBuffer # zeile2 # splitter # color2 # splitter # icon2 # "\t"; @@ -229,19 +377,19 @@ string icon6 = ""; msgBuffer = msgBuffer # zeile4 # splitter # color4 # splitter # icon4 # "\t"; msgBuffer = msgBuffer # zeile5 # splitter # color5 # splitter # icon5 # "\t"; msgBuffer = msgBuffer # zeile6 # splitter # color6 # splitter # icon6; - + string substitutions = "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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E"; - + string bufferLine; string substEntry; integer i; string char; string line; string icon; - + string command = "0x02"; foreach(bufferLine, msgBuffer) { line = bufferLine.StrValueByIndex(splitter, 0); @@ -270,8 +418,7 @@ string icon6 = ""; command = command # ",0x0A"; } command = command # ",0x03"; - + dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(command); - + ! ##### FERTIG ##### - diff --git a/programme/EGL_Display_Taste_oben_lang.hm b/programme/EGL_Display_Taste_oben_lang.hm index 218207c..5df185b 100644 --- a/programme/EGL_Display_Taste_oben_lang.hm +++ b/programme/EGL_Display_Taste_oben_lang.hm @@ -1,161 +1,288 @@ -! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### -integer seitenzahl=5; -! ### Systemvariable seitenzaehler01 holen ### -var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); -var aktuelleSeite = seitenZaehler.Value(); - -if (aktuelleSeite == 2) { +! ### Homatic-Statusanzeige HM-Dis-WM55 #### +! 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) + + !jede Seite des Displays hat 6 Zeilen !hier legen wir die Variablen fest, die !wir auf jeder Seite nutzen können -var lampeLaube = dom.GetObject("Beleuchtung_Laube"); -lampeLaube.State(1); string zeile1 = ""; string color1 = "0x80"; string icon1 = ""; - + string zeile2 = ""; string color2 = "0x80"; string icon2 = ""; - + string zeile3 = ""; string color3 = "0x80"; string icon3 = ""; - + string zeile4 = ""; string color4 = "0x80"; string icon4 = ""; - + string zeile5 = ""; string color5 = "0x80"; string icon5 = ""; - + string zeile6 = ""; string color6 = "0x80"; string icon6 = ""; - zeile1 = ""; + +! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### +integer seitenzahl=6; +! ### Systemvariable seitenzaehler01 holen ### +var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); +var aktuelleSeite = seitenZaehler.Value(); +aktuelleSeite = aktuelleSeite-1; +if (aktuelleSeite<=0) +{ + seitenZaehler.State(seitenzahl); +} +else +{ + seitenZaehler.State(aktuelleSeite); +} +aktuelleSeite = seitenZaehler.Value(); +! ###################### Seite 1 ###################### +if (aktuelleSeite==1 ) { + var oSysvar = dom.GetObject("Alarmanlage"); + var obj = dom.GetObject("Fenster"); + string itemID; + var cntopen=0; + foreach(itemID, obj.EnumUsedIDs()) { + var item = dom.GetObject(itemID); + if(item.IsTypeOf(OT_CHANNEL)) { + var state=item.DPByHssDP("STATE"); + if(state.Value()!=0) { + cntopen=cntopen+1; + } + } + } +!Kellertür Status holen +object kt= dom.GetObject("KG_XX_K2_TK_1"); +var kt_state=kt.DPByHssDP("STATE"); +var alarm_status; +var alarm_icon; +var alarm_color; + if (oSysvar.State()==1) { + alarm_status="an"; + alarm_icon=""; + alarm_color="0x82"; + } else { + alarm_status="aus"; + alarm_icon=""; + alarm_color="0x82"; +} + zeile1 = "Hausalarm"; + color1 = "0x82"; + icon1 = ""; + zeile2 = alarm_status; + color2 = alarm_color; + icon2 = alarm_icon; + zeile3 = ""; + color3="0x83"; + icon3 = ""; + zeile4 = ""; + color4 = "0x83"; + icon4 = ""; + + if (cntopen>0) { + zeile3 = cntopen # " Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "offen"; + color4 = "0x83"; + icon4 = ""; + } else { + zeile3 = "Alle Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "sind zu"; + color4 = "0x83"; + icon4 = ""; + } + var kt_zeile; + var kt_color; + var kt_icon; + if (kt_state == true ) { + kt_zeile="offen"; + kt_color="0x85"; + kt_icon=""; + } else { + kt_zeile="geschlossen"; + kt_color="0x85"; + kt_icon=""; + } + zeile5 = "Kellertür"; + color5 = "0x85"; + icon5 = ""; + zeile6 = kt_zeile; + color6 = kt_color; + icon6 = kt_icon; +} + +! ##### Seite 2 - Licht Laube ###### +if (aktuelleSeite == 2 ) { + var an_aus_laube = dom.GetObject("Beleuchtung_Laube"); + var zustand_laube = an_aus_laube.Value(); + var anzeige_text = ""; + var color = ""; + var icon = ""; + if ( zustand_laube ) { + icon = ""; + anzeige_text="ein"; + color = "0x81"; + } else { + icon = ""; + anzeige_text="ein"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht Laube"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "ist"; + zeile3 = "Licht Laube"; + color3 = "0x83"; icon3 = ""; - color3 ="0x80"; - zeile4 = "ein"; - color4 = "0x81"; - icon4 = ""; + zeile4 = anzeige_text; + icon4 = icon; + color4 =color; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if (aktuelleSeite == 3) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -var lampe = dom.GetObject("Beleuchtung_Esszimmer"); -lampe.State(1); -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +! #### Seite 3 - Licht Esszimmer #### +if (aktuelleSeite == 3 ) { + var an_aus = dom.GetObject("Beleuchtung_Esszimmer"); + var zustand_licht = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand_licht ) { + icon=""; + ausgabe_text="ein"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "Esszimmer"; + zeile3 = "Licht"; + color3 = "0x83"; icon3 = ""; - color3 ="0x80"; - zeile4 = "ist"; - color4 = "0x80"; + zeile4 = "Esszimmer"; + color4 = "0x83"; icon4 = ""; - zeile5 = "ein"; - color5 = "0x81"; - icon5 = ""; - zeile6 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } - -if (aktuelleSeite == 4) { -string alarm_zonen="Alarmzone_EGR_soll,Alarmzone_EGL_soll,Alarmzone_KEL_soll,Alarmzone_WKG_soll,Alarmzone_WDG_soll,Alarmzone_TKG_soll,Alarmzone_TEG_soll,Alarmzone_TDG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(true); +! #### Seite 4 - Alarmanlage alle Zonen #### +if (aktuelleSeite == 4 ) { + var an_aus = dom.GetObject("Alarmanlage"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; } - } -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = "Alarmanlage"; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = "ist"; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = "scharf"; -string color4 = "0x81"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Alarmanlage"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; } - -!#### Seite 5 - Alarmanlage Kellergeschoss #### +! #### Seite 5 - Alarmanlage Kellergeschoss #### if (aktuelleSeite == 5 ) { -string alarm_zonen="Alarmzone_KEL_soll,Alarmzone_WKG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(true); - } - } - var an_aus = dom.GetObject("Alarmanlage_Kellergeschoss"); - an_aus.State(true); + var zustand = an_aus.Value(); var ausgabe_text = ""; var icon = ""; - icon =""; - ausgabe_text="scharf"; - color = "0x84"; - zeile1 = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; zeile2 = ""; @@ -170,50 +297,69 @@ string zone; zeile5 = ausgabe_text; color5 = color; icon5 = icon; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if ((aktuelleSeite != 2) && (aktuelleSeite !=3)&& (aktuelleSeite !=4)&& (aktuelleSeite !=5)) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; +! #################### Seite 6 ####################### +! #################### Teichpumpe #################### +if (aktuelleSeite == 6 ) { + var an_aus = dom.GetObject("GartenTeichPumpe"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="an"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Teichpumpe"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "Garten ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; +} -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +if ((aktuelleSeite == 0)) { + var anzeige_text = ""; + var color = ""; + var icon = ""; + icon = "0x80"; + color = "0x84"; + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Funktion"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "nicht fertig"; - icon3 = "0x81"; - color3 = "0x81"; + zeile3 = aktuelleSeite; + color3 = "0x83"; + icon3 = ""; + zeile4 = ""; + icon4 = icon; + color4 =color; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } @@ -221,7 +367,7 @@ string icon6 = ""; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! System Routine do not change anything below ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - + string splitter="|"; string msgBuffer = zeile1 # splitter # color1 # splitter # icon1 # "\t"; msgBuffer = msgBuffer # zeile2 # splitter # color2 # splitter # icon2 # "\t"; @@ -229,19 +375,19 @@ string icon6 = ""; msgBuffer = msgBuffer # zeile4 # splitter # color4 # splitter # icon4 # "\t"; msgBuffer = msgBuffer # zeile5 # splitter # color5 # splitter # icon5 # "\t"; msgBuffer = msgBuffer # zeile6 # splitter # color6 # splitter # icon6; - + string substitutions = "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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E"; - + string bufferLine; string substEntry; integer i; string char; string line; string icon; - + string command = "0x02"; foreach(bufferLine, msgBuffer) { line = bufferLine.StrValueByIndex(splitter, 0); @@ -270,8 +416,7 @@ string icon6 = ""; command = command # ",0x0A"; } command = command # ",0x03"; - + dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(command); - + ! ##### FERTIG ##### - diff --git a/programme/EGL_Display_Taste_unten_kurz.hm b/programme/EGL_Display_Taste_unten_kurz.hm index 0b8b853..5df185b 100644 --- a/programme/EGL_Display_Taste_unten_kurz.hm +++ b/programme/EGL_Display_Taste_unten_kurz.hm @@ -72,7 +72,7 @@ string color6 = "0x80"; string icon6 = ""; ! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### -integer seitenzahl=5; +integer seitenzahl=6; ! ### Systemvariable seitenzaehler01 holen ### var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); var aktuelleSeite = seitenZaehler.Value(); @@ -164,7 +164,7 @@ var alarm_color; icon6 = kt_icon; } -!##### Seite 2 - Licht Laube ###### +! ##### Seite 2 - Licht Laube ###### if (aktuelleSeite == 2 ) { var an_aus_laube = dom.GetObject("Beleuchtung_Laube"); var zustand_laube = an_aus_laube.Value(); @@ -199,7 +199,7 @@ if (aktuelleSeite == 2 ) { color6 = "0x80"; icon6 = ""; } -!#### Seite 3 - Licht Esszimmer #### +! #### Seite 3 - Licht Esszimmer #### if (aktuelleSeite == 3 ) { var an_aus = dom.GetObject("Beleuchtung_Esszimmer"); var zustand_licht = an_aus.Value(); @@ -233,7 +233,7 @@ if (aktuelleSeite == 3 ) { color6 = "0x80"; icon6 = ""; } -!#### Seite 4 - Alarmanlage alle Zonen #### +! #### Seite 4 - Alarmanlage alle Zonen #### if (aktuelleSeite == 4 ) { var an_aus = dom.GetObject("Alarmanlage"); var zustand = an_aus.Value(); @@ -267,7 +267,7 @@ if (aktuelleSeite == 4 ) { color6 = "0x80"; icon6 = ""; } -!#### Seite 5 - Alarmanlage Kellergeschoss #### +! #### Seite 5 - Alarmanlage Kellergeschoss #### if (aktuelleSeite == 5 ) { var an_aus = dom.GetObject("Alarmanlage_Kellergeschoss"); var zustand = an_aus.Value(); @@ -301,6 +301,43 @@ if (aktuelleSeite == 5 ) { color6 = "0x80"; icon6 = ""; } + +! #################### Seite 6 ####################### +! #################### Teichpumpe #################### +if (aktuelleSeite == 6 ) { + var an_aus = dom.GetObject("GartenTeichPumpe"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="an"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Teichpumpe"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "Garten ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; +} + if ((aktuelleSeite == 0)) { var anzeige_text = ""; var color = ""; diff --git a/programme/EGL_Display_Taste_unten_lang.hm b/programme/EGL_Display_Taste_unten_lang.hm index ef274d6..5df185b 100644 --- a/programme/EGL_Display_Taste_unten_lang.hm +++ b/programme/EGL_Display_Taste_unten_lang.hm @@ -1,161 +1,288 @@ -! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### -integer seitenzahl=5; -! ### Systemvariable seitenzaehler01 holen ### -var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); -var aktuelleSeite = seitenZaehler.Value(); - -if (aktuelleSeite ==2) { -var lampeLaube = dom.GetObject("Beleuchtung_Laube"); -lampeLaube.State(0); - +! ### Homatic-Statusanzeige HM-Dis-WM55 #### +! 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) + + !jede Seite des Displays hat 6 Zeilen !hier legen wir die Variablen fest, die !wir auf jeder Seite nutzen können string zeile1 = ""; string color1 = "0x80"; string icon1 = ""; - + string zeile2 = ""; string color2 = "0x80"; string icon2 = ""; - + string zeile3 = ""; string color3 = "0x80"; string icon3 = ""; - + string zeile4 = ""; string color4 = "0x80"; string icon4 = ""; - + string zeile5 = ""; string color5 = "0x80"; string icon5 = ""; - + string zeile6 = ""; string color6 = "0x80"; string icon6 = ""; - zeile1 = ""; + +! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ########### +integer seitenzahl=6; +! ### Systemvariable seitenzaehler01 holen ### +var seitenZaehler = dom.GetObject("EGL_Display_Seitenzaehler"); +var aktuelleSeite = seitenZaehler.Value(); +aktuelleSeite = aktuelleSeite-1; +if (aktuelleSeite<=0) +{ + seitenZaehler.State(seitenzahl); +} +else +{ + seitenZaehler.State(aktuelleSeite); +} +aktuelleSeite = seitenZaehler.Value(); +! ###################### Seite 1 ###################### +if (aktuelleSeite==1 ) { + var oSysvar = dom.GetObject("Alarmanlage"); + var obj = dom.GetObject("Fenster"); + string itemID; + var cntopen=0; + foreach(itemID, obj.EnumUsedIDs()) { + var item = dom.GetObject(itemID); + if(item.IsTypeOf(OT_CHANNEL)) { + var state=item.DPByHssDP("STATE"); + if(state.Value()!=0) { + cntopen=cntopen+1; + } + } + } +!Kellertür Status holen +object kt= dom.GetObject("KG_XX_K2_TK_1"); +var kt_state=kt.DPByHssDP("STATE"); +var alarm_status; +var alarm_icon; +var alarm_color; + if (oSysvar.State()==1) { + alarm_status="an"; + alarm_icon=""; + alarm_color="0x82"; + } else { + alarm_status="aus"; + alarm_icon=""; + alarm_color="0x82"; +} + zeile1 = "Hausalarm"; + color1 = "0x82"; + icon1 = ""; + zeile2 = alarm_status; + color2 = alarm_color; + icon2 = alarm_icon; + zeile3 = ""; + color3="0x83"; + icon3 = ""; + zeile4 = ""; + color4 = "0x83"; + icon4 = ""; + + if (cntopen>0) { + zeile3 = cntopen # " Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "offen"; + color4 = "0x83"; + icon4 = ""; + } else { + zeile3 = "Alle Fenster"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "sind zu"; + color4 = "0x83"; + icon4 = ""; + } + var kt_zeile; + var kt_color; + var kt_icon; + if (kt_state == true ) { + kt_zeile="offen"; + kt_color="0x85"; + kt_icon=""; + } else { + kt_zeile="geschlossen"; + kt_color="0x85"; + kt_icon=""; + } + zeile5 = "Kellertür"; + color5 = "0x85"; + icon5 = ""; + zeile6 = kt_zeile; + color6 = kt_color; + icon6 = kt_icon; +} + +! ##### Seite 2 - Licht Laube ###### +if (aktuelleSeite == 2 ) { + var an_aus_laube = dom.GetObject("Beleuchtung_Laube"); + var zustand_laube = an_aus_laube.Value(); + var anzeige_text = ""; + var color = ""; + var icon = ""; + if ( zustand_laube ) { + icon = ""; + anzeige_text="ein"; + color = "0x81"; + } else { + icon = ""; + anzeige_text="ein"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht Laube"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "ist"; + zeile3 = "Licht Laube"; + color3 = "0x83"; icon3 = ""; - color3 = "0x80"; - zeile4= "aus"; - color4= "0x84"; - icon4 =""; + zeile4 = anzeige_text; + icon4 = icon; + color4 =color; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if (aktuelleSeite == 3) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -var lampe = dom.GetObject("Beleuchtung_Esszimmer"); -lampe.State(0); -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +! #### Seite 3 - Licht Esszimmer #### +if (aktuelleSeite == 3 ) { + var an_aus = dom.GetObject("Beleuchtung_Esszimmer"); + var zustand_licht = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand_licht ) { + icon=""; + ausgabe_text="ein"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Licht"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "Esszimmer"; + zeile3 = "Licht"; + color3 = "0x83"; icon3 = ""; - color3 ="0x80"; - zeile4 = "ist"; - color4 = "0x80"; + zeile4 = "Esszimmer"; + color4 = "0x83"; icon4 = ""; - zeile5 = "aus"; - color5 = "0x81"; - icon5 = ""; - zeile6 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if (aktuelleSeite == 4) { -string alarm_zonen="Alarmzone_EGR_soll,Alarmzone_EGL_soll,Alarmzone_KEL_soll,Alarmzone_WKG_soll,Alarmzone_WDG_soll,Alarmzone_TKG_soll,Alarmzone_TEG_soll,Alarmzone_TDG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(false); +! #### Seite 4 - Alarmanlage alle Zonen #### +if (aktuelleSeite == 4 ) { + var an_aus = dom.GetObject("Alarmanlage"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; } - } -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = "Alarmanlage"; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = "ist"; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = "unscharf"; -string color4 = "0x84"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; - -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Alarmanlage"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; } - -!#### Seite 5 - Alarmanlage Kellergeschoss #### +! #### Seite 5 - Alarmanlage Kellergeschoss #### if (aktuelleSeite == 5 ) { -string alarm_zonen="Alarmzone_KEL_soll,Alarmzone_WKG_soll"; -string zone; - - foreach(zone,alarm_zonen.Split(",")) { - var zScharf = dom.GetObject(zone); - if (zScharf != null) { - zScharf.State(false); - } - } - var an_aus = dom.GetObject("Alarmanlage_Kellergeschoss"); - an_aus.State(false); + var zustand = an_aus.Value(); var ausgabe_text = ""; var icon = ""; - icon =""; - ausgabe_text="unscharf"; - color = "0x84"; - zeile1 = ""; + if ( zustand ) { + icon=""; + ausgabe_text="scharf"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="unscharf"; + color = "0x84"; + } + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; zeile2 = ""; @@ -170,58 +297,77 @@ string zone; zeile5 = ausgabe_text; color5 = color; icon5 = icon; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } -if ((aktuelleSeite != 2) && (aktuelleSeite !=3) && (aktuelleSeite !=4) && (aktuelleSeite !=5) ) { -!jede Seite des Displays hat 6 Zeilen -!hier legen wir die Variablen fest, die -!wir auf jeder Seite nutzen können -string zeile1 = ""; -string color1 = "0x80"; -string icon1 = ""; - -string zeile2 = ""; -string color2 = "0x80"; -string icon2 = ""; - -string zeile3 = ""; -string color3 = "0x80"; -string icon3 = ""; - -string zeile4 = ""; -string color4 = "0x80"; -string icon4 = ""; - -string zeile5 = ""; -string color5 = "0x80"; -string icon5 = ""; +! #################### Seite 6 ####################### +! #################### Teichpumpe #################### +if (aktuelleSeite == 6 ) { + var an_aus = dom.GetObject("GartenTeichPumpe"); + var zustand = an_aus.Value(); + var ausgabe_text = ""; + var icon = ""; + if ( zustand ) { + icon=""; + ausgabe_text="an"; + color = "0x81"; + } else { + icon =""; + ausgabe_text="aus"; + color = "0x84"; + } + zeile1 = "Einschalten"; + color1 = "0x80"; + icon1 = ""; + zeile2 = ""; + color2 = "0x80"; + icon2 = ""; + zeile3 = "Teichpumpe"; + color3 = "0x83"; + icon3 = ""; + zeile4 = "Garten ist"; + color4 = "0x83"; + icon4 = ""; + zeile5 = ausgabe_text; + color5 = color; + icon5 = icon; + zeile6 = "Ausschalten"; + color6 = "0x80"; + icon6 = ""; +} -string zeile6 = ""; -string color6 = "0x80"; -string icon6 = ""; - zeile1 = ""; +if ((aktuelleSeite == 0)) { + var anzeige_text = ""; + var color = ""; + var icon = ""; + icon = "0x80"; + color = "0x84"; + zeile1 = "Einschalten"; color1 = "0x80"; icon1 = ""; - zeile2 = "Funktion"; + zeile2 = ""; color2 = "0x80"; icon2 = ""; - zeile3 = "nicht fertig"; - icon3 = "0x81"; - color3 = "0x81"; + zeile3 = aktuelleSeite; + color3 = "0x83"; + icon3 = ""; + zeile4 = ""; + icon4 = icon; + color4 =color; zeile5 = ""; - color5 = "0x81"; + color5 = "0x80"; icon5 = ""; - zeile6 = ""; + zeile6 = "Ausschalten"; color6 = "0x80"; icon6 = ""; } + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! System Routine do not change anything below ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - + string splitter="|"; string msgBuffer = zeile1 # splitter # color1 # splitter # icon1 # "\t"; msgBuffer = msgBuffer # zeile2 # splitter # color2 # splitter # icon2 # "\t"; @@ -229,19 +375,19 @@ string icon6 = ""; msgBuffer = msgBuffer # zeile4 # splitter # color4 # splitter # icon4 # "\t"; msgBuffer = msgBuffer # zeile5 # splitter # color5 # splitter # icon5 # "\t"; msgBuffer = msgBuffer # zeile6 # splitter # color6 # splitter # icon6; - + string substitutions = "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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\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"; substitutions = substitutions # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E"; - + string bufferLine; string substEntry; integer i; string char; string line; string icon; - + string command = "0x02"; foreach(bufferLine, msgBuffer) { line = bufferLine.StrValueByIndex(splitter, 0); @@ -270,8 +416,7 @@ string icon6 = ""; command = command # ",0x0A"; } command = command # ",0x03"; - + dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(command); - + ! ##### FERTIG ##### -