Script für Taste von HM-Dis-WM55 aber wohin?

Begonnen von d.stratmann, 16 Februar 2015, 21:17:17

Vorheriges Thema - Nächstes Thema

d.stratmann

Hallo erstmal...

ich bin in der Thematik noch Neuling.
Ich habe seit ein paar Tagen die 6 Heizkörperthermostate HM-CC-RT-DN, 2 Fensterkontakte HM-SEC-SC-2 und 10 Funk-Fenster-Drehgriffkontakt 076789.

Ich wollte mir jetzt noch das HM-Dis-WM55 kaufen, um dort den Status der einzelnen Räume anzuzeigen, darauf hin habe ich den Script hier gefunden und etwas umgeschrieben!

Da ich wie gesagt noch Anfänger bin, ist jetzt die Frage, was bzw. wo kann ich, wenn ich das Display gepairt habe am FHEM Server, einstellen, dass der Script dann bei einem kurzen Tastendruck ausgeführt wird?
Und wo muss ich das Script (die Datei) selber denn speichern und unter welchem Namen?!

Vielen Dank schon einmal für die Hilfe!!!


        !! Programm zum Füllen der OLED-Anzeige
        !! (c) DrTob angepasst von raffcjab
       !! change by D.S.

        !! 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) Wohnzimmer
        ! 0x81 Text  1 (Kanal 1  Text Zeile  2) Küche
        ! 0x82 Text  2 (Kanal 2  Text Zeile  3) Badezimmer
        ! 0x83 Text  3 (Kanal 2  Text Zeile  4) Schlafzimmer
        ! 0x84 Text  4 (Kanal 3  Text Zeile  5) Kinderzimmer1
        ! 0x85 Text  5 (Kanal 3  Text Zeile  6) Kinderzimmer2
        ! 0x86 Text  6 (Kanal 4  Text Zeile  7) TempSoll
        ! 0x87 Text  7 (Kanal 4  Text Zeile  8) TemoIst
        ! 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)

        if ((dom.GetObject("OLED-Seite").Value() < 1) || (dom.GetObject("OLED-Seite").Value() > 6)) {dom.GetObject("OLED-Seite").State(1)};

        if (dom.GetObject("OLED-Seite").Value() == 1)

        {
       string zeile1 = "0x80";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_WZ").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_WZ").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_WZ_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "0x8D";string color5 = "0x81";string icon5  = "0x8B";
        if (dom.GetObject("FK_WZ_2").DPByHssDP("STATE").Value() == 0) {icon5  = "0x89";};

        string zeile6 = "0x8E";string color6 = "0x81";string icon6  = "0x8B";
        if (dom.GetObject("TK_WZ_1").DPByHssDP("STATE").Value() == 0) {icon6  = "0x89";};
        }


        if (dom.GetObject("OLED-Seite").Value() == 2)

        {
       string zeile1 = "0x81";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KU").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KU").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_KU_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "0x8D";string color5 = "0x81";string icon5  = "0x8B";
        if (dom.GetObject("FK_KU_2").DPByHssDP("STATE").Value() == 0) {icon5  = "0x89";};

        string zeile6 = "";string color6 = "";string icon6  = "";
        }


        if (dom.GetObject("OLED-Seite").Value() == 3)

        {
       string zeile1 = "0x82";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_BZ").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_BZ").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_WZ_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "";string color5 = "";string icon5  = "";
       

        string zeile6 = "";string color6 = "";string icon6  = "";
        }

        if (dom.GetObject("OLED-Seite").Value() == 4)

        {
       string zeile1 = "0x83";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_SZ").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_SZ").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_SZ_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "0x8D";string color5 = "0x81";string icon5  = "0x8B";
        if (dom.GetObject("FK_SZ_2").DPByHssDP("STATE").Value() == 0) {icon5  = "0x89";};

        string zeile6 = "";string color6 = "";string icon6  = "";
        }

       if (dom.GetObject("OLED-Seite").Value() == 5)

        {
       string zeile1 = "0x84";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KZ1").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KZ1").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_KZ1_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "0x8D";string color5 = "0x81";string icon5  = "0x8B";
        if (dom.GetObject("FK_WKZ1_2").DPByHssDP("STATE").Value() == 0) {icon5  = "0x89";};

        string zeile6 = "";string color6 = "";string icon6  = "";
        }
       
       if (dom.GetObject("OLED-Seite").Value() == 6)

        {
       string zeile1 = "0x85";string color1 = "0x80";string icon1  = "0x86";

        string zeile2 = "0x86";string color2 = "0x80";string icon2  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KZ2").DPByHssDP("SETPOINT").Value().ToString(1);

        string zeile3 = "0x87";string color3 = "0x80";string icon3  = "";
        zeile3 = zeile3 + dom.GetObject("HK_KZ2").DPByHssDP("TEMPERATURE").Value().ToString(1);

        string zeile4 = "0x8C";string color4 = "0x81";string icon4  = "0x8B";
        if (dom.GetObject("FK_KZ2_1").DPByHssDP("STATE").Value() == 0) {icon4  = "0x89";};

        string zeile5 = "0x8D";string color5 = "0x81";string icon5  = "0x8B";
        if (dom.GetObject("FK_KZ2_2").DPByHssDP("STATE").Value() == 0) {icon5  = "0x89";};

        string zeile6 = "";string color6 = "";string icon6  = "";
        }
       
        dom.GetObject("OLED-Seite").State(dom.GetObject("OLED-Seite").Value()+1);