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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netgear_switch_inventory-0.1.1.tar.gz (63.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netgear_switch_inventory-0.1.1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file netgear_switch_inventory-0.1.1.tar.gz.

File metadata

  • Download URL: netgear_switch_inventory-0.1.1.tar.gz
  • Upload date:
  • Size: 63.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for netgear_switch_inventory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 36a84abbd59cfaa29a1838e0c46c441fa182f35a23f910b8b52c2591e355ac19
MD5 edcefdd6f28c24886d1c8339a907890d
BLAKE2b-256 c9e6fa0ce7da1d134bc3f63826d78d46c08170b0d664f1c907c62a9e7037fd66

See more details on using hashes here.

Provenance

The following attestation bundles were made for netgear_switch_inventory-0.1.1.tar.gz:

Publisher: publish.yml on cprima-integrations/netgear-switch-inventory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netgear_switch_inventory-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netgear_switch_inventory-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7628b7bd31a7f5ebce68d688e34fe2dd6a9a435ecf4756582049b7807b8af1a9
MD5 e3719f2e5c3dbefe05d991c6161f1d14
BLAKE2b-256 0ba1f99e10563c8c1bf907dc523907e5eedf4eab380eaa2c951d16bde3fe730c

See more details on using hashes here.

Provenance

The following attestation bundles were made for netgear_switch_inventory-0.1.1-py3-none-any.whl:

Publisher: publish.yml on cprima-integrations/netgear-switch-inventory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page