Posts

Showing posts with the label python

Port Forwarding on Optus 4G B525 router

Image
The port forwarding or "Virtual Server" settings are not available in the Optus customised web UI. However the underlying XML based API of the router still supports the function, at least for my B525s 65a model. So I've documented a couple of ways you can interact with the router API and set up port forwarding. Important!: Port forwarding will only work when the other device can access the private 10.*.*.* Optus IP Address of the router. I use it so my Optus mobile can access my home network. If you wanted to expose a service to the general internet then this likely won't work. Option 1 - Use the python API I've developed at  https://github.com/jinxo13/HuaweiB525Route r For those with scripting or programming experience Option 2 - Use Chrome and the Servistate plugin to interact with the B525's API directly I've provided a step by step guide - no programming experience is required Option 1 - Use the Python API Step 1 - Check the curre

Huawei B525 Python API

Image
As mentioned in my last post I was tinkering with the Optus provided Huawei B525 router features. I've now manged to implement a few commands and MAC filtering via a Python2 API. You can read more here:  https://github.com/jinxo13/HuaweiB525Router So far I'm using it to: Monitor my usage (I have a 500 GB cap) Implement time scheduling for my kids devices Here's my usage display in Grafana. I run OpenHab and persist the data from the Router using the python API into an Influxdb database that Grafana uses. Here's my current Grafana display: The API will work with the following model: B525s-65a And may work with these others: B618s-22d B715s-23c So far I've got MAC filtering implemented and a few API's to get traffic and other information. Currently supported calls: GET Requests ---------- getInfo() => api/device/information getTraffic() => api/monitoring/traffic-statistics getStats() => api/monitoring/month_