Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Gleiches Problem - Telegram sendet keine Bilder, nur Link

    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

    Gleiches Problem - Telegram sendet keine Bilder, nur Link

    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      ing-michel last edited by

      Re: Telegram sendet kein Doorbird Bild mehr

      Hallo, habe genau das gleiche Problem.
      Der Telegramadapter sendet bei mit nur den Pfad zum Bild und nicht das Bild.

      Die Text2Command-Instanz ist im Telegramadapter eingestellt...

      Kann mir jemand helfen?

      arteck 1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active @ing-michel last edited by

        @ing-michel klar aber meine Glaskugel ist zur politur

        wenn du noch das Script zeigst ?

        I 1 Reply Last reply Reply Quote 0
        • I
          ing-michel @arteck last edited by ing-michel

          @arteck gerne.
          Das Blockly:

          das Skript:

          schedule("* * * * *", async function () {
            sendTo("telegram.0", "send", {
                text: '192.168.1.124/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=iobroker&password=1obroker'
            });
          });
          

          (aus einem Blockly)
          821ed429-e47d-43cc-8ff8-c14d677dded7-image.png https://forum.iobroker.net/assets/uploads/files/1660060307477-bildschirmfoto-2022-08-09-um-17.51.41.png

          DJMarc75 arteck David G. 3 Replies Last reply Reply Quote 0
          • DJMarc75
            DJMarc75 @ing-michel last edited by DJMarc75

            @ing-michel Du sendest quasi den Text den Du da in der Meldung eingetragen hast...
            Und was sollte da jetzt gesendet werden ??
            Wenn da ein Bild gesendet werden soll dann fehlt da aber noch einiges...

            I 1 Reply Last reply Reply Quote 0
            • arteck
              arteck Developer Most Active @ing-michel last edited by arteck

              @ing-michel ist doch alles richtig..

              und wo verschickst du das Bild.. ich seh da nur ein Text der versendet wird
              für ein Bild braucst bissel mehr

              const fs      = require('fs');
              const axios   = require('axios');
              const bild = '/opt/iobroker/iobroker-data/kamerabild.jpg';
              const camUrl = 'http://192.168.1.124/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=iobroker&password=1obroker';
              
              schedule("* * * * *", async function () {
               sendImage();
              });
              
              async function sendImage() {
                  const writer = fs.createWriteStream(bild);
                  try {
                      const response = await axios({
                          url: camUrl,
                          method: 'get',        
                          responseType: 'stream'
                      })
                  
                      response.data.pipe(writer);
              
                      return new Promise((resolve, reject) => {
                          writer.on('finish', resolve => {
                              sendTo('telegram.0', {
                                  text : bild, 
                                  disable_notification:   false
                              });        
                          });        
                      });   
                  } catch (err) {
                      console.log('Kamera hat ein problem', true);
                  }
              }
              
              I 2 Replies Last reply Reply Quote 0
              • I
                ing-michel @DJMarc75 last edited by

                @djmarc75 Moin Marc,
                diverse Anleitungen zeigen, dass Telegramm links automatisch erkennen soll; im Zusammenhang mit installiertem Text2Command.
                z.B. hier: https://www.youtube.com/watch?v=Sb9zjer_vbo

                1 Reply Last reply Reply Quote 0
                • I
                  ing-michel @arteck last edited by ing-michel

                  @arteck said in Gleiches Problem - Telegram sendet keine Bilder, nur Link:

                  Vielen Dank für das mundgerecht vorbereitete Skript. Das Bild muss also erst lokal gespeichert werden...

                  Ich werde testen und berichten.

                  EDIT: es funktioniert; Herzlichen Dank!

                  1 Reply Last reply Reply Quote 0
                  • I
                    ing-michel @arteck last edited by ing-michel

                    @arteck
                    Hi, ich würde das Bild auch gern im Vis anzeigen. Gebe ich den Pfad ein, funktioniert es jedoch nicht. Offenbar wird das jpg nicht mit den nötigen Rechten versehen, kann das sein?

                    Auch wenn ich einen Speicherpfad innerhalb des Vis wähle funktioniert es nicht.🤔

                    1 Reply Last reply Reply Quote 0
                    • David G.
                      David G. @ing-michel last edited by David G.

                      @ing-michel

                      Kann telegram die Bilder denn über das Netzwerk von der Kamera abrufen?
                      Müssen doch lokal zwischengespeichert werden oder?

                      EDIT
                      Oh, stand ja schon weiter oben....

                      I 1 Reply Last reply Reply Quote 0
                      • I
                        ing-michel @David G. last edited by ing-michel

                        @david-g
                        Exakt. Das Bild wird zwischengespeichert. Aber dieses Zwischengespeicherte Bild möchte ich auch im Vis nutze.

                        Aktuell liegt es /vis.0/eigeneBilder/kamerabild.jpg
                        Auch mit dem Pfad w

                        /opt/iobroker/iobroker-data/files/vis.0/eigeneBilder/kamerabild.jpg

                        Wird es nicht angezeigt

                        P David G. 2 Replies Last reply Reply Quote 0
                        • P
                          peterfido @ing-michel last edited by

                          @ing-michel die Antwort dazu steht z.b. hier

                          Homoran 1 Reply Last reply Reply Quote 0
                          • David G.
                            David G. @ing-michel last edited by

                            @ing-michel

                            Das ist ein Teil aus meinem Skript

                            Screenshot_20220820-164632_Chrome.jpg

                            <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="@1th`+1]XUG`ZCTUFaE$" x="62.04432162426312" y="262.33426682894554">
                              <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="8}BHH},]]H[@}au9v(9{">
                                  <field name="oid">default</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="exec" id="D}C)hM0-fx)Wqd=6B+Mj">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                  <field name="WITH_STATEMENT">FALSE</field>
                                  <field name="LOG"></field>
                                  <value name="COMMAND">
                                    <shadow type="text" id="#.^jc[0zE^[OiazhMF}l">
                                      <field name="TEXT">wget -O /opt/iobroker/snapshot/bild.jpg 'http://192.168.99.44/snapshot.jpg?user=xxxx&amp;pwd=xxxxx&amp;strm=1'</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="timeouts_settimeout" id="IHKuLLa5]oXbl$^9t|-F">
                                      <field name="NAME">timeout</field>
                                      <field name="DELAY">3</field>
                                      <field name="UNIT">sec</field>
                                      <statement name="STATEMENT">
                                        <block type="telegram" id="SqJ~@3mh/UY:D8rR:x[6">
                                          <field name="INSTANCE">.0</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="Khu{v^q4H$`GJD4x+%qG">
                                              <field name="TEXT">/opt/iobroker/snapshot/bild.jpg</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                            
                            1 Reply Last reply Reply Quote 0
                            • Homoran
                              Homoran Global Moderator Administrators @peterfido last edited by

                              @peterfido sagte in Gleiches Problem - Telegram sendet keine Bilder, nur Link:

                              @ing-michel die Antwort dazu steht z.b. hier

                              dann brauche ich dir das ja nicht im anderen Thread zu verlinken 🙂

                              I 1 Reply Last reply Reply Quote 0
                              • I
                                ing-michel @Homoran last edited by

                                @homoran @peterfido
                                that's it!

                                Danke Euch beiden!

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate
                                FAQ Cloud / IOT
                                HowTo: Node.js-Update
                                HowTo: Backup/Restore
                                Downloads
                                BLOG

                                771
                                Online

                                31.8k
                                Users

                                80.0k
                                Topics

                                1.3m
                                Posts

                                6
                                14
                                1052
                                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