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.
Last updated
Was this helpful?
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.
Last updated
Was this helpful?
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. .
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.
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.
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.
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.
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:
Severity levels could be one of the following:
MAJOR
MINOR
INFORMATIVE
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). .