1.0.0 • Published 6 months ago
@zigasebenik/zte-sms v1.0.0
ZTE-SMS is a node.js package that allows you to send SMS messages using ZTE modem.
Tested only with model MF79U
.
Install
npm install @ziga-sebenik/zte-sms
Usage
Construct new instance of the Modem with IP of the modem and modem password:
const myModem = new Modem({ modemIP: 'IP', modemPassword: 'password'});
Call sendSMS
method with phone number of the recipient and sms message.
await myModem.sendSms('phoneNumber', 'message');
Example
const Modem = require('@zigasebenik/zte-sms');
const myModem = new Modem({ modemIP: '192.168.0.1', modemPassword: 'password'});
(async () => {
try {
await myModem.sendSms('000000000', 'My message');
} catch (err) {
console.error(err);
}
})();
1.0.0
6 months ago