From 27cf1cdf150fbbf409286c631f873d8634f9ef6d Mon Sep 17 00:00:00 2001 From: Marc Altmann <40744649+MarcA711@users.noreply.github.com> Date: Tue, 28 Nov 2023 01:13:12 +0100 Subject: [PATCH] Fix path of device tree on HassOS add on (#8764) * fix device tree path for HassOS * fix symlink call * fix formatting --- frigate/detectors/plugins/rknn.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frigate/detectors/plugins/rknn.py b/frigate/detectors/plugins/rknn.py index 38beec3b2..01c58b94d 100644 --- a/frigate/detectors/plugins/rknn.py +++ b/frigate/detectors/plugins/rknn.py @@ -42,6 +42,11 @@ class Rknn(DetectionApi): type_key = DETECTOR_KEY def __init__(self, config: RknnDetectorConfig): + # create symlink for Home Assistant add on + if not os.path.isfile("/proc/device-tree/compatible"): + if os.path.isfile("/device-tree/compatible"): + os.symlink("/device-tree/compatible", "/proc/device-tree/compatible") + # find out SoC try: with open("/proc/device-tree/compatible") as file: