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.2.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.2-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netgear_switch_inventory-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 020072c426c6d125821b528840b151eddf450e1c9359bc8cb87b17b4ed9de185
MD5 9aa3d4d6a08e2709a0d435077fc70c51
BLAKE2b-256 f22b922115157529d286518dba994ebc20870369826ec93f7784eabbf544c41d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netgear_switch_inventory-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for netgear_switch_inventory-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 54b6013fe71915aa5d0c548012ee550b72ddc760afe8b49d31a729ffeb475bcd
MD5 4cc4b98dc4b9873b2a5a258327187ad0
BLAKE2b-256 6c99e34a6caaa73648ac85f5c27b8d2045ecb27c5c0ac59083a82a5d3cc00868

See more details on using hashes here.

Provenance

The following attestation bundles were made for netgear_switch_inventory-0.1.2-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