Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Script fürTabelle der Batterie Zustände

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Script fürTabelle der Batterie Zustände

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @liv-in-sky last edited by

      @liv-in-sky
      Danke!
      sehe ich mir heute abend an.

      @liv-in-sky sagte in Script fürTabelle der Batterie Zustände:

      oder du machst einfach "händisch" den wert auf false , aber dann hast du halt eine rote zeile - dauerhaft

      Ist auch nicht anders als dauehaft grün 😉

      liv-in-sky 1 Reply Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @Homoran last edited by

        @Homoran evtl- theortisch könnte man den datenpunkt zu einer zahl umwandeln ( wenn der adapter nicht "murrt") und dann eine abfrage "type of" auf den datenpunkt und wenn dieser number ist, dann warning !

        oder vielleicht gibt es noch andere tricks, die uns noch einfallen - ein dauerndes warning finde ich nicht gut

        Homoran 1 Reply Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @Homoran last edited by liv-in-sky

          @Homoran schau mal nach, was passiert, wenn du den datenpunkt in eine zahl verwandelst - "schockt" das den adapter und er bring einen fehler/warning ?

          H 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @liv-in-sky last edited by

            @liv-in-sky Danke!

            Ihr habt mich irgendwann mal abgehängt.
            Auch das Material-Gedöns habe ich nur am Rande mitbekommen. Leider keine Zeit mich da auch noch einzuarbeiten, obwohl ich alles mit Material richtig gut finde.

            Vielleicht versuche ich heute abend mal die aktuelle Version.
            Muss ich mich da auf große Änderungen einstellen?

            liv-in-sky 1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Homoran last edited by liv-in-sky

              @Homoran wenn du die brauche..widget von den material designs nicht brauchst - musst du nicht mal einen datenpunkt anlegen

              sind halt neue settings dazugekommen - daher aufpassen beim zurückkopieren deines settings - aber sonst ist alles für html table benutzer gleichgeblieben

              material design ist nur ein add-on - ich mag meine tabellen immer noch so, wie wir sie entwickelt haben 🙂 kompakt und schnell in der übersicht !

              1 Reply Last reply Reply Quote 0
              • H
                hofmannha @liv-in-sky last edited by

                @liv-in-sky
                Hallo liv-in-sky,
                ich habe ein Homematic Türkontakt, wo Lowbat = true ist.
                In deiner Tabelle wird er als OK angezeigt.
                Nochmals vielen Dank für deine Mühe.
                Viele Grüße
                balkontuer2.PNG balkontuer.PNG

                liv-in-sky 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky last edited by

                  brauche hilfe von homematic usern - im script ist eine abfrage nach :

                  if LOWBAT=="LOW" -

                  kann das sein oder hat sich da ein fehlerchen eingeschlichen - die LOWBAT sind doch boolean bei homeatic - kann das bitte jmd bestätigen ( @Homoran )

                  diese abfrage ist bei tado richtig aber ich vermute bei homematich falsch

                  Homoran H 2 Replies Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @hofmannha last edited by

                    @hofmannha

                    ändere mal bitte diese beiden zeilen (792 und 793) im script und teste nochmal

                    Image 2.png

                    einfach dass "=="LOW" rauslöschen

                    1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @liv-in-sky last edited by

                      @liv-in-sky sagte in Script fürTabelle der Batterie Zustände:

                      brauche hilfe von homematic usern - im script ist eine abfrage nach :

                      if LOWBAT=="LOW" -

                      kann das sein oder hat sich da ein fehlerchen eingeschlichen - die LOWBAT sind doch boolean bei homeatic - kann das bitte jmd bestätigen ( @Homoran )

                      diese abfrage ist bei tado richtig aber ich vermute bei homematich falsch

                      bestätigt!

                      Bin zwar nicht an meinem System, aber bei HM müsste es Lowbat=true heißen

                      liv-in-sky 1 Reply Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @Homoran last edited by

                        @Homoran danke - da ist wohl der kopierwurm drin - ist aber im ersten post bereinigt !

                        1 Reply Last reply Reply Quote 0
                        • H
                          hofmannha @liv-in-sky last edited by

                          @liv-in-sky
                          Lowbat ist immer true oder false

                          Homoran 1 Reply Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @hofmannha last edited by

                            @hofmannha sagte in Script fürTabelle der Batterie Zustände:

                            @liv-in-sky
                            Lowbat ist immer true oder false

                            oder wie beim HM-Sen-MDIR-O einfach nur leer 😂

                            liv-in-sky 1 Reply Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @Homoran last edited by liv-in-sky

                              @Homoran ich warte ja noch auf deinen input - wenn du aus dem datenpunkt eine zahl machen kannst - ohne warnung im log - könnte ich vorher auf type testen und wenn es eine zahl ist, dann wird etwas bestimmtes angezeigt ansonsten ist es ein bool und das script macht weiter wie bisher

                              der werrt wird ja nicht geschrieben vom adapter - also kannst du den typ doch ändern

                              Homoran 1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @liv-in-sky last edited by

                                @liv-in-sky sagte in Script fürTabelle der Batterie Zustände:

                                der werrt wird ja nicht geschrieben vom adapter - also kannst du den typ doch ändern

                                bin gestern nicht dazu gekommen.

                                Aber der Datenpunkt-Typ wird vom Adapter wahrscheinlich wieder aktualisiert

                                liv-in-sky 1 Reply Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky @Homoran last edited by liv-in-sky

                                  @Homoran wenn du ihn änderst ( musst dir auch die rechte geben) kann der adapter nix mehr ändern - glaube ich

                                  einfach mal testen

                                  die frage ist, bringt er einen fehler

                                  Homoran 1 Reply Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @liv-in-sky last edited by

                                    @liv-in-sky sagte in Script fürTabelle der Batterie Zustände:

                                    glaube ich

                                    Das hieß es auch beim common name, den hatte ich auch erst nur in ioB geändert, damit er in die Tabelle passt.
                                    Wurde dauernd wieder überschrieben - jetzt auf der CCU geändert und Ruhe ist.

                                    Aber ich muss es testen

                                    liv-in-sky 1 Reply Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @Homoran last edited by

                                      @Homoran gib mir bescheid, wenn es weiter geht

                                      Homoran 1 Reply Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @liv-in-sky last edited by Homoran

                                        @liv-in-sky

                                        Habe bei dem DP unter RAW bei "common" auf number und bei NATIVE auf INTEGER gestellt.
                                        Ich nehme erst einmal an, dass der zweite Schritt überflüssig, wenn nicht sogar falsch ist.

                                        Bisher kan eine Latte Fehlermeldungen, beginnend mit:

                                        javascript.0	2020-03-18 16:15:00.119	warn	(27541) getState "hm-rpc.0.KEQ1070107.0.LOWBAT" not found (3)
                                        

                                        Mal sehen was jetzt beim nächsten Aufruf erfolgt

                                        EDIT:
                                        es bleibt bei:

                                        javascript.0	2020-03-18 16:30:00.106	warn	(27541) getState "hm-rpc.0.KEQ1070107.0.LOWBAT" not found (3)
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • Homoran
                                          Homoran Global Moderator Administrators @liv-in-sky last edited by

                                          @liv-in-sky sagte in Script fürTabelle der Batterie Zustände:

                                          habe es so geändert - problem - du bekommst halt immer warnings im log

                                          Da ich eh warnings hab ist das fast egal;

                                          Habe aber noch die Version vom 14.2. da steht an der Stelle:

                                          $('hm-rpc.*.*.0.LOWBAT').each(function(id, i) {           // hier eigene schleife definieren und den wert counter++ nicht vergessen  !!!
                                               var ida = id.split('.');
                                             //  log(id)
                                               //log(arrDoppelt.toString())
                                            //    if (!filterArray.includes(id) && !arrDoppelt.includes(ida[0]+"."+ida[1]+"."+ida[2]+".*.BATTERY_STATE") ) {
                                                        if (!filterArray.includes(id) && !arrDoppelt.includes(ida[0]+"."+ida[1]+"."+ida[2]) ) {                          
                                                 
                                                    
                                               //  counter++;                                       // SEHR WICHTIG - MUSS IN JEDER SCHLEIFE INTEGRIERT SEIN
                                               //  log(id)
                                                  val0=getObject(ida[0]+"."+ida[1]+"."+ida[2]).common.name                     //getObject(id).common.name ; //ida[2]+"."+ida[3];
                                                  var ida = val0.split('.');
                                                  val0=ida[0].replace(/:.+/g,"");
                                                  //log(val0+"   "+id);
                                                 val1help=getState(id).val;
                                                 if (val1help) {val1=(" <font color=\"red\"> ")+"low bat"} else{val1=(" <font color=\"lightgreen\"> ")+"full bat"} 
                                                 //if (val1help<=battAlarm) {val2="<font color=\"red\"><b>X</b>"} else{val2=symbolOK}
                                                 if (val1help) {val2="<font color=\"red\">"+symbolKO} else{val2=symbolOK}   
                                                 //if (val1help) {val2=<font color=\"red\"><b>X</b>} else{val2="✔"}         
                                                 
                                                 if (val1help) AkkuAlarm.push(1);
                                                 if (val1help)  alarmMessage.push(val0);
                                                 let help=[val0,val1,val2]; myObjF.push(help);
                                          

                                          Weiß jetzt nicht wo ich das val1help=="null" eintragen soll

                                          liv-in-sky 2 Replies Last reply Reply Quote 0
                                          • liv-in-sky
                                            liv-in-sky @Homoran last edited by

                                            @Homoran ich wollte nur von dir wissen, ob der adapter meckert, wenn du den datenpunkt in number änderst - scheint er nicht zu machen - ich mach dir morgen eine version , die auf number prüft und reagiert - dann sollten auch keine warnungen vom script mehr kommen - heute schaffe ich das nicht mehr

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            845
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript monitoring template
                                            67
                                            1379
                                            416852
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo