# How to send node-red output to mobile via sms?

**URL:** https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458
**Category:** General
**Created:** [6 December 2023 09:19 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458 "2023-12-06T09:19:37Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![kelvin](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kelvin](https://discourse.nodered.org/u/kelvin)
#### Post date: [6 December 2023 09:19 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/1 "2023-12-06T09:19:37Z")

</div>

Hi community team,

As mention on topic above, have any idea/node that can direct send output/alert to mobile's via sms?  
For this situation my client don't want to install any of the app into mobile, just send output/alert to the mobile number.

thanks.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [6 December 2023 09:25 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/2 "2023-12-06T09:25:18Z")

</div>

Hi @kelvin

If this is strictly SMS.  
I have used for many years BulkSMS

[BulkSMS.com | SMS Gateway to 213 Countries | BulkSMS.com](https://www.bulksms.com/)

- Extremely well priced
- Extremely easy JSON Webservice
- Works in Node RED using only Core Nodes
- Ability to use an Alphanumeric Sender ID  
(You request a sender ID, and BulkSMS will approve and add it to your account to send from)

Of course others may have others preferred providers

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [6 December 2023 11:58 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/3 "2023-12-06T11:58:59Z")

</div>

Depending on what country you are operating in and what volume of texts you are dealing with (and how legal/moral the work is), there will likely be many options. In addition, some airtime vendors have email to text gateways that might be usable (though likely to have much smaller volume limits).

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [6 December 2023 12:53 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/4 "2023-12-06T12:53:47Z")

</div>

I happen to use mobile broadband, so I can send SMS from Node-red via some javascript files that someone released online. It's specific to my tp-link router though.

Since it's javascript I guess I could integrate it with NR but I just use the exec node to call a shell script.

---

<div class="post-metadata">

### Author: ![kelvin](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kelvin](https://discourse.nodered.org/u/kelvin)
#### Post date: [7 December 2023 01:31 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/5 "2023-12-07T01:31:11Z")

</div>

Hi @TotallyInformation,

Only in singapore, for volume will be the machine data/status when update will just send out to mobile in text format.

---

<div class="post-metadata">

### Author: ![kelvin](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kelvin](https://discourse.nodered.org/u/kelvin)
#### Post date: [7 December 2023 01:31 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/6 "2023-12-07T01:31:53Z")

</div>

Hi @jbudd,

Can i have a example for me to take a look?

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [7 December 2023 01:47 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/7 "2023-12-07T01:47:50Z")

</div>

I downloaded everything from [(https://github.com/plewin/tp-link-modem-router)](https://github.com/plewin/tp-link-modem-router) to ~/bin on my Raspberry Pi. There's a lot of files and I'm sure most of them can be discarded for just sending SMS messages.

The script to send an SMS is simple

```auto
#! /bin/bash
LOGIN=$1
PASSWORD=$2
RECIPIENT=$3
MESSAGE=$4
ROUTER=http://192.168.1.1
cd ~/bin/tp-link-modem-router
./sms-send.js --url="$ROUTER" --login="$LOGIN" --password="$PASSWORD" "$RECIPIENT" "$MESSAGE"

```

And in Node-red

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/08951cc452c28ec2c20f3a5e0bc7613bba8bdc68.png)

```auto
[{"id":"aff00f528fa10668","type":"group","z":"820b503366768e45","name":"Send SMS","style":{"label":true,"stroke":"#0070c0"},"nodes":["13fc9fccc6a88453","213afa80544096af","d2cb636eb4901b93","ac649fbea5eed8da","7c296b0377c4345c","fc2dd2efe4ca4601","acbe2007c8ab515c"],"x":14,"y":19,"w":852,"h":202},{"id":"13fc9fccc6a88453","type":"link in","z":"820b503366768e45","g":"aff00f528fa10668","name":"Send SMS","links":["b75d8b3dc668ef41","a558b7f73db3ca09","3ab9de214b5bd153","5cfd364c8c5c7a45","334bad91d6df2df9","d1ad28d60ebc7b40","785923d87b307e3f","4fb14051335559ee","800dfba849475560","94114d6ac3d3a97e","db554a5e3a178bfc","033bbc952bc1c24d","5a4ad1189403783b","ea62ef5701b5fe46","a0f906f30a2baf0a","e21a82870655932b","e58705dc3051e752","e142daf455487cfd","7c183baa42443b43","212787a022d1f3d3","1f0b8de909826aa4","c9c025271347fe21","de857cbaf7595198","ce92e710d4b3872b","32e2c61b8d0a5eaa"],"x":155,"y":120,"wires":[["d2cb636eb4901b93"]]},{"id":"213afa80544096af","type":"exec","z":"820b503366768e45","g":"aff00f528fa10668","command":"/home/pi/bin/sms.sh","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":440,"y":120,"wires":[[],[],["acbe2007c8ab515c"]]},{"id":"d2cb636eb4901b93","type":"function","z":"820b503366768e45","g":"aff00f528fa10668","name":"","func":"const routerlogin = global.get('routerlogin');\nconst routerpassword = global.get('routerpassword')\nconst recipient = global.get('smsrecipient')\nmsg.payload = routerlogin + \" \" + routerpassword + \" \" + recipient + \" '\" + msg.payload + \"'\" ;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":260,"y":120,"wires":[["213afa80544096af"]]},{"id":"ac649fbea5eed8da","type":"inject","z":"820b503366768e45","g":"aff00f528fa10668","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"A Test Message","payloadType":"str","x":140,"y":180,"wires":[["d2cb636eb4901b93"]]},{"id":"7c296b0377c4345c","type":"comment","z":"820b503366768e45","g":"aff00f528fa10668","name":"Send SMS from tp-link mr600","info":"","x":160,"y":60,"wires":[]},{"id":"fc2dd2efe4ca4601","type":"debug","z":"820b503366768e45","g":"aff00f528fa10668","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":750,"y":120,"wires":[]},{"id":"acbe2007c8ab515c","type":"change","z":"820b503366768e45","g":"aff00f528fa10668","name":"Result","rules":[{"t":"change","p":"payload.code","pt":"msg","from":"0","fromt":"num","to":"SMS Message sent","tot":"str"},{"t":"change","p":"payload.code","pt":"msg","from":"1","fromt":"str","to":"Error sendng SMS","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.code","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":120,"wires":[["fc2dd2efe4ca4601"]]}]

```

---

<div class="post-metadata">

### Author: ![rons4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rons4/32/94440_2.png) [@rons4](https://discourse.nodered.org/u/rons4)
#### Post date: [7 December 2023 07:43 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/8 "2023-12-07T07:43:12Z")

</div>

Some providers, especially in the U.S. provide email-to-SMS gateways ([Sending emails to SMS or MMS](https://help.inteliquent.com/sending-emails-to-sms-or-mms)). In this case you can just send an email.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [5 February 2024 07:43 UTC](https://discourse.nodered.org/t/how-to-send-node-red-output-to-mobile-via-sms/83458/9 "2024-02-05T07:43:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
