JioFiber-API is an unofficial Python package for JioRouters. The Api can be used to get stats and configure jio router from python.
I do not own JioFiber or any naming rights w.r.t to it .This is just an unoffical api made for jioFiber router. For any disputes related to naming of the package send an email to : [email protected]
$ pip install jioFiber-Api==0.1.7
JioFiberAPI(username,password) is instantiated by username and password of your jioFiber Admin Page hosted at 192.168.29.1. The default username and password is admin and Jiocentrum. But make sure you login once externally via browser and change it.
NodeProfile consists of following data members
name - MAC vendorName of the device
ipv4 - local ipv4 address provided by Router (DHCP) of the device
mac - MAC address of the device
ntime- Amount of time the device was on the network post start
ap - { } AP details of the device which it is on
security - [ ] security and auth details
.
creates a session with your jioRouter ( Logins in the router ), please make sure to logout any external browser sessions before calling this method. This method also creates a login cookie.
returns a dictionary of all the devices connected to the jioFiber router
# Format
{'9c:b2:d4:f0:e5:2f':
{'ap': {
'code': 'ap1',
'ssid': 'AuroraHome',
'status': 'Enabled'
},
'mac': '9c:b2:d4:f0:e5:2f',
'security': ['WPA2', 'CCMP', 'PSK'],
'ntime': '0 days, 3 hours, 33 minutes, 42 seconds',
'vname': 'Rivet Networks',
'ipv4': '192.168.29.45'
}
returns a list of objects of device info, same as createNodeProfiles but in object form.
returns the soup of the supplied param webpage. Example - object.getSoup('accessPoints.html')
returns the list of rows from the supplied param webage. Example - object.getTableFromPage('accessPoints.html')
There are prebuilt methods which use getTableFromPage to fetch data from pages which contain tables
getAccessPoints(str)->list < accessPoints.html >
getLanClients(str)->list < lanDhcpLeasedClients.html >
getApStats(str)->list < wirelessStatistics.html >
getClientStats(str)->list < wirelessClients.html >
getWirelessStats(str)->list < wirelessStatus.html >
checks if the session exists.
returns token cookie
takes mac address and returns vendor uses https://api.macvendors.com/ api.
takes byte string and decodes it
import jiofiber
Api = JioFiberAPI('admin','thanos.123')
Api.createSession()
try:
print(Api.createNodeProfiles())
except:
Api.endSession()
Api.endSession()
Please make sure you end the session successfully. If the program exits abruptly the session will still persist if the endSession was not called and this will stay for 3 mins until you can create new session. To avoid this put all your code inside a try except block as shown above.
- Updating SSID and Password
- Device Usage Profiles
- Firewall configuration
Refer CONTRIBUTING.md for PR's and COC.
MIT License 2021 Developer - Shreyas Kapale