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.
portsis 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020072c426c6d125821b528840b151eddf450e1c9359bc8cb87b17b4ed9de185
|
|
| MD5 |
9aa3d4d6a08e2709a0d435077fc70c51
|
|
| BLAKE2b-256 |
f22b922115157529d286518dba994ebc20870369826ec93f7784eabbf544c41d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netgear_switch_inventory-0.1.2.tar.gz -
Subject digest:
020072c426c6d125821b528840b151eddf450e1c9359bc8cb87b17b4ed9de185 - Sigstore transparency entry: 2294943841
- Sigstore integration time:
-
Permalink:
cprima-integrations/netgear-switch-inventory@7ac59581c74b7781ccca293531b1081d6550987e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cprima-integrations
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ac59581c74b7781ccca293531b1081d6550987e -
Trigger Event:
push
-
Statement type:
File details
Details for the file netgear_switch_inventory-0.1.2-py3-none-any.whl.
File metadata
- Download URL: netgear_switch_inventory-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54b6013fe71915aa5d0c548012ee550b72ddc760afe8b49d31a729ffeb475bcd
|
|
| MD5 |
4cc4b98dc4b9873b2a5a258327187ad0
|
|
| BLAKE2b-256 |
6c99e34a6caaa73648ac85f5c27b8d2045ecb27c5c0ac59083a82a5d3cc00868
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netgear_switch_inventory-0.1.2-py3-none-any.whl -
Subject digest:
54b6013fe71915aa5d0c548012ee550b72ddc760afe8b49d31a729ffeb475bcd - Sigstore transparency entry: 2294944512
- Sigstore integration time:
-
Permalink:
cprima-integrations/netgear-switch-inventory@7ac59581c74b7781ccca293531b1081d6550987e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cprima-integrations
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ac59581c74b7781ccca293531b1081d6550987e -
Trigger Event:
push
-
Statement type: