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@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Proxmox LXC mit Frigate

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

      @wal ich hätte noch zwei offene Punkte.

      1. Bei mir wird unter /media/frigate/recordings nichts gespeichert. Events usw. sehe ich auf der Weboberfläche. Auch mit deinem Adapter passt alles. Wenn ich aber den Container neu starte, ist alles weg. Scheint so, als ob Frigate alles in einen tmp Ordner speichert. Das ist meine config:
      detectors:
        coral:
          type: edgetpu
          device: usb
      mqtt:
       host: 192.168.179.***
       user: ***
       password: ****
      
      cameras:
        Einfahrt: # <------ Name the camera
          ffmpeg:
            hwaccel_args: preset-vaapi
            inputs:
              # High Resolution Stream
              - path: rtsp://***:***@192.168.179.***:554/h264Preview_01_main
                roles:
                  - record
      
              # Low Resolution Stream
              - path: rtsp://***:***@192.168.179.***:554/h264Preview_01_sub
                roles:
                  - detect
          record: # <----- Enable recording
            enabled: True
          objects:
            track:
              - person
              - car
      
      
      database:
        path: /config/frigate.db
      
      
      1. Kann ich iegendwo definieren, dass die "detects" und "snapshots" automatisch bei einem Neustart eingeschaltet sind? Diese muss ich nach jedem Neustart wieder manuell auf der Weboberfläche aktivieren.
      Wal 1 Reply Last reply Reply Quote 0
      • Wal
        Wal Developer @Hansi1234 last edited by

        @hansi1234 sagte in Proxmox LXC mit Frigate:

        Kann ich iegendwo definieren, dass die "detects" und "snapshots" automatisch bei einem Neustart eingeschaltet sind?

        Das hatten wir schon, du hast bestimmt im MQTT-Adapter "Eigene States beim Verbinden publizieren" eingeschaltet.

        H 1 Reply Last reply Reply Quote 0
        • H
          Hansi1234 @Wal last edited by

          @wal danke. Ich glaub ich setze später nochmal alles auf. Fürs erste Problem find ich keine Lösung

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

            @hansi1234 ,
            habe bei mir eine USB-Platte in Proxmox zum speichern eingebunden die ich mit Samba im Netzwerk freigebe.
            Ich denke es ist ein Rechte Problem bei dir, das hat nichts mit der Frigate-Config zu tun.

            In Proxmox ist die Platte so in der fstab eingebunden:

            UUID=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx /media/usbhdd ext4 auto,nofail,sync,users,rw 0 0
            

            so im Frigate LXC:

            mp0: /media/usbhdd/frigate,mp=/media/frigate
            

            da ich noch mehr auf der USB-Platte speichere, habe ich den Unterordner frigate für Frigate in Proxmox erzeugt.

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

              @wal said in Proxmox LXC mit Frigate:

              Gestern wurde die Coral Dual EDGE TPU eingebaut.
              Der PCI-E Key-E Adapter von Makerfab kam aus China:
              30 Dollar Adapter
              31 Dollar Versand über DHL
              21 Euro Zollgebühren
              macht mit Märchenumrechnungsfaktor von PayPal
              82Euro

              • 63,90 Euro für die Dual Edge TPU mit Versand

              145,90 Euro hat mich der Spass gekostet.

              Die Adapter von Amazon usw. haben leider nur 1 Line für die Anbindung der TPU, deshalb wird nur eine CPU erkannt.
              Der von Makerfab ist speziell für 2 Linien und der Dual TPU gemacht.
              Das Ganze war jetzt trotzdem billiger als 2 x Coral USB bei Pollin.

              Hi, interessiere mich auch gerade für frigate. Kannst du kurz erklären warum du dein Setup mit 2x Coral USB vergleichst? Es reicht doch ein Coral Stick, oder ?

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

                @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.

                M 1 Reply Last reply Reply Quote 0
                • 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
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            660
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

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