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.
    • Christoph1337
      Christoph1337 last edited by

      Hab ne doofe Frage.
      Wo genau wird das File abgelegt, wenn ich braucheEinFile auf true stelle?

      57bb7c1d-9d47-40da-b393-93298a3f17d4-image.png

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

        @christoph1337 dieses setting benötigt man nicht mehr - da iqontrol mittlerweile das direkt als html lesen kann

        das file ist im netzwerk erreichbar unter: http://192.168.178.59:8082/vis.0/htmlexample.html - der port und die ip adresse muss natürlich auf das eigene netzwerk angeglichen werden - port ist in dem instanz-setting der web-instanz zu entnehmen

        wird dann direkt im browser aufgerufen - hier ein anderes beispiel

        Image 1.png

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

          @liv-in-sky und wo in dateisystem?

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

            @christoph1337

            /opt/iobroker/iobroker-data/files/vis.0
            
            1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Christoph1337 last edited by

              @christoph1337

              falls du den befehl zum schreiben eines files suchst?

              die scripte sind schon älter - der richtige befehl zum speichern der files wäre wohl:

              let visPathSystem= "/opt/iobroker/iobroker-data/files/vis.0/";
              writeFileAsync('vis.0', visPathSystem, contentNew);
              

              man könnte z.b eigene webseiten, die nichts mit iobroker zu tun haben, so ins sytem schreiben und iobroker als "mini" webserver nutzen

              als das script geschrieben wurde, wurde über ein iframe diese erzeugte datei in iqontrol eingebunden

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

                @liv-in-sky Ahh okay dank dir.

                Ich hab hier ja noch eine ältere angepasste version von dir laufen. Da steht das noch so drin:

                555cccef-c8be-4f42-a0f8-252f10026f2c-image.png

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

                  @christoph1337

                  • writefile - funktioniert auch

                  ich hatte da was verwechselt - es gibt noch fs.writefile....

                  das sollte man so nicht nutzen - writefile ist in diesem zusammenhang ok

                  writefile ist iobroker "sprache" - notwendig, da sondst iobroker nicht weiß, dass es das file gibt

                  fs.writefile ist ein node befehl und das html file könnte wahrscheinlich nicht über den iobroker webserver aufgerufen werden

                  beide befehle schreiben ins dateisystem

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

                    @liv-in-sky Komischerweise wird bei mir aber keine datei generiert. Es gibt auch keine Meldung dazu im Log

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

                      @christoph1337 hast du braucheEinVISWidget auch auf true ?

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

                        @liv-in-sky jap 🙂

                        https://pastebin.com/raw/rimr2qWH

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

                          @christoph1337

                          http://192.168.178.59:8082/vis.0/batterymonitor.html

                          funktionert bei mir, wenn ich meine version (@liv-in-sky Januar 2021 21.4-17:46) des scriptes nutze und deinen namen eingebe

                          Image 2.png

                          dein script mit meinen dpunkten - ich habe andere adapter wie du, daher fehlende devices:

                          Image 3.png

                          wie sieht es den im filesystem aus - es kann nämlich sein, das der cache ein problem macht

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

                            @liv-in-sky Was meinst du genau? 😃

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

                              @christoph1337 das es funktioniert

                              hast du das file im filesystem gefunden ?

                              wenn ja - mußt du den cache abschalten - muss ich aber ert wieder finden, wo das gemacht wird

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

                                @liv-in-sky eben nicht. Da wird keine Datei geschrieben. Ich will die nichtmal über vis aufrufen. Ich will diese mittels cutycapt als jpg versenden.

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

                                  @christoph1337

                                  da fällt mir nix ein - hast du lust auf anydesk oder teamviewer, dann schau ich mit das an?

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

                                    @liv-in-sky Hab dir im Chat geschrieben

                                    liv-in-sky 3 Replies Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @Christoph1337 last edited by

                                      @christoph1337

                                      wenn wir das in einen vorhandenen dp schreiben - sollte es so funktionieren

                                      Image 8.png

                                      bei dem anderen device (MAX) muss ich erst schauen

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

                                        @christoph1337

                                        bin mir nicht sicher aber im anderen teil müßte es dann das hier sein - ich weiß nicht mehr, was der dp error oder link_error aussagen, aber ich denke das sollte richtig sein

                                        kannst du das irgendwie testen ?

                                        Image 9.png

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

                                          @christoph1337

                                          das komplete script - aber die dp mußt du wieder richtig kopieren - da stehen jetzt meine dp drin - zeile 11 - 15

                                          Batterien-tabelle-christop1337.txt

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

                                            @liv-in-sky Kannst du nochmal neu senden. das encoding ist komplett zerschossen

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            919
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

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