mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 23:15:28 +03:00
Compare commits
2 Commits
78bc11d7e0
...
fa3c7a44d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa3c7a44d2 | ||
|
|
1ea9692b49 |
@ -283,17 +283,6 @@ Topic to activate or deactivate a [profile](/configuration/profiles). Publish a
|
|||||||
|
|
||||||
Topic with the currently active profile name. Published value is the profile name or `none` if no profile is active. This topic is retained.
|
Topic with the currently active profile name. Published value is the profile name or `none` if no profile is active. This topic is retained.
|
||||||
|
|
||||||
### `frigate/profiles/available`
|
|
||||||
|
|
||||||
Topic with a JSON array of all available profile definitions. Published on startup as a retained message.
|
|
||||||
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{ "name": "away", "friendly_name": "Away" },
|
|
||||||
{ "name": "home", "friendly_name": "Home" }
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
### `frigate/notifications/set`
|
### `frigate/notifications/set`
|
||||||
|
|
||||||
Topic to turn notifications on and off. Expected values are `ON` and `OFF`.
|
Topic to turn notifications on and off. Expected values are `ON` and `OFF`.
|
||||||
|
|||||||
@ -29,11 +29,13 @@ from frigate.api import (
|
|||||||
review,
|
review,
|
||||||
)
|
)
|
||||||
from frigate.api.auth import get_jwt_secret, limiter, require_admin_by_default
|
from frigate.api.auth import get_jwt_secret, limiter, require_admin_by_default
|
||||||
|
from frigate.comms.dispatcher import Dispatcher
|
||||||
from frigate.comms.event_metadata_updater import (
|
from frigate.comms.event_metadata_updater import (
|
||||||
EventMetadataPublisher,
|
EventMetadataPublisher,
|
||||||
)
|
)
|
||||||
from frigate.config import FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.config.camera.updater import CameraConfigUpdatePublisher
|
from frigate.config.camera.updater import CameraConfigUpdatePublisher
|
||||||
|
from frigate.config.profile_manager import ProfileManager
|
||||||
from frigate.debug_replay import DebugReplayManager
|
from frigate.debug_replay import DebugReplayManager
|
||||||
from frigate.embeddings import EmbeddingsContext
|
from frigate.embeddings import EmbeddingsContext
|
||||||
from frigate.genai import GenAIClientManager
|
from frigate.genai import GenAIClientManager
|
||||||
@ -69,8 +71,8 @@ def create_fastapi_app(
|
|||||||
event_metadata_updater: EventMetadataPublisher,
|
event_metadata_updater: EventMetadataPublisher,
|
||||||
config_publisher: CameraConfigUpdatePublisher,
|
config_publisher: CameraConfigUpdatePublisher,
|
||||||
replay_manager: DebugReplayManager,
|
replay_manager: DebugReplayManager,
|
||||||
dispatcher=None,
|
dispatcher: Optional[Dispatcher] = None,
|
||||||
profile_manager=None,
|
profile_manager: Optional[ProfileManager] = None,
|
||||||
enforce_default_admin: bool = True,
|
enforce_default_admin: bool = True,
|
||||||
):
|
):
|
||||||
logger.info("Starting FastAPI app")
|
logger.info("Starting FastAPI app")
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
from typing import Any, Callable
|
from typing import Any, Callable
|
||||||
@ -169,16 +168,6 @@ class MqttClient(Communicator):
|
|||||||
self.config.active_profile or "none",
|
self.config.active_profile or "none",
|
||||||
retain=True,
|
retain=True,
|
||||||
)
|
)
|
||||||
available_profiles = [
|
|
||||||
{"name": name, "friendly_name": defn.friendly_name}
|
|
||||||
for name, defn in sorted(self.config.profiles.items())
|
|
||||||
]
|
|
||||||
self.publish(
|
|
||||||
"profiles/available",
|
|
||||||
json.dumps(available_profiles),
|
|
||||||
retain=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.publish("available", "online", retain=True)
|
self.publish("available", "online", retain=True)
|
||||||
|
|
||||||
def on_mqtt_command(
|
def on_mqtt_command(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user