ad4fcd1cfd
First-party plugins for Fabled Scryer (https://github.com/bvandeusen/fabledscryer). traefik: Prometheus metrics scraping, stats history, access log parsing (GeoIP optional) unifi: UniFi controller integration — WAN health, devices, clients, DPI, events ups: UPS monitoring via NUT (Network UPS Tools), Ansible shutdown automation Each plugin follows the Fabled Scryer plugin contract: setup(app), get_scheduled_tasks(), get_blueprint() index.yaml lists all three plugins in the catalog format. Populate checksum_sha256 entries once release zips are published via GitHub Releases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
687 B
Python
29 lines
687 B
Python
# plugins/unifi/__init__.py
|
|
from __future__ import annotations
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from quart import Quart
|
|
|
|
_app: "Quart | None" = None
|
|
|
|
|
|
def setup(app: "Quart") -> None:
|
|
global _app
|
|
_app = app
|
|
from .models import ( # noqa: F401
|
|
UnifiWanStat, UnifiClientSnapshot, UnifiWlanStat, UnifiDpiSnapshot,
|
|
UnifiDevice, UnifiKnownClient, UnifiEvent, UnifiAlarm,
|
|
UnifiSpeedtestResult, UnifiNetwork, UnifiPortForward, UnifiFwRule,
|
|
)
|
|
|
|
|
|
def get_scheduled_tasks() -> list:
|
|
from .scheduler import make_poll_task
|
|
return [make_poll_task(_app)]
|
|
|
|
|
|
def get_blueprint():
|
|
from .routes import unifi_bp
|
|
return unifi_bp
|