mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 02:35:22 +03:00
update python deps
This commit is contained in:
parent
b48eaa6fba
commit
3e8beb8132
@ -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
|
||||
|
||||
@ -1,63 +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
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user