HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Kabellose und kabelgebundene Sender und Empfänger der klassischen Homematic-Serie

Moderator: Co-Administratoren

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 30.07.2018, 12:22

Hallo,
ich möchte von meiner HmIP-STHO Temperatur und Luftfeuchtigkeit angezeigt lassen.
Und von HmIP-SLO den aktuell Helligkeits Wert in Lux auch auf den HM-Dis-EP-WM55.
Habe mir von Dr.Tob viewtopic.php?t=31672 den Script genommen und von alchy viewtopic.php?f=31&t=30127 das auf Homematic IP Sensoren angepast.
Die Temperatur wir angezeigt, dass geht.

Code: Alles auswählen

string zeile2  ="Außen " # datapoints.Get("HmIP-RF.000ED709B2848F:1.ACTUAL_TEMPERATURE" ).Value().ToString(1)# " C";
string icon2  = "";
Mit der Luftfeuchtigkeit bekomme ich nicht hin, auch mit den aktuell Helligkeitswert in Lux.
Ihr habe ich irgendwie ein Fehler drin!

Code: Alles auswählen

string zeile3  ="Luft " # datapoints.Get("HmIP-RF.000ED709B2848F:1.ACTUAL_HUMIDITY" ).Value().ToString(0)# " %";
string icon3  = "";

Code: Alles auswählen

string zeile4  ="Sonne " # datapoints.Get("HmIP-RF.000D58A98FAE02:1.ACTUAL_BRIGHTNESS" ).Value().ToString(1)# " lux";
string icon4  = "";
Könnt ihr mir da Helfen!
Das mit den Programmieren im Script ist für mich neue Land.

Gruß Enrico
Zuletzt geändert von EnricoL am 01.08.2018, 18:54, insgesamt 1-mal geändert.

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 01.08.2018, 11:57

Habe ein wenig rum getestet und es wird jetzt die Luftfeuchtigkeit mit angezeigt.

Code: Alles auswählen

!! Universalprogramm zum Füllen des HM-Disp-EP-WM55
!! (c) DrTob
!! Version 1.10


! Symbole
! 0x80 AUS
! 0x81 EIN
! 0x82 OFFEN
! 0x83 geschlossen
! 0x84 fehler
! 0x85 alles ok
! 0x86 information
! 0x87 neue nachricht
! 0x88 servicemeldung

! Zugriff auf vordefinierte Texte
! 0x80 Textblock  1
! 0x81 Textblock  2
! 0x82 Textblock  3
! 0x83 Textblock  4
! 0x84 Textblock  5
! 0x85 Textblock  6
! 0x86 Textblock  7
! 0x87 Textblock  8
! 0x88 Textblock  9
! 0x89 Textblock 10

! Tonfolgen
! 0xC0 AUS
! 0xC1 LANG LANG
! 0xC2 LANG KURZ
! 0xC3 LANG KURZ KURZ
! 0xC4 KURZ
! 0xC5 KURZ KURZ
! 0xC6 LANG
! 0xC7
! 0xC9
! 0xCA

!Signale
! 0xF0 AUS
! 0xF1 Rotes Blitzen
! 0xF2 Grünes Blitzen
! 0xF3 Orangenes Blitzen

!Seriennummer des HM-Disp-EP-WM55.
string seriennummer = "NEQ1463647";

string zeile2  = "Temp " # datapoints.Get("HmIP-RF.000ED709B2848F:1.ACTUAL_TEMPERATURE" ).Value().ToString(1)# " C";
string icon2  = "";

string zeile3 = "Luft " # datapoints.Get("HmIP-RF.000ED709B2848F:1.HUMIDITY" ).Value().ToString(1)# " %";
string icon3  = "";

string zeile4 = " ";
string icon4  = "";



string signal = "0xF0";

string tonfolge = "0xC0";

! 1 bis 15. 0 = Unendlich
integer wiederholungen = 2;

! es wird zum naechstmoeglichen Abstand aufgerundet. Maximum ist 160s.
integer abstand = 10;

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! System Routine do not change anything below !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

string splitter="|";
string msgBuffer = zeile2 # splitter # icon2 # "\t";
msgBuffer = msgBuffer # zeile3 # splitter # icon3 # "\t";
msgBuffer = msgBuffer # zeile4 # splitter # icon4;

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,0x0A";
foreach(bufferLine, msgBuffer) {
   line = bufferLine.StrValueByIndex(splitter, 0);
   icon = bufferLine.StrValueByIndex(splitter, 1);
   integer linelength = line.Length();
   integer iconlength = icon.Length();
   if ((linelength > 0) || (iconlength > 0)) {
      command = command # ",0x12";
      if ((linelength == 4) && (line.Substr(0,2) == "0x")) {
         command = command # "," # line;
         i = 12;
      }
      else {
         i = 0;
      }
      if (linelength > 12) {
        linelength = 12;
      }
      while (i < linelength) {
        char = line.Substr(i, 1);   
        boolean b = true;
        foreach(substEntry, substitutions){
          if (b == true){
            if (char == substEntry.Substr(0,1)){
              command = command # substEntry.Substr(1,5);
              b = false;
            }
          }
        }
        i = i + 1;
      }
      if (iconlength > 0) {
         command = command # ",0x13," # icon;
      }
   }
   command = command # ",0x0A";
}

command = command # ",0x14," # tonfolge # ",0x1C,";

if (wiederholungen < 1){
   command = command # "0xDF,0x1D,";
}
else {
   if (wiederholungen < 11) {
      command = command # "0xD" # (wiederholungen - 1) # ",0x1D,";
   }
   else {
      if (wiederholungen == 11) {
         command = command # "0xDA,0x1D,";
      }
      else {
         if (wiederholungen == 12) {
            command = command # "0xDB,0x1D,";
         }
         else {
            if (wiederholungen == 13) {
               command = command # "0xDC,0x1D,";
            }
            else {
               if (wiederholungen == 14) {
                  command = command # "0xDD,0x1D,";
               }
               else {
                  command = command # "0xDE,0x1D,";
               }
            }
         }
      }
   }
}


if (abstand <= 10) {
   command = command # "0xE0,0x16,";
}
else {
   if (abstand <= 100) {
      command = command # "0xE" # (abstand - 1 / 10) # ",0x16,";
   }
   else {
      if (abstand <= 110) {
         command = command # "0xEA,0x16,";
      }
      else {
         if (abstand <= 120) {
            command = command # "0xEB,0x16,";
         }
         else {
            if (abstand <= 130) {
               command = command # "0xEC,0x16,";
            }
            else {
               if (abstand <= 140) {
                  command = command # "0xED,0x16,";
               }
               else {
                  if (abstand <= 150) {
                     command = command # "0xEE,0x16,";
                  }
                  else {
                     command = command # "0xEF,0x16,";
                  }
               }
            }
         }
      }
   }
}

command = command # signal # ",0x03";
dom.GetObject("BidCos-RF." # seriennummer # ":3.SUBMIT").State(command);
Jetzt fehlt mir nur noch die Helligkeitswert in Lux vom HmIP-SLO.
Licht.jpg
Lichtsensor.jpg

Code: Alles auswählen

string zeile4  ="Sonne " # datapoints.Get("HmIP-RF.000D58A98FAE02:1.ACTUAL_BRIGHTNESS" ).Value().ToString(1)# " lux";
string icon4  = "";
Kann da mir jemand Helfen?

Gruß Enrico
Zuletzt geändert von EnricoL am 07.08.2018, 19:03, insgesamt 1-mal geändert.

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 07.08.2018, 19:02

Hallo,

kann mir jemand ihr weiter helfen was ich verkehrt mache!
Warum mir die Aktuelle Helligkeit nicht angezeigt wird.

Gruß Enrico

Gluehwurm
Beiträge: 12434
Registriert: 19.03.2014, 00:37
System: in Planung
Hat sich bedankt: 105 Mal
Danksagung erhalten: 380 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von Gluehwurm » 07.08.2018, 21:55

Vielleicht, weil es den Datenpunkt in dieser Form nicht gibt (oder ich habe was übersehen). Datenpunktliste runterladen und den richtigen Datenpunkt eintragen.

Gruß
Bruno

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 08.08.2018, 17:01

Hallo Bruno,

danke für die Hilfestellung!
Habe mir die Aktuelle Homematic IP Devices runter geladen.
https://www.eq-3.de/Downloads/eq3/downl ... tation.pdf
Bissel suchen und überlegen habe ich den Fehler gefunden. :)
Unter Punkte 75 ist HmIP-SLO und 89 ist HmIP-STHO.

So jetzt ist es fertig! Zeigt Aktuelle Temperatur, Luftfeuchtigkeit und Helligkeit an.

Code: Alles auswählen

!! Universalprogramm zum Füllen des HM-Disp-EP-WM55
!! (c) DrTob
!! Version 1.10


! Symbole
! 0x80 AUS
! 0x81 EIN
! 0x82 OFFEN
! 0x83 geschlossen
! 0x84 fehler
! 0x85 alles ok
! 0x86 information
! 0x87 neue nachricht
! 0x88 servicemeldung

! Zugriff auf vordefinierte Texte
! 0x80 Textblock  1
! 0x81 Textblock  2
! 0x82 Textblock  3
! 0x83 Textblock  4
! 0x84 Textblock  5
! 0x85 Textblock  6
! 0x86 Textblock  7
! 0x87 Textblock  8
! 0x88 Textblock  9
! 0x89 Textblock 10

! Tonfolgen
! 0xC0 AUS
! 0xC1 LANG LANG
! 0xC2 LANG KURZ
! 0xC3 LANG KURZ KURZ
! 0xC4 KURZ
! 0xC5 KURZ KURZ
! 0xC6 LANG
! 0xC7
! 0xC9
! 0xCA

!Signale
! 0xF0 AUS
! 0xF1 Rotes Blitzen
! 0xF2 Grünes Blitzen
! 0xF3 Orangenes Blitzen

!Seriennummer des HM-Disp-EP-WM55.
string seriennummer = "NEQ1463647";

string zeile2  = "Temp " # datapoints.Get("HmIP-RF.000ED709B2848F:1.ACTUAL_TEMPERATURE" ).Value().ToString(1)# " C";
string icon2  = "";

string zeile3 = "Luft " # datapoints.Get("HmIP-RF.000ED709B2848F:1.HUMIDITY" ).Value().ToString(1)# " %";
string icon3  = "";

string zeile4 = "Sonne " # datapoints.Get("HmIP-RF.000D58A98FAE02:1.CURRENT_ILLUMINATION" ).Value().ToString(1)# "";
string icon4  = "";



string signal = "0xF0";

string tonfolge = "0xC0";

! 1 bis 15. 0 = Unendlich
integer wiederholungen = 2;

! es wird zum naechstmoeglichen Abstand aufgerundet. Maximum ist 160s.
integer abstand = 10;

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! System Routine do not change anything below !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

string splitter="|";
string msgBuffer = zeile2 # splitter # icon2 # "\t";
msgBuffer = msgBuffer # zeile3 # splitter # icon3 # "\t";
msgBuffer = msgBuffer # zeile4 # splitter # icon4;

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,0x0A";
foreach(bufferLine, msgBuffer) {
   line = bufferLine.StrValueByIndex(splitter, 0);
   icon = bufferLine.StrValueByIndex(splitter, 1);
   integer linelength = line.Length();
   integer iconlength = icon.Length();
   if ((linelength > 0) || (iconlength > 0)) {
      command = command # ",0x12";
      if ((linelength == 4) && (line.Substr(0,2) == "0x")) {
         command = command # "," # line;
         i = 12;
      }
      else {
         i = 0;
      }
      if (linelength > 12) {
        linelength = 12;
      }
      while (i < linelength) {
        char = line.Substr(i, 1);   
        boolean b = true;
        foreach(substEntry, substitutions){
          if (b == true){
            if (char == substEntry.Substr(0,1)){
              command = command # substEntry.Substr(1,5);
              b = false;
            }
          }
        }
        i = i + 1;
      }
      if (iconlength > 0) {
         command = command # ",0x13," # icon;
      }
   }
   command = command # ",0x0A";
}

command = command # ",0x14," # tonfolge # ",0x1C,";

if (wiederholungen < 1){
   command = command # "0xDF,0x1D,";
}
else {
   if (wiederholungen < 11) {
      command = command # "0xD" # (wiederholungen - 1) # ",0x1D,";
   }
   else {
      if (wiederholungen == 11) {
         command = command # "0xDA,0x1D,";
      }
      else {
         if (wiederholungen == 12) {
            command = command # "0xDB,0x1D,";
         }
         else {
            if (wiederholungen == 13) {
               command = command # "0xDC,0x1D,";
            }
            else {
               if (wiederholungen == 14) {
                  command = command # "0xDD,0x1D,";
               }
               else {
                  command = command # "0xDE,0x1D,";
               }
            }
         }
      }
   }
}


if (abstand <= 10) {
   command = command # "0xE0,0x16,";
}
else {
   if (abstand <= 100) {
      command = command # "0xE" # (abstand - 1 / 10) # ",0x16,";
   }
   else {
      if (abstand <= 110) {
         command = command # "0xEA,0x16,";
      }
      else {
         if (abstand <= 120) {
            command = command # "0xEB,0x16,";
         }
         else {
            if (abstand <= 130) {
               command = command # "0xEC,0x16,";
            }
            else {
               if (abstand <= 140) {
                  command = command # "0xED,0x16,";
               }
               else {
                  if (abstand <= 150) {
                     command = command # "0xEE,0x16,";
                  }
                  else {
                     command = command # "0xEF,0x16,";
                  }
               }
            }
         }
      }
   }
}

command = command # signal # ",0x03";
dom.GetObject("BidCos-RF." # seriennummer # ":3.SUBMIT").State(command);
Gruß Enrico

Gluehwurm
Beiträge: 12434
Registriert: 19.03.2014, 00:37
System: in Planung
Hat sich bedankt: 105 Mal
Danksagung erhalten: 380 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von Gluehwurm » 08.08.2018, 20:19

Hi Enrico,

gerne doch, freut mich, daß Du es gefunden hast und es jetzt funktioniert. :D

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 29.09.2018, 16:49

Hallo,

habe noch ein bissel weiter gearbeitet am Display!
Zeigt auch jetzt die Alarm- und Servicemeldungen mit an!
Habe unter Systemvariable ein neues Variable angelegt als " Systemfehler ".
Systemfehler.jpg
Unter Programme " Display-Büro " wird der Wetter Skript alle 10 min aus geführt, wenn kein Systemfehler ist.
Display-Büro.jpg
Kommt jetzt ein Systemfehler, Wird das so lange auf den Display gezeigt.
Display-Büro_2.jpg
Bis man am Display die Taste 2 drückt.
Display-Büro_3.jpg

Gruß Enrico

AndynordSee
Beiträge: 23
Registriert: 23.04.2018, 10:59
Danksagung erhalten: 4 Mal

HM-Dis-EP-WM55 Wetterdaten von IP Sensoren erweiterung um regenwarscheinlichkeit

Beitrag von AndynordSee » 08.10.2018, 09:16

Moin Moin

würde gerne in zeile 4 die regenwarscheinlichkeit ausgeben.
Nach dem wunderground.com leider keine Api keys mehr bereit stellt, hat einer von euch eine gute alternative?

blücher16
Beiträge: 73
Registriert: 03.12.2014, 10:06
Hat sich bedankt: 2 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von blücher16 » 30.11.2018, 18:21

Hallo zusammen,

ich bin ebenfalls Besitzer eines HM-Dis-EP-WM55 und verwende das Programm von Dr. Tob.

Läuft prima - bis zu einem Neustart der CCU2 - dann wird das Script "zerschossen" sprich bei Fehlerprüfung wird ein solcher ausgegeben.
Hilft bisher nur das Grundprogramm erneut einzugeben, individuelle Daten ergänzen, dann läuft es wieder. Hab ich bestimmt schon 20 mal gehabt.

Was habt Ihr denn für Erfahrungen?

Danke, Gruß Bernd.

EnricoL
Beiträge: 266
Registriert: 11.12.2017, 17:46
Hat sich bedankt: 26 Mal
Danksagung erhalten: 5 Mal

Re: HM-Dis-EP-WM55 Wetterdaten von IP Sensoren anzeigen!

Beitrag von EnricoL » 09.12.2018, 10:45

Hallo Bernd,

habe den Script auf 3 HM-Dis-EP-WM55 Display laufen. Läuft super ohne Fehler!
Auch wenn ich neustarte den Pi3 oder neue SD Karte bespiele, es läuft.
Das einzige was öfter mal kommt, Systemmeldung von die Display.
Weil die zu langsam Antworten.

Hast mal den 5 Bericht zurück getestet? Der Script läuft bei mir super!

Gruß Enrico

Antworten

Zurück zu „HomeMatic Aktoren und Sensoren (klassisch)“