Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. Script Bild Versand funktioniert nicht

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    3.6k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

Script Bild Versand funktioniert nicht

Scheduled Pinned Locked Moved JavaScript
6 Posts 3 Posters 896 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mctom
    wrote on last edited by
    #1

    Hallo zusammen,

    ich benutze folgendes Script um ein Bild von meiner CAM per Telegram zu versenden.

    function sendImage() {
    
    
        request.get({url:"http://192.168.2.82/tmpfs/snap.jpg?usr=iobroker&pwd=iobroker" , timeout: 10000, encoding: 'binary'}, function (error, response, body) {
            if (error) {
                console.error(error);
                } 
            fs.writeFile('/tmp/klingelbild.jpg', body, 'binary', function(err) {
                if (err) {
                   console.error(err);
                  } else {
                    sendTo('telegram.0', '/tmp/klingelbild.jpg');
                }
            });
        });
    }
    

    Leider bekommen ich hier eine Fehlermeldung im LOG:

    telegram.0	2020-09-11 18:08:53.168	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
    telegram.0	2020-09-11 18:08:53.151	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
    telegram.0	2020-09-11 18:08:53.096	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
    javascript.1	2020-09-11 18:08:52.756	error	(1007) Request error: Error: ETIMEDOUT
    javascript.1	2020-09-11 18:08:52.755	error	(1007) script.js.Benachrichtigung.Klingel-Bild-versenden: {'code':'ETIMEDOUT','connect':true}
    

    Hat jemand eine Idee woran dies liegen kann ?

    Gruß

    Michael

    GlasfaserG 1 Reply Last reply
    0
    • M mctom

      Hallo zusammen,

      ich benutze folgendes Script um ein Bild von meiner CAM per Telegram zu versenden.

      function sendImage() {
      
      
          request.get({url:"http://192.168.2.82/tmpfs/snap.jpg?usr=iobroker&pwd=iobroker" , timeout: 10000, encoding: 'binary'}, function (error, response, body) {
              if (error) {
                  console.error(error);
                  } 
              fs.writeFile('/tmp/klingelbild.jpg', body, 'binary', function(err) {
                  if (err) {
                     console.error(err);
                    } else {
                      sendTo('telegram.0', '/tmp/klingelbild.jpg');
                  }
              });
          });
      }
      

      Leider bekommen ich hier eine Fehlermeldung im LOG:

      telegram.0	2020-09-11 18:08:53.168	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
      telegram.0	2020-09-11 18:08:53.151	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
      telegram.0	2020-09-11 18:08:53.096	error	(6258) Cannot send photo [chatId - 359188986]: Error: ETELEGRAM: 400 Bad Request: IMAGE_PROCESS_FAILED
      javascript.1	2020-09-11 18:08:52.756	error	(1007) Request error: Error: ETIMEDOUT
      javascript.1	2020-09-11 18:08:52.755	error	(1007) script.js.Benachrichtigung.Klingel-Bild-versenden: {'code':'ETIMEDOUT','connect':true}
      

      Hat jemand eine Idee woran dies liegen kann ?

      Gruß

      Michael

      GlasfaserG Offline
      GlasfaserG Offline
      Glasfaser
      wrote on last edited by Glasfaser
      #2

      @mctom
      Funktioniert doch ...

      var fs = require('fs');
      
      function sendImage() {
      
          request.get({url:"http://xxxx:xxxxxx@192.168.178.53/streaming/channels/101/picture" , timeout: 10000, encoding: 'binary'}, function (error, response, body) {
      
              if (error) {
      
                  console.error(error);
      
                  } 
      
              fs.writeFile('/tmp/klingelbild.jpg', body, 'binary', function(err) {
      
                  if (err) {
      
                     console.error(err);
      
                    } else {
      
                      sendTo('telegram.0', '/tmp/klingelbild.jpg');
                      
                  }
      
              });
      
          });
      
      }
      
      sendImage();
      

      oder tausche mal :

      sendTo('telegram.0', {text: '/tmp/klingelbild.jpg', caption: 'Jemand klingelt an der Haustür !!!', disable_notification: true});
      

      Ich vermute eher , das kein Bild erzeugt wird mit deinem Link !?

      Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

      M GlasfaserG 2 Replies Last reply
      0
      • GlasfaserG Glasfaser

        @mctom
        Funktioniert doch ...

        var fs = require('fs');
        
        function sendImage() {
        
            request.get({url:"http://xxxx:xxxxxx@192.168.178.53/streaming/channels/101/picture" , timeout: 10000, encoding: 'binary'}, function (error, response, body) {
        
                if (error) {
        
                    console.error(error);
        
                    } 
        
                fs.writeFile('/tmp/klingelbild.jpg', body, 'binary', function(err) {
        
                    if (err) {
        
                       console.error(err);
        
                      } else {
        
                        sendTo('telegram.0', '/tmp/klingelbild.jpg');
                        
                    }
        
                });
        
            });
        
        }
        
        sendImage();
        

        oder tausche mal :

        sendTo('telegram.0', {text: '/tmp/klingelbild.jpg', caption: 'Jemand klingelt an der Haustür !!!', disable_notification: true});
        

        Ich vermute eher , das kein Bild erzeugt wird mit deinem Link !?

        M Offline
        M Offline
        mctom
        wrote on last edited by
        #3

        @Glasfaser Danke für deine Hilfe.

        Ich habe mal geschaut. Das Problem scheint nicht an Telegramm zu liegen.
        Es wird zwar eine Datei angelegt, aber die Datei ist nur 1KB groß.
        Also scheint hier schon ein Problem zu sein.
        Noch eine Idee ?

        GlasfaserG F 2 Replies Last reply
        0
        • GlasfaserG Glasfaser

          @mctom
          Funktioniert doch ...

          var fs = require('fs');
          
          function sendImage() {
          
              request.get({url:"http://xxxx:xxxxxx@192.168.178.53/streaming/channels/101/picture" , timeout: 10000, encoding: 'binary'}, function (error, response, body) {
          
                  if (error) {
          
                      console.error(error);
          
                      } 
          
                  fs.writeFile('/tmp/klingelbild.jpg', body, 'binary', function(err) {
          
                      if (err) {
          
                         console.error(err);
          
                        } else {
          
                          sendTo('telegram.0', '/tmp/klingelbild.jpg');
                          
                      }
          
                  });
          
              });
          
          }
          
          sendImage();
          

          oder tausche mal :

          sendTo('telegram.0', {text: '/tmp/klingelbild.jpg', caption: 'Jemand klingelt an der Haustür !!!', disable_notification: true});
          

          Ich vermute eher , das kein Bild erzeugt wird mit deinem Link !?

          GlasfaserG Offline
          GlasfaserG Offline
          Glasfaser
          wrote on last edited by
          #4

          @Glasfaser sagte in Script Bild Versand funktioniert nicht:

          Ich vermute eher , das kein Bild erzeugt wird mit deinem Link !?

          Habe ich oben schon geschrieben !

          Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

          1 Reply Last reply
          0
          • M mctom

            @Glasfaser Danke für deine Hilfe.

            Ich habe mal geschaut. Das Problem scheint nicht an Telegramm zu liegen.
            Es wird zwar eine Datei angelegt, aber die Datei ist nur 1KB groß.
            Also scheint hier schon ein Problem zu sein.
            Noch eine Idee ?

            GlasfaserG Offline
            GlasfaserG Offline
            Glasfaser
            wrote on last edited by
            #5

            @mctom sagte in Script Bild Versand funktioniert nicht:

            Noch eine Idee ?

            nimm doch einfach ein Link zum Testen !

            https://upload.wikimedia.org/wikipedia/commons/d/dc/Elbe_-_flussaufw%C3%A4rts_kurz_nach_Ort_K%C3%B6nigstein.jpg
            

            Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

            1 Reply Last reply
            0
            • M mctom

              @Glasfaser Danke für deine Hilfe.

              Ich habe mal geschaut. Das Problem scheint nicht an Telegramm zu liegen.
              Es wird zwar eine Datei angelegt, aber die Datei ist nur 1KB groß.
              Also scheint hier schon ein Problem zu sein.
              Noch eine Idee ?

              F Offline
              F Offline
              fastfoot
              wrote on last edited by
              #6

              @mctom sagte in Script Bild Versand funktioniert nicht:

              Es wird zwar eine Datei angelegt, aber die Datei ist nur 1KB groß.
              Also scheint hier schon ein Problem zu sein.
              Noch eine Idee ?

              Was steht denn in der Datei drin?

              iobroker läuft unter Docker auf QNAP TS-451+
              SkriptRecovery: https://forum.iobroker.net/post/930558

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Support us

              ioBroker
              Community Adapters
              Donate

              679

              Online

              32.7k

              Users

              82.4k

              Topics

              1.3m

              Posts
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
              ioBroker Community 2014-2025
              logo
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Home
              • Recent
              • Tags
              • Unread 0
              • Categories
              • Unreplied
              • Popular
              • GitHub
              • Docu
              • Hilfe