npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gs310tp

v1.0.0

Published

Control Netgear GS310TP (and maybe others) over its HTTP API

Readme

gs310tp - Netgear GS310TP Controller

This is a set of library and CLI tool to control Netgear GS310TP 10-port PoE L2 smart switch. It should support other S350-series switches and possibly others.

Being a "smart switch" (industry term of describing a switch with limited management features), this switch only supports management over an WebUI. This package is an attempt to automate by directly accessing the underlying "get/set.cgi" APIs.

Currently, CLI tool targets PoE operation only while the backing library should support access to all other management features as well.

CLI Tool Usage

$ gs310tp -h
gs310tp - Controls NetGear GS310TP (and maybe others) over its HTTP API
Usage: gs310tp [options] <subcommand> <args...>
Options:
  -u URL : base URL of NetGear Web console
  -p str : password for the console
Example:
  $ gs310tp -u http://gs310 poe status
  $ gs310tp poe on 1
  $ gs310tp poe off 1
  $ gs310tp poe cycle 1
NOTE:
  - Currently, only PoE operation is supported in CLI tool
  - Env $NETGEAR_URL can be used instead of -u option
  - Env $NETGEAR_PWD can be used instead of -p option

# Set defaults in envvars
$ export NETGEAR_URL=http://192.168.0.249
$ export NETGEAR_PWD=hogehoge

# Check PoE port status
$ gs310tp poe status
{
  powerUnit: 'mW',
  adminPower_min: 3000,
  adminPower_max: 30000,
  ports: [
...

# Disable PoE for given ports
$ gs310tp poe off 1 2 3

# Enable PoE for given ports
$ gs310tp poe on 1 2 3

# Power cycle PoE for given ports
$ gs310tp poe cycle 1 2 3

Library Usage

const gs = require('gs310tp')

async function main() {
  let ua = new gs.Agent('http://192.168.0.249')
  await ua.login('hogehoge')
  let ret = await ua.get('poe_port')
  console.log(ret.data.data)
}

main()

TODO

  • Add non-PoE subcommands to the CLI tool
  • Convert the project to TypeScript