Skip to content

3 min read#node-red#iot#push-notifications#javascript#home-automation

Node-RED and the IoT Notification Gap

Node-RED is a visual programming tool that has become the backbone of countless IoT and home automation setups. It excels at wiring together APIs, hardware devices, and online services through a drag-and-drop flow editor. But one area where the default palette falls short is rich push notifications. Sure, you can send an email or a Telegram message, but for instant, reliable notifications on your phone (with priority levels, custom sounds, and image attachments), Pushover is hard to beat.

We built node-red-pushover to fill this gap. It is a Node-RED library that wraps the Pushover API into a simple, configurable node. Drop it into any flow, wire it up to a trigger, and you have instant push notifications on your iOS or Android device.

Designing the Node

A Node-RED node consists of three pieces: an HTML file that defines the editor UI, a JavaScript file that implements the runtime behaviour, and a package.json that declares the node to Node-RED's Palette Manager. The design goal was to expose Pushover's full API surface (messages, priorities, sounds, devices, images, and HTML formatting) without overwhelming the user with configuration.

The node accepts its inputs through the flow's msg object. The payload becomes the message body. Optional properties like msg.title, msg.image, msg.url, and msg.sound override the defaults configured in the editor. This means you can set sensible defaults in the node properties and override them dynamically at runtime. That is exactly how Node-RED users expect things to work.

Priority levels range from Lowest to High, and each level changes how the notification behaves on the receiving device. High-priority messages bypass Do Not Disturb, which is essential for critical alerts like security system triggers or server outages.

Sound, Image, and HTML Support

One of Pushover's best features is custom notification sounds. The node exposes all available sounds: bike, bugle, cashregister, classical, cosmic, falling, gamelan, incoming, intermission, magic, mechanical, pianobar, siren, spacealarm, tugboat, alien, climb, persistent, echo, updown, and vibrate. Users pick a default sound in the editor but can override it per message.

Image support was the trickiest feature to implement. Pushover's API accepts an image attachment as a multipart form upload. The node accepts a Buffer or file path in msg.image and handles the multipart encoding transparently. This is particularly useful for security camera integrations. When motion is detected, the flow captures a snapshot and sends it as a push notification with the image inline.

HTML formatting in message bodies is also supported. Pushover allows bold, italic, underline, colour, and hyperlink tags, which the node passes through without modification. This lets you create rich, formatted alerts directly from your automation flows.

Pushover Glances and Smartwatch Support

Beyond standard notifications, the plugin also supports Pushover's Glances API. Glances provides data to widgets and smartwatch complications. These are small pieces of information, like a title, text, subtext, count, and percentage, that update on your device without triggering a full notification.

This is useful for dashboard-style monitoring. For example, a home automation flow might push the current temperature, humidity, and air quality index to your Apple Watch complication via Glances. This can update every five minutes without buzzing your wrist each time.

The node-red-pushover plugin can be installed through Node-RED's built-in Palette Manager or via npm. It has been used in home automation, server monitoring, security systems, and industrial IoT setups where reliable, instant notifications are non-negotiable.