0.0.3 • Published 2 years ago

zte-cpe v0.0.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

ZTE-CPE ROUTER/MODEM API

Usage

const ZTECPE = require('zte-cpe');
const myRouter = new ZTECPE('192.168.1.1');

if(!await myRouter.isLogged()) await myRouter.login('<your password>');

const rawSMS = await myRouter.getSMS();
const parsedSMS = rawSMS.map(sms => `${sms.number}: ${sms.content}`);

console.log(parsedSMS);

Notes

  • Every function related to the router/modem connection is async
  • Some features require to login to be functional
    • You can check if you're logged or not using .isLogged()
  • If an API error occurres, the returned object is { error: true }
  • Since there are lots of methods, check out the typings
  • I'm not fully sure if this is compatible with other ZTE-CPE router/modems

Tested on

[
  // SPECKY
  {
    cr_version: 'CR_VODACOM_ZA_MF253V1.0.0B04',
    wa_version: 'BD_ZM8620V1.0.0B15',
    hardware_version: 'PCBMF253V1.0.0',
  },
]
0.0.3

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago