Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test Adapter OctoPrint

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Test Adapter OctoPrint

    This topic has been deleted. Only users with topic management privileges can see it.
    • haus-automatisierung
      haus-automatisierung Developer Most Active @Latzi last edited by

      @latzi sagte in Test Adapter OctoPrint:

      Da hat Matthias wohl am Inhalt von thumbnail_url in der 3.0.0 nachgebessert

      Genau, hatte ich ja schon weiter oben geschrieben dass das passieren wird 🙂 Kann man so wahrscheinlich mehr mit anfangen.

      1 Reply Last reply Reply Quote 1
      • da_Woody
        da_Woody @Latzi last edited by da_Woody

        @latzi schon wieder vorbei...
        nehm ich das raus, kommt nach kurzem

        17:54:08.039	warn	javascript.0 (615) at Object.<anonymous> (script.js.common.Diverses.Octothumb:6:20)
        17:54:08.043	warn	javascript.0 (615) at Object.<anonymous> (script.js.common.Diverses.Octothumb:9:4)
        

        da ist plötzlich eine if zeile zusätzlich?
        zwar keine fehler mehr, aber octoprint.0.printjob.file.origin kann nicht ganz passen, da steht local drinnen...
        ich häng mal mein script an... hab ja die DP bei mir geändert/ anders benannt...

        on({id: 'octoprint.0.printjob.file.name', change: "any"}, async function (obj) {
           var octo_thumb='';
           var thumb_file=''; 
           if ((obj.state.val)!== null) {
               thumb_file=getState("octoprint.0.printjob.file.origin").val +"_" + obj.state.val.replace(".gcode","");
               if (existsState("octoprint.0.files." + thumb_file + ".thumbnail_url")) {
                  octo_thumb= getState("octoprint.0.files." + thumb_file + ".thumbnail_url").val;
               };
           } 
           setState("javascript.0.Octothumb.dir_thumb", thumb_file, true);
           setState("javascript.0.Octothumb.thumbnail", octo_thumb, true);
        }); 
        
        

        ac2fd98c-879d-4edd-8f9b-9685aaa99b0a-grafik.png

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

          @da_woody
          local war immer schon drin, sollte so passen.
          Wie sieht denn die DP-Struktur unter files.local_Düse-V1_r bei dir aus?

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

            @latzi schön langsam strick ich mir einen pullover mit den DPs... 😄

            http://192.168.2.59:80/plugin/prusaslicerthumbnails/thumbnail/Düse-v1_r.png?20220120151807
            

            das passt. kann ich logischer weise nicht verwenden. thumbnail bleibt leer.
            e519bd81-b240-4f13-87a3-6a83ed88c37f-grafik.png

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

              @da_woody
              🙂
              ich meinte unter octoprint.0.files.local_Düse-v1_r.
              Das Schneegestöber benebelt meine Sinne, wie ist´s im Burgenland?

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

                @latzi jo, eh!
                92fa322a-bfbb-4bb0-b726-e8405bd2d017-grafik.png
                jep, da stöberts auch...

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

                  @da_woody
                  bitte versuch mal Zeile 9

                  };
                  

                  anstatt

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

                    @latzi sorry, hat kurz gedauert, bin vom büro in die männerhöhle geflüchtet...
                    keine änderung, javascript.0.Octothumb.thumbnail bleibt leer...

                    Latzi 2 Replies Last reply Reply Quote 0
                    • Latzi
                      Latzi @da_Woody last edited by

                      @da_woody
                      Männerhöhle klingt sehr gut 👍
                      Hast du aktuell etwas im Druck? Das Ganze wird nur durchlaufen, wenn sich beim DP octoprint.0.printjob.file.name etwas ändert oder aktualisiert wird (und das script gestartet wird).

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

                        @da_woody
                        sehr böse, jetzt hab ich´s!
                        das "-" im Filenamen wird unter files zu einem "_" und daher findet das script keine thumbnail_url und befüllt nicht.
                        @haus-automatisierung gibt es noch weitere "Sonderzeichen", die "übersetzt" werden?

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

                          @latzi er drückt sich grad einen... dauert noch, muss aber eh noch was drucken. muss ich aber erst fila tauschen.
                          84bf3b4e-0596-4036-8bb9-5639eea3bda3-grafik.png
                          die 3. kachel wär schon fürs thumb vorbereitet... 😄
                          nuja, hab so ca. 75qm für mich. werkstatt (büro) und eben die dachhöhle auch ca 20qm...
                          ich hab platz... banane2.gif

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

                            @latzi i c!
                            das meinst...
                            d9389968-b037-46dc-9469-e9a34cc247b8-grafik.png

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

                              @da_woody
                              lechts sabber, ich auch mag 😉
                              versuchs mal damit (ungetestet, Zeile 6 ist neu und soll übersetzen)

                              on({id: 'octoprint.0.printjob.file.name', change: "any"}, async function (obj) {
                                 var octo_thumb='';
                                 var thumb_file=''; 
                                 if ((obj.state.val)!== null) {
                                     thumb_file=getState("octoprint.0.printjob.file.origin").val +"_" + obj.state.val.replace(".gcode","");
                                    thumb_file=thumb_file.replace("-","_");
                                     if (existsState("octoprint.0.files." + thumb_file + ".thumbnail_url")) {
                                        octo_thumb= getState("octoprint.0.files." + thumb_file + ".thumbnail_url").val;
                                     };
                                 }; 
                                 setState("javascript.0.Octothumb.dir_thumb", thumb_file, true);
                                 setState("javascript.0.Octothumb.thumbnail", octo_thumb, true);
                              }); 
                              
                              da_Woody 1 Reply Last reply Reply Quote 0
                              • Latzi
                                Latzi @da_Woody last edited by

                                @da_woody sagte in Test Adapter OctoPrint:

                                das meinst...

                                ja, ganz genau!
                                Wieder was gelernt: "-" ist böse, nicht nur beim Konto!

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

                                  @latzi irgendwo fehlt eine (. mault in zeile 13 über );
                                  2e9465cf-74d1-4586-af7f-f0bbab6bee0c-grafik.png

                                  19:19:09.191	error	javascript.0 (615) script.js.common.Diverses.Octothumb compile failed: at script.js.common.Diverses.Octothumb:13
                                  
                                  Latzi 1 Reply Last reply Reply Quote 0
                                  • Latzi
                                    Latzi @da_Woody last edited by Latzi

                                    @da_woody
                                    so sieht´s bei mir aus:

                                    on({id: 'octoprint.0.printjob.file.name', change: "any"}, async function (obj) {
                                       var octo_thumb='';
                                       var thumb_file=''; 
                                       if ((obj.state.val)!== null) {
                                           thumb_file=getState("octoprint.0.printjob.file.origin").val +"_" + obj.state.val.replace(".gcode","");
                                           thumb_file=thumb_file.replace("-","_");
                                           if (existsState("octoprint.0.files." + thumb_file + ".thumbnail_url")) {
                                              octo_thumb= getState("octoprint.0.files." + thumb_file + ".thumbnail_url").val;
                                           };
                                       }; 
                                       setState("javascript.0.3D-Drucker.dir_thumb", thumb_file, true);
                                       setState("javascript.0.3D-Drucker.thumbnail", octo_thumb, true);
                                    }); 
                                    

                                    Edit: Hab die "}" oben eingefügt, sorry voll übersehen 😞

                                    da_Woody 1 Reply Last reply Reply Quote 1
                                    • da_Woody
                                      da_Woody @Latzi last edited by

                                      @latzi 28e68269-e375-47a2-ad63-88e692acf79d-grafik.png
                                      touchdown!

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

                                        @da_woody
                                        schwere Geburt - Hauptsache es läuft.
                                        Wie schaut die 3. Kachel nun aus?

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

                                          @latzi LOL, scheiße, um es nett auszudrücken. die browser gehn mir immer mehr auf die nerven...
                                          firefox:
                                          Zu Ihrem Schutz erlaubt 192.168.2.59 es Firefox nicht, diese Seite anzuzeigen, wenn sie in eine andere Seite eingebettet ist. Zur Anzeige der Seite muss diese in einem neuen Tab geöffnet werden.
                                          chrome:
                                          acf17982-1932-4ad7-a68b-5f2c5aa61f80-grafik.png

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

                                            @da_woody
                                            verwendest du iframe?
                                            Bei mir läuft´s mit iframe und chrome (ff hab ich nicht getestet).

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            805
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            adapter entwicklung adatper updates developer testen
                                            49
                                            461
                                            69260
                                            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