question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
pbvdvencommented, Dec 21, 2022

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

0reactions
NickM-27commented, Dec 21, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Zigbee stick not working when using with an SSD ...
Now we can finally boot a Rasberry Pi 4 native from an SSD, but when you also use a Conbee or Raspbee stick...
Read more >
[SOLVED] ZHA not working with conbee II
I just pluged in a Conbee II key and it was correctly detected but the configuration failed systematicaly with the following error: ...
Read more >
Home Assistant | Z2M and Conbee coordinator | Facebook
I have HA on a pi4 and is connected to an UPS to avoid issue due to the power. Anyway, when the power...
Read more >
Zigbee Sufferers Unite : r/homeassistant - Reddit
I am a Zigbee Sufferer. Starting about two weeks ago my ConBee II lost touch with all devices. Restarts, reinstalls, backups - nothing...
Read more >
[SOLVED] Conbee II stopped adding devices - General Support
My conbee had previously connected to my zigbee devices with no problem. (Aqara temp sensor and button and Ikea dimmer). I had some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found