Network share on Frigate HASSOS with nabucasa(SSL) and Proxmox LXC container

What can I see there?

What ever you see in debug, paste here. It should say why your cameras is lagging as you mention on other thread.

{
  "cameras": {
    "parkeerplaats": {
      "best_image_timeout": 60,
      "clips": {
        "enabled": false,
        "objects": null,
        "post_capture": 5,
        "pre_capture": 5,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {
            "person": 150
          }
        }
      },
      "detect": {
        "enabled": true,
        "max_disappeared": 30
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:[email protected]:554/Streaming/Channels/102/ -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/parkeerplaats-%Y%m%d%H%M%S.mp4 -r 6 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect",
            "clips"
          ]
        }
      ],
      "fps": 6,
      "frame_shape": [
        480,
        640
      ],
      "height": 480,
      "motion": {
        "contour_area": 100,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 80,
        "mask": "402,30,461,47,455,170,640,230,640,0,474,0,56,0,58,45,207,57,206,34,233,32,229,88,326,77,354,54,379,38",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "required_zones": [],
        "timestamp": true
      },
      "name": "parkeerplaats",
      "objects": {
        "filters": {
          "bicycle": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "car": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": null,
        "track": [
          "person",
          "car",
          "dog",
          "bicycle"
        ]
      },
      "record": {
        "enabled": false,
        "retain_days": 30
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": false,
        "crop": false,
        "enabled": true,
        "height": null,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "width": 640,
      "zones": {}
    },
    "schuurachter": {
      "best_image_timeout": 60,
      "clips": {
        "enabled": false,
        "objects": null,
        "post_capture": 5,
        "pre_capture": 5,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {
            "person": 150
          }
        }
      },
      "detect": {
        "enabled": true,
        "max_disappeared": 30
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:[email protected]:554/Streaming/Channels/102/ -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/schuurachter-%Y%m%d%H%M%S.mp4 -r 6 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect",
            "clips"
          ]
        }
      ],
      "fps": 6,
      "frame_shape": [
        576,
        704
      ],
      "height": 576,
      "motion": {
        "contour_area": 100,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 96,
        "mask": null,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "required_zones": [],
        "timestamp": true
      },
      "name": "schuurachter",
      "objects": {
        "filters": {
          "bicycle": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "car": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": null,
        "track": [
          "person",
          "car",
          "dog",
          "bicycle"
        ]
      },
      "record": {
        "enabled": false,
        "retain_days": 30
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": false,
        "crop": false,
        "enabled": true,
        "height": null,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "width": 704,
      "zones": {}
    },
    "terras": {
      "best_image_timeout": 60,
      "clips": {
        "enabled": false,
        "objects": null,
        "post_capture": 5,
        "pre_capture": 5,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {
            "person": 150
          }
        }
      },
      "detect": {
        "enabled": true,
        "max_disappeared": 20
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:[email protected]:554/Streaming/Channels/101/ -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/terras-%Y%m%d%H%M%S.mp4 -r 4 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect",
            "clips"
          ]
        }
      ],
      "fps": 4,
      "frame_shape": [
        2160,
        3840
      ],
      "height": 2160,
      "motion": {
        "contour_area": 100,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 360,
        "mask": "3840,0,3840,1290,3193,1383,3069,769,3001,378,2723,0",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "required_zones": [],
        "timestamp": true
      },
      "name": "terras",
      "objects": {
        "filters": {
          "bird": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": null,
        "track": [
          "bird",
          "dog",
          "cat"
        ]
      },
      "record": {
        "enabled": false,
        "retain_days": 30
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": false,
        "crop": false,
        "enabled": true,
        "height": null,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "width": 3840,
      "zones": {}
    },
    "voordeur": {
      "best_image_timeout": 60,
      "clips": {
        "enabled": false,
        "objects": null,
        "post_capture": 5,
        "pre_capture": 5,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {
            "person": 150
          }
        }
      },
      "detect": {
        "enabled": true,
        "max_disappeared": 30
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:[email protected]:554/Streaming/Channels/102/ -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/voordeur-%Y%m%d%H%M%S.mp4 -r 6 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect",
            "clips"
          ]
        }
      ],
      "fps": 6,
      "frame_shape": [
        576,
        704
      ],
      "height": 576,
      "motion": {
        "contour_area": 100,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 96,
        "mask": null,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "required_zones": [],
        "timestamp": true
      },
      "name": "voordeur",
      "objects": {
        "filters": {
          "cat": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": null,
        "track": [
          "person",
          "dog",
          "cat"
        ]
      },
      "record": {
        "enabled": false,
        "retain_days": 30
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": false,
        "crop": false,
        "enabled": true,
        "height": null,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "width": 704,
      "zones": {}
    }
  },
  "clips": {
    "max_seconds": 30,
    "retain": {
      "default": 100,
      "objects": {
        "person": 150
      }
    },
    "tmpfs_cache_size": "256m"
  },
  "database": {
    "path": "/media/frigate/clips/frigate.db"
  },
  "detectors": {
    "coral": {
      "device": "usb",
      "num_threads": 3,
      "type": "edgetpu"
    }
  },
  "environment_vars": {},
  "logger": {
    "default": "DEBUG",
    "logs": {}
  },
  "model": {
    "height": 320,
    "width": 320
  },
  "mqtt": {
    "client_id": "frigate200",
    "host": "192.168.1.142",
    "port": 1883,
    "stats_interval": 60,
    "topic_prefix": "frigate200",
    "user": "mqtt"
  },
  "snapshots": {
    "retain": {
      "default": 10,
      "objects": {}
    }
  }
}

Yeah, no, then thats not it. So lets start from the begining. First lets fix the mounts then we go further. Otherwise we jump from one to another.
The easiest would be for me connect though :> nvm.
Instruction:
1.Fix the mount
2.When you go by my toturial when you start docker compose up then you will see detailed debug log on run , where it will be written why your cameras not working etc. So it should be very easy from that part.

Ohh thats it!

Now you have the debug log, other people should be abble to assist, otherwise write to developer blacksomething

Yeah i don’t know but maybe this is a problem?

ffmpeg.schuurachter.detect     ERROR   : Error writing trailer of /tmp/cache/schuurachter-%Y%m%d%H%M%S.mp4: No space left on device

:smiley:

I bet, but what to do to solve?

As there is so many posibilities with linux and its outside the scope of home assistant and frigate. I can help only with remote connection as going through step by step would take months.
Otherwise i suggest to google “proxmox container tmp no space left on device”
And sort it out.

Or maybe you can just lower as it says, maybe it will help
frigate.events WARNING : Consider increasing space available at /tmp/cache or reducing max_seconds in your clips config.
Remember logs are very powerfull stuff, it should always guide where you should go and check.

I’m stuck on there

docker-compose up
root@FRIGATE:~/dockfrigate# docker-compose up

Usage:  docker [OPTIONS] COMMAND

docker-compose is a Docker CLI plugin

Options:
      --config string      Location of client config files (default "/root/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote

Management Commands:
  completion                 generate the autocompletion script for the specified shell
  compose                    Docker Compose

Run 'docker COMMAND --help' for more information on a command.

To get more help with docker, check out our guides at https://docs.docker.com/go/guides/

I have proxmox and a vm with hassos and frigate with coral usb passthrough

But i have a lot of error so I’m trying to install frigate on the host.

How can I do that? I’m a little newbie with that, especially with docker.

I see that maybe can fix my problem and i can use coral with low inferences and frigate process can’t goes down.

So you follow all the steps that are described and docker up is not working right?
If yes, then show ls -la in that frigate folder

Have you considered using frigate addon and use USB passthrough?
You need to pass the whole USB controoler though. If its a headless server that should not be a problem.

FIY i moved to this solution, which works well.But using PCI passthrough coral

frigate add on i use for now but have this error that i wrote in github.

i’ll try right now to passthrough usb controller.

anyway docker seems a better solution.

root@FRIGATE:~/dockfrigate# ls -la
total 12
drwxr-xr-x 2 root root 4096 Sep  9 19:32 .
drwx------ 4 root root 4096 Sep  9 15:29 ..
-rw-r--r-- 1 root root  747 Sep  9 16:53 docker-compose.yml
version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: blakeblackshear/frigate:stable-amd64
    devices:
      - /dev/bus/usb:/dev/bus/usb
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /mnt/hassconfig/config.yml:/config/config.yml:ro
      - /mnt/media:/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
    environment:
      FRIGATE_RTSP_PASSWORD: "mypass"
root@FRIGATE:/mnt# ls -la
total 12
drwxr-xr-x  4 root root 4096 Sep  9 15:38 .
drwxr-xr-x 22 root root 4096 Sep  9 15:46 ..
-rw-r--r--  1 root root  756 Sep  9 15:35 docker-compose.yml
drwxr-xr-x  2 root root    0 Sep  9 15:37 hassconfig
drwxr-xr-x  2 root root    0 Sep  9 15:43 media

EDIT:

root@NUC-i3:~# lspci
00:00.0 Host bridge: Intel Corporation Device 3ecc (rev 08)
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-U GT3e [Iris Plus Graphics 655] (rev 01)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 30)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 30)
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 30)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 30)
00:17.0 SATA controller: Intel Corporation Cannon Point-LP SATA Controller [AHCI Mode] (rev 30)
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f0)
00:1d.6 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #15 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 30)
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 30)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 30)
6e:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)

I can’t passthrough the entire usb controller, there is only one

I wish to create a container with frigate, and i don’t understand if needed or not, get a pasthrough gpu and coral usb.

Anyway proxmox with hass os and frigate, gpu and usb coral passthrough, get frigate in a reboot every time, so is impossible to use, and docker is the last chance, or use the entire nuc, and i don’t want use the entire nuc only for HA

I dont understant why docker not working. Try to figure it out. Try some google tutorial on how to run docker and debug the start afterwards it should work. btw you cant passthrough a GPU to a container :no_mouth:

Have you tryed to go through troubleshooting on the end of my first post?

yes but no way.

docker-compose isn’t a recognize command.

and if i use another command, i have this error:

root@FRIGATE:~/dockfrigate# docker-compose up -d frigate
unknown shorthand flag: 'd' in -d
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

docker-compose is a Docker CLI plugin

Options:
      --config string      Location of client config files (default
                           "/root/.docker")
  -c, --context string     Name of the context to use to connect to the daemon
                           (overrides DOCKER_HOST env var and default context
                           set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level
                           ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default
                           "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default
                           "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote

Management Commands:
  completion                 generate the autocompletion script for the specified shell
  compose                    Docker Compose

Run 'docker COMMAND --help' for more information on a command.

To get more help with docker, check out our guides at https://docs.docker.com/go/guides/

So i have tried also:

root@FRIGATE:~/dockfrigate# docker run docker-compose.yml
Unable to find image 'docker-compose.yml:latest' locally
docker: Error response from daemon: pull access denied for docker-compose.yml, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

Have you checked that the docker daemon is running? show me
journalctl -xe

Linux NUC-i3 5.11.22-1-pve #1 SMP PVE 5.11.22-2 (Fri, 02 Jul 2021 16:22:45 +0200) x86_64
Sep 10 09:46:32 FRIGATE systemd[1]: systemd-tmpfiles-clean.service: Consumed 9ms CPU time.
-- Subject: Resources consumed by unit runtime
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit systemd-tmpfiles-clean.service completed and consumed the indicated resources.
Sep 10 10:15:01 FRIGATE CRON[878]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 10 10:15:01 FRIGATE CRON[879]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 10 10:15:01 FRIGATE CRON[878]: pam_unix(cron:session): session closed for user root
Sep 10 11:15:01 FRIGATE CRON[882]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 10 11:15:01 FRIGATE CRON[883]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 10 11:15:01 FRIGATE CRON[882]: pam_unix(cron:session): session closed for user root
Sep 10 12:15:01 FRIGATE CRON[885]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 10 12:15:01 FRIGATE CRON[886]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 10 12:15:01 FRIGATE CRON[885]: pam_unix(cron:session): session closed for user root
Sep 10 13:15:01 FRIGATE CRON[889]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 10 13:15:01 FRIGATE CRON[890]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 10 13:15:01 FRIGATE CRON[889]: pam_unix(cron:session): session closed for user root
Sep 10 13:36:50 FRIGATE dockerd[349]: time="2021-09-10T13:36:50.865825158Z" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
Sep 10 13:36:50 FRIGATE dockerd[349]: time="2021-09-10T13:36:50.866773973Z" level=info msg="Ignoring extra error returned from registry: unauthorized: authentication required"
Sep 10 14:15:01 FRIGATE CRON[920]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 10 14:15:01 FRIGATE CRON[921]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 10 14:15:01 FRIGATE CRON[920]: pam_unix(cron:session): session closed for user root

requested access to the resource is denied\nunauthorized: authentication required
Yeah thats mean something with permission. You need to follow some google guide to make it work and then go back to my tutorial