Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Blink Camera System

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Blink Camera System

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

      Ich grabe diesen Thread aus aktuellem Anlass wieder aus.

      Seit irgendwann im April hat Blinkpy nicht mehr funktioniert, weil Amazon bei der Anmeldung etwas geändert hat und dadurch jedes Mal ein neuer 2FA Code gesendet wurde. Das wurde auch auf GitHub behandelt (https://github.com/fronzbot/blinkpy/issues/917). Inzwischen dürfte es eine Lösung geben die ich hier gerne zusammenfassen möchte. Vielleicht nützt es ja jemandem.

      Aktuell muss man folgende beiden Skripte von GitHub herunterladen und bei sich im Ordner /home/<user>/.local/lib/python3.11/site-packages/blinkpy ersetzen: auth.py und blinkpy.py.

      Man erstellt einmalig ein Skript (z.B. anmelden.py) mit folgendem Inhalt:

      import asyncio
      from aiohttp import ClientSession
      from blinkpy.blinkpy import Blink
      from blinkpy.auth import Auth
      
      async def start():
          blink = Blink(session=ClientSession())
          # Can set no_prompt when initializing auth handler
          auth = Auth({"username": <your username>, "password": <your password>}, no_prompt=True)
          blink.auth = auth
          await blink.start()
          await blink.save("/opt/iobroker/blink_auth.json")
          return blink
      
      blink = asyncio.run(start())
      

      Wenn man dieses von der Console aufruft

      python3.11 anmelden.py
      

      , wird man nach seinen Anmeldedaten gefragt und erhält dann den 2FA Code welchen man angibt. Anschließend wird in /opt/iobroker die Datei blink_auth.json erstellt. Diese enthält die Anmeldedaten für künftige Abfragen. Danach kann man das Skript wenn man möchte wieder löschen.

      Um jetzt ein Bild abzufragen braucht man folgendes Skript:

      import asyncio
      from aiohttp import ClientSession
      from blinkpy.blinkpy import Blink
      from blinkpy.auth import Auth
      from blinkpy.helpers.util import json_load
      
      async def start():
          blink = Blink()
          auth = Auth(await json_load("/opt/iobroker/blink_auth.json"))   # Anmeldeinformationen laden
          blink.auth = auth   # Anmeldeinformationen senden
          await blink.start()   # Verbindung starten
          camera = blink.cameras['<Kameraname>']   # Kameraname angeben
          await camera.snap_picture()   # Bild aufnehmen
          await blink.refresh()   # Daten vom Blink-Server abfragen
          await camera.image_to_file('/opt/iobroker/blink.jpg')   # Bild speichern
          return blink
      
      blink = asyncio.run(start())
      

      Leider ist es mir nicht gelungen das Skript mit exec (JS oder Blockly) wegen fehlender Berechtigung aufzurufen. Ich habe das dann mit dem Linux-Control Adapter gelöst.

      Judas2016 created this issue in fronzbot/blinkpy

      closed PIN Code Rejection #917

      F D 2 Replies Last reply Reply Quote 1
      • F
        Flowski @Dr. Bakterius last edited by

        gibt es mittlerweile eine Möglichkeit auf die Bilder der Cam zuzugreifen??

        Dr. Bakterius 1 Reply Last reply Reply Quote 0
        • Dr. Bakterius
          Dr. Bakterius Most Active @Flowski last edited by

          @flowski Geht doch wie oben beschrieben.

          F 2 Replies Last reply Reply Quote 1
          • F
            Flowski @Dr. Bakterius last edited by

            @dr-bakterius said in Blink Camera System:

            @flowski Geht doch wie oben beschrieben.

            oh wow das habe ich wohl übersehen, bzw. inhaltlich garnicht wirklich begriffen, befinde mich noch in den Anfängen des ganzen... wie zuverlässig läuft das ganze? Sind die Bilder auch schnell verfügbar dass es auch Sinn macht?

            Dr. Bakterius 1 Reply Last reply Reply Quote 0
            • Dr. Bakterius
              Dr. Bakterius Most Active @Flowski last edited by

              @flowski Was ist schnell? Ich lasse mir die Bilder mit Pushover ans Handy schicken. Das dauert etwa 15 Sekunden. Der Verbinungsaufbau meiner Blink Outdoor dauert alleine schon 10-12 Sekunden.

              F 1 Reply Last reply Reply Quote 0
              • F
                Flowski @Dr. Bakterius last edited by

                @dr-bakterius : 15 sek. empfinde ich als schnell von daher würde das passen.

                1 Reply Last reply Reply Quote 0
                • F
                  Flowski @Dr. Bakterius last edited by

                  @dr-bakterius gibt es da irgendwo eine Anleitung für Dummies zu? Mit meinem Wissensstand kriege ich das leider nicht gebacken vermute ich 😞

                  Dr. Bakterius 1 Reply Last reply Reply Quote 0
                  • L
                    line last edited by

                    Hallo, kann mir jemand sagen, ob sich die Blink Outdoor Kamaras nun in den Iobroker integrieren lassen mit einem Adapter? Also ich will nur in meinem IQontrol das bild von der Kamara sehen. Ist dies nun möglich? Momentan sind Prime Days und preislich interessant.

                    1 Reply Last reply Reply Quote -1
                    • Dr. Bakterius
                      Dr. Bakterius Most Active @Flowski last edited by

                      @flowski Einfach probieren. Wenn es wo hakt, beschreiben was nicht geht (Fehlermeldung oder Screenshot). Eine Schritt-für-Schritt Anleitung kenne ich nicht.

                      L F 2 Replies Last reply Reply Quote 1
                      • L
                        line @Dr. Bakterius last edited by

                        @dr-bakterius dann entscheide ich mich evt. Doch lieber für eine IP Kamera. Hoffentlich geht das besser, wie die von Blink

                        Dr. Bakterius 1 Reply Last reply Reply Quote 0
                        • Dr. Bakterius
                          Dr. Bakterius Most Active @line last edited by

                          @line sagte in Blink Camera System:

                          lieber für eine IP Kamera

                          Ja, wenn das in deiner Situation möglich ist, ist das sicher die bessere Wahl. Ich würde aber darauf achten nicht von einer Cloud abhängig zu sein. Also lieber ein paar Euro mehr investieren.

                          1 Reply Last reply Reply Quote 0
                          • F
                            Flowski @Dr. Bakterius last edited by

                            @dr-bakterius danke für das Angebot.. werde mich morgen dransetzen. Zum Verständnis, das erstellen der Scripte erledige ich alles unter Scripte -> Java Script... und für das Aufrufen dann über den Linux controller?

                            Dr. Bakterius 1 Reply Last reply Reply Quote 0
                            • Dr. Bakterius
                              Dr. Bakterius Most Active @Flowski last edited by

                              @flowski Nein, du installierst auf der Linux-Konsole erst Python und dann mittels pip install blinkpy die eigentliche Software. Ich glaube, dass der Austausch der beiden Dateien inzwischen nicht mehr notwendig sein wird.

                              Danach erstellst du (z.B. mit nano) die beiden Skripte die du natürlich auf deine Gegebenheiten anpasst. Das erste Skript musst du nur einmal aufrufen um die Anmeldedaten zu speichern. Das zweite kannst du dann per cron, händisch oder mit dem linux-control Adapter aufrufen wenn du eine Aufnahme speichern möchtest. Dieses Bild kannst du dann wie gewünscht versenden oder archivieren.

                              Also mit der Konsole solltest du nicht auf Kriegsfuß stehen... 😊

                              V 1 Reply Last reply Reply Quote 1
                              • V
                                varg @Dr. Bakterius last edited by varg

                                Frickel schon bei der Installation seit ner Stunde rum 👌

                                pi@iobroker:~ $ pip install blinkpy
                                error: externally-managed-environment
                                
                                × This environment is externally managed
                                ╰─> To install Python packages system-wide, try apt install
                                    python3-xyz, where xyz is the package you are trying to
                                    install.
                                
                                    If you wish to install a non-Debian-packaged Python package,
                                    create a virtual environment using python3 -m venv path/to/venv.
                                    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
                                    sure you have python3-full installed.
                                
                                    For more information visit http://rptl.io/venv
                                
                                note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
                                hint: See PEP 668 for the detailed specification.
                                pi@iobroker:~ $ ^C
                                
                                

                                Egal was ich mache ich kann das ding nicht installieren. Evtl. hat mir jemand einen Tip ?

                                Dr. Bakterius V 2 Replies Last reply Reply Quote 0
                                • Dr. Bakterius
                                  Dr. Bakterius Most Active @varg last edited by

                                  @varg Steht doch in der Meldung. Du benötigst python. Hast du das installiert?

                                  V 1 Reply Last reply Reply Quote 0
                                  • V
                                    varg @Dr. Bakterius last edited by varg

                                    @dr-bakterius klar auch die build essentials sind drauf. Kann aber in dem Ordner nix installieren. Konnte auch keinen Alternativbefehl finden.

                                    Dr. Bakterius 1 Reply Last reply Reply Quote 0
                                    • Dr. Bakterius
                                      Dr. Bakterius Most Active @varg last edited by

                                      @varg Dann vielleicht diesem Hinweis folgen:

                                      You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.

                                      Aber vorher ein Backup machen!

                                      V 1 Reply Last reply Reply Quote 0
                                      • V
                                        varg @Dr. Bakterius last edited by

                                        @dr-bakterius ok danke aber das folgende machts auch nicht besser ;(

                                        pi@iobroker:~ $ pip install blinkpy --break-system-packages
                                        Defaulting to user installation because normal site-packages is not writeable
                                        Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
                                        Collecting blinkpy
                                          Downloading https://www.piwheels.org/simple/blinkpy/blinkpy-0.23.0-py3-none-an                                                                                                                                                             y.whl (30 kB)
                                        Collecting python-dateutil>=2.8.1
                                          Downloading https://www.piwheels.org/simple/python-dateutil/python_dateutil-2.                                                                                                                                                             9.0.post0-py2.py3-none-any.whl (229 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 2.7 MB/s eta 0:00:00
                                        Requirement already satisfied: requests>=2.24.0 in /usr/lib/python3/dist-package                                                                                                                                                             s (from blinkpy) (2.28.1)
                                        Collecting python-slugify>=4.0.1
                                          Downloading https://www.piwheels.org/simple/python-slugify/python_slugify-8.0.                                                                                                                                                             4-py3-none-any.whl (10 kB)
                                        Collecting sortedcontainers~=2.4.0
                                          Downloading https://www.piwheels.org/simple/sortedcontainers/sortedcontainers-                                                                                                                                                             2.4.0-py2.py3-none-any.whl (29 kB)
                                        Collecting aiohttp>=3.8.4
                                          Downloading aiohttp-3.11.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_a                                                                                                                                                             arch64.whl (1.7 MB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 5.8 MB/s eta 0:00:00
                                        Collecting aiofiles>=23.1.0
                                          Downloading https://www.piwheels.org/simple/aiofiles/aiofiles-24.1.0-py3-none-                                                                                                                                                             any.whl (15 kB)
                                        Collecting aiohappyeyeballs>=2.3.0
                                          Downloading https://www.piwheels.org/simple/aiohappyeyeballs/aiohappyeyeballs-                                                                                                                                                             2.6.1-py3-none-any.whl (15 kB)
                                        Collecting aiosignal>=1.1.2
                                          Downloading https://www.piwheels.org/simple/aiosignal/aiosignal-1.3.2-py2.py3-                                                                                                                                                             none-any.whl (7.6 kB)
                                        Collecting attrs>=17.3.0
                                          Downloading https://www.piwheels.org/simple/attrs/attrs-25.3.0-py3-none-any.wh                                                                                                                                                             l (63 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.8/63.8 kB 1.4 MB/s eta 0:00:00
                                        Collecting frozenlist>=1.1.1
                                          Downloading frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_                                                                                                                                                             aarch64.whl (276 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 276.4/276.4 kB 5.0 MB/s eta 0:00:00
                                        Collecting multidict<7.0,>=4.5
                                          Downloading multidict-6.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_a                                                                                                                                                             arch64.whl (135 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.7/135.7 kB 4.1 MB/s eta 0:00:00
                                        Collecting propcache>=0.2.0
                                          Downloading propcache-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_a                                                                                                                                                             arch64.whl (232 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.4/232.4 kB 5.0 MB/s eta 0:00:00
                                        Collecting yarl<2.0,>=1.17.0
                                          Downloading yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch                                                                                                                                                             64.whl (340 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 340.6/340.6 kB 4.6 MB/s eta 0:00:00
                                        Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from                                                                                                                                                              python-dateutil>=2.8.1->blinkpy) (1.16.0)
                                        Collecting text-unidecode>=1.3
                                          Downloading https://www.piwheels.org/simple/text-unidecode/text_unidecode-1.3-                                                                                                                                                             py2.py3-none-any.whl (78 kB)
                                             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 kB 1.1 MB/s eta 0:00:00
                                        Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from                                                                                                                                                              yarl<2.0,>=1.17.0->aiohttp>=3.8.4->blinkpy) (3.3)
                                        Installing collected packages: text-unidecode, sortedcontainers, python-slugify,                                                                                                                                                              python-dateutil, propcache, multidict, frozenlist, attrs, aiohappyeyeballs, aio                                                                                                                                                             files, yarl, aiosignal, aiohttp, blinkpy
                                          WARNING: The script slugify is installed in '/home/pi/.local/bin' which is not                                                                                                                                                              on PATH.
                                          Consider adding this directory to PATH or, if you prefer to suppress this warn                                                                                                                                                             ing, use --no-warn-script-location.
                                        Successfully installed aiofiles-24.1.0 aiohappyeyeballs-2.6.1 aiohttp-3.11.14 ai                                                                                                                                                             osignal-1.3.2 attrs-25.3.0 blinkpy-0.23.0 frozenlist-1.5.0 multidict-6.2.0 propc                                                                                                                                                             ache-0.3.0 python-dateutil-2.9.0.post0 python-slugify-8.0.4 sortedcontainers-2.4                                                                                                                                                             .0 text-unidecode-1.3 yarl-1.18.3
                                        pi@iobroker:~ $ await Blink.start()
                                        -bash: syntax error near unexpected token `('
                                        pi@iobroker:~ $ import asyncio
                                        -bash: import: command not found
                                        pi@iobroker:~ $ cd blinkpy
                                        -bash: cd: blinkpy: No such file or directory
                                        
                                        
                                        Dr. Bakterius 1 Reply Last reply Reply Quote 0
                                        • Dr. Bakterius
                                          Dr. Bakterius Most Active @varg last edited by

                                          @varg Die Befehle ruft man nicht in der Konsole auf sondern per Python-Skript. Zum Speichern eines Bildes sieht es bei mir so aus (abgelegt unter /opt/iobroker/bild.py mit den Rechten 674:

                                          import asyncio
                                          from aiohttp import ClientSession
                                          from blinkpy.blinkpy import Blink
                                          from blinkpy.auth import Auth
                                          from blinkpy.helpers.util import json_load
                                          
                                          async def start():
                                              blink = Blink()
                                              auth = Auth(await json_load("/opt/iobroker/blink_auth.json"))
                                              blink.auth = auth
                                              await blink.start()
                                              camera = blink.cameras['Eingangstuere']
                                              await camera.snap_picture()       # Take a new picture with the camera
                                              await blink.refresh()             # Get new information from server
                                              await camera.image_to_file('/opt/iobroker/blink.jpg')
                                              return blink
                                          
                                          blink = asyncio.run(start())
                                          

                                          Wie man die blink_auth.json erstellt, habe ich weiter oben schon beschrieben.

                                          Der Aufruf mit Blockly wird dann mit diesem Befehl ausgeführt:
                                          Screenshot 2025-03-21 085159.png

                                          So kannst du auch auf in der Konsole einen Test starten.

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            Dette @Dr. Bakterius last edited by

                                            Leider ist es mir nicht gelungen das Skript mit exec (JS oder Blockly) wegen fehlender Berechtigung aufzurufen. Ich habe das dann mit dem Linux-Control Adapter gelöst.

                                            Daran bin ich auch fast gestorben, denn auch mit dem Linux-Control klappt es bei mir nicht.

                                            Die einfache Lösung:
                                            Man muss blinkpy mit dem user "iobroker" installieren:

                                            sudo -H -u iobroker pip install blinkpy
                                            

                                            Danach kann man das Python Skript normal via exec aufrufen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            804
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            blink xt camera
                                            63
                                            406
                                            97212
                                            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