Send Alerts to a Mobile Phone

Estimated reading time: 3 minutes

This page details OT Link Platform flows use cases for sending SMS alerts to Mobile Phones.

OT Link Platform Use Case

Send alerts from the shop floor to workers who need to respond to critical conditions:

  • Read tags from a PLC. 
  • Define alerts (conditions/rules/levels) in Flows.
  • Route alerts to specific cell phones or user groups.

Strategies for Sending Alerts

Use an SMS Converged edge system for Messaging

  • SMPP-based SMS Converged edge system: Use the SMPP (Short Message Peer-to-Peer) protocol for an SMS (Short Message Service) Converged edge system to generate alerts. Use either a Converged edge system available in a data center or deploy an open source solution, such as Jasmin SMS Converged edge system, which you can install in a OT Link Platform Marketplace.
  • Hardware SMS Converged edge system: Deploy a device with a SIM card to serve as an SMS Converged edge system. Use Flows to send messages to this SMS Converged edge system when an alert is triggered.
  • Online SMS Converged edge system: Use an online, cloud-based SMS Converged edge system, such as AWS SNS (Simple Notification Service) or Twilio.

Send Messages over WiFi/Network

Install a Notification Receiving mobile app. Several MBaaS (Mobile Backend-as-a-Service) applications (such as Kinvey, Cloudkit for iOS, or Firebase) provide this capability.

  • OT Link Platform becomes the Notification Server.
  • The app connects to Flows to receive notifications.

Create a Twilio Flow to Send an SMS Alert

The following example provides_ high-level guidance_ for configuring outgoing Twilio messaging in Flows. Because each enterprise has unique requirements and configurations, customize this example for your environment.

Prerequisites

  • Know how to configure flows in Flows. See OT Link Platform Flows.
  • Install a Twilio Node in the Flows Palette.
  • Register for a Twilio account here (if you do not have an account), to enable the Twilio Node in a Flow.

Note

Twilio bills for message activity.

Install a Twilio Node in the Flows Palette

To add a Twilio node to the Flows palette:

  1. Take the steps described in Manage the Nodes Palette.
  2. Search for the node-red-node-twilio node and click Install.

Note

Although this node supports phone calls, this documentation covers only text messaging.

Configure the Twilio Node

Configure connectivity parameters for the Twilio Node:

  1. In Flows, drag a Twilio Node onto the canvas.
  2. Double-click the node to edit it.

  3. In the edit node dialog, select SMS output and enter a phone number (no spaces or special characters) for the person who will receive the text messages. 
  4. Do not click Done yet.
  5. In the edit node dialog, click the pencil icon (next to the Twilio field) to configure the connection parameters for the Twilio Node.

  6. To retrieve the values for configuring a Twilio connection, go to your Twilio account and access the Programmable SMS Dashboard.

    1. Account SID - Find this security ID in the Twilio account dashboard.
    2. From - Use the Twilio-assigned phone number found in your Twilio account.
    3. Token - Find this authentication token in the Twilio account dashboard.
    4. Name - Enter an optional user-defined name.
  7. Click Update to return to the edit node dialog.
  8. In the edit node dialog, click Done.
  9. Save the flow.

Create a Flow to Test Connectivity

Create a basic flow to test connectivity to Twilio.

To create a flow to test Twilio connectivity:

  1. In Flows, continue with the flow that you just configured in the previous procedure.
  2. Drag a Function node onto the canvas and wire it to the Twilio Node.
  3. Double-click the Function node to edit it. Enter a basic message to send as a text message. Click Done.

    msg.payload = "Alert: This is a test message from the manufacturing floor.";
    return msg;
    
  4. Drag an Inject node onto the canvas and wire it to the Function node. This node will initiate sending the text to the phone.

  5. Save the flow.
  6. Inject a timestamp to trigger the alert. Then, check your phone for the text message.