Local realtime person detection for RTSP cameras

Disabled protection mode, unplugged coral and restarted a few times (had network issues with camera) but I’m up and running again.

Really appreciate the support.

Does protection mode need to be turned off due to the new config being outside the addon?

@blakeblackshear I dont see a donate button here or on GitHub nor the docs?

found it… well something I never saw before…:

I think in his next version he is working on showing disk usage stats (among many more cool things!): https://github.com/blakeblackshear/frigate/pull/686

1 Like

This is great news. Based on your post and previous posts of yours, I removed the mask, added in zones in the hope that object detections would speed up but I was getting flooded with clips/snapshots form away up the street.

Great News! Thanks

PS. The delay is 2 seconds on my front camera and 4 seconds on my garden camera.

Cant wait for 0.8.2 … All the commits I’ve seen on github are impressive!

Any help would be appreciated. Thanks

Try passing it as a variable to the script: https://www.home-assistant.io/integrations/script/#passing-variables-to-scripts

I have been reading that for an hour now but I don’t understand how to do it if the {{trigger.payload_json["after"]["label"]}} is in multiple parts of the script - and not just a simple message:

Installed addon but not getting option to add config via addon as described i step 3 here:

What am I missing?

This would have been nice to see in the changelog. Thankfully notepad++ autosaves and I had copied/pasted the config into there when moving from the beta to stable or I’d have lost my entire config.

Well so much for consistency…see what happens when you think! :upside_down_face:

It was in the addon changelog.

The supervisor changes from homeassistant would have caused your entire config to be deleted anyway. Nothing I could do about it.

3 Likes

Edit: I switched from beta to stable and when doing so did not turn off protection mode. I swear it was working with it on earlier, but I doubt it. Working now.

Having a tough time recently on the Odroid N2+. Recently it fails ffmpeg and then loses the usb. Any ideas?

Here’s logs after unplug/restart:

 * Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.mqtt                   INFO    : MQTT connected
detector.coral                 INFO    : Starting detection process: 41
frigate.app                    INFO    : Camera processor started for porch: 44
frigate.app                    INFO    : Capture process started for porch: 46
frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate.edgetpu                INFO    : No EdgeTPU detected.
Process detector:coral:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 124, in run_detector
    object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
  File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
    edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog               INFO    : Detection appears to have stopped. Restarting frigate
frigate.app                    INFO    : Stopping...
frigate.object_processing      INFO    : Exiting object processor...
frigate.events                 INFO    : Exiting event processor...
frigate.record                 INFO    : Exiting recording maintenance...
frigate.events                 INFO    : Exiting event cleanup...
frigate.watchdog               INFO    : Exiting watchdog...

It’s not valid since the last supervisor update. Create a file named frigate.yml with your configuration , save it in your home assistant folder.

Hi, whats wrong hre:

* Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
frigate.app                    WARNING : Camera voordeur has rtmp enabled, but rtmp is not assigned to an input.
frigate.app                    WARNING : Camera schuurachter has rtmp enabled, but rtmp is not assigned to an input.
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.mqtt                   INFO    : MQTT connected
detector.coral                 INFO    : Starting detection process: 37
frigate.edgetpu                INFO    : Attempting to load TPU as usb
Process detector:coral:
frigate.edgetpu                INFO    : No EdgeTPU detected.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 124, in run_detector
    object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
  File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
    edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.app                    INFO    : Camera processor started for voordeur: 40
frigate.app                    INFO    : Camera processor started for schuurachter: 41
frigate.app                    INFO    : Capture process started for voordeur: 43
frigate.app                    INFO    : Capture process started for schuurachter: 45
frigate.watchdog               INFO    : Detection appears to have stopped. Restarting frigate
frigate.app                    INFO    : Stopping...
frigate.events                 INFO    : Exiting event processor...
frigate.record                 INFO    : Exiting recording maintenance...
frigate.object_processing      INFO    : Exiting object processor...
frigate.watchdog               INFO    : Exiting watchdog...
frigate.events                 INFO    : Exiting event cleanup...

Your USB coral wasn’t available at start time

Is protection on or off?
It needs to be off.

Then restart addon.

If that fails.

Remove addon

Reboot host machine

Reimstall addon and disable protection

I have no Coral… >

Then why have you set your config that you have?

ehm… did I? not on purpose:

mqtt:
  host: 192.168.1.142
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigateaddon
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigateaddon
  # Optional: user
  user: mqtt
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60
cameras:
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
          roles:
            - detect
    width: 2560
    height: 1440
    fps: 6
  schuurachter:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
          roles:
            - detect
    width: 2048
    height: 1536
    fps: 4
objects:
  track:
    - person
    - car

edit: think I did not have this… weird is that when I had 1 cam it worked without this config, when adding the second it did not.

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

Ok, next (noob) question…

I do get people and cars here:

Should I also see them when I click on this?
I do only see:

and its always empty?