Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Bild versand

    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

    Bild versand

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

      @totocotonio sieht ok aus,
      keine Ahnung, im Moment habe ich keine Idee.

      Aus das Log des entsprechenden Telegram Adapters auf Debug zu stellen und dann noch mal senden und schauen was das Log sagt.

      Die Bilder sind auch wirklich gültige Bilder? Wenn du dir diese mal ansiehst? Nicht das der Dateityp nicht - mehr - stimmt.
      Hattest du schon im ersten Post geschrieben das du die Bilder kontrolliert hast.

      Text senden geht nehme ich an.

      1 Reply Last reply Reply Quote 0
      • haus-automatisierung
        haus-automatisierung Developer Most Active last edited by

        Warum überhaupt noch wget? Dafür habe ich doch die httpGet-Aktionen zur Verfügung gestellt 😞
        Geht mittlerweile alles ohne exec und wget...

        totocotonio 2 Replies Last reply Reply Quote 0
        • totocotonio
          totocotonio @haus-automatisierung last edited by

          @haus-automatisierung

          Hi,
          kannst du mir mal ein Beispiel geben?

          haus-automatisierung 1 Reply Last reply Reply Quote 0
          • totocotonio
            totocotonio @haus-automatisierung last edited by

            @haus-automatisierung

            Ich bin da etwas ratlos und würde auch gerne auf Ursachenforschung gehen.

            J 1 Reply Last reply Reply Quote 0
            • haus-automatisierung
              haus-automatisierung Developer Most Active @totocotonio last edited by

              @totocotonio sagte in Bild versand:

              kannst du mir mal ein Beispiel geben?

              Hier ein Screenshot aus dem Kurs:

              telegram.jpg

              MartinP totocotonio 2 Replies Last reply Reply Quote 1
              • J
                J_Paul @totocotonio last edited by

                @totocotonio
                Es liegt am Bild (danke fürs zu schicken) und damit ist es egal, auf welche Weise du es abholst.
                Wenn man dein Bild in Paint ohne etwas zu ändern unter anderem Namen speicherst, dann lässt es sich über Telegram verschicken. Beide haben 640x480, 96dpi, beide unkomprimiert, das Original hat ca. 40 kB, die Kopie 70 kB. Versuch mal ob du bei den Einstellungen beim Octoprint was erreichen kannst.

                BananaJoe totocotonio 2 Replies Last reply Reply Quote 0
                • MartinP
                  MartinP @haus-automatisierung last edited by

                  @haus-automatisierung sagte in Bild versand:

                  @totocotonio sagte in Bild versand:

                  kannst du mir mal ein Beispiel geben?

                  Hier ein Screenshot aus dem Kurs:

                  telegram.jpg

                  Das wäre ja eine "Aufräum-Aktion" wert ... wie pingelig ist das get bzgl Zertifikaten... wget musste ein wenig "überredet" werden..

                  82380618-4f74-4c8d-815f-f67cab5f4d37-grafik.png

                  haus-automatisierung 1 Reply Last reply Reply Quote 0
                  • BananaJoe
                    BananaJoe Most Active @J_Paul last edited by BananaJoe

                    @j_paul sagte in Bild versand:

                    @totocotonio
                    Es liegt am Bild (danke fürs zu schicken) und damit ist es egal, auf welche Weise du es abholst.
                    Wenn man dein Bild in Paint ohne etwas zu ändern unter anderem Namen speicherst, dann lässt es sich über Telegram verschicken. Beide haben 640x480, 96dpi, beide unkomprimiert, das Original hat ca. 40 kB, die Kopie 70 kB. Versuch mal ob du bei den Einstellungen beim Octoprint was erreichen kannst.

                    Als Workaround (Pfuschen):

                    • ImageMagick nachinstallieren auf der ioBroker Maschine (Befehle für Debian gemäß https://linuxcapable.com/how-to-install-imagemagick-on-debian-linux/)
                    sudo apt install libpng-dev libjpeg-dev libtiff-dev
                    sudo apt install imagemagick
                    

                    und dann ein exec in das execwelches den Befehl convert aufruft und das Bild umwandelt, so etwas wie

                    convert 1.jpg 1.png
                    

                    Man könnte auch die Auflösung oder Qualität ändern (statt das Format)

                    totocotonio 2 Replies Last reply Reply Quote 0
                    • haus-automatisierung
                      haus-automatisierung Developer Most Active @MartinP last edited by

                      @martinp sagte in Bild versand:

                      wie pingelig ist das get bzgl Zertifikaten...

                      Wird validiert. Die Validierung deaktivieren geht aktuell nur per JavaScript und ist in Blockly nicht umgesetzt.

                      MartinP 1 Reply Last reply Reply Quote 0
                      • totocotonio
                        totocotonio @J_Paul last edited by

                        @j_paul

                        Danke Jörg.

                        1 Reply Last reply Reply Quote 0
                        • totocotonio
                          totocotonio @haus-automatisierung last edited by totocotonio

                          @haus-automatisierung
                          Danke Mathias für den Hinweis.

                          fc03a61a-9ee6-4839-b6f8-3c666b5dc25c-grafik.png

                          Geht leider auch nicht.

                          1 Reply Last reply Reply Quote 0
                          • totocotonio
                            totocotonio @BananaJoe last edited by

                            @bananajoe
                            Das wäre eine Möglichkeit.

                            Ich fange jetzt erst einmal damit an, was bei Octoprint passiert ist.
                            Es hat ja immer funktioniert. Da muss also was mit dem Bild passiert sein.

                            Ich gebe auf jeden Fall Rückmeldung

                            1 Reply Last reply Reply Quote 1
                            • MartinP
                              MartinP @haus-automatisierung last edited by MartinP

                              @haus-automatisierung Danke - eine Ausrede, da vorerst nicht aufzuräumen 😉

                              Der Snapshot kommt direkt von einer Reolink-Kamera... vielleicht kann man sich da ja einen Workaround mit eigenem DNS (oder schlichtweg einer hosts-Datei) und einer URL passend zum Zertifikat basteln ...

                              Sind aber aktuell schon zwei Reolink-Kameras ...

                              Habe mal das Zertifikat der beiden Kameras unter die Lupe genommen

                              C:\> certutil -dump certificate.pem
                              X.509-Zertifikat:
                              Version: 1
                              Seriennummer: 01
                              Signaturalgorithmus:
                                  Algorithmus Objekt-ID: 1.2.840.113549.1.1.11 sha256RSA
                                  Algorithmusparameter:
                                  05 00
                              Aussteller:
                                  E=CERTIFICATE@CERTIFICATE.com
                                  CN=CERTIFICATE
                                  OU=CERTIFICATE
                                  O=CERTIFICATE
                                  L=SZ
                                  S=GD
                                  C=CN
                                Namenshash (sha1): 8c30e4da4a81d52b835743fc261edeb26b0ac4da
                                Namenshash (md5): 606efb5bd531bd73d791f6522a1d22f9
                              
                               Nicht vor: 12.05.2023 11:36
                               Nicht nach: 07.05.2043 11:36
                              
                              Antragsteller:
                                  E=CERTIFICATE@CERTIFICATE.com
                                  CN=CERTIFICATE
                                  OU=CERTIFICATE
                                  O=CERTIFICATE
                                  L=SZ
                                  S=GD
                                  C=CN
                                Namenshash (sha1): 8c30e4da4a81d52b835743fc261edeb26b0ac4da
                                Namenshash (md5): 606efb5bd531bd73d791f6522a1d22f9
                              
                              Öffentlicher Schlüssel-Algorithmus:
                                  Algorithmus Objekt-ID: 1.2.840.113549.1.1.1 RSA (RSA_SIGN)
                                  Algorithmusparameter:
                                  05 00
                              Länge des öffentlichen Schlüssels: 2048 Bits
                              Öffentlicher Schlüssel: Nicht verwendete Bits = 0
                                  0000  30 82 01 0a 02 82 01 01  00 bb 7a 3c d7 3c 95 40
                                  0010  70 80 a0 44 98 fb 77 03  1c ef 02 5c 0f af 99 b0
                                  0020  61 08 0d b0 a9 d0 14 38  e7 2b 95 08 04 74 85 61
                                  0030  f7 28 ee 37 00 79 c7 cf  81 a9 b8 0d ec 46 e7 be
                                  0040  a6 ba 15 2c 2b a9 0e fa  38 23 f4 51 ca 3a f6 4b
                                  0050  c5 eb 3e 43 ff 11 04 e9  bc a9 f2 1f 2a 22 1e 08
                                  0060  c8 d6 5b 90 e8 23 62 bc  a3 ab bd bc 8c 29 f0 21
                                  0070  4c 03 bd 17 94 56 ca db  b2 34 af 45 19 54 89 18
                                  0080  14 27 4e 13 a0 f4 03 2a  9a 74 0a 99 d3 c2 3e 14
                                  0090  ca 23 66 1e 43 1c 4a ce  e7 e8 31 75 2c 96 6a df
                                  00a0  97 fb 09 b5 63 25 fa 3e  02 27 0d 4b 0e 41 d3 e6
                                  00b0  86 47 1c 57 00 74 00 45  3e 8e c7 74 a2 8e e3 dd
                                  00c0  fa 13 5b e3 f2 29 d0 d2  fc da 4d 74 70 aa 28 82
                                  00d0  d0 32 a0 b6 9e c1 83 58  f8 63 37 e7 eb 49 2f 00
                                  00e0  31 cd 30 a8 33 4b 5b 61  3d b6 4c af 91 31 97 7b
                                  00f0  a6 d4 1e e5 7a d5 6e 3f  f0 80 7e f2 e8 7e 68 bd
                                  0100  95 16 54 7d c8 68 50 1d  65 02 03 01 00 01
                              Zertifikaterweiterungen: 0
                              Signaturalgorithmus:
                                  Algorithmus Objekt-ID: 1.2.840.113549.1.1.11 sha256RSA
                                  Algorithmusparameter:
                                  05 00
                              Signatur: Nicht verwendete Bits=0
                                  0000  bb 27 8d c1 d2 1f 21 56  0d 61 1e 36 be 9f 70 cc
                                  0010  49 de 94 37 1a 47 7f 2f  0f 3d ce fa 80 73 ce 94
                                  0020  4b e3 4c d7 4d 02 e6 7e  74 22 1e cb 07 af 94 ae
                                  0030  5d 49 a2 de 91 c6 17 f6  7a cb ee 8d 30 32 0c 5d
                                  0040  f9 5a 64 8d 79 1b 2b a4  28 99 f9 3c 1b 1c 7e 16
                                  0050  25 88 5e 7b fc dd b5 d6  c3 16 cd 20 a3 65 f3 0f
                                  0060  a2 36 a3 6a eb 74 29 dc  4f fa d7 a4 6e 6d c9 9d
                                  0070  9f f2 0f 1d c5 2e 5e 2e  37 b3 f0 e0 37 ca f0 f7
                                  0080  99 d8 47 7d 65 d9 9a 8c  c4 3a e6 df 97 81 3a 80
                                  0090  ad 10 23 2c 76 94 d3 7f  36 6b f2 09 68 3a bb a7
                                  00a0  04 a1 fd 4d 51 e2 c6 d8  13 86 ae 9a ad 13 47 9d
                                  00b0  4f 1f 9f 4e 52 05 b0 72  7a e8 de 29 6d 05 9f 9d
                                  00c0  c8 bc 0a 90 37 d8 fd 62  9e 79 b0 14 b8 95 ff 0e
                                  00d0  15 c6 d7 5c 42 58 9b 7b  43 20 c3 9d b0 63 d4 3d
                                  00e0  7b 54 aa 6f ef 2c dd 92  65 52 65 84 9b b6 62 03
                                  00f0  6f f8 e2 7b 5e 5c be 21  d3 f2 9a e3 86 31 05 5e
                              Mögliches Stammzertifikat: Antragsteller stimmt mit dem Aussteller überein, die Signaturüberprüfung ist jedoch fehlgeschlagen: c000a000
                              Schlüssel-ID-Hash(rfc-sha1): 03adbc8bcb86603f51966ab575bdfbe5162cb2a0
                              Schlüssel-ID-Hash(sha1): 34685c10923c3cb37b0016727a0f4bfae4cbb2db
                              Schlüssel-ID-Hash(bcrypt-sha1): dc23c04a86d3756a28aa64f336b64015f70c58fd
                              Schlüssel-ID-Hash(bcrypt-sha256): bacb41f8b26978c5f38972d5afb1466eef577d27e854e8e620c81a2d8a53986f
                              Schlüssel-ID-Hash(md5): e5ed45bb65c078a13444b98762ed3a21
                              Schlüssel-ID-Hash(sha256): b8354843a3f64e5bc705b9df0c7b0d8bc645d4bbdcb48d340be4f176cda11ae7
                              Schlüssel-ID-Hash(pin-sha256): pnwMqh30qaq4iVkysVTZ2xU0g1YrOA5vTUVL9Tbf3MU=
                              Schlüssel-ID-Hash(pin-sha256-hex): a67c0caa1df4a9aab8895932b154d9db153483562b380e6f4d454bf536dfdcc5
                              Zertifikathash(md5): 759c6764d15b1eac3d2e97a564c540c9
                              Zertifikathash(sha1): c3611265dde2ff12aec1494b16882aa10624038e
                              Zertifikathash(sha256): d0f5937fdf67bb73f342b5abd108bc33843ee55af3641a48a83c453a7b884d40
                              Signaturhash: c4e34e8e50e2547b235d99146660b2d60429ac351e7ae7533b98de8069f47d44
                              CertUtil: -dump-Befehl wurde erfolgreich ausgeführt.
                              

                              Da wird man wohl wenig Glück haben, sich eine Fake-URL in seine hosts - datei zu basteln ...

                              Habe es mal versucht

                              die certificate.pem Datei mit dem Broweser heruntergeladen, und auf den iobroker Linux LXC geschoben:

                              martin@iobroker-test-sicher:/usr/local/share/ca-certificates$ mv reolink.pem reolink.crt
                              martin@iobroker-test-sicher:/usr/local/share/ca-certificates$ sudo mv reolink.pem reolink.crt
                              martin@iobroker-test-sicher:/usr/local/share/ca-certificates$ ls
                              reolink.crt
                              martin@iobroker-test-sicher:/usr/local/share/ca-certificates$ cd ..
                              martin@iobroker-test-sicher:/usr/local/share$ bash update-ca-certificates
                              bash: update-ca-certificates: No such file or directory
                              martin@iobroker-test-sicher:/usr/local/share$ sudo update-ca-certificates
                              Updating certificates in /etc/ssl/certs...
                              rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
                              1 added, 0 removed; done.
                              Running hooks in /etc/ca-certificates/update.d...
                              done.
                              martin@iobroker-test-sicher:/usr/local/share$ 
                              

                              Hilft aber erstmal nicht ...

                              martin@iobroker-test-sicher:/usr/local/share$ wget 'https://192.168.2.190/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=Martin&passwordxxxxxxxxxxxxxxx&width=640&height=480'
                              --2024-10-22 13:38:38--  https://192.168.2.190/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=Martin&password=xxxxxxxxxxxxxx&width=640&height=480
                              Connecting to 192.168.2.190:443... connected.
                              The certificate's owner does not match hostname '192.168.2.190'
                              martin@iobroker-test-sicher:/usr/local/share$ 
                              

                              jetzt mit hosts Einträgen

                              192.168.2.190 garage.CERTIFICATE garage.CERTIFICATE.cn garage.CERTIFICATE.com garage.CERTIFICATE.CERTIFICATE
                              
                              

                              nichts funktioniert

                              martin@iobroker-test-sicher:~$ wget --verbose 'https://garage.CERTIFICATE#/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&userq=Martin&password=xxxxxxxxxxxxxxxx!&width=640&height=480'
                              --2024-10-22 14:01:37--  https://garage.certificate/
                              Resolving garage.certificate (garage.certificate)... 192.168.2.190
                              Connecting to garage.certificate (garage.certificate)|192.168.2.190|:443... connected.
                              The certificate's owner does not match hostname 'garage.certificate'
                              martin@iobroker-test-sicher:~$ wget --verbose 'https://garage.CERTIFICATE.com#/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&userq=Martin&passwordxxxxxxxxxxxxxxxx!&width=640&height=480'
                              --2024-10-22 14:01:49--  https://garage.certificate.com/
                              Resolving garage.certificate.com (garage.certificate.com)... 192.168.2.190
                              Connecting to garage.certificate.com (garage.certificate.com)|192.168.2.190|:443... connected.
                              The certificate's owner does not match hostname 'garage.certificate.com'
                              martin@iobroker-test-sicher:~$ wget --verbose 'https://garage.CERTIFICATE.cn#/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&userq=Martin&password=xxxxxxxxxxxxx!&width=640&height=480'
                              --2024-10-22 14:01:58--  https://garage.certificate.cn/
                              Resolving garage.certificate.cn (garage.certificate.cn)... 192.168.2.190
                              Connecting to garage.certificate.cn (garage.certificate.cn)|192.168.2.190|:443... connected.
                              The certificate's owner does not match hostname 'garage.certificate.cn'
                              martin@iobroker-test-sicher:~$ wget --verbose 'https://garage.CERTIFICATE.certificate#/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&userq=Martin&passworxxxxxxxxxxx!&width=640&height=480'
                              --2024-10-22 14:02:10--  https://garage.certificate.certificate/
                              Resolving garage.certificate.certificate (garage.certificate.certificate)... 192.168.2.190
                              Connecting to garage.certificate.certificate (garage.certificate.certificate)|192.168.2.190|:443... connected.
                              The certificate's owner does not match hostname 'garage.certificate.certificate'
                              martin@iobroker-test-sicher:~$ 
                              
                              haus-automatisierung 1 Reply Last reply Reply Quote 0
                              • haus-automatisierung
                                haus-automatisierung Developer Most Active @MartinP last edited by

                                Logisch. Kannst Dir ja keine Domain ausdenken und darauf ein beliebiges Zertifikat ausliefern:

                                @martinp sagte in Bild versand:

                                The certificate's owner does not match hostname 'garage.certificate'

                                MartinP 1 Reply Last reply Reply Quote 0
                                • MartinP
                                  MartinP @haus-automatisierung last edited by MartinP

                                  @haus-automatisierung

                                  Bei EINER Kamera würde es so funktionieren ...

                                  hosts Eintrag

                                  192.168.2.190 certificate 
                                  

                                  Wget-Aufruf

                                  martin@iobroker-test-sicher:~$ wget --verbose 'https://certificate#/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&userq=Martin&password=xxxxxxxxxxxx&width=640&height=480'
                                  --2024-10-22 14:17:25--  https://certificate/
                                  Resolving certificate (certificate)... 192.168.2.190
                                  Connecting to certificate (certificate)|192.168.2.190|:443... connected.
                                  HTTP request sent, awaiting response... 200 OK
                                  Length: 23193 (23K) [text/html]
                                  Saving to: 'index.html.1'
                                  

                                  Leider ist das Zertifikat der zweiten Kamera auch auf die Dummy-Domain "certificate" ausgestellt ...

                                  Wenn die die Zertifikate jeder einzelnen Kamera auf "<seriennummer>.certificate" ausstellen würden, wäre das ja eine Lösung ....
                                  oder es in den Zertifikaten eine Liste von Domains gäbe, z. B. "0.certifikate" bis "255.certificate"

                                  Muss mich wohl noch weiter mit dem Zertifikationsgedöns auseinandersetzen ...

                                  dachte, wenn man ein Zertifikat für" blablubb.de" hat, gilt das auch für "dies.blablubb.de" und "das.blablubb.de".
                                  Gilt aber leider nur für "blablubb.de/dies" und "blablubb.de/das"
                                  Dafür gibt es dann keine "hosts" Tricks 😉

                                  haus-automatisierung 1 Reply Last reply Reply Quote 0
                                  • haus-automatisierung
                                    haus-automatisierung Developer Most Active @MartinP last edited by

                                    @martinp sagte in Bild versand:

                                    dachte, wenn man ein Zertifikat für" blablubb.de" hat, gilt das auch für "dies.blablubb.de" und "das.blablubb.de".

                                    Dazu wäre ein Wildcard-Zertifikat notwendig. Wir kapern aber gerade den Thread mit OT. Daher bin ich raus 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • totocotonio
                                      totocotonio @BananaJoe last edited by

                                      @bananajoe

                                      Hi,
                                      wie Jörg bereits gesagt hat, liegt es definitiv am Bild.

                                      Ich weiß nur noch nicht, warum!

                                      Es ging ja immer.

                                      Ich habe jetzt mit verschiedenen Auflösungen getestet, immer das gleiche, das Bild wird nicht versendet, obwohl es auf dem Server gelandet ist.

                                      haus-automatisierung 1 Reply Last reply Reply Quote 0
                                      • haus-automatisierung
                                        haus-automatisierung Developer Most Active @totocotonio last edited by

                                        @totocotonio sagte in Bild versand:

                                        immer das gleiche, das Bild wird nicht versendet

                                        Was sagt denn file /opt/iobroker/Bild_Kamera/1.jpg

                                        PS: Man arbeitet nicht als root. Nie. Das ist aber ein anderes Thema und hat nichts mit dem Problem zu tun. Leg Dir zur zeitnah einen neuen Benutzer an und arbeite mit sudo (falls nötig).

                                        totocotonio 1 Reply Last reply Reply Quote 0
                                        • totocotonio
                                          totocotonio @haus-automatisierung last edited by

                                          @haus-automatisierung

                                          Hi,
                                          arbeite normal nicht als root. Hatte nur getestet.

                                          Hier das Ergebnis.

                                          torsten@iobdebian:~$ file /opt/iobroker/Bild_Kamera/8.jpg
                                          /opt/iobroker/Bild_Kamera/8.jpg: JPEG image data, baseline, precision 8, 640x480, components 3
                                          
                                          
                                          haus-automatisierung 1 Reply Last reply Reply Quote 0
                                          • haus-automatisierung
                                            haus-automatisierung Developer Most Active @totocotonio last edited by haus-automatisierung

                                            @totocotonio Das sieht doch aber erstmal gut aus. Bleibt die Frage, was Telegram für ein Problem mit dem Bild hat.

                                            Aber alle Themen die man zu IMAGE_PROCESS_FAILED findet, deuten auf defektes Bild hin. z.B. auch https://github.com/yagop/node-telegram-bot-api/issues/375

                                            Wie auch immer sich das äußert. Kenne mich mit JPEG im Detail nicht aus.

                                            almeynman created this issue in yagop/node-telegram-bot-api

                                            closed Trouble rendering image and audio from aws s3 #375

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            827
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            32
                                            1782
                                            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