1.0.2 • Published 9 months ago

padavan v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Router management with Padavan firmware

Install

npm install padavan

Usage

import Padavan from 'padavan';
const client = new Padavan({
    repo, branch, token, // GITHUB
    host, username, password // Router
});

API

Get current status

await client.getStatus();
// { lavg, uptime, ram, swap, cpu, wifi2, wifi5 }

Get traffic history

await client.getHistory();
// { daily_history, monthly_history }

Get logs

await client.getLog();

Get device list

await client.getDevices();
// [{ hostname, ip, mac, rssi }]

Get parameters

await client.getParams(); // Object with all parameters
await client.getParams('firmver_sub'); // Only { firmver_sub }
await client.getParams([ 'firmver_sub', 'ip6_service' ]); // { firmver_sub, ip6_service }

Set parameters

await client.setParams({
	sid_list: 'IP6Connection;',
	ip6_service: '6in4'
}); // Enable ipv6
await client.setParams({
	ip6_service: ''
}); // Disable ipv6

Start SpeedTest on the device

await client.startSpeedTest();
// { networkDownloadSpeedMbps, networkUploadSpeedMbps }

Start firmware build in the repository

await client.startBuild();

Get the firmware changelog

await client.getChangelog();
await client.getChangelog(from_id, to_id);
// { from_id, to_id, data: [] }

Start firmware upgrade

await client.startUpgrade();

Reboot

await client.startReboot();

Find repositories with firmware for the device

await client.find();
await client.find(productid);
// [{ repo, branch, active, created_at, name }]
1.0.2

9 months ago

1.0.1

10 months ago

1.0.0

10 months ago