Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Proxmox
    5. Proxmox LXC mit Frigate

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    Proxmox LXC mit Frigate

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      martinschm @Wal last edited by

      @wal said in Proxmox LXC mit Frigate:

      @martinschm ,
      der USB Stick war zu der Zeit bei Pollin nicht lieferbar und die Dual CPU war auch noch billiger, deshalb habe ich mich darauf eingelassen. Ein USB Stick genügt, bei 1-2 Kameras genügt sogar die Softwareerkennung.

      Danke für die schnelle Antwort. Aktuell liegt der USB Stick bei um die 80€

      Kannte bisher nur die USB Variante. Hab ein Intel Nuc (BOXNUC6CAYH), müsste mal schauen ob ich da auch eine der anderen Varianten nutzen kann.

      Wal 1 Reply Last reply Reply Quote 0
      • Wal
        Wal Developer @martinschm last edited by

        @martinschm ,
        man muss auch bedenken das die Corals nur für die Objekterkennung sind und nicht für das Transkoding.
        Die CPU Last wenn ein Stream gewandelt werden muss hat man immer noch.

        M 1 Reply Last reply Reply Quote 0
        • M
          martinschm @Wal last edited by

          @wal said in Proxmox LXC mit Frigate:

          @martinschm ,
          man muss auch bedenken das die Corals nur für die Objekterkennung sind und nicht für das Transkoding.
          Die CPU Last wenn ein Stream gewandelt werden muss hat man immer noch.

          Aktuell hab ich nur eine Kamera, ist alles noch experimentativ. Zwei weitere liegen hier aber schon. Um halbwegs alles im Blick zu haben würden 6 oder so Sinn machen. Mir geht's aber eigentlich nichts ums anschauen sondern eher drum, Infos zu bekommen wenn sich was bewegt.

          Hat dein Einwand etwas mit der Wahl des Coral Produkts zu tun oder war es eher ein allgemeiner Hinweis?

          Wal 1 Reply Last reply Reply Quote 0
          • Wal
            Wal Developer @martinschm last edited by

            @martinschm ,
            ein allgemeiner Hinweis.
            Ich würde erst einmal mit dem "OpenVINO Detector" anfangen da der schon super ist.

            M 1 Reply Last reply Reply Quote 1
            • M
              martinschm @Wal last edited by martinschm

              @wal said in Proxmox LXC mit Frigate:

              @martinschm ,
              ein allgemeiner Hinweis.
              Ich würde erst einmal mit dem "OpenVINO Detector" anfangen da der schon super ist.

              Hab es nach deiner Anleitung installiert, allerdings ohne das Skript von TTeck. Läuft jetzt unter ubuntu22 bei mir, frigate ist aufrufbar und der Kamera Stream ist eingebunden.

              Gibt es eigentlich ein Grund, warum du den LXC über das Skript und nicht im Frontend angelegt hast?

              Jetzt muß ich mich erstmal mit frigate beschäftigen. Das User Interface ist ja ziemlich minimalistisch. Muß alles über config Files eingerichtet werden, oder ? 😲

              Wal 1 Reply Last reply Reply Quote 0
              • Wal
                Wal Developer @martinschm last edited by Wal

                @martinschm ,
                ich habe das nur für die Anleitung genutzt, da das schneller geht und für den Anfang leichter ist.
                Ich erstelle meine LXC auch selbst. 😉

                @martinschm sagte in Proxmox LXC mit Frigate:

                Muß alles über config Files eingerichtet werden, oder ?

                Ja.

                edit: Bin gerade am Frigate 13 zu testen, da gibt es ein paar Schalter mehr.

                1 Reply Last reply Reply Quote 1
                • M
                  martinschm last edited by

                  @wal said in Proxmox LXC mit Frigate:

                  In die frigate.yml einfügen:

                  So, Coral Stick ist heute angekommen. Bin beim einrichten.
                  Du hast oben in der Anleitung geschrieben, das man etwas in die frigate.yml einfügen muß.

                  b598ae87-d6f4-4ead-998f-5efd2b3a09fb-image.png

                  Wo findet sie sich denn ?
                  Die config.yml habe ich editiert, aber die frigate.yml finde ich nicht.

                  Und beim Schritt drunter zum Inference Speed, kommt das auch in die config.yml ?

                  Wal 1 Reply Last reply Reply Quote 0
                  • Wal
                    Wal Developer @martinschm last edited by

                    @martinschm ,
                    die frigate.yml ist die docker-compose.yml.
                    In die config.yml muss jetzt:

                        ffmpeg:
                          hwaccel_args: preset-vaapi
                    

                    ab dem zweiten Post ist alles veraltet, ich kann ja nicht jeden Post neu bearbeiten wenn sich was ändert. 😉

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      martinschm @Wal last edited by

                      Hi,

                      so ganz klappt es bei mir noch nicht. Mir fehlt da auch das Backgroundwissen zu Docker und noch bei frigate.

                      Das ist die conf von meiner lxc

                      arch: amd64
                      cores: 2
                      features: nesting=1
                      hostname: frigate2
                      memory: 2048
                      net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=56:8F:E8:1F:74:05,ip=dhcp,type=veth
                      ostype: ubuntu
                      rootfs: local-lvm:vm-103-disk-0,size=8G
                      swap: 512
                      unprivileged: 1
                      lxc.cgroup2.devices.allow: c 226:128 rwm
                      lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
                      lxc.cgroup2.devices.allow: c 120:0 rwm
                      lxc.mount.entry: /dev/bus/usb/002/003 dev/bus/usb/002/003 none bind,optional,create=dir 0, 0
                      

                      Den Mount Entry hab ich so gewählt, weil lsusb bei mir das hier ausgegeben hat

                      frigate@frigate2:~$ lsusb
                      Bus 002 Device 003: ID 1a6e:089a Global Unichip Corp.
                      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
                      Bus 001 Device 004: ID 8087:0aa7 Intel Corp. Wireless-AC 3168 Bluetooth
                      Bus 001 Device 003: ID 0451:bef3 Texas Instruments, Inc. CC1352R1 Launchpad
                      Bus 001 Device 002: ID 0403:6f70 Future Technology Devices International, Ltd HB-RF-USB
                      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                      

                      Hab nach der Anpassung den lxc neu gestartet.

                      docker-compose.yml sieht so aus

                      version: "3.9"
                      services:
                        frigate:
                          container_name: frigate
                          privileged: true # this may not be necessary for all setups
                          restart: unless-stopped
                          image: ghcr.io/blakeblackshear/frigate:stable
                          shm_size: "64mb" # update for your cameras based on calculation above
                          cap_add:
                            - CAP_PERFMON
                          devices:
                           - /dev/bus/usb//003: /dev/bus/usb/002/003
                           # - /dev/apex_0:/dev/apex_0 - /dev/apex_1:/dev/apex_1
                            - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
                          volumes:
                            - /etc/localtime:/etc/localtime:ro
                            - /home/frigate/frigate/config.yml:/config/config.yml
                            - /media/frigate:/media/frigate
                            - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
                              target: /tmp/cache
                              tmpfs:
                                size: 1000000000
                          ports:
                            - "5000:5000"
                            - "1935:1935" # RTMP feeds
                      

                      und die config.yml so:

                      mqtt:
                        enabled: false
                        host: 192.168.1.198:1884
                        user: xxx
                        password: xxx
                      
                      cameras:
                        back:
                          ffmpeg:
                            inputs:
                              - path: rtsp://xxx:xxx@192.168.1.141:8554/unicast
                                roles:
                                  - detect
                      
                          detect:
                            enabled: true
                            width: 640
                            height: 480
                      
                      #ffmpeg:
                      #      hwaccel_args:
                      #        - -hwaccel
                      #        - vaapi
                      #        - -hwaccel_device
                      #        - /dev/dri/renderD128
                      #      inputs:
                      
                      detectors:
                        coral:
                          type: edgetpu
                          device: usb
                      
                      #  ov:
                      #    type: openvino
                      #    device: AUTO
                      #    model:
                      #      path: /openvino-model/ssdlite_mobilenet_v2.xml
                      
                      #model:
                      #  width: 300
                      #  height: 300
                      #  input_tensor: nhwc
                      #  input_pixel_format: bgr
                      #  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
                      
                      
                      birdseye:
                        # Optional: Enable birdseye view (default: shown below)
                        enabled: false
                        # Optional: Restream birdseye via RTSP (default: shown below)
                        # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
                        restream: False
                        # Optional: Width of the output resolution (default: shown below)
                        width: 1280
                        # Optional: Height of the output resolution (default: shown below)
                        height: 720
                      

                      Momentan meckert frigate im log, das es die Coral TPU nicht findet.

                      Wal 1 Reply Last reply Reply Quote 0
                      • Wal
                        Wal Developer @martinschm last edited by

                        @martinschm ,
                        laut hier muss es unprivileged: 0 sein.
                        Ich habe keine USB Coral.

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          martinschm @Wal last edited by

                          @wal said in Proxmox LXC mit Frigate:

                          @martinschm ,
                          laut hier muss es unprivileged: 0 sein.
                          Ich habe keine USB Coral.

                          Jetzt hab ich zumindest mal kein Coral Fehler mehr. Nur die Kamera lädt jetzt nicht in frigate.

                          Laut einer Anleitung muß ich jetzt noch python im Container installieren und den usb stick einmalig eine Erkennung machen lassen.

                          Leider hab ich gerade noch Probleme auf dem Container, das ich keine sudo commands mehr ausführen kann
                          "sudo: /etc/sudo.conf is owned by uid 100000, should be 0"

                          Wal 2 Replies Last reply Reply Quote 0
                          • Wal
                            Wal Developer @martinschm last edited by

                            @martinschm ,
                            im Container muss nichts installiert werden.
                            Ich habe die Coreltreiber in Proxmox installiert.

                            M 1 Reply Last reply Reply Quote 0
                            • Wal
                              Wal Developer @martinschm last edited by

                              @martinschm ,

                              echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
                              
                              curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
                              
                              sudo apt-get update
                              
                              sudo apt-get install libedgetpu1-std
                              
                              1 Reply Last reply Reply Quote 0
                              • M
                                martinschm @Wal last edited by

                                @wal said in Proxmox LXC mit Frigate:

                                @martinschm ,
                                im Container muss nichts installiert werden.
                                Ich habe die Coreltreiber in Proxmox installiert.

                                In dem von dir verlinkten Post bei proxmox schreiben sie, das sie die Treiber im Container installiert haben: https://forum.proxmox.com/threads/proxmox-google-coral-usb.114098/#post-505746

                                Und hier dann, das man es nach der Anleitung von Google installieren soll: https://forum.proxmox.com/threads/proxmox-google-coral-usb.114098/post-512047

                                Wal 1 Reply Last reply Reply Quote 0
                                • Wal
                                  Wal Developer @martinschm last edited by

                                  @martinschm ,
                                  ich kann dir nur sagen wie ich es gemacht habe, allerdings habe ich die dual coral tpu und musste auch die pci treiber installieren. Das habe ich alles im Proxmox Host gemacht.

                                  M 1 Reply Last reply Reply Quote 1
                                  • M
                                    martinschm @Wal last edited by martinschm

                                    @wal läuft jetzt bei mir 🙂

                                    Also vermute ich zumindest 🙂

                                    Das steht in meiner config.

                                    mqtt:
                                      enabled: true
                                      host: 192.168.1.198
                                      port: 1885
                                    user: xx
                                      password: xxx
                                    
                                    cameras:
                                      Eingang:
                                        ffmpeg:
                                          inputs:
                                            - path: rtsp://xx:xx@192.168.1.141:8554/unicast
                                              roles:
                                                - detect
                                     
                                        detect:
                                          enabled: true
                                          width: 640
                                          height: 480
                                    
                                    #ffmpeg:
                                    #      hwaccel_args:
                                    #        - -hwaccel
                                    #        - vaapi 
                                    #        - -hwaccel_device
                                    #        - /dev/dri/renderD128 
                                    #      inputs:
                                    
                                    detectors:
                                      coral:
                                        type: edgetpu
                                        device: usb
                                    

                                    Wenn ich mir in frigate die Kamera anschaue und in den Debug Modus gehe zeigt er mir, wenn ich durch die Kamera laufe einen Kasten um mich an und dann 80% Person. Da ich nur Coral als detector definiert habe, muß es ja darüber laufen, oder ?

                                    Jetzt muß ich nur noch MQTT und deine Erweiterung ans fliegen bekommen.

                                    Das sind meine Einstellungen beim MQTT Adapter, aber ich bekomme keine Verbindug zustande.
                                    78f050b2-51fe-46fe-802e-cbe51caa2959-image.png
                                    8cb3eeef-393c-45f6-af9c-c241c203c044-image.png

                                    Woran liegt es eigentlich, das wenn ich durchs Bild laufe, in frigate kein Event geloggt wird?

                                    Wal 1 Reply Last reply Reply Quote 0
                                    • Wal
                                      Wal Developer @martinschm last edited by Wal

                                      @martinschm sagte in Proxmox LXC mit Frigate:

                                      Wenn ich mir in frigate die Kamera anschaue und in den Debug Modus gehe zeigt er mir, wenn ich durch die Kamera laufe einen Kasten um mich an und dann 80% Person. Da ich nur Coral als detector definiert habe, muß es ja darüber laufen, oder ?

                                      Im Webinterface von Frigate muss in den Logs TPU found stehen.

                                      2023-10-11 15:22:46.667252280  [2023-10-11 15:22:46] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
                                      2023-10-11 15:22:46.672202351  [2023-10-11 15:22:46] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
                                      

                                      Dein Hardware Transcoding ist nicht aktiv "ffmpeg: hwaccel_args: preset-vaapi".

                                      Im MQTT Adapter habe ich keinen Haken und bei Maske nur mqtt.0.* stehen.
                                      In den Frigate Kamera Objekten muss unter frigate.0."Kameranamen".detect.state ein true stehen.

                                      Meine Config:

                                      detectors:
                                        coral1:
                                          type: edgetpu
                                          device: pci:0
                                        coral2:
                                          type: edgetpu
                                          device: pci:1
                                      
                                      mqtt:
                                        ***
                                      
                                      birdseye:
                                        enabled: False
                                        mode: continuous
                                        
                                      cameras:
                                        doorbell:
                                          ffmpeg:
                                            hwaccel_args: preset-vaapi
                                            inputs:
                                              ***
                                          detect:
                                           ***
                                      
                                      objects:
                                            track:
                                              - person
                                              - car
                                      #        - truck
                                      #        - bicycle
                                      #        - motorcycle
                                      #        - dog
                                      #        - cat
                                      snapshots:
                                            # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
                                            # This value can be set via MQTT and will be updated in startup based on retained value
                                        enabled: True
                                            # Optional: print a timestamp on the snapshots (default: shown below)
                                        timestamp: False
                                            # Optional: draw bounding box on the snapshots (default: shown below)
                                        bounding_box: False
                                            # Optional: crop the snapshot (default: shown below)
                                        crop: False
                                            # Optional: height to resize the snapshot to (default: original size)
                                        height: 175
                                            # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
                                        required_zones: []
                                            # Optional: Camera override for retention settings (default: global values)
                                        retain:
                                              # Required: Default retention days (default: shown below)
                                          default: 10
                                              # Optional: Per object retention days
                                          objects:
                                            person: 15
                                      
                                      record:
                                        enabled: True
                                        retain:
                                          days: 7
                                          mode: motion
                                        events:
                                          retain:
                                            default: 14
                                            mode: active_objects
                                            objects:
                                              person: 14
                                      
                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        martinschm @Wal last edited by martinschm

                                        @wal said in Proxmox LXC mit Frigate:

                                        Guten Morgen @Wal

                                        danke erstmal für deine Unterstützung. Das Ausmaß an Hilfsbereitschaft in der iobroker Community ist echt mega.

                                        Im Webinterface von Frigate muss in den Logs TPU found stehen.

                                        2023-10-11 15:22:46.667252280  [2023-10-11 15:22:46] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
                                        2023-10-11 15:22:46.672202351  [2023-10-11 15:22:46] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
                                        

                                        Aktuell sieht es so aus

                                        2023-11-18 23:45:02.078551335  [INFO] Starting Frigate...
                                        2023-11-18 23:45:05.197894986  [2023-11-18 23:45:05] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
                                        2023-11-18 23:45:05.252454933  [2023-11-18 23:45:05] peewee_migrate                 INFO    : Starting migrations
                                        2023-11-18 23:45:05.253249754  [2023-11-18 23:45:05] peewee_migrate                 INFO    : There is nothing to migrate
                                        2023-11-18 23:45:05.291757508  [2023-11-18 23:45:05] frigate.app                    INFO    : Output process started: 283
                                        2023-11-18 23:45:05.328377860  [2023-11-18 23:45:05] frigate.app                    INFO    : Camera processor started for Eingang: 290
                                        2023-11-18 23:45:05.346169291  [2023-11-18 23:45:05] frigate.app                    INFO    : Capture process started for Eingang: 292
                                        2023-11-18 23:45:08.027040196  [2023-11-18 23:45:05] detector.coral                 INFO    : Starting detection process: 282
                                        2023-11-18 23:45:08.029757862  [2023-11-18 23:45:05] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
                                        2023-11-18 23:45:08.030460133  [2023-11-18 23:45:08] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
                                        2023-11-18 23:45:08.871703954  [2023-11-18 23:45:08] frigate.comms.mqtt             ERROR   : Unable to publish to Eingang/all: client is not connected
                                        

                                        Scheint also geklappt zu haben

                                        Dein Hardware Transcoding ist nicht aktiv "ffmpeg: hwaccel_args: preset-vaapi".

                                        Ok danke, füge ich hinzu. Dachte das hätte was mit der OpenV Sache zu tun. Dabei geht es aber tatsächlich um die Umwandlung des Streams, korrekt ?

                                        Im MQTT Adapter habe ich keinen Haken und bei Maske nur mqtt.0.* stehen.

                                        Sehe gerade in den ioB Logs, das frigate sich nicht einloggen kann. Hab jetzt Username und Passwort nochmal überall ber copy paste eingefügt.
                                        Copy Paste war anscheinend die Ursache. Hab das Passwort nochmal eingetippt und jetzt klappt es. Vermutlich hat er beim Kopieren noch ein Leerzeichen hinten dran eingefügt. Das ist mir schon ein paar mal aufgefallen, das so was passiert.

                                        In den Frigate Kamera Objekten muss unter frigate.0."Kameranamen".detect.state ein true stehen.

                                        167f0604-01d1-4638-9f05-3bac0efd4de6-image.png

                                        Läuft. Mega cool.

                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          martinschm @martinschm last edited by martinschm

                                          Bei motion gibt es zwei Werte, einmal hat der Ordner auch einen Wert und darunter gibt es noch einen State. Ist das so korrekt angelegt ?
                                          416190ec-d743-45da-aa5a-c508dd739022-image.png

                                          Hab aktuell ein Stream laufen, so sieht mein LXC Container aus
                                          3de1035e-2a0f-47b1-a724-87472595bfee-image.png

                                          Und das sind die Werte aus frigate
                                          18b17aa6-275f-498c-ba71-93217a532ad1-image.png

                                          Bin mal gespannt wie es ausschaut mit mehreren Kameras.

                                          Die ersten Tests mit Objekterkennung vor der Haustür waren auf jeden Fall sehr gut.

                                          Wal 1 Reply Last reply Reply Quote 0
                                          • Wal
                                            Wal Developer @martinschm last edited by

                                            @martinschm ,
                                            wenn du jetzt noch den Frigate Adapter installieren und mittesten würdest wäre das nicht schlecht.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            556
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            16
                                            176
                                            27071
                                            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