Hailo8l hat/Pi5 integration Frigate/Home Assistant OS

Hello everyone,

I have been running into some problems whilst trying to get Frigate up and running on Home Assistant (core: 2025.12.4 supervisor: 2025.12.3 os: 16.3).

I haven’t been able to find a straightforward way to check that the Hailo8l AI hat on my Pi 5 is configured and up to date. All command examples I have found don’t seem work on Home Assistant OS.

Commands like v4l2-ctl --list-devices, hailo-version or pip show hailo all return the ‘command not found’ error message in the terminal add on within Home Assistant.

I added the codedetectors: hailo: type: hailo8l device: /dev/hailo0 to the frigate.yaml configuration file, but that seemed to break Frigate. The Frigate add on stopped running properly even though I had selected watchdog in the settings. When Frigate would run, the feed from my USB camera stopped working properly also, and kept cutting out. I removed the ‘detectors:’ block of code, and Frigate started running again properly.

I had a look at the log, and it was complaining about libhailort failing with error 91 . Something to do with the hailo hef file being corrupted.

I am thinking an update for the hailo hat should hopefully fix the issue, it’s just finding instructions to do that is proving to be a challenge.

Any help would be greatly appreciated. Thanks

Best wishes

blakeblackshear/frigate · Discussions · GitHub is the official Frigate support hub and is another good place to get help with Frigate if you don’t get an answer here.

2 Likes

We can’t help without seeing the logs from Frigate

Hello,

Thanks for getting back to me.

I will try posting in the github forum if needed, thanks.

Here is the log from Frigate

2025-12-29 21:36:51.884498316  [INFO] Preparing Frigate...
2025-12-29 21:36:55.361386300  [INFO] Starting Frigate...
2025-12-29 21:36:58.617596235  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2025-12-29 21:36:58.617602130    setattr(self, word, getattr(machar, word).flat[0])
2025-12-29 21:36:58.617682479  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2025-12-29 21:36:58.617684185    return self._float_to_str(self.smallest_subnormal)
2025-12-29 21:36:58.617782294  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2025-12-29 21:36:58.617783888    setattr(self, word, getattr(machar, word).flat[0])
2025-12-29 21:36:58.617811308  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2025-12-29 21:36:58.617812569    return self._float_to_str(self.smallest_subnormal)
2025-12-29 21:37:02.334042332  [2025-12-29 21:37:02] frigate.util.config            INFO    : Checking if frigate config needs migration...
2025-12-29 21:37:02.343522028  [2025-12-29 21:37:02] frigate.util.config            INFO    : frigate config does not need migration...
2025-12-29 21:37:03.077884977  [2025-12-29 21:37:03] frigate.util.services          WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended
2025-12-29 21:37:03.148051404  [2025-12-29 21:37:03] frigate.app                    INFO    : Starting Frigate (0.16.3-9034454)
2025-12-29 21:37:03.148772177  [2025-12-29 21:37:03] frigate.app                    INFO    : Creating directory: /tmp/cache
2025-12-29 21:37:03.169037722  [2025-12-29 21:37:03] peewee_migrate.logs            INFO    : Starting migrations
2025-12-29 21:37:03.169661439  [2025-12-29 21:37:03] peewee_migrate.logs            INFO    : There is nothing to migrate
2025-12-29 21:37:03.180883980  [2025-12-29 21:37:03] frigate.app                    INFO    : Recording process started: 432
2025-12-29 21:37:03.190896484  [2025-12-29 21:37:03] frigate.app                    INFO    : Review process started: 435
2025-12-29 21:37:03.195610032  [2025-12-29 21:37:03] frigate.app                    INFO    : go2rtc process pid: 127
2025-12-29 21:37:03.221965305  [2025-12-29 21:37:03] detector.cpu                   INFO    : Starting detection process: 457
2025-12-29 21:37:03.222742158  [2025-12-29 21:37:03] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2025-12-29 21:37:03.241511486  [2025-12-29 21:37:03] frigate.app                    INFO    : Output process started: 474
2025-12-29 21:37:03.279964098  [2025-12-29 21:37:03] frigate.app                    INFO    : Camera processor started for usb_camera: 503
2025-12-29 21:37:03.283634014  INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2025-12-29 21:37:03.296628001  [2025-12-29 21:37:03] frigate.app                    INFO    : Capture process started for usb_camera: 507
2025-12-29 21:37:04.472480004  [2025-12-29 21:37:04] frigate.api.fastapi_app        INFO    : Starting FastAPI app
2025-12-29 21:37:04.804157730  [2025-12-29 21:37:04] frigate.api.fastapi_app        INFO    : FastAPI started

The warning about not detecting a hardware accelerator contained a link that took me to a non existent page. I’m not totally sure about the cpu detector warning to be honest. I removed the code in the yaml file that referred to detectors.

Is there a command I can run in the terminal add on that would update the firmware of the Hailo hat, or at least just tell me if it was recognised and active? Thanks

Best wishes

Your config is not setup to use the Hailo, copy the config example in the docs

I added these lines of code to the yaml file

detectors:
    hailo8l:
        type: hailo8l
        device: PCIe

The log file now appears to recognise the Hailo, but I am getting the HEF file corrupted error message again

2025-12-29 22:32:58.922936124  [INFO] Preparing Frigate...
2025-12-29 22:32:59.783623241  [INFO] Starting Frigate...
2025-12-29 22:33:02.019132241  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2025-12-29 22:33:02.019138792    setattr(self, word, getattr(machar, word).flat[0])
2025-12-29 22:33:02.023612720  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2025-12-29 22:33:02.023615570    return self._float_to_str(self.smallest_subnormal)
2025-12-29 22:33:02.023783469  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2025-12-29 22:33:02.023786060    setattr(self, word, getattr(machar, word).flat[0])
2025-12-29 22:33:02.023843075  /usr/local/lib/python3.11/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2025-12-29 22:33:02.023844908    return self._float_to_str(self.smallest_subnormal)
2025-12-29 22:33:04.342440406  [2025-12-29 22:33:04] frigate.util.config            INFO    : Checking if frigate config needs migration...
2025-12-29 22:33:04.356068689  [2025-12-29 22:33:04] frigate.util.config            INFO    : frigate config does not need migration...
2025-12-29 22:33:05.126322253  [2025-12-29 22:33:05] frigate.util.services          WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended
2025-12-29 22:33:05.131048771  [2025-12-29 22:33:05] frigate.app                    INFO    : Starting Frigate (0.16.3-9034454)
2025-12-29 22:33:05.131652341  [2025-12-29 22:33:05] frigate.app                    INFO    : Creating directory: /tmp/cache
2025-12-29 22:33:05.141602665  [2025-12-29 22:33:05] peewee_migrate.logs            INFO    : Starting migrations
2025-12-29 22:33:05.142734132  [2025-12-29 22:33:05] peewee_migrate.logs            INFO    : There is nothing to migrate
2025-12-29 22:33:05.154010390  [2025-12-29 22:33:05] frigate.app                    INFO    : Recording process started: 241
2025-12-29 22:33:05.167444373  [2025-12-29 22:33:05] frigate.app                    INFO    : Review process started: 254
2025-12-29 22:33:05.170508602  [2025-12-29 22:33:05] frigate.app                    INFO    : go2rtc process pid: 122
2025-12-29 22:33:05.192362996  [2025-12-29 22:33:05] detector.hailo8l               INFO    : Starting detection process: 266
2025-12-29 22:33:05.210695570  [2025-12-29 22:33:05] frigate.app                    INFO    : Output process started: 285
2025-12-29 22:33:05.234508450  [2025-12-29 22:33:05] frigate.app                    INFO    : Camera processor started for usb_camera: 319
2025-12-29 22:33:05.259625000  [2025-12-29 22:33:05] frigate.app                    INFO    : Capture process started for usb_camera: 323
2025-12-29 22:33:05.332322524  [HailoRT] [error] CHECK failed - HEF file length does not match
2025-12-29 22:33:05.332353134  [HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_HEF_FILE_CORRUPTED(91)
2025-12-29 22:33:05.332355077  [HailoRT] [error] Failed parsing HEF file
2025-12-29 22:33:05.332356039  [HailoRT] [error] Failed creating HEF
2025-12-29 22:33:05.332367587  [HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_HEF_FILE_CORRUPTED(91)
2025-12-29 22:33:05.338565445  Process detector:hailo8l:
2025-12-29 22:33:05.338575160  Traceback (most recent call last):
2025-12-29 22:33:05.338576789    File "/usr/local/lib/python3.11/dist-packages/hailo_platform/pyhailort/pyhailort.py", line 345, in __init__
2025-12-29 22:33:05.338578084      self._hef = _pyhailort.Hef.create_from_file(hef_source)
2025-12-29 22:33:05.338581175                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338586153  hailo_platform.pyhailort._pyhailort.HailoRTStatusException: 91
2025-12-29 22:33:25.293434  2025-12-29 22:33:05.338587079
2025-12-29 22:33:05.338588374  The above exception was the direct cause of the following exception:
2025-12-29 22:33:25.293466  2025-12-29 22:33:05.338620742
2025-12-29 22:33:05.338622074  Traceback (most recent call last):
2025-12-29 22:33:05.338623370    File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
2025-12-29 22:33:05.338624758      self.run()
2025-12-29 22:33:05.338625905    File "/opt/frigate/frigate/util/process.py", line 41, in run_wrapper
2025-12-29 22:33:05.338664195      return run(*args, **kwargs)
2025-12-29 22:33:05.338665787             ^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338666971    File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run
2025-12-29 22:33:05.338681684      self._target(*self._args, **self._kwargs)
2025-12-29 22:33:05.338683238    File "/opt/frigate/frigate/object_detection/base.py", line 112, in run_detector
2025-12-29 22:33:05.338684571      object_detector = LocalObjectDetector(detector_config=detector_config)
2025-12-29 22:33:05.338685755                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338686958    File "/opt/frigate/frigate/object_detection/base.py", line 57, in __init__
2025-12-29 22:33:05.338687957      self.detect_api = create_detector(detector_config)
2025-12-29 22:33:05.338688957                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338702485    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2025-12-29 22:33:05.338703503      return api(detector_config)
2025-12-29 22:33:05.338704354             ^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338705539    File "/opt/frigate/frigate/detectors/plugins/hailo8l.py", line 256, in __init__
2025-12-29 22:33:05.338706612      self.inference_engine = HailoAsyncInference(
2025-12-29 22:33:05.338707593                              ^^^^^^^^^^^^^^^^^^^^
2025-12-29 22:33:05.338708777    File "/opt/frigate/frigate/detectors/plugins/hailo8l.py", line 112, in __init__
2025-12-29 22:33:05.338709591      self.hef = HEF(hef_path)
2025-12-29 22:33:05.338725378                 ^^^^^^^^^^^^^
2025-12-29 22:33:05.338727543    File "/usr/local/lib/python3.11/dist-packages/hailo_platform/pyhailort/pyhailort.py", line 343, in __init__
2025-12-29 22:33:05.338728376      with ExceptionWrapper():
2025-12-29 22:33:05.338729782    File "/usr/local/lib/python3.11/dist-packages/hailo_platform/pyhailort/pyhailort.py", line 122, in __exit__
2025-12-29 22:33:05.338730837      self._raise_indicative_status_exception(value)
2025-12-29 22:33:05.338732484    File "/usr/local/lib/python3.11/dist-packages/hailo_platform/pyhailort/pyhailort.py", line 172, in _raise_indicative_status_exception
2025-12-29 22:33:05.338733687      raise self.create_exception_from_status(error_code) from libhailort_exception
2025-12-29 22:33:05.338735167  hailo_platform.pyhailort.pyhailort.HailoRTException: libhailort failed with error: 91 (HAILO_HEF_FILE_CORRUPTED)
2025-12-29 22:33:05.341231507  [2025-12-29 22:33:05] frigate.detectors.plugins.hailo8l ERROR   : [INIT] Failed to initialize HailoAsyncInference: libhailort failed with error: 91 (HAILO_HEF_FILE_CORRUPTED)
2025-12-29 22:33:05.913745928  [2025-12-29 22:33:05] frigate.api.fastapi_app        INFO    : Starting FastAPI app
2025-12-29 22:33:06.234609870  [2025-12-29 22:33:06] frigate.api.fastapi_app        INFO    : FastAPI started

And now the video stream is broken. It cuts out with a blank or white screen most of the time. And I only get the proper camera feed for a few seconds before it cuts out again

So I have added a few more lines to the yaml file after following section 9 of this guide here, but now I get an ‘Unknown error’ message when I try to save and restart Frigate

Here is my config file

mqtt:
  enabled: true
  host: 192.168.1.128
  user: mqtt_frigate
  password: *******

go2rtc:
  streams:
    usb_camera:
      - ffmpeg:device?video=0&video_size=1024x576#video=h264

cameras:
  usb_camera:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/usb_camera
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1024
      height: 576
    objects:
      track:
        - person
        - fork
        - spoon
        - knife
        - banana

detectors:
    hailo8l:
        type: hailo8l
        device: PCIe

# Default model
model:
  width: 640
  height: 640
  input_tensor: nhwc
  input_pixel_format: rgb
  input_dtype: int
  model_type: yolo-generic  # Default YOLOv6n

# Example with Custom YOLO Model (HEF compiled for Hailo8) with URL (e.g. YOLOv8m)
# model:
#   width: 640
#   height: 640
#   input_tensor: nhwc
#   input_pixel_format: rgb
#   input_dtype: int
#   model_type: yolo-generic
#   path: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.17.0/hailo8/yolov8m.hef

detect:
  enabled: true
  width: 1280
  height: 720
  fps: 5

objects:
  track:  # List of objects to track from model's labelmap. Since model is Yolo, then: https://docs.ultralytics.com/datasets/detect/coco/#dataset-yaml
    - person
 
  filters:  # Optional: filters to reduce false positives for specific object types
    person:
      min_area: 5000
      max_area: 100000
      min_score: 0.5
      threshold: 0.7

snapshots:  # Optional: Configuration for the jpg snapshots written to the clips directory for each tracked object
  enabled: true
  timestamp: true
  bounding_box: true
  crop: False
  retain:
    default: 1
    objects:
      person: 1

logger:
  default: info
  logs:
    frigate.object_detection: debug
    frigate.motion: debug
    detector.hailo8l: debug

version: 0.16-0

Do I need to specify a path to a specific yolo model in the ‘model:’ section? Thanks