Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden

    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

    [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden

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

      @UHU01

      /ch0/?transportmode=unicast

      Bei deinem Script kann ich nur die Variante mit dem mp4 testen, da meine Kamera keine Bilder ablegt.

      Was für eine Cam ...

      laut Google .. wäre es eine Hikvision oder .!?

      Hikvison ... die habe ich auch und kann auch ein Snapshot per URL bekommen .

      http://user:passwort@192.168.178.51/streaming/channels/1/picture
      
      1 Reply Last reply Reply Quote 0
      • UHU01
        UHU01 last edited by

        @glasfaser

        Nein. Ist eine Wansview W5. Hab bisher nichts in Richtung Snapshot dafür gefunden.

        crunchip Glasfaser 2 Replies Last reply Reply Quote 0
        • crunchip
          crunchip Forum Testing Most Active @UHU01 last edited by

          @uhu01 sagte in [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden:

          Hab bisher nichts in Richtung Snapshot dafür gefunden

          https://www.maffert.net/wansview-befehle-commands-und-technische-infos/

          UHU01 1 Reply Last reply Reply Quote 1
          • Glasfaser
            Glasfaser @UHU01 last edited by Glasfaser

            @uhu01 sagte in [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden:

            Wansview W5

            ist eine W6 ... siehe hier , vielleicht geht es damit :

            https://forum.iobroker.net/post/586617

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

              @glasfaser lDas scheint der Sache schon näher zu kommen.

              ffmpeg -loglevel fatal -i rtsp:// FxSdL:cVK3mCsK @192.168.178.166:554/live/ch0 -vframes 1 -y -r 1 /opt/iobroker/iobroker-data/files/vis.0/main/icons/Hof3.jpg
              

              bringt zumindest keinen Fehler mehr. Abgelegt wird aber auch nichts. Kann das mit den Berechtigungen zu tun haben? Wo und wie stelle ich die denn ein wenn es so ist?

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

                @crunchip Leider nicht für diese Kamera.

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

                  @uhu01 sagte in [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden:

                  /opt/iobroker/iobroker-data/files/vis.0/main/icons/Hof3.jpg

                  nimm den tmp Ordner

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

                    @glasfaser

                    Funktioniert leider auch nich:

                    pi@raspberrypi:/tmp $ ffmpeg -loglevel fatal -i rtsp:// FxS:cVK3m9rV @192.168.178.166:554/live/ch0 -vframes 1 -y -r 1 /tmp/Hof3.jpg
                    pi@raspberrypi:/tmp $ ls -la
                    insgesamt 44
                    drwxrwxrwt 11 root     root     4096 27. Jan 18:53 .
                    drwxr-xr-x 22 root     root     4096 27. Jan 17:26 ..
                    drwxrwxrwt  2 root     root     4096 21. Jan 22:53 .font-unix
                    drwxr-xr-x  2 iobroker iobroker 4096 27. Jan 10:55 hsperfdata_iobroker
                    drwxrwxrwt  2 root     root     4096 21. Jan 22:53 .ICE-unix
                    drwx------  2 pi       pi       4096 21. Jan 22:53 runtime-pi
                    drwx------  3 root     root     4096 21. Jan 22:53 systemd-private-f9e07d227dfe4ba6848daeff263d15ab-colord.service-ak1Huf
                    drwx------  3 root     root     4096 21. Jan 22:53 systemd-private-f9e07d227dfe4ba6848daeff263d15ab-systemd-logind.service-xk2P1h
                    drwxrwxrwt  2 root     root     4096 21. Jan 22:53 .Test-unix
                    drwxrwxrwt  2 root     root     4096 21. Jan 22:53 .X11-unix
                    drwxrwxrwt  2 root     root     4096 21. Jan 22:53 .XIM-unix
                    pi@raspberrypi:/tmp $
                    
                    Glasfaser 1 Reply Last reply Reply Quote 0
                    • Glasfaser
                      Glasfaser @UHU01 last edited by Glasfaser

                      @uhu01

                      stimmt den der Link , es kann auch sein das es ein anderer Kanal ist
                      als im Thread mit der W6

                      rtsp://user:pwd@192.168.178.xxx:554/live/ch0
                      

                      Teste den Link im VLC , bzw. im Browser

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

                        @glasfaser
                        Ja, der link funktioniert (mit vlc getestet) :

                        rtsp://xxx:xxx@192.168.178.166:554/live/ch0
                        
                        Glasfaser 1 Reply Last reply Reply Quote 0
                        • Glasfaser
                          Glasfaser @UHU01 last edited by Glasfaser

                          @uhu01

                          teste mal damit :

                          ffmpeg -loglevel fatal -rtsp_transport tcp -i 'rtsp://user:pwd@192.168.178.xxx:554/live/ch0' -f image2 -vframes 1 -pix_fmt yuvj420p /home/bild.jpeg
                          
                          UHU01 1 Reply Last reply Reply Quote 0
                          • UHU01
                            UHU01 @Glasfaser last edited by

                            @glasfaser
                            Es dauert zwar eine Weile, bis die Eingabe ausgeführt ist, aber es kommt wieder nichts an:

                            i@raspberrypi:/ $ ffmpeg -loglevel fatal -rtsp_transport tcp -i 'rtsp://FxSdL8f6:m9rKEcC@192.168.178.166:554/live/ch0' -f image2 -vframes 1 -pix_fmt yuvj420p /home/bild.jpeg
                            pi@raspberrypi:/ $ cd home
                            pi@raspberrypi:/home $ ls
                            iobroker  pi
                            pi@raspberrypi:/home $
                            
                            Glasfaser 1 Reply Last reply Reply Quote 0
                            • Glasfaser
                              Glasfaser @UHU01 last edited by

                              @uhu01

                              schreibe mal ein

                              sudo
                              

                              davor

                              sudo ffmpeg -loglevel fatal -rtsp_transport tcp -i 'rtsp://FxSdL8f6:m9rKEcC@192.168.178.166:554/live/ch0' -f image2 -vframes 1 -pix_fmt yuvj420p /home/bild.jpeg
                              
                              UHU01 1 Reply Last reply Reply Quote 0
                              • UHU01
                                UHU01 @Glasfaser last edited by UHU01

                                @Glasfaser
                                Heureka. Das war's. Danke dir vielmals!

                                Screenshot_20230127-223640_Telegram.jpg

                                Glasfaser 1 Reply Last reply Reply Quote 1
                                • Glasfaser
                                  Glasfaser @UHU01 last edited by

                                  @uhu01 sagte in [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden:

                                  Heureka. Das war's. Danke dir vielmals!

                                  Kein Thema .. 🙂

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

                                    @glasfaser
                                    Läuft doch noch nicht ganz. Das Foto wird zwar zuverlässig gesendet, aber immer das gleiche (von gestern). Es wird anscheinend kein neues abgelegt.

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

                                      @uhu01 sagte in [Frage BLOCKLY ] Klingel Bild per Telegram versenden / Snapshot von Cam per Telegram versenden:

                                      Es wird anscheinend kein neues abgelegt.

                                      lösche es mit

                                      rm  /home/bild.jpeg
                                      

                                      wird dann ein neues Bild erstellt

                                      EDIT :

                                      bzw.

                                      sudo rm  /home/bild.jpeg
                                      
                                      UHU01 1 Reply Last reply Reply Quote 0
                                      • UHU01
                                        UHU01 @Glasfaser last edited by UHU01

                                        @glasfaser

                                        Jetzt muss ich weiter ausholen...

                                        Das Blockly, in dem ich den Befehl zur Fotoablage verwendet habe löscht weder, noch hat es jemals ein Bild abgelegt. Es sendet nur das Foto, dass ich vorher über den Putty Befehl abgelegt hatte.

                                        Bei der JS Variante bekomme ich einen Kompilierungsfehler in Zeile 15. Ich vermute wegen der Hochkommas in der Mitte.

                                        c48fcb9b-6257-465a-93b8-3f71093feabe-grafik.png

                                        var timeout;
                                        7
                                        
                                        //Installation  apt-get update dann apt-get install ffmpeg
                                         
                                        
                                        on({id: '0_userdata.0.Testschalter', val: true}, async function (obj) {
                                        
                                          var value = obj.state.val;
                                        
                                          var oldValue = obj.oldState.val;
                                        
                                         // exec('sudo ffmpeg -y -i rtsp://user:pass@192.168.178.166:554/live/ch0/ -t 8 -f mp4 -vcodec libx264 -pix_fmt yuv420p -an -vf scale=w=1280:h=738:force_original_aspect_ratio=decrease -r 10 /tmp/bild.mp4');
                                        
                                          exec('sudo ffmpeg -loglevel fatal -rtsp_transport tcp -ii 'rtsp://user:pass@192.168.178.166:554/live/ch0' -f image2 -vframes 1 -pix_fmt yuvj420p /tmp/bild.jpeg');
                                        
                                        
                                          timeout = setTimeout(async function () {
                                        
                                            sendTo("telegram.1", "send", {
                                        
                                                text: '/tmp/bild.jpeg',
                                        
                                                disable_notification: true
                                        
                                            });
                                        
                                          }, 15000);
                                        
                                        });
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser last edited by Glasfaser

                                          @uhu01

                                          in Zeile 15. Ich vermute wegen der Hochkommas in der Mitte.

                                          im Blockly , ändere auf , ohne '

                                          sudo ffmpeg -loglevel fatal -rtsp_transport tcp -i rtsp://FxSdL8f6:m9rKEcC@192.168.178.166:554/live/ch0 -f image2 -vframes 1 -pix_fmt yuvj420p /home/bild.jpeg
                                          
                                          UHU01 1 Reply Last reply Reply Quote 0
                                          • UHU01
                                            UHU01 @Glasfaser last edited by

                                            @glasfaser
                                            Nichts zu machen. Beide Befehle funktionieren über Putty. Aus dem Blockly heraus passiert aber nichts (außer der Telegram Versand).

                                            <xml xmlns="https://developers.google.com/blockly/xml">
                                              <variables>
                                                <variable type="timeout" id="timeout">timeout</variable>
                                              </variables>
                                              <block type="on_ext" id="1GbHG!B#J@}|7P.az3EG" x="5" y="-1324">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                <field name="CONDITION">ne</field>
                                                <field name="ACK_CONDITION"></field>
                                                <value name="OID0">
                                                  <shadow type="field_oid" id="iTK;8eqeV2xQkN+QJ9TF">
                                                    <field name="oid">0_userdata.0.Testschalter</field>
                                                  </shadow>
                                                </value>
                                                <statement name="STATEMENT">
                                                  <block type="controls_if" id=",E+)WRA_=k%0lckb]:h[">
                                                    <value name="IF0">
                                                      <block type="logic_boolean" id=":W8j?iohfcdV4;W)j-:+">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                    <statement name="DO0">
                                                      <block type="debug" id="}8RCQT8,f)4Z_@C)y|jz">
                                                        <field name="Severity">log</field>
                                                        <value name="TEXT">
                                                          <shadow type="text" id="-rVRQ4^8Kdn,N2(0%6`;">
                                                            <field name="TEXT">Auslösung</field>
                                                          </shadow>
                                                        </value>
                                                      </block>
                                                    </statement>
                                                    <next>
                                                      <block type="exec" id="fm/.+zLn;3lyLZC=l=DZ">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                        <field name="WITH_STATEMENT">FALSE</field>
                                                        <field name="LOG">debug</field>
                                                        <value name="COMMAND">
                                                          <shadow type="text" id="6XpaZ{GR9!n:*-ue?ELc">
                                                            <field name="TEXT">sudo rm  /tmp/bild.jpeg</field>
                                                          </shadow>
                                                        </value>
                                                        <next>
                                                          <block type="exec" id="0?HLe|@]G@3[q4L[tx|t">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                            <field name="WITH_STATEMENT">FALSE</field>
                                                            <field name="LOG">debug</field>
                                                            <value name="COMMAND">
                                                              <shadow type="text" id=".#9er8iN6K=urJvj_Uo|">
                                                                <field name="TEXT">sudo ffmpeg -loglevel fatal -rtsp_transport tcp -i rtsp://user:pass@192.168.178.166:554/live/ch0 -f image2 -vframes 1 -pix_fmt yuvj420p /tmp/bild.jpeg</field>
                                                              </shadow>
                                                            </value>
                                                            <next>
                                                              <block type="timeouts_settimeout" id="9J*b:4r8O.XG.h{=|~/*">
                                                                <field name="NAME">timeout</field>
                                                                <field name="DELAY">3000</field>
                                                                <field name="UNIT">ms</field>
                                                                <statement name="STATEMENT">
                                                                  <block type="telegram" id="RWDx)$R22ue?FT{1ER4x">
                                                                    <field name="INSTANCE">.1</field>
                                                                    <field name="LOG"></field>
                                                                    <field name="SILENT">FALSE</field>
                                                                    <field name="PARSEMODE">default</field>
                                                                    <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                                    <value name="MESSAGE">
                                                                      <shadow type="text" id="+!xJbKp]),=E8{`2)2xz">
                                                                        <field name="TEXT">/tmp/bild.jpeg</field>
                                                                      </shadow>
                                                                    </value>
                                                                    <value name="USERNAME">
                                                                      <block type="text" id="MSphw!NZ_?j1UA-~h4x9">
                                                                        <field name="TEXT">xxxx</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </statement>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </xml>
                                            

                                            exec ist in der Instanz zugelassen:

                                            91d7de0e-e45e-4535-8e35-698928521056-grafik.png

                                            Glasfaser 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            901
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            36
                                            157
                                            32237
                                            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