IoTFlows
  • Welcome to IoTFlows Docs
  • IoTFlows
  • Console
  • REST API
  • Device Management & Secure Remote Access
    • 1. Connect a device to the cloud or create a virtual device
    • 2. SSH to your device over the internet
    • 3. Transfer files to your device over the internet
    • 4. Remotely access Node-RED on your device
    • 5. Create public links for local web-apps
  • Real-Time Data Streams, Alerts, and Actions
    • Create a Device API Key
    • Publish and subscribe to real-time messages with Node-RED
    • Creating an Alert Channel
    • Publish an Alert with Node-RED
    • Define and execute an Action in Node-RED
    • Python real-time SDK
    • Javascript real-time SDK
  • Cloud Node-RED Servers
    • Create a secure Cloud Node-RED Server in five minutes
    • Subscribe to data streams with a Cloud Node-RED Server
    • Integrate data streams to Node-RED dashboard
    • Integrate data streams to Slack
  • IOTFLOWS OVERVIEW
    • IoTFlows Roles and Permissions
    • Adding Team Members
  • Example Projects
    • Raspberry Pi as Gateway
      • Arduino to Raspberry Pi Serial Communication for Ultrasonic Sensor
    • Getting Started with Node-Red Dashboard
      • Installing Node-Red Dashboard
      • Accessing Node-Red Dashboard
      • 1. Creating a Page
      • 2. Adding Gauge Nodes
      • 3. Changing Dashboard Themes
      • 4. Adding Data to Gauge Nodes
      • 5. Adding a Chart Node
      • 6. Adding Data to Chart Node
      • 7. Adding a Template Node
      • 8. Adding Data to Template Node
      • 9. Adding Switch Node
      • 10. Adding Logic to Switch Node
      • 11. Adding a Slider Node
      • 12. Adding a Color Picker Node
      • 13. Adding a Numeric Node
      • 14. Adding a Button Node
      • 15. Adding Logic to a Button Node
      • Node-Red Dashboard Code
    • Publishing Data Streams from Python
    • Ultrasonic Sensor on Raspberry Pi Node-Red
  • General
    • Downloading IoTFlows Node-Red Nodes
    • Publishing Alert from Node-Red Manual
    • Publishing Data Stream from Node-Red Manual
Powered by GitBook
On this page
  • Prerequisites
  • Create an Alert Channel
  • Connect to Node-RED
  • Configure Alert Channel node in Node-RED:
  • Publish an Alert from Node-RED

Was this helpful?

  1. Real-Time Data Streams, Alerts, and Actions

Publish an Alert with Node-RED

In this page, you will see how to publish an Alert from your Node-Red application that will be delivered to the alert channel members based on their preference of method of delivery.

PreviousCreating an Alert ChannelNextDefine and execute an Action in Node-RED

Last updated 3 years ago

Was this helpful?

Prerequisites

For this section, you'll first need to , , and .

In case you have a Node-RED already installed manually and only need to exchange real-time data without managing your device, you can add manually to your Node-RED. .

Create an Alert Channel

Navigate to the Alerts tab. Tap on Alert Channels and create a channel.

Tap on the gear icon next to the alert channel and go to Manage Alert Channel Notifications to set your personal preferences for receiving an alert from this channel (Go to for details). Note that to receive a text message, you should verify your phone number first, which can be done in the Profile Button on the top right side of the screen.

Connect to Node-RED

Ensure your device is connected to the cloud by checking if you see the green light on the device page, Enable the Node-RED connection in the Remote Connections tab, and hit Connect.

Configure Alert Channel node in Node-RED:

From the nodes in the left navigation bar, drag and drop the alert channel out node.

Double-click on the alert channel out node, and then double click on the edit button.

If you have previously configured any nodes with your Device API KEY username and password, your nodes should already be configured.

Next, we will click the refresh button in the Topic and select the Alert Channel that we will like to publish to.

Once everything is complete, click Done.

Publish an Alert from Node-RED

  • Drag and drop an inject node.

  • Drag and drop a function node.

  • Connect the inject to function to alert channel out node, respectively.

  • Double-tap the function node and write this code:

msg.payload = 
{
    "severity_level": "MAJOR",
    "subject": "An alert subject",
    "description":  "Description of the alert",
};
return msg;

Severity levels could be one of the following:

  1. MAJOR

  2. MINOR

  3. INFORMATIVE

Important: Alert severities need to be CAPITALIZED.

From the top right corner of Node-RED, tap Deploy.

Tap the button of the inject node and you should receive an alert based on your alert channel notification preferences. You can change your notification preferences by selecting the alert channel and clicking on the gear icon.

Congratulations! You have successfully published an alert to an alert channel and subscribes have received a notification based on their delivery preferences.

IMPORTANT: We strongly recommend that you change the default username and password for Node-RED (admin, password). .

connect your device to the cloud
create a remote connection for Node-RED
create a Device API Key
IoTFlows Node-RED Nodes
Learn how to add nodes to Node-RED
Learn how to change the Node-RED credentials
Managing Alert Channel