fritznode

0.0.7 • Public • Published

Fritz Node

Uses node.js to access the fritz box with a minimal set of external dependencies.

API calls provided

  • getDeviceList

Returns active and inactive network devices known to the box.

  • getBandwithUsage

Returns the current download and upload rate.

  • blockDevice

Blocks the device internet access.

  • unblockDevice

Unblocks the device internet access.

  • getOverview

Gets overview information about your fritz.box. Contains connection status and the recent caller list.

  • GetNAS

Shows information about your fritz.box NAS

Example ........

Get the current bandwith usage

run = async()=>{
    let con = await module.exports.fritz({
        password : 'secret'
    });
    let usage = await con.getBandwithUsage();
    console.log(JSON.stringify(usage,' ','  '));
};
run();

Produces

{
  "downMax": 24331000,
  "downCurrent": 27240,
  "upMax": 4899000,
  "upCurrent": 6693
}

See the examples folder for more usage scenarios.

Environment variables supported

Name Description Default
FRITZ_HOST Fritz box host name or IP. fritz.box
FRITZ_USER Fritz user name. Defaults to fritz generated admin user
FRITZ_PASSWORD Fritz box password.
LOG_LEVEL Console log level. Supported are TRACE,DBEUG,INFO,WARN, ERROR INFO

Package Sidebar

Install

npm i fritznode

Weekly Downloads

10

Version

0.0.7

License

MIT

Unpacked Size

20 kB

Total Files

11

Last publish

Collaborators

  • rodney42