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.
    • K
      Kuddel @liv-in-sky last edited by

      @liv-in-sky erstmal viele Dank für deine Arbeit.

      Ich habe mir das Skript per Chrome kopiert.

      Dabei ist direkt aufgefallen, dass alle Umlaute falsch dargestellt werden,

      So sieht dann entsprechend auch im ersten Versuch mit der Tabelle aus:

      eb854f66-d011-4137-89cc-3339ddfbd05d-grafik.png

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

        @kuddel Chrome zerhakkt bei copy-paste den Inhalt

        K 1 Reply Last reply Reply Quote 0
        • K
          Kuddel @Kueppert last edited by

          @kueppert danke für die schnelle Antwort.

          Wie muss ich die TXT Datei dann öffnen / downloaden ?

          K 1 Reply Last reply Reply Quote 0
          • K
            Kueppert @Kuddel last edited by

            @kuddel runterladen die Datei (Rechtsklick => download) und dann mit Notepad++ öffnen (Windows)

            K 1 Reply Last reply Reply Quote 1
            • K
              Kuddel @Kueppert last edited by

              @kueppert super, hat geklappt.

              0db0c464-b80e-46ca-a5bd-66621112181d-grafik.png

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

                @kuddel

                notepad++ ist ein sehr guter tipp - leider ist- für ein direktes copy - nicht genug platz im post

                es sind auch nicht die umlaute sondern die emojis, die defekt sind.

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

                  @kuddel ok - schon gelöst

                  1 Reply Last reply Reply Quote 0
                  • Marco Laser
                    Marco Laser last edited by

                    Moin, erstmal Danke für deine Arbeit, hat mir ne menge Zeit gespart.
                    Ich hätte allerdings noch ein Hersteller/Gerät was noch nicht unterstützt ist und zwar Shelly. Die Batteriegeräte melden nämlich auch ihren Batteriestand.
                    Screenshot 2021-02-07 184315.png

                    Hoffe du kannst da was machen 🙂

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

                      @marco-laser teste mal das und bitte ein feedback - ist noch nicht im ersten post - erst nach postiven feedback

                      Batterien-script-7.2.-21.txt

                      du musst shelly auf true setzen

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

                        @liv-in-sky Klappt, besten Dank für die super schnelle Antwort 👍

                        hanan 1 Reply Last reply Reply Quote 0
                        • hanan
                          hanan @Marco Laser last edited by

                          Hallo zusammen
                          Ich habe mal das Skript kopiert und die entsprechenden Datenpunkte angelegt.
                          Leider erhalte ich Fehlermeldungen:

                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at processTicksAndRejections (internal/process/task_queues.js:97:5)
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at runMicrotasks (<anonymous>)
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at /opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23)
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at /opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInRedis.js:616:17
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at /opt/iobroker/node_modules/iobroker.javascript/main.js:1140:17
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at /opt/iobroker/node_modules/iobroker.javascript/main.js:1559:17
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at prepareScript (/opt/iobroker/node_modules/iobroker.javascript/main.js:1503:37)
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at createVM (/opt/iobroker/node_modules/iobroker.javascript/main.js:1280:28)
                          javascript.1	2021-02-14 08:21:39.079	error	(27755) at Object.createScript (vm.js:261:10)
                          javascript.1	2021-02-14 08:21:39.078	error	(27755) at new Script (vm.js:88:7)
                          javascript.1	2021-02-14 08:21:39.078	error	(27755) SyntaxError: Missing initializer in const declaration
                          javascript.1	2021-02-14 08:21:39.078	error	(27755) ^^^^^^^^^^^^^^
                          javascript.1	2021-02-14 08:21:39.078	error	(27755) const UeberSchriftHöhe="35"; //Überschrift bekommt mehr Raum - darunter und darüber - Zellenhöhe
                          javascript.1	2021-02-14 08:21:39.078	error	(27755) script.js.common.Batterien_Zustand compile failed: at script.js.common.Batterien_Zustand:80
                          

                          Hat mir bitte jemand einen Tipp was ich falsch mache.

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

                            @hanan hallo,

                            was steht den in zeile 80 ?

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

                              @liv-in-sky

                              Da steht:

                              const UeberSchriftHöhe="35";                          //Überschrift bekommt mehr Raum - darunter und darüber - Zellenhöhe
                              
                              

                              Hat das vielleicht mit der Übersetzung zu tun?

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

                                @hanan

                                probier mal damit - normalerweise nutze ich keine umlaute in scripts - hab ich wohl übersehen im eifer des ....
                                Batterien-script-14.2.-21.txt

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

                                  @liv-in-sky

                                  Jep, passt. Lief durch ohne Fehler und hat sieben schwache Meldungen ausgegeben.

                                  Ich habe bei den Zigbee einige Tadfri installiert, welche bei 60% AkkuAlarm auslösen.
                                  Müssten diese nicht erst unter 40% auslösen?

                                  var battAlarm=25;                                     //alarm batterie wert
                                  var battAlarmWarning=40;                                     //warnungen batterie wert
                                  
                                  liv-in-sky 1 Reply Last reply Reply Quote 0
                                  • liv-in-sky
                                    liv-in-sky @hanan last edited by

                                    @hanan kannst du nach belieben einstellen

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

                                      Ja, aber der Alarmwert steht ja im Skript auf 25% und das Gerät hat 60%.
                                      Ich habe auch ein HMIP welches mit angezeigt wird obschon der "indicator.lowbat" auf false steht.

                                      Oder verstehe ich etwas falsch?

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

                                        @hanan bin mir nicht sicher, ob ich folgen kann

                                        wenn dort im datenpunkt 60 steht und im script als alarm 25 und warning 40 ist das gerät für das script grün !

                                        zeig doch mal deine tabelle und den datenpunkt dazu

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

                                          @liv-in-sky
                                          Ups, beim Zigbee stimmt es, habe mich um ein Device vertan und beim HMIP wird die Voltzahl, welche bei 2.3V steht, deklariert, daher die Meldung.

                                          Alles iO und eine super Arbeit.
                                          Besten Dank für die Hilfe, muss nur noch die Status-Icons einpflegen.

                                          1 Reply Last reply Reply Quote 1
                                          • K
                                            Katzenbeißer last edited by

                                            Hallo Zusammen,
                                            irgendwie hakt es....
                                            Ich habe die Datenpunkte angelegt, Fehler werden im Script nicht angezeigt...
                                            Gibt es ein Miniscript zum automatischen Anlegen der Datenpunkte?

                                            Besten Dank für eure Hilfe

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            900
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript monitoring template
                                            67
                                            1379
                                            416620
                                            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