Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Puppeteer: Screenshots PhantomJS Alternative

    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

    Puppeteer: Screenshots PhantomJS Alternative

    This topic has been deleted. Only users with topic management privileges can see it.
    • foxriver76
      foxriver76 Developer @Negalein last edited by foxriver76

      @negalein geh mal im admin auf Dateien und dann Benutzerdaten

      Auf dem Filessystem ist das defaultmäßig /opt/iobroker/iobroker-data/files/0_userdata.0/

      Negalein 1 Reply Last reply Reply Quote 1
      • Negalein
        Negalein Global Moderator @foxriver76 last edited by Negalein

        @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

        geh mal im admin auf Dateien und dann Benutzerdaten

        gefunden in /opt/iobroker/iobroker-data/files/0_userdata.0/ 🙂

        Jetzt muss ich noch an der Auflösung basteln

        wetterstation.png

        So ist es original.
        b6c35708-effe-4c76-872d-c946ebbb450b-image.png

        Puppeteer quetscht es irgendwie.

        wetterstation.png

        foxriver76 1 Reply Last reply Reply Quote 0
        • foxriver76
          foxriver76 Developer @Negalein last edited by foxriver76

          @negalein Mom.. ich bastel kurz was. Defaultmäßig macht Puppeteer Browser 800x600 Auflösung statt die maximal Mögliche.

          1 Reply Last reply Reply Quote 1
          • foxriver76
            foxriver76 Developer last edited by

            Bitte mal 0.2.4 probieren, ist in 5 Minuten auf npm

            Negalein 1 Reply Last reply Reply Quote 0
            • Negalein
              Negalein Global Moderator @foxriver76 last edited by

              @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

              Bitte mal 0.2.4 probieren

              eingestellt auf 1600x800

              wetterstation.png

              foxriver76 1 Reply Last reply Reply Quote 0
              • foxriver76
                foxriver76 Developer @Negalein last edited by

                @negalein Schade, dann mach mal zusätzlich mit in die Message

                viewportOptions: {
                 width: 1600,
                height: 1000
                }
                

                Entsprechen angepasst, bin nur am Handy.

                Negalein 1 Reply Last reply Reply Quote 0
                • Negalein
                  Negalein Global Moderator @foxriver76 last edited by

                  @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                  Entsprechen angepasst, bin nur am Handy.

                  schon viel besser. 🙂

                  Jetzt muss ich nur noch den rechten schwarzen Rand weg bekommen.

                  wetterstation.png

                  foxriver76 1 Reply Last reply Reply Quote 0
                  • foxriver76
                    foxriver76 Developer @Negalein last edited by

                    @negalein das sollte mit den Clip Optionen gehen.

                    Negalein 1 Reply Last reply Reply Quote 0
                    • Negalein
                      Negalein Global Moderator @foxriver76 last edited by

                      @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                      das sollte mit den Clip Optionen gehen.

                      muss das später in Ruhe testen.
                      Umso mehr ich mit Clip probiere, umso komischer wird es.

                      So wie oben (trotz identen Settings) bekomm ich es nicht mehr hin.

                      wetterstation.png

                      foxriver76 1 Reply Last reply Reply Quote 0
                      • foxriver76
                        foxriver76 Developer @Negalein last edited by

                        @negalein Gerne die exakten Settings posten, falls du noch daran hängst.

                        Negalein 1 Reply Last reply Reply Quote 0
                        • Negalein
                          Negalein Global Moderator @foxriver76 last edited by Negalein

                          @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                          Gerne die exakten Settings posten, falls du noch daran hängst.

                          Merci

                          Hier ein paar Beispiele.
                          Original schaut es so aus:
                          a0fd5a76-40fc-420a-845d-6b71f07218b9-image.png

                          So wie hier (paar Beiträge weiter oben) schaff ich es nicht mehr.
                          Das war mit exakt dem Code aus "Test 2", das jetzt allerdings anders erstellt wird (siehe Test 2).
                          1660304833935-wetterstation.png

                          sendTo('puppeteer.0', 'screenshot', { 
                              url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                              clip: {
                                  x: 0,
                                  y: 0,
                                  width: 1920,
                                  height: 757
                              },
                              ioBrokerOptions: {
                                  storagePath: 'wetterstation.png',
                                },
                              viewportOptions: {
                           width: 1200,
                          height: 800
                          }
                          });
                          

                          wetterstation.png

                          sendTo('puppeteer.0', 'screenshot', { 
                              url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                              clip: {
                                  x: 0,
                                  y: 0,
                                  width: 1920,
                                  height: 757
                              },
                              ioBrokerOptions: {
                                  storagePath: 'wetterstation.png',
                                },
                              viewportOptions: {
                           width: 1600,
                          height: 1000
                          }
                          });
                          

                          wetterstation.png

                          sendTo('puppeteer.0', 'screenshot', { 
                              url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                              clip: {
                                  x: 0,
                                  y: 0,
                                  width: 1920,
                                  height: 757
                              },
                              ioBrokerOptions: {
                                  storagePath: 'wetterstation.png',
                                },
                              viewportOptions: {
                           width: 1800,
                          height: 1000
                          }
                          });
                          

                          wetterstation.png

                          sendTo('puppeteer.0', 'screenshot', { 
                              url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                              clip: {
                                  x: 0,
                                  y: 0,
                                  width: 1000,
                                  height: 757
                              },
                              ioBrokerOptions: {
                                  storagePath: 'wetterstation.png',
                                },
                              viewportOptions: {
                           width: 1600,
                          height: 1000
                          }
                          });
                          

                          wetterstation.png

                          foxriver76 1 Reply Last reply Reply Quote 0
                          • foxriver76
                            foxriver76 Developer @Negalein last edited by foxriver76

                            @negalein sagte in Puppeteer: Screenshots PhantomJS Alternative:

                            sendTo('puppeteer.0', 'screenshot', {

                            Ah ich mache gleich eine neue Version. Ich vermute es ist schlauer den Viewport im Code zu ändern, bevor man die Seite lädt, manche Seiten kommen nicht klar wenn man die Auflösung später ändert.

                            Bitte 0.2.5 probieren.

                            Negalein 1 Reply Last reply Reply Quote 0
                            • Negalein
                              Negalein Global Moderator @foxriver76 last edited by

                              @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                              Bitte 0.2.5 probieren.

                              Perfekt! 🙂

                              Schaut jetzt sehr gut aus.
                              Merci

                              sendTo('puppeteer.0', 'screenshot', { 
                                  url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                                  clip: {
                                      x: 0,
                                      y: 0,
                                      width: 1000,
                                      height: 757
                                  },
                                  ioBrokerOptions: {
                                      storagePath: 'wetterstation.png',
                                    },
                                  viewportOptions: {
                               width: 1600,
                              height: 1000
                              }
                              });
                              

                              wetterstation.png

                              foxriver76 1 Reply Last reply Reply Quote 0
                              • foxriver76
                                foxriver76 Developer @Negalein last edited by

                                @negalein Perfekt, freut mich, dass wir den Adapter verbessern konnten. 😉

                                Negalein 2 Replies Last reply Reply Quote 1
                                • Negalein
                                  Negalein Global Moderator @foxriver76 last edited by

                                  @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                  Perfekt, freut mich, dass wir den Adapter verbessern konnten.

                                  Ja, freut mich auch.
                                  Jetzt kommt der Langzeittest.
                                  Phantomjs hat mir den ioB gekillt. Wurde immer träger, bis zum Absturz.

                                  PS: schnell eine Website erstellt (nicht aufs Desigh achten 😂 ) http://wetter.nega.at/

                                  1 Reply Last reply Reply Quote 0
                                  • Negalein
                                    Negalein Global Moderator @foxriver76 last edited by

                                    @foxriver76

                                    PS: kannst du mir da mit einem Timeout oder so helfen?

                                    Es passiert oft, dass er schneller mit dem FTP anfängt, ehe er die Datei schreibt.
                                    Was muss ich machen, damit er mit dem FTP erst 5 Sek. später anfängt?

                                    schedule("*/3 * * * *", function () {
                                    sendTo('puppeteer.0', 'screenshot', { 
                                        url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                                        clip: {
                                            x: 0,
                                            y: 0,
                                            width: 1000,
                                            height: 757
                                        },
                                        ioBrokerOptions: {
                                            storagePath: 'wetterstation.png',
                                          },
                                        viewportOptions: {
                                     width: 1600,
                                    height: 1000
                                    }
                                    });
                                      exec('wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com');
                                      console.log("exec: " + 'wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com');
                                    });
                                    
                                    
                                    foxriver76 1 Reply Last reply Reply Quote 0
                                    • foxriver76
                                      foxriver76 Developer @Negalein last edited by

                                      @negalein sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                      @foxriver76

                                      PS: kannst du mir da mit einem Timeout oder so helfen?

                                      Es passiert oft, dass er schneller mit dem FTP anfängt, ehe er die Datei schreibt.
                                      Was muss ich machen, damit er mit dem FTP erst 5 Sek. später anfängt?

                                      schedule("*/3 * * * *", function () {
                                      sendTo('puppeteer.0', 'screenshot', { 
                                          url: 'http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk',
                                          clip: {
                                              x: 0,
                                              y: 0,
                                              width: 1000,
                                              height: 757
                                          },
                                          ioBrokerOptions: {
                                              storagePath: 'wetterstation.png',
                                            },
                                          viewportOptions: {
                                       width: 1600,
                                      height: 1000
                                      }
                                      }, () =>
                                        exec('wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com');
                                        console.log("exec: " + 'wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com');
                                      });
                                      });
                                      

                                      Sorry nur Handy, habe es leicht abgeändert dass es erst im callback passiert, dann sollte er es vorher geschrieben haben.

                                      Negalein 1 Reply Last reply Reply Quote 0
                                      • Negalein
                                        Negalein Global Moderator @foxriver76 last edited by

                                        @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                        habe es leicht abgeändert dass es erst im callback passiert, dann sollte er es vorher geschrieben haben.

                                        da bekomm ich javascript.0 (564) script.js.Wetter.Wetter_to_FTP compile failed: at script.js.Wetter.Wetter_to_FTP:18

                                        foxriver76 1 Reply Last reply Reply Quote 0
                                        • foxriver76
                                          foxriver76 Developer @Negalein last edited by

                                          @negalein Vom Rechner:

                                          schedule("*/3 * * * *", () => {
                                            sendTo("puppeteer.0", "screenshot", {
                                              url: "http://10.0.1.203:3000/d/14q2Khmnz/wetterstation-copy?orgId=1&refresh=1m&kiosk",
                                              clip: {
                                                x: 0,
                                                y: 0,
                                                width: 1000,
                                                height: 757
                                              },
                                              ioBrokerOptions: {
                                                storagePath: "wetterstation.png"
                                              },
                                              viewportOptions: {
                                                width: 1600,
                                                height: 1000
                                              }
                                            }, () => {
                                              exec("wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com");
                                              console.log("exec: " + "wput -nc /opt/iobroker/iobroker-data/files/0_userdata.0/wetterstation.png ftp://xxxxxx:xxxxxx@www37.world4you.com");
                                            });
                                          });
                                          
                                          Negalein 1 Reply Last reply Reply Quote 0
                                          • Negalein
                                            Negalein Global Moderator @foxriver76 last edited by

                                            @foxriver76 sagte in Puppeteer: Screenshots PhantomJS Alternative:

                                            Vom Rechner:

                                            fuck, ioB geht in die Knie 😞

                                            06a90534-265d-4d35-a311-ebd55c3fa775-image.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            864
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            browser headless phantomjs puppeteer screenshot screenshots website
                                            23
                                            245
                                            25734
                                            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