Name | netgear-plus JSON |
Version |
0.1.8
JSON |
| download |
home_page | None |
Summary | A library for interacting with Netgear Plus switches. |
upload_time | 2024-10-27 17:52:33 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
api
library
netgear
plus
switch
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Python Library for NETGEAR Plus Switches
## What it does
Grabs statistical network data from [supported NETGEAR Switches](#supported-and-tested-netgear-modelsproducts-and-firmwares) from the
[Plus Managed Network Switch](https://www.netgear.com/business/wired/switches/plus/) line. These switches can only be managed using a
Web interface and not through SNMP or cli. This library uses web scraping to collect the switch configuration, statistics and
some basic configuration updates.
## How it works
1. Detecting Switch Model/Product in login.cgi
2. Connects to the Switch and asks for a cookie (`http://IP_OF_SWITCH/login.cgi`)
3. HTTP-Request send to the Switch twice (`http://IP_OF_SWITCH/portStatistics.cgi`) and compared with previous data ("in response time")
### List of port statistics
| Name | key from `get_switch_infos()` | Unit |
| ----------------------------- | ---------------------------------- | ----------------------------------- |
| Port {port} Traffic Received | `port_{port}_traffic_rx_mbytes` | MB (in response time) |
| Port {port} Traffic Sent | `port_{port}_traffic_tx_mbytes` | MB (in response time) |
| Port {port} Receiving | `port_{port}_speed_rx_mbytes` | MB/s |
| Port {port} Transferring | `port_{port}_speed_tx_mbytes` | MB/s |
| Port {port} IO | `port_{port}_speed_io_mbytes` | MB/s |
| Port {port} Total Received | `port_{port}_sum_rx_mbytes` | MB (since last switch reboot/reset) |
| Port {port} Total Transferred | `port_{port}_sum_tx_mbytes` | MB (since last switch reboot/reset) |
| Port {port} Connection Speed | `port_{port}_connection_speed` | MB/s |
| Port {port} Status | `port_{port}_status` | "on"/"off" |
| Port {poe_port} POE Power | `port_{poe_port}_poe_power_active` | "on"/"off" |
### List of aggregated statistics
| Sensor Name | key from `get_switch_infos()` | Unit |
| ----------------------- | ----------------------------- | --------------------- |
| Switch IO | `sum_port_speed_bps_io` | MB/s |
| Switch Traffic Received | `sum_port_traffic_rx` | MB (in response time) |
| Switch Traffic Sent | `sum_port_traffic_tx` | MB (in response time) |
## Supported and tested NETGEAR Models/Products and firmware versions
| Model | Ports | Firmware versions | Bootloader versions |
| -------- | ----- | -------------------------------------- | ------------------- |
| GS105E | 5 | ? | |
| GS108E | 8 | V1.00.11 | V1.00.03 |
| GS105Ev3 | 5 | ? | |
| GS108Ev3 | 8 | V2.00.05, V2.06.10, V2.06.17, V2.06.24 | V2.06.01 - V2.06.03 |
| GS305EP | 5 | V1.0.1.1 | |
| GS308EP | 8 | V1.0.0.10, V1.0.1.4 | |
| GS308EPP | 8 | ? | |
Supported firmware languages: GR (German), EN (English)
# Unsupported models
| Model | Support status |
| --------- | ------------------------------------------------------ |
| GS108PEv3 | Not yet started |
| GS316EP | Login is supported, statistics and PoE control not yet |
| GS316EPP | Login is supported, statistics and PoE control not yet |
## Library Usage
### create a python venv with `requests` and `lxml`
```shell
python3 -m venv .venv
source .venv/bin/activate
pip install lxml requests
```
Using this VENV go to your local source folder
### Example calls
```shell
cd src
python3
```
```python
ip = '192.168.178.68' # replace with IP address of your switch
p = 'fyce4gKZemkqjDY' # replace with your password
import netgear_plus
sw = netgear_plus.NetgearSwitchConnector(ip, p)
sw.autodetect_model()
sw.get_login_cookie()
data = sw.get_switch_infos()
print(sw.switch_model.MODEL_NAME)
print(data["port_1_sum_rx_mbytes"])
print(data)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "netgear-plus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "api, library, netgear, plus, switch",
"author": null,
"author_email": "Michiel Fokke <github@fokke.org>, Christian Karri\u00e9 <ckarrie@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/52/45/5d8ae06665592cce8238bb050a040a10f1c09cf035b47632de87497968d9/netgear_plus-0.1.8.tar.gz",
"platform": null,
"description": "# Python Library for NETGEAR Plus Switches\n\n## What it does\n\nGrabs statistical network data from [supported NETGEAR Switches](#supported-and-tested-netgear-modelsproducts-and-firmwares) from the\n[Plus Managed Network Switch](https://www.netgear.com/business/wired/switches/plus/) line. These switches can only be managed using a\nWeb interface and not through SNMP or cli. This library uses web scraping to collect the switch configuration, statistics and\nsome basic configuration updates.\n\n## How it works\n\n1. Detecting Switch Model/Product in login.cgi\n2. Connects to the Switch and asks for a cookie (`http://IP_OF_SWITCH/login.cgi`)\n3. HTTP-Request send to the Switch twice (`http://IP_OF_SWITCH/portStatistics.cgi`) and compared with previous data (\"in response time\")\n\n### List of port statistics\n\n| Name | key from `get_switch_infos()` | Unit |\n| ----------------------------- | ---------------------------------- | ----------------------------------- |\n| Port {port} Traffic Received | `port_{port}_traffic_rx_mbytes` | MB (in response time) |\n| Port {port} Traffic Sent | `port_{port}_traffic_tx_mbytes` | MB (in response time) |\n| Port {port} Receiving | `port_{port}_speed_rx_mbytes` | MB/s |\n| Port {port} Transferring | `port_{port}_speed_tx_mbytes` | MB/s |\n| Port {port} IO | `port_{port}_speed_io_mbytes` | MB/s |\n| Port {port} Total Received | `port_{port}_sum_rx_mbytes` | MB (since last switch reboot/reset) |\n| Port {port} Total Transferred | `port_{port}_sum_tx_mbytes` | MB (since last switch reboot/reset) |\n| Port {port} Connection Speed | `port_{port}_connection_speed` | MB/s |\n| Port {port} Status | `port_{port}_status` | \"on\"/\"off\" |\n| Port {poe_port} POE Power | `port_{poe_port}_poe_power_active` | \"on\"/\"off\" |\n\n### List of aggregated statistics\n\n| Sensor Name | key from `get_switch_infos()` | Unit |\n| ----------------------- | ----------------------------- | --------------------- |\n| Switch IO | `sum_port_speed_bps_io` | MB/s |\n| Switch Traffic Received | `sum_port_traffic_rx` | MB (in response time) |\n| Switch Traffic Sent | `sum_port_traffic_tx` | MB (in response time) |\n\n## Supported and tested NETGEAR Models/Products and firmware versions\n\n| Model | Ports | Firmware versions | Bootloader versions |\n| -------- | ----- | -------------------------------------- | ------------------- |\n| GS105E | 5 | ? | |\n| GS108E | 8 | V1.00.11 | V1.00.03 |\n| GS105Ev3 | 5 | ? | |\n| GS108Ev3 | 8 | V2.00.05, V2.06.10, V2.06.17, V2.06.24 | V2.06.01 - V2.06.03 |\n| GS305EP | 5 | V1.0.1.1 | |\n| GS308EP | 8 | V1.0.0.10, V1.0.1.4 | |\n| GS308EPP | 8 | ? | |\n\nSupported firmware languages: GR (German), EN (English)\n\n# Unsupported models\n\n| Model | Support status |\n| --------- | ------------------------------------------------------ |\n| GS108PEv3 | Not yet started |\n| GS316EP | Login is supported, statistics and PoE control not yet |\n| GS316EPP | Login is supported, statistics and PoE control not yet |\n\n## Library Usage\n\n### create a python venv with `requests` and `lxml`\n\n```shell\npython3 -m venv .venv\nsource .venv/bin/activate\npip install lxml requests\n```\n\nUsing this VENV go to your local source folder\n\n### Example calls\n\n```shell\ncd src\npython3\n```\n\n```python\nip = '192.168.178.68' # replace with IP address of your switch\np = 'fyce4gKZemkqjDY' # replace with your password\nimport netgear_plus\nsw = netgear_plus.NetgearSwitchConnector(ip, p)\nsw.autodetect_model()\nsw.get_login_cookie()\n\ndata = sw.get_switch_infos()\nprint(sw.switch_model.MODEL_NAME)\nprint(data[\"port_1_sum_rx_mbytes\"])\nprint(data)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A library for interacting with Netgear Plus switches.",
"version": "0.1.8",
"project_urls": {
"Homepage": "https://github.com/foxey/py-netgear-plus",
"Issues": "https://github.com/foxey/py-netgear-plus/issues"
},
"split_keywords": [
"api",
" library",
" netgear",
" plus",
" switch"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "82dde32f235f06fd95f8b810882c72ed467c859ea1ed0138a6c2489dc585c13a",
"md5": "b340e136993912bfe69252175cb50984",
"sha256": "38eb3ea40ce41cff2413ca191cf51e3e55b184dfe2f8e5295e96972d3551ffd3"
},
"downloads": -1,
"filename": "netgear_plus-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b340e136993912bfe69252175cb50984",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 16375,
"upload_time": "2024-10-27T17:52:32",
"upload_time_iso_8601": "2024-10-27T17:52:32.617239Z",
"url": "https://files.pythonhosted.org/packages/82/dd/e32f235f06fd95f8b810882c72ed467c859ea1ed0138a6c2489dc585c13a/netgear_plus-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "52455d8ae06665592cce8238bb050a040a10f1c09cf035b47632de87497968d9",
"md5": "1e41ced2d870a5c481eed36956e48fe5",
"sha256": "b5d719f01bd3fd60e51530a1328e21d2f193e6f7918ad4a4b9f75eaf37c56ca9"
},
"downloads": -1,
"filename": "netgear_plus-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "1e41ced2d870a5c481eed36956e48fe5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20655,
"upload_time": "2024-10-27T17:52:33",
"upload_time_iso_8601": "2024-10-27T17:52:33.620382Z",
"url": "https://files.pythonhosted.org/packages/52/45/5d8ae06665592cce8238bb050a040a10f1c09cf035b47632de87497968d9/netgear_plus-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-27 17:52:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "foxey",
"github_project": "py-netgear-plus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "netgear-plus"
}