[Announce] node-red-zte-sms

This one is a bit specific but nevertheless if someone has a ZTE LTE USB modem stick lying around (I tested this with model MF79U), this node might come handy to send SMS notifications to your phone.

1 Like

Thanks for the contribution @ziga

Just a few small things:

Having a quick look at the code - May I suggest having the recipient be overwritten from say msg.recpient if it exists? I can imagine a Node like this can be used to address different recipients.

Lastly I would change this.

 if (!config.phoneNumber || !modem) {
        node.status({ fill: 'red', shape: 'ring' });
        send(msg);
        done();
        return;
}

to

 if (!config.phoneNumber || !modem) {
        const error = 'Missing configuration, and / or recipient'
        node.status({ fill: 'red', shape: 'ring', text: error });
        // send(msg); /* Don't propagate */
        done(new Error(error)); // If done is called with an error, then it will trigger any ‘Catch’ nodes
        return;
}

Just some Constructive feedback - again thanks

Thanks @marcus-j-davies make sense yes.

You can define phone recipient number also through incoming node message instead of defining it in properties, by adding recipientNumber key.

{
  payload: "your payload",
  topic: "your topic",
  recipientNumber: "123456789"
}

Node status warning also added if configuration is missing.
Published version 1.0.2 where these changes are made.

2 Likes

Version update 1.1.0

First iteration of the node was somewhat limited as it allowed only sending the SMS messages. As modem SMS capacity is limited, one needs an option to at least delete messages as well. While extending the API, 4 more nodes were added.

  • zte-sms-check - checks for all SMS messages on modem
  • zte-sms-filter - filters SMS messages by type (sent, received, ...) and by provided phone number (so one can listen to messages only from trusted set of numbers)
  • zte-sms-delete - deletes SMS messages from modem
  • zte-sms-mark - marks SMS messages on modem as read

All nodes using modem also show modem device SMS capacity as a status.

More in documentation: node-red-zte-sms (node) - Node-RED