Code Monkey home page Code Monkey logo

tendan301monitor's Introduction

Unofficial Tenda N301 Monitor App

I've never programmed in Kotlin so I decided to make something quick and useful for me that serves as practice. Officially, the Tenda N301 router, doesn't have a mobile app to manage all the stuff related with it, and yeah, it obviouslly has its own local webpage (minimalistic and responsive) to do it, but I said... Why not an app?

Features

  • See current upload and download speed of your network
  • See all devices connected to the router
  • And that's all.. It's just a simple consult app

The code is probably not the most optimal and contains bad practices of mine, but it works! There is some bug thing related with the motion layout and the recycler view that makes the app to crash, maybe someday I'll investigate about it.

Operation

The app is ready to operate with routers without password, if it isn't your case, you have to download the source code and make your own build by changing the next line in HomeFragment.kt:

tenda = TendaAPI("your_pass_here", activity!!)

I made some kind of API writen as well in Kotlin, you just need to provide the router password and the actual activity, by itself it gets the device gateway (where it is supposed to be the router connected), after that, it makes a POST request to http://$__ROUTERIP/login/Auth, if the response header contains the cookie session, you're in! otherwise you aren't and you get notified. In case there is no a Tenda N301 or the response is unexpected, you'll get notified as well. Don't know what happen if other Tenda model tries to connect.

To get all the information about the connected devices I use

tenda!!.getOnlineDevices()

To get current router status I use

tenda!!.getDeviceStatistics()

Those methods should be executed not in the main thread or wont work (Android rules), they returns a JSONObject. I execute getOnlineDevice() every 5 seconds (the official web does this by default) if I reduce this time eventually weird things will happend with the json returned by the router and you'll need to restart it.

Other stuff

Third party libraries

tendan301monitor's People

Contributors

slayer015 avatar

Stargazers

Sebin P Johnson avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.