Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. HTML Tabelle für TrashSchedule Adapter

    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

    HTML Tabelle für TrashSchedule Adapter

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rowein @liv-in-sky last edited by

      @liv-in-sky
      Seit den letzten Updates von Trashschedule wurden wohl ein paar Datenpunkte umbenannt und nun kann das Skript nicht mehr auf diese referenzieren.
      Habs kurz überflogen und es scheinen nur die days und date-Punkte zu betreffen.
      Ich habe auch schon selbst versucht, das zu beheben.
      Scheitere aber bei der Anzeige der dritten Spalte (Datum) und benötige Unterstützung.
      Danke!

      Grüße

      liv-in-sky 4 Replies Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @rowein last edited by liv-in-sky

        @rowein

        werd ich natürlich beheben - wollte aber die neue version nicht installieren, da es bei einigen zu problemen kommt- muss ich mal durchlesen

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

          @rowein
          version 1.0.1
          habe mal upgedatet - keinerlei probleme bei der tabelle oder den materialdesignwidgets
          einzelne datenpunkte sind eh nicht wichtig, da nur mit dem json gearbeitet wird - das json scheint aber ok zu sein

          auch meine eigenen icons zählen richtig

          Image 2.png

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

            @rowein

            WARTE - muss nochmal prüfen - da ist doch was

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

              @rowein

              Sorry - du hattest vollkommen recht - habe im ersten post ein neues script - bitte teste mal

              R 1 Reply Last reply Reply Quote 1
              • R
                rowein @liv-in-sky last edited by

                @liv-in-sky
                Super, läuft wieder. Danke für den schnellen Fix 🙂

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

                  @liv-in-sky Wenn man das Anlegen der Objekte dem Script überlässt, braucht man es nicht von Hand zu machen

                  const dpVIS="0_userdata.0.Tabellen.TrashScheduleTermine"         //WICHTIG wenn "braucheEinVISWidget" auf true gesetzt !!  dp zusätzlich für VIS-HTML-Basic-Widget
                  const dpMaterialWidget="0_userdata.0.Tabellen.TrashScheduleMaterialWidget";            // WICHTIG wenn braucheMaterialDesignWidget auf true MATERIALDESIGN List Widget - datenpunkt anlegen : zeichenkette  
                  const dpMaterialWidgetTable="0_userdata.0.Tabellen.TrashScheduleMaterialWidgetTable";  // WICHTIG wenn braucheMaterialDesignWidgetTable auf true MATERIALDESIGN Table Widget - datenpunkt anlegen: zeichenkette  
                  const dpTSJson="trashschedule.0.type.json"                        //WICHTIG wenn "braucheEinVISWidget" auf true gesetzt !! wähle den dp der trashschedule instanz
                  
                  
                  // Anlegen der Datenpunkte
                  const createStateList = [
                      {name :dpVIS, type:"string", role : "value"},
                      {name :dpMaterialWidget, type:"string", role : "value"},
                      {name :dpMaterialWidgetTable, type:"string", role : "value"}
                  ]
                  
                  createStateList.forEach (function(item) {
                      createState(item.name, { 
                          type: item.type,
                          min: 0,
                          def: 0,
                          role: item.role
                      });
                  });
                  
                  

                  Noch etwas eleganter :

                  // Anlegen der Datenpunkte
                  const createStateList = [
                      {enabled:braucheEinVISWidget, name :dpVIS, type:"string", role : "value"},
                      {enabled:braucheMaterialDesignWidget, name :dpMaterialWidget, type:"string", role : "value"},
                      {enabled:braucheMaterialDesignWidgetTable, name :dpMaterialWidgetTable, type:"string", role : "value"}
                  ]
                  
                  createStateList.forEach (function(item) {
                      if (item.enabled) {
                          createState(item.name, { 
                              type: item.type,
                              min: 0,
                              def: 0,
                              role: item.role
                          });
                      }
                  });
                  
                  
                  
                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @Gargano last edited by

                    @Gargano

                    danke das weiß ich

                    ich würde aber mit async arbeiten

                     if (!(await existsStateAsync("javascript." + instance + ".CheckRadar."+b+".StandortBlitzer"))) {
                            await createStateAsync("CheckRadar."+b+".StandortBlitzer", {type: "string", name: "StandortBlitzer", role: "value", read: true, write: true, } ); }
                    

                    diese tabellen gibt es in x versionen -ich war bisher zu faul, das in allen vorlagen zu ändern
                    https://forum.iobroker.net/topic/28021/html-table-für-vis-oder-iqontrol-js-und-blockly

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

                      @liv-in-sky Was für einen Vorteil hat Async ?
                      Die Exist-Abfrage kann man auch in meine Tabelle reinmachen, obwohl iobroker den Datenpunkt nicht doppelt einträgt,

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

                        @Gargano

                        damit verhindere ich, dass beim ersten lauf eine fehlermeldung kommt, weil das script schneller ist, als der datnpunkt beim ersten lauf angelegt wird

                        verlangt aber einen anderen aufbau der scripte

                        ein beispiel dafür habe ich hier - es gibt aber leute im forum , die sich damit besser auskennen

                        https://forum.iobroker.net/post/512330

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

                          @liv-in-sky Danke, hab auch schon etwas gelesen.

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

                            @liv-in-sky Wenn ich dies

                            await setStateAsync("hm-rpc.2.002A5A49A6D845.3.COMBINED_PARAMETER",Zeile); 
                            

                            einfüge kommt ein eine Compilermeldung

                            javascript.0 (11447) script.js.Anzeige.Anzeige_Temp compile failed: at script.js.Anzeige.Anzeige_Temp:13

                            npm ist version 6.14.4

                            ohne await wird es ohne Fehler compiliert.

                            Was ist da falsch ?

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

                              @Gargano hast du diesen aufruf in einer async function ?

                              beispiel: doStuff ist eine async function

                              doStuff wird wiederum aufgerufen - als haupttrigger oder hauptschleife

                              async function doStuff() {
                                  kurzBlitzerAnzeige=[];
                                  //für einzelne Koordinaten Abfrage 
                                  if (!(await existsStateAsync("javascript." + instance + ".CheckRadar.Daheim"))) {
                                      await createStateAsync("CheckRadar.Daheim", myStandardMarker,{type: "string", name: "Daheim", role: "value", read: true, write: true, } ); }
                                  if (!(await existsStateAsync("javascript." + instance + ".CheckRadar.MYBlitzer"))) {
                              ..............
                              
                              
                              schedule( mySchedule, function () { 
                              doStuff();
                              });
                              
                              

                              mir wurde hier https://forum.iobroker.net/post/510033 noch etwas erklärt

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

                                @liv-in-sky Danke, das war es. Ich hatte das im Hauptprogramm ohne async function.

                                Ich wollte ausprobieren, ob ich dann mehrere setStateAync hintereinander setzen kann.

                                Danke für die schnelle und kompetente Antwort.

                                1 Reply Last reply Reply Quote 0
                                • F
                                  FuXXz2 last edited by

                                  Hi zusammen,

                                  mir ist aufgefallen, dass die Tabellen keine Transparenten Farbwerte nehmen. Mache ich da etwas falsch oder klappt das nicht?
                                  Also
                                  rgba(255,255,255,0.2) und #fffff00 funktionieren nicht.

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

                                    @FuXXz2

                                    nein sowas geht nicht

                                    aber:

                                    "red" oder "lightblue"
                                    "#FE1345"   6 stellige
                                    "transparent"
                                    
                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      FuXXz2 @liv-in-sky last edited by FuXXz2

                                      @liv-in-sky
                                      Ich habe alle Farbwerte auf #ffffff oder transparent aber dann bekommt das tr Element die "dezente" Farbe #0000e0 🤕 . Weiß nicht woher die kommt.
                                      d7b00754-9101-49e9-91b0-650a4909ffa3-image.png

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

                                        @FuXXz2 vis oder iqontrol ?

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

                                          @liv-in-sky iqontrol, aber als BACKGROUND_HTML
                                          Ich kann es halt auf weiß stellen, aber auch nicht soo schön.

                                          Screenshot 2020-11-12 170930.jpg

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

                                            @FuXXz2

                                            ich muss ganz ehrlih zugeben, die iqontrol sache war nur nebenbei

                                            aber poste mal dein setting, damit ich das bei mir teste ( also alles bist unter die html settings) - was hättest du den gerne für einen hintergrund in der tabelle - und poste bitte auch das setting in iqontrol - habe da noch nie einen hintergrund bestimmt - sonst muss ich das suchen

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            404
                                            Online

                                            31.8k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript template
                                            11
                                            135
                                            11216
                                            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