npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zigasebenik/zte-sms

v1.2.2

Published

A node library to send sms messages using ZTE MF79U modem.

Readme

ZTE-SMS is a Node package that exposes SMS functions of the ZTE LTE modem.

Tested with model MF79U.

Install

npm install @ziga-sebenik/zte-sms

Constructor

new Modem({ modemIP: 'IP', modemPassword: 'password'});

modemIp [string] - ZTE modem IP address (defaults to 192.168.0.1) modemPassword [string] - password for ZTE modem

Methods

  • getAllSms()

Retrieves all SMS messages from modem. This array includes sent, received, unread, draft and failed messages. Returns a Promise that resolves with array of message objects. Each message has a tag property by which you can check message type:

| tag | meaning | | ----- | ------------------- | | '0' | Received SMS | | '1' | Unread received SMS | | '2' | Sent SMS | | '3' | Failed sent SMS | '4' | Draft SMS |

Example of message object

{
  id: '148',
  number: '+386123456789',
  content: 'Cool 😎',
  tag: '0',
  date: '25/01/24 19:56:09',
  draft_group_id: '',
  received_all_concat_sms: '1',
  concat_sms_total: '0',
  concat_sms_received: '0',
  sms_class: '4'
}
  • sendSms(number, message)

number [string] - phone number of the SMS recipient message [string] - SMS message

Sends the SMS to a given number. Returns a Promise that resolves with sent SMS message object if SMS was sent and is rejected otherwise.

  • setSmsAsRead(smsIds)

smsIds [Array<String>] - array of SMS IDs you want to mark as read.

Sets the status of the received SMS with given id to read. Have in mind that you can only mark SMS as read if it has a tag of 1 that then becomes 0. Returns a Promise that resolves if SMS messages were successfully marked as read.

  • setAllSmsAsRead()

Sets the status of all unread SMS messages to read. (tag from 1 to 0) Returns a Promise that resolves if SMS messages were successfully marked as read.

  • deleteSms(smsIds)

smsIds [Array<String>] - array of SMS IDs you want to delete from the modem.

Deletes the SMS messages of given ids from zte modem. Returns a Promise that resolves if SMS messages were successfully deleted.

  • deleteAllSms()

Deletes ALL SMS messages from ZTE modem regardless of the tag ('received', 'sent', 'unread', 'failed', 'drafts'). Returns a Promise that resolves if SMS messages were successfully deleted.

  • getSmsCapacityInfo()

Returns a Promise that resolves with a modem SMS capacity info object.

Example:

{
  sms_nv_total: '100',
  sms_sim_total: '20',
  sms_nvused_total: '30',
  sms_nv_rev_total: '3',
  sms_nv_send_total: '22',
  sms_nv_draftbox_total: '5',
  sms_sim_rev_total: '0',
  sms_sim_send_total: '0',
  sms_sim_draftbox_total: '0'
}

Usage

Construct new instance of the Modem with IP of the modem and modem password:

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');
    const allSMSMessages = await myModem.getAllSms();
    console.log(allSMSMessages);
  } catch (err) {
    console.error(err);
  }
})();