What's New
UniFi Controller API Integration
- Full API client (
unifi_api.py) for the UniFi Controller's Classic and Integration APIs — settings, network config, firewall policies, and client/device polling - Settings UI (
SettingsOverlay.jsx) for configuring the UniFi connection with test-and-save workflow, env var detection, and encrypted API key storage - Setup wizard API path — auto-detects WAN interfaces, network segments, and VLAN topology from the controller instead of log-based discovery
- Firewall Rules viewer (
FirewallRules.jsx) with zone matrix, policy table, bulk syslog toggle, collapsible groups, and per-rule logging management - Device name resolution — background polling of UniFi clients and devices enriches logs with device names (e.g. "SwitchBot Hub", "LG SmartTV") via MAC and IP matching
API Modularization
- Extracted monolithic
api.pyinto 6 focused route modules underreceiver/routes/— logs, stats, setup, unifi, abuseipdb, health - Shared dependencies isolated in
deps.py; query building inquery_helpers.py
Error Handling & Security
- Exception chaining and
logger.exceptionacross all route error handlers for full traceback preservation - Defensive try/except around device name resolution so enrichment pipeline can't abort on UniFi API errors
- Several security enhancements
Dashboard & UI Polish
- Dashboard skeleton loader prevents flash on time range switch
- Log stream background fetch eliminates flicker on auto-refresh
- Zone matrix disclaimer alignment and filter checkbox sizing
- Settings page logo and branding
Bug Fixes (v2.0.0 post-release)
- Fixed: Rules filter always returns no results (fixes #19) — Rule name search now matches both the internal rule name and the visible rule description, using case-insensitive matching
- Fixed: WAN auto-detection wrong for most hardware — Now reads
wan1.uplink_ifnamefrom the gateway device object instead of relying on a hardcoded static map. Works correctly on UDR, UDM, UDM-Pro, UDM-SE, and USG - Fixed: WAN interface edit field reverting on keystroke — Editing the WAN interface in the setup wizard no longer reverts; includes undo button and confidence indicators (verified from gateway / best guess / user edited)
- Added: SVG favicon (fixes #20) — Browser tab now shows the app logo
Key Files Modified
receiver/unifi_api.py— New UniFi Controller API client (770+ lines)receiver/routes/unifi.py— Firewall proxy, settings, device endpointsui/src/components/FirewallRules.jsx— Zone matrix + policy management UIui/src/components/SettingsOverlay.jsx— UniFi connection settingsui/src/components/SetupWizard.jsx— API-powered wizard pathreceiver/db.py— Device name tables, encrypted config storagereceiver/api.py— Slimmed down to app setup + SPA serving (routes extracted)receiver/query_helpers.py— Rule name/desc search fixui/public/favicon.svg— New favicon