blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.93k stars 1.73k forks source link

[EdgeTPU Support]: usb coral and conbee 2 zigbee network wont work well #4768

Closed pbvdven closed 1 year ago

pbvdven commented 1 year ago

Describe the problem you are having

frigate breaks my zha conbee network

Im running home assistant supervised latest version all worked great i used blueiris in the past no issues at all. never even looked at my home assistant zigbee network i had conbee directly plugged in to usb3 with 80 devices no issues.

now i switched to frigate with coral usb it works great but the moment i start frigate my zigbee network starts to fail sometimes it takes a moment but then door sensors wont report lights cant be turned on or off. this is from the moment i stated with frigate at first i didn't know so i rebooted started checking zha sometimes after reboot it worked for day or 2 and then started again. so i bought new usb extension for my conbee a usb powered hub because someone suggested that could be the issue. i switchend usb ports. nothing would help.

i found out that frigate or the usb coral creates the issue because as soon as i stop frigate container my zigbee network works flawless again. now with this new info i googled and someone suggested it has to do with interference of usb3 or the coral and i should create a greater distance between the two. so i bought new quality shielded cables usb 3 extension for the coral so now i have coral on usb 3 with extension 3m one side of the room then conbee 2 on extension usb2 3m other side of the room. it feels kinda stupid haha and does not work because still as soon as i start frigate home assistant zha zigbee network start to fail when i stop frigate all works fine again. ow yes someone said the coral produces a lot of noise so i wrapped it in tin foil and of course no luck so im out of ideas and hoping someone as a solution.

Version

frigate:0.11.1

Frigate config file

# yaml-language-server: $schema=http://192.168.2.16:5000/api/config/schema

mqtt:
  host: 192.168.2.16
  user: frigate
  password: deleted

ffmpeg:
  output_args: 
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac

detectors:
  coral:
    type: edgetpu
    device: usb

birdseye:
  enabled: True
  mode: continuous

objects:
  track:
    - person

record:
  enabled: true
  expire_interval: 60
  # Optional: Retention settings for recording
  retain:
    # Optional: Number of days to retain recordings regardless of events (default: shown below)
    # NOTE: This should be set to 0 and retention should be defined in events section below
    #       if you only want to retain recordings of events.
    days: 0
    # Optional: Mode for retention. Available options are: all, motion, and active_objects
    #   all - save all recording segments regardless of activity
    #   motion - save all recordings segments with any detected motion
    #   active_objects - save all recording segments with active/moving objects
    # NOTE: this mode only applies when the days setting above is greater than 0
    mode: all
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 5
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 5
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
    required_zones: []
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 3
      # Optional: Mode for retention. (default: shown below)
      #   all - save all recording segments for events regardless of activity
      #   motion - save all recordings segments for events with any detected motion
      #   active_objects - save all recording segments for event with active/moving objects
      #
      # NOTE: If the retain mode for the camera is more restrictive than the mode configured
      #       here, the segments will already be gone by the time this mode is applied.
      #       For example, if the camera retain mode is "motion", the segments without motion are
      #       never stored, so setting the mode to "all" here won't bring them back.
      mode: motion
      # Optional: Per object retention days
      objects:
        person: 5
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
  retain:
    # Required: Default retention days (default: shown below)
    default: 10
    # Optional: Per object retention days
    objects:
      person: 15

cameras:
  Deurbel: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: rtsp://admideleted
          roles:
            - detect
            - rtmp
            - record
    detect:
      width: 1536 # <---- update for your camera's resolution
      height: 2048 # <---- update for your camera's resolution  
    snapshots: # <----- Enable snapshots
      enabled: True

  Voordeur: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: rtsdeleted
          roles:
            - detect
            - rtmp
      inputs:
        - path: rtsp://admin:deleted
          roles:
            - record
    detect:
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  Oprit: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: rtsp://admin:Odeleted
          roles:
            - detect
            - rtmp
      inputs:
        - path: rtsdeleted
          roles:
            - record
    detect:
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  PTZ: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: rdeleted
          roles:
            - detect
            - rtmp
    detect:
      width: 1920 # <---- update for your camera's resolution
      height: 1080 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  Achtertuin: # <------ Name the camera
    ffmpeg: 
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: rtsp:/deletedtreaming/Channels/2
          roles:
            - detect
            - rtmp
      inputs:
        - path: rtdeleted:554/Streaming/Channels/1
          roles:
            - record
    detect:
      width: 768 # <---- update for your camera's resolution
      height: 432 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  Voortuin: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: deleted
          roles:
            - detect
            - rtmp
      inputs:
        - path:deleted
          roles:
            - record
    detect:
      width: 768 # <---- update for your camera's resolution
      height: 432 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  Hal: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path:deleted
          roles:
            - detect
            - rtmp
      inputs:
        - path:deleted
          roles:
            - record
    detect:
      width: 480 # <---- update for your camera's resolution
      height: 640 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True

  Bijkeuken: # <------ Name the camera
    ffmpeg:
      input_args:
        - -c:v
        - h264_cuvid
      inputs:
        - path: deleted
          roles:
            - detect
            - rtmp
      inputs:
        - path: deleted
          roles:
            - record
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
    snapshots: # <----- Enable snapshots
      enabled: True
rtmp:
  enabled: True
environment_vars:
  PLUS_API_KEY: dfjkonkl

docker-compose file or Docker CLI command

version: "3.9"
services:
  frigate:
    container_name: frigate
    #privileged: true # this may not be necessary for all setups
    #pid: host
    restart: unless-stopped
    image: blakeblackshear/frigate:0.11.1
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              device_ids: ['0']
              capabilities: [gpu]
    shm_size: "3gb" # update for your cameras based on calculation above
    devices:
      - /dev/bus/usb:/dev/bus/usb #USBCoral
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /usr/share/hassio/homeassistant/frigate/config.yml:/config/config.yml:ro
      - /usr/share/hassio/share/frigatedata:/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: "0000"

Relevant log output

[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [segment @ 0x55ad452c8080] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x55ad452cfc40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x55ad452cfc40] Packet is missing PTS
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : av_interleaved_write_frame(): Invalid argument
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [mp4 @ 0x55ad45b0fb80] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : Finishing stream 2:0 without any data written to it.
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [mp4 @ 0x55ad45b0fb80] pts has no value
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x55ad452cfc40] Failed to update header with correct duration.
[2022-12-21 21:06:20] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x55ad452cfc40] Failed to update header with correct filesize.
[2022-12-21 21:06:22] frigate.video                  ERROR   : Voortuin: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:22] frigate.video                  ERROR   : Voortuin: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:30] watchdog.Voortuin              ERROR   : Ffmpeg process crashed unexpectedly for Voortuin.
[2022-12-21 21:06:30] watchdog.Voortuin              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 3 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 8 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 1 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] left block unavailable for requested intra mode
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] error while decoding MB 0 39, bytestream 28510
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 8 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] Increasing reorder buffer to 1
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 9 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] left block unavailable for requested intra mode
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] error while decoding MB 0 34, bytestream 130
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] max delay reached. need to consume packet
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [rtsp @ 0x5632f2e76d80] RTP: missed 1 packets
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [h264 @ 0x5632f2e7bd40] error while decoding MB 69 64, bytestream -7
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x5632f2eda000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x5632f2eda000] Packet is missing PTS
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : av_interleaved_write_frame(): Invalid argument
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [segment @ 0x5632f2ed1740] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : Finishing stream 2:0 without any data written to it.
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [mp4 @ 0x5632f37053c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [mp4 @ 0x5632f37053c0] pts has no value
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x5632f2eda000] Failed to update header with correct duration.
[2022-12-21 21:06:30] ffmpeg.Voortuin.detect         ERROR   : [flv @ 0x5632f2eda000] Failed to update header with correct filesize.
[2022-12-21 21:06:40] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Voortuin: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Voortuin: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Voortuin: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Achtertuin: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Achtertuin: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Oprit: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Oprit: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Oprit: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Deurbel: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Deurbel: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Hal: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Voordeur: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Hal: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Voordeur: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : Bijkeuken: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : Bijkeuken: ffmpeg process is not running. exiting capture thread...
[2022-12-21 21:06:40] frigate.video                  ERROR   : PTZ: Unable to read frames from ffmpeg process.
[2022-12-21 21:06:40] frigate.video                  ERROR   : PTZ: ffmpeg process is not running. exiting capture thread...
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-12-21 21:06:46] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
Starting migrations
[2022-12-21 21:06:46] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-12-21 21:06:46] peewee_migrate                 INFO    : There is nothing to migrate
[2022-12-21 21:06:46] detector.coral                 INFO    : Starting detection process: 225
[2022-12-21 21:06:46] frigate.app                    INFO    : Output process started: 227
[2022-12-21 21:06:46] ws4py                          INFO    : Using epoll
[2022-12-21 21:06:46] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-12-21 21:06:46] frigate.mqtt                   INFO    : Turning off recordings for Voortuin via mqtt
[2022-12-21 21:06:49] frigate.edgetpu                INFO    : TPU found
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Deurbel: 232
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Voordeur: 236
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Oprit: 237
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for PTZ: 239
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Achtertuin: 241
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Voortuin: 243
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Hal: 244
[2022-12-21 21:06:46] frigate.app                    INFO    : Camera processor started for Bijkeuken: 246
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Deurbel: 248
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Voordeur: 252
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Oprit: 258
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for PTZ: 261
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Achtertuin: 268
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Voortuin: 282
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Hal: 288
[2022-12-21 21:06:46] frigate.app                    INFO    : Capture process started for Bijkeuken: 293
[2022-12-21 21:06:46] ws4py                          INFO    : Using epoll

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

All the things you tried are what should be suggested, at the end of the day it is going to come down to some hardware issue somewhere.

I never had an interference issue or power issue with my server, as long the coral and conbee were away from each other.

also you'd want to use the shielded usb cable with the conbee not with the coral (after all, the conbee is the device that you want shielded from the interference.

pbvdven commented 1 year ago

both are on shielded extension cables now both on opposite sides of the room and still having same issues it did not get any better.

i didn't believe i have power issues i use dell poweredge t150. i just tried the powered usb hub because yea if you ask advice you should try whats suggested if reasonable of course.

the zigbee network works fine with every other usb device bluetooth and zwave-stick only not with the coral. i dropped the z-wave and bluetooth because i didnt use them. so now only devices plugged in are coral and conbee stick and aslong as frigate is not running it works fine the coral can be plugged in then there is no problem but if i start frigate container it stops working not everything on zigbee but mostly all or with delays.

NickM-27 commented 1 year ago

in that case, maybe the USB controller on the host is not fast enough to handle both devices and is getting some message interference. Have you seen if all the usb ports on the host are run by the same controller? Trying different ports that belong to different controllers would be a good thing to try.

pbvdven commented 1 year ago

that i also tried one on dev/usb/001/002 and the other on dev/usb/002/004 i dont know for sure but i assume that means different controllers

NickM-27 commented 1 year ago

/001/ and /002/ should mean different controllers. Not really sure then, what powered hub configurations did you try? Have you tried coral on the device directly and the zigbee on the hub?

pbvdven commented 1 year ago

yes i tried different combination coral on the hub conbee on the hub same controller different controller coral directly conbee on the hub.

but that could be a thing i didn't think of that. i didn't setup anything special on frigate side so i have 8 cameras all person detection and one coral maybe its to heavy?

NickM-27 commented 1 year ago

all that would do is affect the coral, for example the coral would cut out and frigate would stop. anything affecting another hardware device / service is going to be either a hardware or OS issue.

The conbee is also a USB 2 device I believe, have you plugged it into a USB 2 port?

pbvdven commented 1 year ago

yes conbee is USB2 and on a USB 2 port. i just now tried the usb3 instead of usb2 cable because its better quality on USB2 port for the conbee and coral plugged in the pc without extension. im now checking how thats going

NickM-27 commented 1 year ago

where is the powered hub in that mix?

pbvdven commented 1 year ago

not using it i try now with because it down already

pbvdven commented 1 year ago

i didn't use powered hub yet because its working for the moment frigate is running and lights still go on and off door senors work but that is the case sometimes after reboot of frigate. but i have hope so lets wait a little and see maybe that better quality usb3 extension on the conbee did the trick. thanks for helping

pbvdven commented 1 year ago

ok it failed again i waited a while before i send that it works but the hole evening it stopt almost directly so this seems to be better but it failed now lights wont go of and remotes dont react. ill put the powered hub between the pc and conbee now

NickM-27 commented 1 year ago

I would suggest doing more than just trying and seeing how the lights work, odds are your zigbee software has logs which explain why a failure happened and may give helpful info

pbvdven commented 1 year ago

yes ill try if i can find some readable logs from zha

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

v1n2e7t commented 1 year ago

I am having this same issue using a coral m.2 card, with a nortek zigbee/zwave controller. When frigate is running zwave devices get disconnected and i cannot re-interview devices. Once Frigate is shutdown i can re-interview devices flawlessly.

I have homeassistant running both Frigate and ZWaveJS in a VM with 6cores 12threads, 8GB of Ram. This didnt seem to be an issue when I only had 3 Cameras Running through Frigate, I now have 7 Cameras. Cpu Usage hovers around 40% with frigate. Personally I am leaning towards it being a cpu issue as the source from the cameras are all 4k, and the detection runs at 720p so downscaling is required.

NickM-27 commented 1 year ago

I am having this same issue using a coral m.2 card, with a nortek zigbee/zwave controller.

When frigate is running zwave devices get disconnected and i cannot re-interview devices. Once Frigate is shutdown i can re-interview devices flawlessly.

I have homeassistant running both Frigate and ZWaveJS in a VM with 6cores 12threads, 8GB of Ram.

This didnt seem to be an issue when I only had 3 Cameras Running through Frigate, I now have 7 Cameras.

Cpu Usage hovers around 40% with frigate. Personally I am leaning towards it being a cpu issue as the source from the cameras are all 4k, and the detection runs at 720p so downscaling is required.

As far as cpu usage goes, yes resizing is a problem. It will work better in 0.12 when you use ffmpeg presets for hardware acceleration

pbvdven commented 1 year ago

I am having this same issue using a coral m.2 card, with a nortek zigbee/zwave controller.

When frigate is running zwave devices get disconnected and i cannot re-interview devices. Once Frigate is shutdown i can re-interview devices flawlessly.

I have homeassistant running both Frigate and ZWaveJS in a VM with 6cores 12threads, 8GB of Ram.

This didnt seem to be an issue when I only had 3 Cameras Running through Frigate, I now have 7 Cameras.

Cpu Usage hovers around 40% with frigate. Personally I am leaning towards it being a cpu issue as the source from the cameras are all 4k, and the detection runs at 720p so downscaling is required.

As far as cpu usage goes, yes resizing is a problem. It will work better in 0.12 when you use ffmpeg presets for hardware acceleration

Im using 0.12 for about a week now and the issue i had with the conbee2 and usb coral seems fixed. My zigbee network stays stable for now even after several reboots from frigate or the host. The cpu runs a lot lower also on 0.12. Im also using NVidia. But didn't changed anything 0.11 had i issues a lot some times it was stable for few days but eventually i would fail. Really hoping this issue is fixed with 0.12 looks like it for now🥳

v1n2e7t commented 1 year ago

I did some further testing I moved to frigate 0.12, with 5-4K camera streams and 2-2K camera streams Frigate pushes the homeassistant to 30-35% cpu load for the ffmpeg process. When we're at all those streams zwave devices hop off the mesh and cannot be pinged. As soon as frigate is stopped they work instantly. When testing with 1-4K camera stream it all runs fine (~5% cpu), with all 7 cameras using their substreams for detection (480p - highest substream option), it all runs fine as well ( ~7% cpu)

I currently do not have a gpu for hardware acceleration but have a Ryzen 7 3800x powering the system.

At least in my case i do not believe its a frigate issue, its more likely some issue with either my virtualization or home assistant's ability to handle zwave when cpu load is higher. I will probably do some more testing to try and narrow it down.

pbvdven commented 1 year ago

I am having this same issue using a coral m.2 card, with a nortek zigbee/zwave controller.

When frigate is running zwave devices get disconnected and i cannot re-interview devices. Once Frigate is shutdown i can re-interview devices flawlessly.

I have homeassistant running both Frigate and ZWaveJS in a VM with 6cores 12threads, 8GB of Ram.

This didnt seem to be an issue when I only had 3 Cameras Running through Frigate, I now have 7 Cameras.

Cpu Usage hovers around 40% with frigate. Personally I am leaning towards it being a cpu issue as the source from the cameras are all 4k, and the detection runs at 720p so downscaling is required.

As far as cpu usage goes, yes resizing is a problem. It will work better in 0.12 when you use ffmpeg presets for hardware acceleration

Im using 0.12 for about a week now and the issue i had with the conbee2 and usb coral seems fixed. My zigbee network stays stable for now even after several reboots from frigate or the host. The cpu runs a lot lower also on 0.12. Im also using NVidia. But didn't changed anything 0.11 had i issues a lot some times it was stable for few days but eventually i would fail. Really hoping this issue is fixed with 0.12 looks like it for now🥳

This morning i had the issues with 0.12 the zigbee network became unreliable again. I don't really know how i can identify the problemen but i believe it has something to do with the cpu instead of interference with the coral.

I use a dell t3630 Intel Xeon E3-1240 V5 4-CORE 3.5Ghz 32gb with nvidia k620 and usb coral.

Debian 11 with home assistant supervised and running frigate in docker not as addon.

I never had issues before I started using frigate. I also had plex on it but moved it before starting with frigate to my windows server but with plex the cpu got much higher then with frigate and then I didn't had these issues. Maybe this is not all related but i really have no clue where to start looking to identify the problem. Maybe someone could point me in the right direction?

pbvdven commented 1 year ago

i moved my frigate to another pc its next to the one with home assistant installed. but still i have the same issues when frigate is running eventually my zigbee network goes down when i stop the container it almost works instantly even when frigate is on the other machine. i stopt the ha integration then the problem still exist i disabled mqtt in frigate and stopt the addon in home assistant and still no change. but when i stop the frigate container on the other machine it starts working again. so the problem is probably interference but i already use a 3m shielded extension for my zigbee stick. so im out of options please some help i cant be the only one with this issue?

ro-explorer commented 9 months ago

2 years late - I ended up in exactly the same scenario as OP. Zigbee network (Conbee II coordinator) working perfectly for years. I've added a coral TPU to the frigate instance and in the moment I started Frigate the zigbee network died. I went through a lot of troubleshooting and the final conclusion is a problematic internal USB hub when one device shifts the hib in USB 3.0 mode while the conbee adapter still tried some USB2.0 protocol (on a legacy NUC unit). By putting a USB 2.0 HUB in between the USB3.0port of the computer and the Conbee II coordinator all problem are gone, everything works perfect again.

Just wanted to share my experience.

aminasadi0 commented 6 months ago

Well same here. I have wifi cameras so I never thought of any other issue than interference. I tried setting all wifi router to channel 1 or 6 and set conbii channel to 24. The network became a bit better but still not fully functional. My hardware is a mac mini i5 flashed into Ubuntu running HA and Frigate in docker-compose.