Skip to content

Snuffy2/aiopnsense

Repository files navigation

aiopnsense

GitHub Release GitHub Release Date GitHub Activity Coverage Documentation License

PyPI

aiopnsense is an async Python client library for OPNsense.

What this library does

aiopnsense wraps supported OPNsense REST endpoints behind a single async client, OPNsenseClient. It is designed for applications that need to query router state or trigger supported OPNsense actions without manually building HTTP requests.

The client currently includes helpers for:

  • system information, notices, certificates, CARP, Wake-on-LAN, reboot, and interface reloads
  • firmware version checks, update status, and upgrade actions
  • interface, gateway, CPU, memory, filesystem, and temperature telemetry
  • DHCP lease and ARP table access
  • firewall rules, NAT rules, alias toggling, and state killing
  • service status lookup and service start/stop/restart operations
  • Unbound blocklist management
  • OpenVPN and WireGuard status plus VPN instance toggling
  • vnStat metrics, captive portal vouchers, and speed test data

Requirements

  • Requires OPNsense Firmware >= 25.1

  • Recommended OPNsense Firmware >= 26.1.1

    • For firmware < 26.1.1, the Firewall and NAT methods will return empty data.

Documentation

Origin and Purpose

aiopnsense was initially extracted from the hass-opnsense integration. It is primarily for use as an external dependency by Home Assistant for its OPNsense Integration.

About

Async Python client library for OPNsense

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages