Skip to main content

Access Netgear routers using their SOAP API

Project description

pyNetgear

pipeline status

pyNetgear provides an easy to use Python API to control your Netgear router. It uses the SOAP-api on modern Netgear routers to communicate. It is built by reverse engineering the requests made by the NETGEAR Genie app.

pyNetgear works with Python 2 and 3.

If you are connected to the network of the Netgear router, a host is optional. If you are connected via a wired connection to the Netgear router, a password is optional. The username defaults to admin. The port defaults to 5000. The ssl defaults to false. You can specify url and it will take precedence on host/port/ssl parameters. This allows the use of HTTPS, https://orbilogin.com for example.

It currently supports the following operations:

login
Logs in to the router. Will return True or False to indicate success.

get_attached_devices
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate and allow_or_block.

get_attached_devices_2
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate, allow_or_block, device_type, device_model, ssid and conn_ap_mac.

This call is slower and probably heavier on the router load.

get_traffic_meter
Return a dict containing the traffic meter information from the router (if enabled in the webinterface).

allow_block_device
Allows user to block/unblock devices from accessing router by specifying mac_addr and new device_status (Block/Allow) Note: In order to use this function, Remote Management must be enabled in the router's admin settings.

Installation

You can install PyNetgear from PyPi using pip3 install pynetgear (use pip if you're still using Python 2).

Usage

To test run from the console: $ python -m pynetgear [<pass>] [<host>] [<user>] [<port>] [<ssl>]

To use within your Python scripts:

from pynetgear import Netgear

netgear = Netgear(password=mypassword)

for i in netgear.get_attached_devices():
    print i

Supported routers

It has been tested with the Netgear R6300 router and the Netgear WNDR4500 router. According to the NETGEAR Genie app description, the following routers should work:

  • Netgear Orbi
  • Netgear R7800
  • Netgear R7500v2 (Port 80)
  • Netgear R7000
  • Netgear R6900
  • Netgear R6300
  • Netgear R6250
  • Netgear R6200
  • Netgear R6100
  • Netgear N300 - Model: C3000 (Port 80)
  • Netgear Centria (WNDR4700, WND4720)
  • Netgear WNDR4500
  • Netgear WNDR4300
  • Netgear WNDR4000
  • Netgear WNDR3800
  • Netgear WNDR3700v3
  • Netgear WNDR3700v2
  • Netgear WNDR3400v2
  • Netgear WNR3500Lv2
  • Netgear WNR2200
  • Netgear WNR2000v3
  • Netgear WNR2000v4 (Port 80)
  • Netgear WNR1500
  • Netgear WNR1000v2
  • Netgear WNR1000v3
  • Netgear WNDRMAC
  • Netgear WNR612v2

Project details


Download files

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

Source Distribution

pynetgear-0.10.5.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

pynetgear-0.10.5-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file pynetgear-0.10.5.tar.gz.

File metadata

  • Download URL: pynetgear-0.10.5.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.3

File hashes

Hashes for pynetgear-0.10.5.tar.gz
Algorithm Hash digest
SHA256 7a694377f55308d9ffb906bd53cdd3d2439c60ca36ad37e94866b1c211de1a32
MD5 3b87d6b1b00d5b57e1bd6397b65a1d50
BLAKE2b-256 aaf44f19f39d41b81c8312e4b093ba93a5a43e1301f11d0a391dd0eb7abdd10d

See more details on using hashes here.

Provenance

File details

Details for the file pynetgear-0.10.5-py3-none-any.whl.

File metadata

  • Download URL: pynetgear-0.10.5-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.3

File hashes

Hashes for pynetgear-0.10.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9d88bb3df06d86356e2d956d9fd8c9c59f0df56a7f0d7ad1ef835b7fd481d6db
MD5 349e3cdee0465e7219e5f35d028562d7
BLAKE2b-256 64c5701df2183104866874f7450ed5fc27b24d4faa63dd16f76a11df7ab20aeb

See more details on using hashes here.

Provenance

Supported by

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