Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Sonoff Geräte als HTML Tabelle - Vis

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Sonoff Geräte als HTML Tabelle - Vis

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

      @da_woody

      könntest du das neue script bitte testen

      sonoff-integr-IFrame-29-12.21-14.txt

      sollte so aussehen

      Image 2.png

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

        @liv-in-sky de4afee9-4cdf-4a99-bafc-58d85b1fb57b-grafik.png
        jop, tut! allerdings hab ich da jetzt
        91d87e1e-70cc-479f-869e-47236196dd73-grafik.png statt dem punkt...
        uiui,

                                 
        //BLOCK NOT IN SE 
         var symbolOK="✔️";     // auch möglich: ="✅"   🟩   ✔️  🌎
        var symbolKO="🔵"           // ist in let symbolSchalter    //"🔔";     //z.b. auch "<font color=\"red\"><b>X</b>" für ein rotes kreuz  oder : ="❌"  ⚪   🟢 ⚫ ⭕  🔴 🔵  🚫 ⏱ 💀 👍 👎 📑 💲 👀 😡 🟥 ⬜ 🧊 💬 🗑️ 🔔
        var symbolWARN="ℹ️";    // ="⚠️" oder info: "ℹ️"
        var symbolKO_MD="🟥"    // ist in let symbolSchalter   
        var symbolLink="🌎";
        var externalOhneInfo=false;  //noch nicht integriert
        

        extra mit chrome kopiert... 🤕

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

          @da_woody

          das könnte beim kopieren passiert sein

          Image 4.png

          sollte so aussehen - wenn nicht kopiere mal das folgende da rein - einfach markieren und dann paste im script -

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

            @liv-in-sky da ist mehr passiert. alle umlaute und so weg...

            
            //HIER DIE SPALTEN ANZAHL DEFINIEREN - jede Spalte einen Wert - in diesem Beispiel sind es 3 - es MÜSSEN in allen Arrays die GLEICHE Anzahl für die Werte sein
            let htmlFeld=        ["NAME","ONLINE","TYPE","RSSI","IP","UPTIME","POWER","VER"];                   // GLEICHE ANZAHL !! NAME/ÜBERSCHRIFT DER SPALTE
            let val=             ["true","true","true","true","true","true","true","true"];                 // bei false wird spalte ausgeblendet// GLEICHE ANZAHL !! SPALTE ANZEIGEN/AUSBLENDEN UND HIER SIND DIE  WERTE, DIE IN DER SCHLEIFE GEFILTERET WERDEN -  jeder val[x] muss unten in der schleife gesetzt werden !!
            let Feld1lAlign=     ["left","center","center","center","center","center","center","center"] ;        // GLEICHE ANZAHL !! AUSRICHTUNG IN DER SPALTE
            let htmlSpalte1Weite=["0px","0px","0px","0px","0px","0px","0px","0px"];                      // GLEICHE ANZAHL !! BREITE DER SPALTE, wenn "0px" auto
            let schalterInSpaltenUeberschrift=[true,true,true,true,true,true,true,true,true,true,true,true,true,true];    // WENN BUTTONS INSTALLIERT WERDEN - sonst false
            let symbolSchalter=              ["na","&check;","&cross;","&#128472;","⚪"];               //ONLINE SYMBOLE         // SYMBOLE DER BUTTONS 
            //-----------------------------------
            
            //Symbole für Tabelle z.b.: ⚪  ⚫ ⭕  🔴 🔵 ⏱ 💀 👍 👎 📑 💲 👀 🔹 ✅ ❌ ⚠️ mehr: https://emojiterra.com/de/ oder https://unicode-table.com/de/html-entities/
            
            //hier werden die styles für die tabelle definiert
            //ÜBERSCHRIFT ÜBER TABELLE
            const htmlUberschrift=false;                             // mit Überschrift über der tabelle
            const htmlSignature=true;                               // anstatt der Überscghrift eine signature: - kleiner - anliegend
            const htmlFeldUeber='SONOFF';                // für Überschrift und Signature falls htmlUberschrift und htmlSignature ist true
            const htmlFarbUber="white";                              // Farbe der Überschrift
            const htmlSchriftWeite="normal";                         // bold, normal - Fettschrift für Überschrift
            const htmlUEberFontGroesse="18px";                       // schriftgröße überschrift
            
            liv-in-sky 1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @da_Woody last edited by

              @da_woody

              wenn ich mir das script auf github ansehe, ist da alles richtig - mit chrome

              wenn du das script vom forum runterkopierst und öffnest damit du es kopieren kannst, könnte das problem sein, dass du nicht notepad++ als editor hast

              kopier mal direkt von hier: https://github.com/liv-in-sky/sonoff-iobroker-script/blob/main/sonoff-integr-IFrame-29-12.21-15.txt

              1 Reply Last reply Reply Quote 0
              • da_Woody
                da_Woody last edited by

                @liv-in-sky war der fehler, habs direkt aus der webpage kopiert und nicht in notepad++ geöffnet...
                f3591e2d-4d95-4f2d-b753-a28a5c0ecc68-grafik.png
                bascht wieder. jetzt noch farben und schriften umbauen... 😄

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

                  @da_woody

                  damit wird die 0 nach dem namen gesteuert - auf false setzen !

                  Image 5.png

                  damit kannst du die "kästchen" in der anderen ansicht ändern - damit wird bei der temperatur nicht immer eine neue zeile verwendet - langsam vergrößern evtl. 150 --> 160

                  Image 5.png

                  da_Woody 2 Replies Last reply Reply Quote 1
                  • da_Woody
                    da_Woody @liv-in-sky last edited by

                    @liv-in-sky TOP. werd sowieso in vis auch noch die fenstergröße anpassen. werd am abend dann im code fummeln.
                    danke.gif

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

                      @liv-in-sky oioioi, seitdem wir gestern im sonoff adapter rumgebastelt haben, bekomm ich warnings ohne ende...
                      quer durch alle geräte. hast ne ahnung wie man das wegbekommt?

                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubcomp for unknown message ID: 14897
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubrel on D1mini_Bad for unknown messageId 11298
                      
                      sonoff.0
                      2021-12-30 05:16:22.582	warn	Client [Küche] Received pubcomp for unknown message ID: 14901
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrec on Küche for unknown messageId 29556
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 24940
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 19395
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrel on Küche for unknown messageId 25972
                      
                      sonoff.0
                      2021-12-30 05:16:22.580	warn	Client [Küche] Received pubcomp for unknown message ID: 28243
                      
                      sonoff.0
                      2021-12-30 04:48:22.537	warn	Client [Ender] Received puback for unknown message ID: 30022
                      
                      sonoff.0
                      2021-12-30 04:48:22.505	warn	Client [Ender] Received pubcomp for unknown message ID: 26991
                      
                      sonoff.0
                      2021-12-30 04:48:22.505	warn	Client [Ender] Received pubrec on Ender for unknown messageId 28005
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubrel on Ender for unknown messageId 29793
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 29793
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 26990
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 26701
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 29218
                      
                      sonoff.0
                      2021-12-30 04:47:41.043	warn	Client [Gästezimmer] Received pubrec on Gästezimmer for unknown messageId 8788
                      
                      sonoff.0
                      2021-12-30 04:47:41.043	warn	Client [Gästezimmer] Received pubrel on Gästezimmer for unknown messageId 28261
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubrel on D1mini_Bad for unknown messageId 29797
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubcomp for unknown message ID: 14897
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubrel on D1mini_Bad for unknown messageId 11298
                      
                      sonoff.0
                      2021-12-30 05:16:22.582	warn	Client [Küche] Received pubcomp for unknown message ID: 14901
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrec on Küche for unknown messageId 29556
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 24940
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 19395
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrel on Küche for unknown messageId 25972
                      
                      sonoff.0
                      2021-12-30 05:16:22.580	warn	Client [Küche] Received pubcomp for unknown message ID: 28243
                      
                      sonoff.0
                      2021-12-30 04:48:22.537	warn	Client [Ender] Received puback for unknown message ID: 30022
                      
                      sonoff.0
                      2021-12-30 04:48:22.505	warn	Client [Ender] Received pubcomp for unknown message ID: 26991
                      
                      sonoff.0
                      2021-12-30 04:48:22.505	warn	Client [Ender] Received pubrec on Ender for unknown messageId 28005
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubrel on Ender for unknown messageId 29793
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 29793
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 26990
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 26701
                      
                      sonoff.0
                      2021-12-30 04:48:22.492	warn	Client [Ender] Received pubcomp for unknown message ID: 29218
                      
                      sonoff.0
                      2021-12-30 04:47:41.043	warn	Client [Gästezimmer] Received pubrec on Gästezimmer for unknown messageId 8788
                      
                      sonoff.0
                      2021-12-30 04:47:41.043	warn	Client [Gästezimmer] Received pubrel on Gästezimmer for unknown messageId 28261
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubrel on D1mini_Bad for unknown messageId 29797
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubcomp for unknown message ID: 14897
                      
                      sonoff.0
                      2021-12-30 04:02:49.625	warn	Client [D1mini_Bad] Received pubrel on D1mini_Bad for unknown messageId 11298
                      
                      sonoff.0
                      2021-12-30 05:16:22.582	warn	Client [Küche] Received pubcomp for unknown message ID: 14901
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrec on Küche for unknown messageId 29556
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 24940
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubcomp for unknown message ID: 19395
                      
                      sonoff.0
                      2021-12-30 05:16:22.581	warn	Client [Küche] Received pubrel on Küche for unknown messageId 25972
                      
                      sonoff.0
                      2021-12-30 05:16:22.580	warn	Client [Küche] Received pubcomp for unknown message ID: 28243
                      
                      sonoff.0
                      2021-12-30 04:48:22.537	warn	Client [Ender] Received puback for unknown message ID: 30022
                      
                      liv-in-sky 3 Replies Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @da_Woody last edited by

                        @da_woody sagte in Sonoff Geräte als HTML Tabelle - Vis - Iqontrol:

                        Received pubcomp for unknown message ID

                        was hast du für eine dapter version ?

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

                          @da_woody

                          du kannst auch gerne durchrufen - wie gestern - bin am pc

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

                            @da_woody

                            • wir haben doch nur alle dp gelöscht und den adapter restartet - dann hat er alle dp wieder sauber angelegt - das solltekein thema sein
                            • und dann haben wir 2 devices von typ miniD1 auf general geändert

                            sonst haben wir nichts gemacht - wenn man nach dem fehler in google sucht, findet man mqtt fehler

                            sind den die dp noch aktuell , wenn du mit der tasmota gui schaltest - oder werden die dp nicht mehr aktualisiert - da gab es im august 2020 mal ein issue auf github

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

                              Guten morgen

                              Versuche seit anfang der Woche das Script bei mir zum laufen zu bringen.
                              Habe mehrere Sonoff Geräte die mit Tasmota laufen aber nur einer davon ist mit Verbrauchanzeige.
                              Dazu hab ich noch 10 stk von NOUS A1T geräten die auch mit Tasmota 9.5.0 laufen.
                              Alle diese Geräte können auch Verbrauch anzeigen.
                              Wenn ich jetzt im Script tasmota nur anzeigen lasse tauchen die besagten Nous geräte nicht auf.
                              Ist es möglich die in das Script mit einzupflegen ?
                              Die json hab ich beigefügt.

                              MfG Alex


                              sonoff.0.Nous 1 TV Strom (1).json

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

                                @alex220773 nutzt du die alte oder neue version ? in der neuen , sollte die von allein kommen

                                1 Reply Last reply Reply Quote 0
                                • da_Woody
                                  da_Woody @Alex220773 last edited by

                                  @alex220773 sagte in Sonoff Geräte als HTML Tabelle - Vis - Iqontrol:

                                  Versuche seit anfang der Woche das Script bei mir zum laufen zu bringen.

                                  die letzte version ist vom 29.12....

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

                                    @da_woody ich denke , er nutzt die ganz alte version - siehe ersten post - dort muss man die tasmota typen noch einarbeiten, damt sie erkannt werden

                                    A 1 Reply Last reply Reply Quote 1
                                    • A
                                      Alex220773 @liv-in-sky last edited by Alex220773

                                      Guten morgen
                                      @liv-in-sky
                                      @da_Woody
                                      Danke für die Antworten und die Aufmerksamkeit,
                                      Aber ich hab ein fehler gemacht,ich wollte eigentlich im diesem Thema reinschreiben.


                                      https://forum.iobroker.net/topic/29189/energieanzeige-kwh-über-html-tabelle-vis

                                      Konnte ein Mod das bitte dort verschieben.

                                      MfG

                                      1 Reply Last reply Reply Quote 0
                                      • amg_666
                                        amg_666 last edited by

                                        @liv-in-sky

                                        ich hab mal 2 Fragen zum Skript:
                                        Meine Devices habe ich ganz frisch umgestellt auf tasmota 11.0.0 und dabei auch einige Devices umbenannt. Das Skript bringt mir folgendes:
                                        dac39f18-9551-47a9-9646-bf510331925f-grafik.png
                                        Den ersten Eintrag in der Tabelle (sonoff-2661) gibt es nicht in meinem iobroker. Das ist eigentlich das Device in Zeile 4 (POW02), sieht man auch an der gleichen IP Adresse.
                                        Ich habe mal den Baum mit den Datenpunkten im sonoff Adapter komplett gelöscht und den Adapter neu gestartet trotzdem zeigt das Skript immer noch die 1. Zeile an (mit alter Tasmota Version).
                                        Woran könnte das liegen?

                                        Und dann noch eine Frage zum Skript selbst: In Zeile 233 steht

                                        var myData="xxxxx"; 
                                        

                                        Was bewirkt die, muss ich da irgendwas anpassen?

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

                                          @amg_666 starte mal die javascript instanz neu, überprüfe aber alle alle instanzen des sonoff adapters, ob da nicht doch was steht

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

                                            @liv-in-sky
                                            Irgendwas ist da noch krumm. Ich habe nochmal alle sonoff-DP gecheckt und nichts gefunden. javascript neu gestartet, keine Besserung. Die Tabelle, die das Skript baut, komplett gelöscht und skrript neu gestartet, keine Besserung.
                                            faa89475-a6fd-4048-967a-648b9566517c-grafik.png
                                            Der "falsche" Eintrag ist immer noch da und neu ist der Effekt, dass ein weiteres Device 2mal angezeigt wird (im screenshot POW02-2661 (0), einmal ist die Uptime 15:10 (korrekt) und einmal ist die Uptime "Sonoff Pow R2"...
                                            Ich hab am Skript nichts verändert, aber irgendwas scheint sich auf meinem System zu verschlucken.
                                            iob auf nuc, beta repository, node.js v14.19.0, iob 4.0.15
                                            Getestet habe ich mit Firefox und mit Chrome, Cache jeweils mehrfach gelöscht.

                                            liv-in-sky 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            1.1k
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript monitoring template
                                            33
                                            629
                                            102462
                                            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