NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
vtburtonra
Feb 14, 2023Aspirant
access the list of attached devices via URL with json output
I have an Orbi RBR850 and two RBS850's. In combination, they provide excellent WiFi coverage to my house. The RBS's are connected back to the RBR via Ethernet. I have "a bunch" of IOT devices conn...
- Feb 16, 2023
CrimpOn wrote:I found the READ.ME less helpful than I would have wanted, especially in terms of how to enter the commands.
Plus, it spewed a bunch of warnings about "certificate verification" which did not affect the results, but annoyed me a lot.
Loaded on Linux Mint 20.3 using pip3.
Set environment variables:
PYNETGEAR_PASSWORD="<router password>"
HOST=192.168.1.1
USER="admin"
URL="192.168.1.1"
command python3 -m pynetgear_enhanced attached_devices2 >dev.txt
I got it to work, but had to do this:
python3 -m pynetgear_enhanced --url 'https://routerlogin.net' --host "192.168.1.1" --user "admin" --password "<router password>" attached_devices2 >dev.txt 2>&1
The https in the URL did the trick. It did not seem to pay attention to the PYNETGEAR_PASSWORD, HOST, USER and URL variables. I tried setting them within a bash script and also exporting them. The command worked for me on OpenSUSE, Ubuntu, Fedora, Mint, Rasbian, and Debian.
This uncovered another problem. I have an RBR850 and two RBS850s. When I log into the RBR, and go to attached devices, it only shows 1 device from one of the two RBSs, but that RBS has 10 devices attached to it. When I log into the RBS directly, and select Connected Devices, it shows all 10 devices, but the IP address field is "-" for all except 1 device, and that's the 1 device that shows up in the RBR. The pynetgear_ehnanced program shows the same, but expected given that logging directly into the RBB shows this.
The other RBS shows everything correctly, including IP addresses. All 3 are running the latest firmware (4.6.14.3).
Note that all 10 of those devices are working fine - I can ping them. Even pinging them doesn't cause the RBS to start showing their IP addresses. I'm guessing this RBS is fubar and needs a reboot. I'll do that and I'm assuming that will fix it.
I really do appreciate your help and suggestions on this.
Randy
FURRYe38
Feb 14, 2023Guru - Experienced User
Something to post here about:
https://community.netgear.com/t5/Idea-Exchange-For-Home/idb-p/idea-exchange-for-home
vtburtonra
Feb 14, 2023Aspirant
Posted.
- CrimpOnFeb 14, 2023Guru - Experienced User
vtburtonra , please check your private messages. (click on the envelop in the upper right part of the screen.
- CrimpOnFeb 14, 2023Guru - Experienced User
Netgear uses the Simple Object Access Protocol (SOAP) as the communications link between the router and apps (Orbi app, Nighthawk app, etc.) https://en.wikipedia.org/wiki/SOAP . The list of routers using SOAP is extensive:
https://www.routeripaddress.com/search/netgear+router+soap+api/*/*/
In addition to the Excel spreadsheet mentioned above, there are examples on the internet which use various programming languages to access and control Netgear routers using SOAP. One for Python is pyNetgear_Enhanced
https://github.com/roblandry/pynetgear_enhanced . There's one for Go https://github.com/DRuggeri/netgear_client
Javascript; https://www.npmjs.com/package/netgear
A common complaint is that each of these projects was limited because Netgear does not publish specifications for the SOAP interface and each developer had to scrape the parameters from observing the Nighthawk or Orbi app communications.
If someone had a Fortran or C language library, I'd be all over this.
- CrimpOnFeb 14, 2023Guru - Experienced User
Python pyNetgear_Enhanced https://github.com/roblandry/pynetgear_enhanced may be exactly what you are looking for.
When run against my Orbi, it produces a complete list of all devices currently on the network with this format:
{
"name": "Family Room Speaker",
"ip": "192.168.1.22",
"mac": "48:A6:B8:D4:xx:8E",
"type": "5GHz",
"signal": 0,
"link_rate": "0",
"allow_or_block": "Allow",
"device_type": 23,
"device_model": "Sonos One",
"ssid": "MY-Orbi-SSID",
"conn_ap_mac": "3C:37:86:43:xx:1C"
}There are options for other output formats (which I did not explore).
Unlike the Excel spreadsheet, it is obvious that this implementation does not fetch signal or Link Rate correctly.
Installing this script on Windows totally beat me. (Python for Windows is not my friend!) Did get it to work on Linux Mint.