Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Telegram Bild direkt schicken, ohne Zwischenspeichern

    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

    Telegram Bild direkt schicken, ohne Zwischenspeichern

    This topic has been deleted. Only users with topic management privileges can see it.
    • coyote
      coyote Most Active @Ralla66 last edited by

      @Ralla66 OK, kannst mir ja nachher mal zeigen wie, vllt kann ich es bei Telegram so auch anwenden

      Ralla66 1 Reply Last reply Reply Quote 0
      • Ralla66
        Ralla66 Most Active @coyote last edited by

        @coyote

        Bitte schön :

        Bild senden A_E.jpg

        coyote 1 Reply Last reply Reply Quote 0
        • coyote
          coyote Most Active @Ralla66 last edited by

          @Ralla66 ok, danke. Aber dann scheint es mit E-Mail zu funktionieren und mit Telegram nicht, mache ja eigentlich nichts anderes, siehe ersten Post.
          Ich nehme einfach das vorhandene jpg File und will mir das per Telegram schicken, macht er aber nicht

          Ralla66 1 Reply Last reply Reply Quote 0
          • Ralla66
            Ralla66 Most Active @coyote last edited by Ralla66

            @coyote
            Dann mußt du erst einmal best.jpg immer überschreiben.
            Timing auch ne Sache, erst speichern, 2 sec pause , dann senden.
            Mach mal ein Timeout 2 Sek dazwischen.
            Error: ENOENT: no such file or directory, open '192.168.XX.XX:5000/garage/car/best.jpg
            Da ist wohl im Pfad kein Bild da.

            N coyote 2 Replies Last reply Reply Quote 0
            • N
              Nahasapee @Ralla66 last edited by

              @coyote ich glaube du musst den link übergeben als text nicht das fs objekt
              entsprechende code im adapter ist da:
              https://github.com/iobroker-community-adapters/ioBroker.telegram/blob/b94deeea6c2afdb9f37c8f05eb9b4d88e01ca4f2/main.js#L602

              bsp:

              
                  sendTo('telegram.0', {
                      chatId : getState('telegram.0.communicate.requestChatId'/*User ID of last received request*/).val,
                      text : "https://cdn.prod.www.spiegel.de/images/371e5371-21a1-4e98-818d-fa44aa58bf7a_w872_r1.77_fpx50_fpy22.jpg",
                      type: 'photo'
                });
              
              1 Reply Last reply Reply Quote 0
              • coyote
                coyote Most Active @Ralla66 last edited by

                @Ralla66 best.jpg wird immer bei Objekterkennung überschrieben. Gebe ich diesen Pfad im Browser ein, ist ja das Bild da.
                Daher verstehe ich nicht, warum er sagt "no such file or directory", das Bild ist definitv vorhanden

                N Ralla66 2 Replies Last reply Reply Quote 0
                • N
                  Nahasapee @coyote last edited by

                  @coyote vielleicht hat dein iobroker keine lese rechte?

                  coyote 1 Reply Last reply Reply Quote 0
                  • coyote
                    coyote Most Active @Nahasapee last edited by

                    @Nahasapee hm, ist ein Argument. Jetzt ist die Frage, wie gebe ich ioBroker lese Rechte, falls es daran liegt

                    N 1 Reply Last reply Reply Quote 0
                    • Ralla66
                      Ralla66 Most Active @coyote last edited by

                      @coyote
                      das ist wohl eher das hier:
                      da es ja eh auf dem anderen Rechner hinterlegt ist
                      Direkt von der Cam geht ja.

                      1 Reply Last reply Reply Quote 0
                      • N
                        Nahasapee @coyote last edited by

                        @coyote chmod o+r MyFile

                        coyote 1 Reply Last reply Reply Quote 0
                        • coyote
                          coyote Most Active @Nahasapee last edited by

                          @Nahasapee @Ralla66 aber egal von welchem Gerät im Netzwerk ich diese URL aufrufe, bekomme ich das Bild angezeigt, zumindest im Browser

                          Ralla66 N 2 Replies Last reply Reply Quote 0
                          • Ralla66
                            Ralla66 Most Active @coyote last edited by

                            @coyote
                            ja ok, dann teste Telegramm,
                            leg das Bild ab wo Telgramm läuft und rufe das ab im Browser und mit Telegramm.

                            coyote 1 Reply Last reply Reply Quote 0
                            • N
                              Nahasapee @coyote last edited by

                              @coyote hast du den code oben versucht von mir? ich kann das bild ohne zwischenspeichern verschicken!

                              coyote 2 Replies Last reply Reply Quote 0
                              • coyote
                                coyote Most Active @Ralla66 last edited by

                                @Ralla66 wenn ich es so wie im ersten Post (letzter Code Tag) abrufe und zwar nicht direkt die URL der Cam, sondern die URL mit Endung /best.jpg, dann als "cambild.jpg" unter einem Verzeichnis in ioBroker speichere und das wiederum mit Telegram verschicke, geht es ohne Probleme

                                1 Reply Last reply Reply Quote 0
                                • coyote
                                  coyote Most Active @Nahasapee last edited by

                                  @Nahasapee werde ich morgen mal testen, vllt geht das

                                  1 Reply Last reply Reply Quote 0
                                  • coyote
                                    coyote Most Active @Nahasapee last edited by

                                    @Nahasapee geht leider auch nicht.

                                    telegram.0	2020-12-08 05:56:03.874	error	(20198) Cannot send photo [chatId - 182393659]: Error: ETELEGRAM: 400 Bad Request: wrong file identifier/HTTP URL specified
                                    
                                    N 1 Reply Last reply Reply Quote 0
                                    • N
                                      Nahasapee @coyote last edited by

                                      @coyote zeig Mal dein code

                                      coyote 1 Reply Last reply Reply Quote 0
                                      • coyote
                                        coyote Most Active @Nahasapee last edited by

                                        @Nahasapee mehr ist es nicht

                                           sendTo('telegram.0', {
                                                text : "http://192.168.XX.XX:5000/garage/car/best.jpg",
                                                type: 'photo'
                                          });
                                        
                                        N 1 Reply Last reply Reply Quote 0
                                        • N
                                          Nahasapee @coyote last edited by

                                          @coyote blöde Frage aber für die xx schreibst du schon die richtige IP Adresse rein ?

                                          coyote 1 Reply Last reply Reply Quote 0
                                          • coyote
                                            coyote Most Active @Nahasapee last edited by coyote

                                            @Nahasapee 😉 natürlich

                                            EDIT: Gleicher Fehler kommt im Log, wenn der Webserver abgeschaltet ist. Seltsam.
                                            Macht es einen Unterschied, weil der im Webserver im Docker läuft?
                                            Ich verstehs eben nicht, weil ich diese URL ja von überall im Netzwerk erreichen kann

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            716
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript
                                            3
                                            29
                                            2788
                                            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