Skip to main content

netgear-switch-inventory

Inventory and monitoring for Netgear Easy Smart switches via HTTP scraping.

No SNMP, no official API — the package reverse-engineers the proprietary web UI used by Netgear ProSAFE Easy Smart switches (GS116Ev2, GS108Ev3 and compatible).

Device support

Model Auth Port status Features NSDP discovery
GS116Ev2 HMAC-MD5 (YOU_CAN_NOT_PASS) Yes Yes Yes
GS108Ev3 MD5-interleave(password, rand) No* Yes Yes

* GS108Ev3 serves port state via AJAX (/getstatus.cgi). This endpoint is not yet implemented. ports returns [] for GS108Ev3. All other data (identity, features) works correctly.

Install

pip install netgear-switch-inventory
# with CLI
pip install "netgear-switch-inventory[cli]"

Or with uv:

uv add netgear-switch-inventory
uv add "netgear-switch-inventory[cli]"

Configuration

Credentials are passed directly or via environment variables. Create a .env file (never commit it):

NETGEAR_HOST="192.168.1.100"
NETGEAR_PASSWORD="password"

CLI usage

# Collect and print inventory from a switch
netgear-inventory collect --host 192.168.1.100

# Collect and save to YAML file
netgear-inventory fetch --host 192.168.1.100 --output ./inventory/

# Discover switches on the LAN via NSDP broadcast
netgear-discover

Run --help on any command for all options.

Library usage

from netgear_switch.session import SwitchSession
from netgear_switch.models import load_catalog
from netgear_switch.inventory import snapshot, persist
from pathlib import Path

catalog = load_catalog()  # ships with package

sw = SwitchSession("192.168.1.100", "password")
sw.login()
snap = snapshot(sw, catalog)

print(snap.model, snap.firmware, snap.firmware_status)
print(f"{len(snap.ports_up)} ports up")

persist(snap, Path("inventory/"))

NSDP discovery

from netgear_switch.nsdp import probe

for switch in probe(timeout=3.0):
    print(switch.get("model"), switch.get("ip"), switch.get("_from"))

Requires the process to bind to UDP 63321. On Linux, use --network host in Docker or run as root/with CAP_NET_BIND_SERVICE.

Salt grains

Copy src/netgear_switch/contrib/salt_grains.py to your Salt _grains/ directory as netgear_switch.py, then configure the minion:

# /etc/salt/minion.d/netgear_switch.conf
netgear_switch:
  host: "192.168.1.100"
  password: "password"
  catalog_path: "/etc/salt/netgear/device_catalog.yaml"  # optional
  timeout: 10

Verify:

salt-call --local grains.item switch

The grains module returns switch identity and feature flags under the switch key, mirroring Salt built-in grain names where applicable (manufacturer, productname, serialnumber, osrelease).

Known limitations

  • GS108Ev3 port status: not implemented — AJAX endpoint not yet reverse-engineered. ports is always [] for this model.
  • Write operations: the package never calls any mutating web UI endpoint.
  • HTTPS: Netgear Easy Smart switches do not support HTTPS. All communication is HTTP.
  • Multi-switch: the CLI and library operate on one switch at a time. Iterate from a wrapper script for fleet inventory.

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for netgear-switch-inventory 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netgear-switch-inventory 0.1.3
File Size Uploaded
netgear_switch_inventory-0.1.3.tar.gz 121.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netgear-switch-inventory 0.1.3
File Interpreter ABI Platform
netgear_switch_inventory-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 151.6 kB

Release files / netgear_switch_inventory-0.1.3.tar.gz

Download URL netgear_switch_inventory-0.1.3.tar.gz
Size 121.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c23a88fe3c89aadcedb5ba558ac38adafe1235a95ae457edaa019f9ed708d7d9
BLAKE2b-256 checksum
How to use checksums
7e3d5a62808620773652f1df305ed8cbe58b291940e680c04a40570c58a01a02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / netgear_switch_inventory-0.1.3-py3-none-any.whl

Download URL netgear_switch_inventory-0.1.3-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd093a28c356031448448094d11ae1d0dd19bba6eb52fa36c05126839c252f2c
BLAKE2b-256 checksum
How to use checksums
d8a6d3a886c39d05791a21634e2ab19da271252de6c0379ec2a383885083426e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page