github jmasarweh/UniFi-Insights-Plus v2.0.0
v2.0.0 — UniFi API Integration & Firewall Management

latest releases: v3.7.0, v3.6.3, v3.6.2...
3 months ago

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.py into 6 focused route modules under receiver/routes/ — logs, stats, setup, unifi, abuseipdb, health
  • Shared dependencies isolated in deps.py; query building in query_helpers.py

Error Handling & Security

  • Exception chaining and logger.exception across 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_ifname from 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 endpoints
  • ui/src/components/FirewallRules.jsx — Zone matrix + policy management UI
  • ui/src/components/SettingsOverlay.jsx — UniFi connection settings
  • ui/src/components/SetupWizard.jsx — API-powered wizard path
  • receiver/db.py — Device name tables, encrypted config storage
  • receiver/api.py — Slimmed down to app setup + SPA serving (routes extracted)
  • receiver/query_helpers.py — Rule name/desc search fix
  • ui/public/favicon.svg — New favicon

Don't miss a new UniFi-Insights-Plus release

NewReleases is sending notifications on new releases.