mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
update deps (#6093)
* update dev deps * update deps * docs deps * python dev deps * update python deps
This commit is contained in:
parent
a218d2f6ff
commit
15415bab10
1365
docs/package-lock.json
generated
1365
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -14,12 +14,12 @@
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "^2.2.0",
|
||||
"@docusaurus/preset-classic": "^2.2.0",
|
||||
"@docusaurus/core": "^2.4.0",
|
||||
"@docusaurus/preset-classic": "^2.4.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
@ -36,8 +36,8 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.0",
|
||||
"@docusaurus/module-type-aliases": "2.2.0"
|
||||
"@docusaurus/module-type-aliases": "^2.4.0",
|
||||
"@types/react": "^17.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
|
@ -391,7 +391,6 @@ class FrigateApp:
|
||||
self.start_stats_emitter()
|
||||
self.start_watchdog()
|
||||
self.check_shm()
|
||||
# self.zeroconf = broadcast_zeroconf(self.config.mqtt.client_id)
|
||||
|
||||
def receiveSignal(signalNumber: int, frame: Optional[FrameType]) -> None:
|
||||
self.stop()
|
||||
|
@ -59,6 +59,3 @@ ignore_errors = false
|
||||
[mypy-frigate.watchdog]
|
||||
ignore_errors = false
|
||||
disallow_untyped_calls = false
|
||||
|
||||
[mypy-frigate.zeroconf]
|
||||
ignore_errors = false
|
||||
|
@ -329,7 +329,6 @@ class BirdsEyeFrameManager:
|
||||
|
||||
# update each position in the layout
|
||||
for position, camera in enumerate(self.camera_layout, start=0):
|
||||
|
||||
# if this camera was removed, replace it or clear it
|
||||
if camera in removed_cameras:
|
||||
# if replacing this camera with a newly added one
|
||||
|
@ -111,7 +111,6 @@ class RecordingMaintainer(threading.Thread):
|
||||
grouped_recordings[camera] = grouped_recordings[camera][-keep_count:]
|
||||
|
||||
for camera, recordings in grouped_recordings.items():
|
||||
|
||||
# clear out all the recording info for old frames
|
||||
while (
|
||||
len(self.recordings_info[camera]) > 0
|
||||
|
@ -23,7 +23,6 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_latest_version(config: FrigateConfig) -> str:
|
||||
|
||||
if not config.telemetry.version_check:
|
||||
return "disabled"
|
||||
|
||||
|
@ -179,7 +179,6 @@ class StorageMaintainer(threading.Thread):
|
||||
def run(self):
|
||||
"""Check every 5 minutes if storage needs to be cleaned up."""
|
||||
while not self.stop_event.wait(300):
|
||||
|
||||
if not self.camera_storage_stats or True in [
|
||||
r["needs_refresh"] for r in self.camera_storage_stats.values()
|
||||
]:
|
||||
|
@ -673,7 +673,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].detect.max_disappeared == 5 * 5
|
||||
|
||||
def test_motion_frame_height_wont_go_below_120(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -702,7 +701,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].motion.frame_height == 50
|
||||
|
||||
def test_motion_contour_area_dynamic(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -731,7 +729,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert round(runtime_config.cameras["back"].motion.contour_area) == 30
|
||||
|
||||
def test_merge_labelmap(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"model": {"labelmap": {7: "truck"}},
|
||||
@ -761,7 +758,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.model.merged_labelmap[7] == "truck"
|
||||
|
||||
def test_default_labelmap_empty(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -790,7 +786,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.model.merged_labelmap[0] == "person"
|
||||
|
||||
def test_default_labelmap(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"model": {"width": 320, "height": 320},
|
||||
@ -820,7 +815,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.model.merged_labelmap[0] == "person"
|
||||
|
||||
def test_fails_on_invalid_role(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -849,7 +843,6 @@ class TestConfig(unittest.TestCase):
|
||||
self.assertRaises(ValidationError, lambda: FrigateConfig(**config))
|
||||
|
||||
def test_fails_on_missing_role(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -880,7 +873,6 @@ class TestConfig(unittest.TestCase):
|
||||
self.assertRaises(ValueError, lambda: frigate_config.runtime_config)
|
||||
|
||||
def test_works_on_missing_role_multiple_cams(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -929,7 +921,6 @@ class TestConfig(unittest.TestCase):
|
||||
runtime_config = frigate_config.runtime_config
|
||||
|
||||
def test_global_detect(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"detect": {"max_disappeared": 1},
|
||||
@ -959,7 +950,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].detect.height == 1080
|
||||
|
||||
def test_default_detect(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -983,7 +973,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].detect.height == 720
|
||||
|
||||
def test_global_detect_merge(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"detect": {"max_disappeared": 1, "height": 720},
|
||||
@ -1014,7 +1003,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].detect.width == 1920
|
||||
|
||||
def test_global_snapshots(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"snapshots": {"enabled": True},
|
||||
@ -1042,7 +1030,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].snapshots.height == 100
|
||||
|
||||
def test_default_snapshots(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1066,7 +1053,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].snapshots.quality == 70
|
||||
|
||||
def test_global_snapshots_merge(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"snapshots": {"bounding_box": False, "height": 300},
|
||||
@ -1096,7 +1082,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].snapshots.enabled
|
||||
|
||||
def test_global_rtmp_disabled(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1119,7 +1104,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert not runtime_config.cameras["back"].rtmp.enabled
|
||||
|
||||
def test_default_not_rtmp(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1142,7 +1126,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert not runtime_config.cameras["back"].rtmp.enabled
|
||||
|
||||
def test_global_rtmp_merge(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"rtmp": {"enabled": False},
|
||||
@ -1169,7 +1152,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].rtmp.enabled
|
||||
|
||||
def test_global_rtmp_default(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1196,7 +1178,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert not runtime_config.cameras["back"].rtmp.enabled
|
||||
|
||||
def test_global_jsmpeg(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"live": {"quality": 4},
|
||||
@ -1220,7 +1201,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].live.quality == 4
|
||||
|
||||
def test_default_live(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1243,7 +1223,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].live.quality == 8
|
||||
|
||||
def test_global_live_merge(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"live": {"quality": 4, "height": 480},
|
||||
@ -1271,7 +1250,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].live.height == 480
|
||||
|
||||
def test_global_timestamp_style(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"timestamp_style": {"position": "bl"},
|
||||
@ -1295,7 +1273,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].timestamp_style.position == "bl"
|
||||
|
||||
def test_default_timestamp_style(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"cameras": {
|
||||
@ -1318,7 +1295,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].timestamp_style.position == "tl"
|
||||
|
||||
def test_global_timestamp_style_merge(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"rtmp": {"enabled": False},
|
||||
@ -1345,7 +1321,6 @@ class TestConfig(unittest.TestCase):
|
||||
assert runtime_config.cameras["back"].timestamp_style.thickness == 4
|
||||
|
||||
def test_allow_retain_to_be_a_decimal(self):
|
||||
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
"snapshots": {"retain": {"default": 1.5}},
|
||||
|
@ -772,7 +772,6 @@ def get_docker_memlimit_bytes() -> int:
|
||||
|
||||
# check running a supported cgroups version
|
||||
if get_cgroups_version() == "cgroup2":
|
||||
|
||||
memlimit_command = ["cat", "/sys/fs/cgroup/memory.max"]
|
||||
|
||||
p = sp.run(
|
||||
@ -817,7 +816,6 @@ def get_cpu_stats() -> dict[str, dict]:
|
||||
for line in lines:
|
||||
stats = list(filter(lambda a: a != "", line.strip().split(" ")))
|
||||
try:
|
||||
|
||||
if docker_memlimit > 0:
|
||||
mem_res = int(stats[5])
|
||||
mem_pct = str(
|
||||
|
@ -162,7 +162,6 @@ def capture_frames(
|
||||
current_frame: mp.Value,
|
||||
stop_event: mp.Event,
|
||||
):
|
||||
|
||||
frame_size = frame_shape[0] * frame_shape[1]
|
||||
frame_rate = EventsPerSecond()
|
||||
frame_rate.start()
|
||||
@ -594,7 +593,6 @@ def process_frames(
|
||||
stop_event,
|
||||
exit_on_empty: bool = False,
|
||||
):
|
||||
|
||||
fps = process_info["process_fps"]
|
||||
detection_fps = process_info["detection_fps"]
|
||||
current_frame_time = process_info["detection_frame"]
|
||||
@ -748,7 +746,6 @@ def process_frames(
|
||||
|
||||
selected_objects = []
|
||||
for group in detected_object_groups.values():
|
||||
|
||||
# apply non-maxima suppression to suppress weak, overlapping bounding boxes
|
||||
# o[2] is the box of the object: xmin, ymin, xmax, ymax
|
||||
# apply max/min to ensure values do not exceed the known frame size
|
||||
|
@ -1,62 +0,0 @@
|
||||
import logging
|
||||
import socket
|
||||
|
||||
from zeroconf import (
|
||||
ServiceInfo,
|
||||
NonUniqueNameException,
|
||||
InterfaceChoice,
|
||||
IPVersion,
|
||||
Zeroconf,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
ZEROCONF_TYPE = "_frigate._tcp.local."
|
||||
|
||||
# Taken from: http://stackoverflow.com/a/11735897
|
||||
def get_local_ip() -> bytes:
|
||||
"""Try to determine the local IP address of the machine."""
|
||||
host_ip_str = ""
|
||||
try:
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
# Use Google Public DNS server to determine own IP
|
||||
sock.connect(("8.8.8.8", 80))
|
||||
|
||||
host_ip_str = sock.getsockname()[0]
|
||||
except OSError:
|
||||
try:
|
||||
host_ip_str = socket.gethostbyname(socket.gethostname())
|
||||
except socket.gaierror:
|
||||
host_ip_str = "127.0.0.1"
|
||||
finally:
|
||||
sock.close()
|
||||
|
||||
try:
|
||||
host_ip_pton = socket.inet_pton(socket.AF_INET, host_ip_str)
|
||||
except OSError:
|
||||
host_ip_pton = socket.inet_pton(socket.AF_INET6, host_ip_str)
|
||||
|
||||
return host_ip_pton
|
||||
|
||||
|
||||
def broadcast_zeroconf(frigate_id: str) -> Zeroconf:
|
||||
zeroconf = Zeroconf(interfaces=InterfaceChoice.Default, ip_version=IPVersion.V4Only)
|
||||
|
||||
host_ip = get_local_ip()
|
||||
|
||||
info = ServiceInfo(
|
||||
ZEROCONF_TYPE,
|
||||
name=f"{frigate_id}.{ZEROCONF_TYPE}",
|
||||
addresses=[host_ip],
|
||||
port=5000,
|
||||
)
|
||||
|
||||
logger.info("Starting Zeroconf broadcast")
|
||||
try:
|
||||
zeroconf.register_service(info)
|
||||
except NonUniqueNameException:
|
||||
logger.error(
|
||||
"Frigate instance with identical name present in the local network"
|
||||
)
|
||||
return zeroconf
|
@ -1,2 +1,2 @@
|
||||
pylint == 2.15.*
|
||||
black == 22.12.*
|
||||
pylint == 2.17.*
|
||||
black == 23.3.*
|
||||
|
@ -11,15 +11,14 @@ peewee_migrate == 1.6.*
|
||||
psutil == 5.9.*
|
||||
pydantic == 1.10.*
|
||||
PyYAML == 6.0
|
||||
pytz == 2022.7
|
||||
pytz == 2023.3
|
||||
tzlocal == 4.2
|
||||
types-PyYAML == 6.0.*
|
||||
requests == 2.28.*
|
||||
types-requests == 2.28.*
|
||||
scipy == 1.8.*
|
||||
scipy == 1.10.*
|
||||
setproctitle == 1.3.*
|
||||
ws4py == 0.5.*
|
||||
zeroconf == 0.47.*
|
||||
# Openvino Library - Custom built with MYRIAD support
|
||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.2.0/openvino-2022.2.0-000-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64'
|
||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.2.0/openvino-2022.2.0-000-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64'
|
||||
|
3648
web/package-lock.json
generated
3648
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,21 +13,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@cycjimmy/jsmpeg-player": "^6.0.5",
|
||||
"axios": "^1.2.2",
|
||||
"axios": "^1.3.5",
|
||||
"copy-to-clipboard": "3.3.3",
|
||||
"date-fns": "^2.29.3",
|
||||
"idb-keyval": "^6.2.0",
|
||||
"immer": "^9.0.16",
|
||||
"monaco-yaml": "^4.0.2",
|
||||
"preact": "^10.11.3",
|
||||
"immer": "^9.0.21",
|
||||
"monaco-yaml": "^4.0.4",
|
||||
"preact": "^10.13.2",
|
||||
"preact-async-route": "^2.2.1",
|
||||
"preact-router": "^4.1.0",
|
||||
"react": "npm:@preact/compat@^17.1.2",
|
||||
"react-dom": "npm:@preact/compat@^17.1.2",
|
||||
"strftime": "^0.10.1",
|
||||
"swr": "^1.3.0",
|
||||
"video.js": "^7.20.3",
|
||||
"videojs-playlist": "^5.0.0",
|
||||
"video.js": "^7.21.4",
|
||||
"videojs-playlist": "^5.1.0",
|
||||
"videojs-seek-buttons": "^3.0.1",
|
||||
"vite-plugin-monaco-editor": "^1.1.0"
|
||||
},
|
||||
@ -35,26 +35,26 @@
|
||||
"@preact/preset-vite": "^2.5.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/preact": "^3.2.2",
|
||||
"@testing-library/preact": "^3.2.3",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/video.js": "^7.3.50",
|
||||
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
||||
"@typescript-eslint/parser": "^5.47.1",
|
||||
"@vitest/coverage-c8": "^0.26.2",
|
||||
"@vitest/ui": "^0.26.2",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint": "^8.30.0",
|
||||
"@types/video.js": "^7.3.51",
|
||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
||||
"@typescript-eslint/parser": "^5.58.0",
|
||||
"@vitest/coverage-c8": "^0.30.1",
|
||||
"@vitest/ui": "^0.30.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-config-preact": "^1.3.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-vitest-globals": "^1.2.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-vitest-globals": "^1.3.1",
|
||||
"fake-indexeddb": "^4.0.1",
|
||||
"jsdom": "^20.0.3",
|
||||
"msw": "^0.49.2",
|
||||
"jsdom": "^21.1.1",
|
||||
"msw": "^1.2.1",
|
||||
"postcss": "^8.4.19",
|
||||
"prettier": "^2.8.0",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^4.0.3",
|
||||
"vitest": "^0.25.3"
|
||||
"prettier": "^2.8.7",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"typescript": "^5.0.4",
|
||||
"vite": "^4.2.1",
|
||||
"vitest": "^0.30.1"
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ const getUTCOffset = (date: Date, timezone: string): number => {
|
||||
const utcDate = new Date(date.getTime() - (date.getTimezoneOffset() * 60 * 1000));
|
||||
// locale of en-CA is required for proper locale format
|
||||
let iso = utcDate.toLocaleString('en-CA', { timeZone: timezone, hour12: false }).replace(', ', 'T');
|
||||
iso += '.' + utcDate.getMilliseconds().toString().padStart(3, '0');
|
||||
const target = new Date(iso + 'Z');
|
||||
iso += `.${utcDate.getMilliseconds().toString().padStart(3, '0')}`;
|
||||
const target = new Date(`${iso}Z`);
|
||||
return (target.getTime() - utcDate.getTime()) / 60 / 1000;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user