Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Internetinhalte auf Wandtablet ohne Inetzugang darstellen?

    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

    Internetinhalte auf Wandtablet ohne Inetzugang darstellen?

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @paul53 last edited by

      @paul53 Danke - dann hätte es ja doch einen Einfluss

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

        @Homoran
        hi
        funktioniert es bei dir - bei mir klappt das mit dem script von jey-cee - nutze ein anderes bild - sollte aber egal sein und habe ein schedule in das script eingebaut, dass alle 15 minuten das bild holt.

        Homoran 2 Replies Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @liv-in-sky last edited by Homoran

          @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

          funktioniert es bei dir

          leider nein

          @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

          bei mir klappt das mit dem script von jey-cee - nutze ein anderes bild

          könntest du es bitte mal mit meinem Bild versuchen.
          http://www.dwd.de/DWD/wetter/radar/rad_nrw_akt.jpg

          @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

          habe ein schedule in das script eingebaut

          oops, den brauch ich auch noch 😞

          bei mir ist nur ein Leerzeichen im state:
          dwd_bild_state_leer.png

          wie bindest du das Bild (wenn es denn mal da wäre) in vis ein?

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

            @Homoran

            das script nutze ich :

            /*Author: Jey Cee jey-cee@live.com; Version: 0.1.2; Datum: 05.10.2019*/
            
            let objPath = 'cam'         //Der Pfad zu den Skript Objekten; Ergebnis: javascript.0.cam
            let urlCam1 ='http://www.wetter24.de/meteo/automatic-gif/radar.teaser/radar_de_teaser.gif'; //      'https://www.dwd.de/DWD/wetter/radar/rad_bayern_akt.jpg';      //URL zum snapshot der IP Cam
            let intervall = 2;      //Zeit intervall für die Abfrage; 0 = Dynamisch, 1-x = Zeit in Sekunden;
            
            //Ab hier keine Änderungen mehr
            createState(objPath + '.image', '', false, {type: 'string'});
            createState(objPath + '.start', false, false, {type: 'boolean', role: 'switch'});
            
            const request = require('request').defaults({ encoding: null });
            
            on({id: 'javascript.0.' + objPath + '.start', val: true},
               function(){
                   getSnap();
               }) 
            schedule('*/15 * * * *',  function () { 
            //function(){
                   getSnap();//}
            });
            
            
            function getSnap(){
              // log("bin d")
               request.get(urlCam1, function (error, response, body) {
               if(error){
                   log(error);
               }
               if (!error && response.statusCode == 200) {
                    data = "data:" + response.headers["content-type"] + ";base64," + new Buffer(body).toString('base64');
                   setState('javascript.0.' + objPath + '.image', data);
               }
               if(intervall === 0 && getState('javascript.0.' + objPath + '.start').val === true){
                   getSnap();
               }else if(intervall !== 0 && getState('javascript.0.' + objPath + '.start').val === true){
                   setTimeout(function(){
                           getSnap();
                   }, intervall * 1000);
               }
               
            });
            }
            
            
            
            
            

            ich werd mal dein bild eingeben und melde mich dann

            Homoran 1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @liv-in-sky last edited by

              @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

              das script nutze ich :
              Spoiler

              das habe ich auch - leicht modifiziert:

              /*Author: Jey Cee jey-cee@live.com; Version: 0.1.2; Datum: 05.10.2019*/
               
              let objPath = 'DWD'         //Der Pfad zu den Skript Objekten; Ergebnis: javascript.0.DWD
              let urlCam1 = 'http://www.dwd.de/DWD/wetter/radar/rad_nrw_akt.jpg';      //URL zum Radarbild
              let intervall = 60;      //Zeit intervall für die Abfrage; 0 = Dynamisch, 1-x = Zeit in Sekunden;
               
              //Ab hier keine Änderungen mehr
              createState(objPath + '.image', '', false, {type: 'string'});
              createState(objPath + '.start', false, false, {type: 'boolean', role: 'switch'});
               
              const request = require('request').defaults({ encoding: null });
               
              on({id: 'javascript.0.' + objPath + '.start', val: true},
                  function(){
                      getSnap();
                  }) 
               
               
              function getSnap(){
                  request.get(urlCam1, function (error, response, body) {
                  if(error){
                      log(error);
                  }
                  if (!error && response.statusCode == 200) {
                      let data = "data:" + response.headers["content-type"] + ";base64," + new Buffer(body).toString('base64');
                      setState('javascript.0.' + objPath + '.image', data);
                  }
                  if(intervall === 0 && getState('javascript.0.' + objPath + '.start').val === true){
                      getSnap();
                  }else if(intervall !== 0 && getState('javascript.0.' + objPath + '.start').val === true){
                      setTimeout(function(){
                              getSnap();
                      }, intervall * 1000);
                  }
                  
              });
              }
              
              liv-in-sky 1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @Homoran last edited by

                @Homoran noch ne frage

                mein bild ist ein gif , indem die wolken sich bewegen - in wiederholung

                dein bild scheint still zu stehen - wie oft wird das geupdated von denen ?

                Homoran 1 Reply Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @liv-in-sky last edited by

                  @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

                  habe ein schedule in das script eingebaut, dass alle 15 minuten das bild holt.

                  habe gerade nochmal nachgesehen. Wofür ist denn dann das Intervall in Zeile 5?

                  1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @liv-in-sky last edited by

                    @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

                    dein bild scheint still zu stehen - wie oft wird das geupdated von denen ?

                    alle 5 Minuten - manchmal auch nur alle 10 Minuten

                    @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

                    mein bild ist ein gif , indem die wolken sich bewegen - in wiederholung

                    und du bist sicher, dass das neu geladen wird, oder immer nur das alte weiterkreiselt?

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

                      @Homoran bei mir ja- habe das widget vor 1- 2 stunden reingestellt - als ich wiederkam, war es ein anderes bild - außerdem habe ich mir jetzt noch ein blockly gemacht, dass alexa sagen läßt, wenn ein anderes bild da ist - bei meinem bild dauert der zyklus länger- ich weiß nicht wie lange er ist

                      ds interval:

                      wenn du den datenpunkt (start) auf true setzt, und läßt, wird der bei interval 2 jede 2 sekunden ein bild geholt

                      ich hätte das interval auch auf 15*60 stellen können - dann hätte ich mir das eigene schedule sparen können

                      gerade hat sich dein bild geändert und alexa hat mir bescheid gegeben

                      Homoran 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @liv-in-sky last edited by Homoran

                        @liv-in-sky was mach ich falsch?
                        dein skript klappt bei mir auch nicht.

                        😳

                        man muss start auf true stellen - dann klappt es auch 😳

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

                          @Homoran
                          habe mich nicht fragen getraut, ob du es auf true gesetzt hast 🙂

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

                            Ist sehr lustig, den Thread hier nebenbei mitzulesen 😂
                            ist in etwa so:
                            A: Mein Auto fährt nicht
                            B: tritt mal aufs Gas
                            A: tut sich immer noch nix
                            B: Gang drin?
                            A: na logo
                            <Pause>
                            A: hab einfach mal den Motor gestartet, jetzt gehts
                            B: 🤣

                            1 Reply Last reply Reply Quote 3
                            • Homoran
                              Homoran Global Moderator Administrators @liv-in-sky last edited by

                              @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

                              @Homoran
                              habe mich nicht fragen getraut, ob du es auf true gesetzt hast 🙂

                              mit dem DWD klappt es nicht, mit dem gif schon

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

                                @Homoran geduld - du musst warten bis es sich wieder ändert - war bis jetzt noch nicht - ich schreibe dir, wenn es sich wieder geändert hat

                                Homoran 1 Reply Last reply Reply Quote 0
                                • Homoran
                                  Homoran Global Moderator Administrators @liv-in-sky last edited by

                                  @liv-in-sky sagte in Internetinhalte auf Wandtablet ohne Inetzugang darstellen?:

                                  geduld - du musst warten bis es sich wieder ändert

                                  aber es sollte doch erstmalig überhaupt geladen werden, oder?
                                  Das Feld WERT ist leer

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

                                    @Homoran

                                    ja - bei start-dp auf true sollte es sofort kommen

                                    1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 @Homoran last edited by paul53

                                      @Homoran sagte:

                                      mit dem DWD klappt es nicht

                                      Bei mir funktioniert dieses Script:

                                      const url = 'http://www.dwd.de/DWD/wetter/radar/rad_nrw_akt.jpg';
                                      const idDp = '0_userdata.0.Wetter.Regen.NRW';
                                      
                                      schedule('* * * * *', function() {
                                          request({url: url, encoding: null}, function(err, response, data) {
                                              if(!err && data) {
                                                  data = "data:" + response.headers["content-type"] + ";base64," + new Buffer(data).toString('base64');
                                                  setState(idDp, data);
                                              }
                                          });
                                      });
                                      

                                      Der Datenpunkt "0_userdata.0.Wetter.Regen.NRW" ist vom Typ "string".
                                      HTML vom Widget:

                                      <img src={0_userdata.0.Wetter.Regen.NRW} width="550px">
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • liv-in-sky
                                        liv-in-sky @Homoran last edited by liv-in-sky

                                        @Homoran evtl darsft du das let vor data nicht schreiben - nicht das du da eine neue variable machst und die request variable überschreibst

                                        @paul53 - kann das sein

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

                                          @liv-in-sky sagte:

                                          nicht das du da eine neue variable machst und die request variable überschreibst

                                          Die request-Variable war body, deshalb let data.

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

                                            @paul53 alles klar - body hab ich in der zeile überlesen

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            493
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            android app vis vis
                                            7
                                            58
                                            2979
                                            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