Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Lokal abgelegten Snapshot in VIS anzeigen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Lokal abgelegten Snapshot in VIS anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • Glasfaser
      Glasfaser last edited by

      @yoda

      var fs = require('fs');
      
      var timeout1
      
      exec('ffmpeg -loglevel fatal -i rtsp://user:pwd@192.168.178.xxx:554/live/ch0 -vframes 1 -y -r 1 /tmp/Vorne.jpg');
      
       
      
          timeout1 = setTimeout(function () {
      
             
      
               const picture= fs.readFileSync('/tmp/Vorne.jpg');
      
               writeFile('vis.0','/klingelbild/Vorneneu.jpg', picture, function (error) { });
      
       
      
          }, 20000);
      
      
      Yoda 1 Reply Last reply Reply Quote 1
      • Yoda
        Yoda @Glasfaser last edited by

        @Christian-Sandkaulen
        Danke, das beruhigt schon mal das du die W6 eingebunden hast. Mit MotionEye habe ich noch nichts gemacht, müsste ich mich mal einlesen was ich da machen muss.....

        @glasfaser
        Danke für deine Antwort, ich habe die Pfade mal entsprechend meiner Ordner angepasst und auch nochmal einen Neuen Name für das Bild verwendet Hof7.jpg

        • Dieses wird im Verzeichnis beim starten des Skripts nur einmalig Aktualisiert.
        • In Vis wird das Bild weiterhin nicht angezeigt.

        Wärst du so Lieb und schauts dort noch mal rüber - vielen Dank!

        var fs = require('fs');
         
        var timeout1
         
        exec('ffmpeg -loglevel fatal -i rtsp://user:pwd@192.168.178.117:554/live/ch0 -vframes 1 -y -r 1 /opt/iobroker/iobroker-data/files/vis.0/main/img/Hof7.jpg');
         
         
         
            timeout1 = setTimeout(function () {
         
               
         
                 const picture= fs.readFileSync('/opt/iobroker/iobroker-data/files/vis.0/main/img/Hof7.png');
         
                 writeFile('vis.0','/opt/iobroker/iobroker-data/files/vis.0/main/img/Hof7.png', picture, function (error) { });
         
         
         
            }, 20000);
         
        
        

        2.jpg

        Pfad in Vis:
        Bem. nehme ich ein anderes Bild aus dem Vis Ordner wird dieses angezeigt.
        /vis.0/main/img/Hof7.jpg

        3.jpg

        Glasfaser 1 Reply Last reply Reply Quote 0
        • Glasfaser
          Glasfaser @Yoda last edited by

          @yoda

          ändere auf :

          writeFile('vis.0','/main/img/Hof7.png', picture, function (error) { });
          
          Yoda 1 Reply Last reply Reply Quote 0
          • Yoda
            Yoda @Glasfaser last edited by Yoda

            @glasfaser
            habe ich gemacht - aber es ändert sich nichts, weiterhin so wie oben beschrieben:

            var fs = require('fs');
             
            var timeout1
             
            exec('ffmpeg -loglevel fatal -i rtsp://user:pwd@192.168.178.117:554/live/ch0 -vframes 1 -y -r 1 /opt/iobroker/iobroker-data/files/vis.0/main/img/Hof7.jpg');
             
             
             
                timeout1 = setTimeout(function () {
             
                   
             
                     const picture= fs.readFileSync('/opt/iobroker/iobroker-data/files/vis.0/main/img/Hof7.png');
             
                     writeFile('vis.0','/main/img/Hof7.png', picture, function (error) { });
             
             
             
                }, 20000);
             
            
            
            Glasfaser 1 Reply Last reply Reply Quote 0
            • Glasfaser
              Glasfaser @Yoda last edited by Glasfaser

              @yoda

              Nimm ganz oben mein erstes Beispiel ohne dein Pfad einzutragen/ändern , teste es mit dem hinterlegten Pfad /tmp/Vorne.jpg

              und die Ausgabe erfolgt dann in

              writeFile('vis.0','/klingelbild/Vorneneu.jpg

              Yoda 1 Reply Last reply Reply Quote 0
              • Yoda
                Yoda @Glasfaser last edited by

                @glasfaser
                das wird was.
                Bild wird gespeichert und auch in Vis angezeigt.
                Jetz müsste nur noch der Timmer alle 3 sec das Bild aktualisieren.

                var fs = require('fs');
                 
                var timeout1
                 
                exec('ffmpeg -loglevel fatal -i rtsp://user:pwd@192.168.178.117:554/live/ch0 -vframes 1 -y -r 1 /tmp/Vorne.jpg');
                 
                 
                 
                    timeout1 = setTimeout(function () {
                 
                       
                 
                         const picture= fs.readFileSync('/tmp/Vorne.jpg');
                 
                         writeFile('vis.0','/klingelbild/Vorneneu.jpg', picture, function (error) { });
                 
                 
                 
                    }, 20000);
                 
                
                

                Es wird also nur einmal dort gespeichert:
                4.jpg

                Yoda 1 Reply Last reply Reply Quote 0
                • Yoda
                  Yoda @Yoda last edited by

                  Zusatz,
                  wenn ich das Script stoppe und wieder starte, wird das Bild Aktualisiert - dauert 24 sec.
                  Sorry für die ganzen Fragen aber da kenne ich mich null mit aus 😞
                  Danke für deine Geduld und Hilfe.

                  Muss hier vielleicht noch ein wert rein?

                  timeout1 = setTimeout(function () {
                  
                  Glasfaser 1 Reply Last reply Reply Quote 0
                  • Glasfaser
                    Glasfaser @Yoda last edited by Glasfaser

                    @yoda
                    Nein ... der Timeoutwert ist unten , das heißt es wird das Bild bei Scriptstart geholt und nach 20 sec. in den Ordner gelegt .
                    Dort kannst du die Zeit runterschrauben !

                    
                    }, 20000);
                    
                    Yoda 1 Reply Last reply Reply Quote 0
                    • Yoda
                      Yoda @Glasfaser last edited by Yoda

                      @glasfaser
                      ah ok.
                      Dann müsste ich nochmal schauen das ein Intervall dazukommt, das die Bilder von der Kamera alle 3 sec geholt werden. Habe mich da wohl falsch ausgedrückt.
                      Das Skript soll ja dann dauerhaft laufen, mit Aktuelle Bilder in ...sec Takt.

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

                        @yoda sagte in Lokal abgelegten Snapshot in VIS anzeigen:

                        Das Skript soll ja dann dauerhaft laufen, mit Aktuelle Bilder in ...sec Takt.

                        Würde gehen , aber nicht empfehlenswert.

                        Hier habe ich etwas von deiner Wansview gefunden , mit einem direkten Link in einem Widget ist es besser .
                        Kannst ja dort mal anfragen

                        Ich habe eine Wansview IPCamera welche mir über den den Browser ohne Probleme ein stream / snap .cgi Bild sendet.

                        https://forum.iobroker.net/topic/12871/webcam-fritzbox-ftp

                        Yoda 1 Reply Last reply Reply Quote 0
                        • Yoda
                          Yoda @Glasfaser last edited by

                          @glasfaser
                          Danke für deine Hilfe und Zeit!👍
                          Habe ich mir angeschaut nur seine Wansview IP Cam macht ein Bild / stream über einen Browser.
                          Ich habe auch eine Wansview 1 oder 2 die macht das auch, da ist das alles klein Problem.
                          Wansview hat hier wohl für jedes Model eigene Befehle / Möglichkeiten, Problem ist die W6.

                          Habe schon Kontakt mit denen aufgenommen, mal sehen ob was kommt..
                          Ansonst mal mit @Christian-Sandkaulen Vorschlag MotionEye weitermachen, oder Rücksendung.

                          1 Reply Last reply Reply Quote 0
                          • Yoda
                            Yoda @ChrisNett last edited by

                            @christian-sandkaulen
                            ich habe nun MotionEye am laufen, bekomme nun auch eine http Adresse für Snapshot oder aus den Video Sream Pfad. Kann also alles per Broser Eingabe öffnen.

                            Bild-Snapshot:
                            http://xxx.168.178.47:8765/picture/1/current/
                            Stream:
                            http://xxx.168.178.47:8081
                            Frame pro 1sec
                            http://xxx.168.178.47:8765/picture/1/frame/

                            Nun fehlt mir noch die Steuerung das ich das Video bei einem Alarm über einen Variablen Daten Punkt /Objekt (Shelly+ Bewegungsmelder) Aufzeichnen / starten und später auch wieder beenden kann.

                            Bisher finde ich dazu noch nichts passendes,
                            ein Ansatz hier wäre mit externen GPIO:
                            https://github.com/avanc/motioneye-pir/blob/master/README.md
                            Ich benötige das aber alt mit Steuerung über einem Datenpunkt / Objekt.

                            Mit dieses Befehlen sollte man die Motion steueren können - aber da tut sich nichts:
                            http://xxx.168.178.47:8765/1/detection/start
                            http://xxx.168.178.47:8081/1/Erkennung/Pause

                            http://xxx.168.178.47:8081/1/config/set?emulate_motion=1
                            http://xxx.168.178.47:8081/1/config/set?emulate_motion=0

                            curl http://xxx.168.178.47:8081/1/config/set?emulate_motion=1
                            curl http://xxx.168.178.47:8081/1/config/set?emulate_motion=0

                            Kann mir hier noch jemand weiterhelfen?
                            LG

                            B wendy2702 2 Replies Last reply Reply Quote 0
                            • B
                              Berzi @Yoda last edited by

                              @yoda ich denke für dieses neue Problem würde sich dann langsam ein eigener thread für anbieten

                              Yoda 1 Reply Last reply Reply Quote 0
                              • wendy2702
                                wendy2702 @Yoda last edited by

                                @yoda sagte in Lokal abgelegten Snapshot in VIS anzeigen:

                                http://xxx.168.178.47:8081/1/Erkennung/Pause
                                http://xxx.168.178.47:8081/1/config/set?emulate_motion=1
                                http://xxx.168.178.47:8081/1/config/set?emulate_motion=0
                                curl http://xxx.168.178.47:8081/1/config/set?emulate_motion=1
                                curl http://xxx.168.178.47:8081/1/config/set?emulate_motion=0

                                1. Läuft iobroker und MOtioneye auf demselben Rechner?
                                2. Alle links mit Port 8081 deuten eigentlich auf den Streaming Link hin, kann mir nicht vorstellen das man da etwas steuern kann.
                                3. Der Port zur KOntrolle ist eigenlich 7999

                                another possibility could be that the PIR set the camera to active processing the video stream
                                (http://192.168.1.14:7999/1/detection/start)
                                and then back to "pause"
                                (http://192.168.1.14:7999/1/detection/pause)

                                reducing the false positives and the heating of the PI due to the active processing of videos all the time

                                https://github.com/ccrisan/motioneyeos/issues/842

                                iceboatLeniceboatLen created this issue 21. März 2017, 20:37 in ccrisan/motioneyeos
                                open

                                iceboatLen created this issue in ccrisan/motioneyeos

                                closed Request: external trigger recording #842

                                1 Reply Last reply Reply Quote 0
                                • Yoda
                                  Yoda @Berzi last edited by

                                  @berzi hast recht - ist besser.
                                  @wendy2702 - ich habe die Antworten dort auch vermerkt. Habe hier 2 Raspis im Einsatz.

                                  Hier der Neue Forumseintrag:
                                  https://forum.iobroker.net/topic/42953/motioneye-zeitliche-video-aufnahme

                                  Danke für die Hilfe hier!
                                  LG

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User @Glasfaser last edited by

                                    Das funktioniert perfect, kann man das Bild auch innerhalb der vis kopieren und umbenennen?

                                    @glasfaser

                                    request(
                                    
                                      {
                                    
                                        url: "http://192.168.178.xxx:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=hxxx&pwd=roadxxxxx",
                                    
                                        encoding: null,
                                    
                                      },
                                    
                                      (error, response, body) => {
                                    
                                        if (!error && body) {
                                    
                                          writeFile("vis.0", "/klingelbild/VorneTest.jpg", body);
                                    
                                        }
                                    
                                      }
                                    
                                    );
                                    
                                    
                                    Glasfaser 1 Reply Last reply Reply Quote 0
                                    • Glasfaser
                                      Glasfaser @Guest last edited by

                                      @brainbug

                                      Meinst du so :

                                      Das Bild heißt eigentlich Vorne.jpg , wird aber dann in VIS mit Vorneneu.jpg kopiert .

                                      https://forum.iobroker.net/topic/42416/lokal-abgelegten-snapshot-in-vis-anzeigen/17

                                      ? 1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User @Glasfaser last edited by A Former User

                                        @glasfaser ich glaube nein. Ich speichere den Zeitpunkt wann es an der Tür geklingelt hat. Und das auf die letzten 3 Aktionen. Nun möchte ich das jeweilige Bild dazu anzeigen können. Das aktuelle Bild welches die letzte Aktion darstellt hab ich nun schon in der Vis. Um dann das vorletztes Bild anzuzeigen müsste ich es ja nur vorher kopieren und dann das aktuelle überschreiben.

                                        bild_aktuell
                                        bild_vorletztes
                                        bild_vorvorletztes

                                        Von oben nach unten überschreiben die Bilder das andere.

                                        Glasfaser 1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser @Guest last edited by

                                          @brainbug

                                          Ah .. ok , das wäre dann so

                                          14804f8f-812f-4b7f-aa72-445ac96af220-grafik.png

                                          Habe es von hier , funktioniert sehr gut .

                                          https://forum.iobroker.net/topic/25541/gelöst-wie-writefile-in-js-script-nutzen/66

                                          ? 1 Reply Last reply Reply Quote 0
                                          • ?
                                            A Former User @Glasfaser last edited by A Former User

                                            @glasfaser danke werde ich probieren!
                                            Funktioniert perfekt und ist schon in der Vis eingebaut!

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            978
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            13
                                            56
                                            4222
                                            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