Monnit Edge - 10 Monnit Alert

Monnit Alert with Delay

Monnit - Alert module with Delay Flow

This article walks through a complete template Flow that uses Monnit - Alert with a 30-second Delay before email / HTTP. If the condition returns to normal (or you Disarm) while the message is still waiting in the Delay, the pending notification is cancelled and nothing is sent.

Package: node-red-contrib-monnit-alert   (palette label Monnit - Alert).

Related articles:


What this example demonstrates

Goal How the flow does it
Detect a sensor condition like an iMonnit Rule Monnit - Alert
Wait briefly before notifying (grace / debounce window) Core delay node (30 seconds)
Cancel the pending send if things go normal Alert Status → change (msg.reset = true  ) → same delay
Stop escalation on demand Inject disarm  → Monnit - Alert
Allow the next matching reading to alert again Inject rearm  → Monnit - Alert
Deliver a notification template → e-mail (your SMTP) and/or http request (webhook POST)

Important: Monnit - Alert alone stops new Alert messages after clear / Disarm. It does not cancel a message that has already entered a Delay. That is why Status must reset the Delay.


Flow diagram

[iMonnit-Edge] ──► [Monnit - Sensor Filter] ──► [Monnit - Alert]
                                                      │
                         ┌── Alert (port 1) ──────────┼──► [30s Delay] ──► [Alert Text] ──┬──► [e-mail]
                         │                            │                                  └──► [http request]
                         │                            │
                         └── Status (port 2) ──► [Resolve before delay] ──► [30s Delay]
                              (sets msg.reset = true)         ▲
                                                              │
[inject: disarm] ──► [Monnit - Alert] ──(Status: disarmed)────┘
[inject: rearm]  ──► [Monnit - Alert]   (rearm only — do not reset the Delay)

Wire disarm and rearm into the same Monnit - Alert input as the sensor stream. Node-RED merges multiple wires into one input.


How cancel-before-send works (step by step)

  1. A reading meets the Alert condition → Alert output fires (state: "ALARM"  ).
  2. That message enters 30s Delay and waits.
  3. Within those 30 seconds, either:

- The reading returns to normal (Acknowledge = Auto), or

- You click disarm

  1. Monnit - Alert emits on Status (cleared   or disarmed  ).
  2. Resolve before delay sets msg.reset = true   and sends into the same Delay node.
  3. The Delay flushes / cancels its queue → template / e-mail / http never run for that pending alert.

If the Delay finishes with no reset, the message continues to Alert Text → email / HTTP.

Rearm only resets the Alert rule for the next matching sample. Do not wire rearm into msg.reset   — that would only clear a pending Delay, which is not what Rearm means in iMonnit.


Nodes in the example (every configuration)

1. iMonnit-Edge

Setting Example / template value Notes
Name *(blank)* Optional canvas label
Wiring Output → Sensor Filter Live Edge sensor traffic

Use your site’s Edge connection settings as usual. This node is the live data source for the template.


2. Monnit - Sensor Filter

Setting Example / template value Notes
Name *(blank)* Optional
Sensor ID *(blank in template)* Fill in when copying to a real site
Reading Checked Pass primary reading
Battery Unchecked Not required for this reading alert
Signal Unchecked
State Unchecked
Wiring Output 1 (match) → Monnit - Alert Other filter outputs unused

A filter is optional — Monnit - Alert can match sensor IDs itself. The template keeps a Filter so you can restrict traffic before the Alert node. This is used if your intention is to create an alert for a single sensor.


3. Monnit - Alert (example values used in the template)

These are the values from the example Flow. Empty Sensor ID / Value are intentional for a copy-and-fill template.

Setting Example value Why
Name *(blank)* Optional
Sensors *(blank)* Set your Monnit sensor ID(s) before Deploy on a real site
Trigger Sensor Reading Compare the primary datum
Channel 0   Primary / first reading
Compare Greater than or equal to Typical high-threshold temp rule
Value *(blank)* Set your threshold (e.g. 20  ) before use
Low / High 0   / 100   Only used if Compare is Outside / Inside band
Inactive 60   Only used if Trigger = Inactivity
Snooze Enabled Repeat while condition persists
Minutes 120   Snooze interval (iMonnit-style default)
Each trigger Jointly One shared snooze for all listed sensors
Acknowledge Auto Clear when condition returns to normal
Wiring Port 1 → Delay; Port 2 → Resolve before delay

When you copy this Flow for production: set Sensors and Value (and adjust Compare / Snooze as needed). Leave the Delay / Status / Disarm / Rearm wiring as shown.


4. Delay — “30s Delay”

Setting Example value Notes
Action Delay each message Standard delay (not rate limit)
For 30   seconds Grace window before notify
msg.reset Accepted (default) Required so Status can cancel the queue
Wiring Input from Alert and from Resolve before delay; output → Alert Text Same Delay node for both paths

Do not use a second Delay for the reset path — reset must hit the Delay that holds the pending Alert message.


5. Change — “Resolve before delay”

Setting Example value Notes
Name Resolve before delay
Rule Set msg.reset   to boolean true   Cancels messages waiting in the Delay
Wiring From Alert Status → this node → 30s Delay

Any Status event from Monnit - Alert (cleared  , disarmed  , rearmed  , stopped_24h  , …) will reset the Delay in this template. That is fine for a grace-window example. Optionally insert a switch on msg.payload.state   and only pass cleared   / disarmed   if you do not want rearmed   to flush the Delay.


6. Inject — “disarm”

Setting Example value Notes
Name disarm
Payload string disarm   Exact command (case-insensitive aliases also accepted — see below)
Repeat none Manual click only
Inject once Off
Wiring → Monnit - Alert only Status (disarmed  ) then resets the Delay

Disarm stops further Alert notifications while the condition may still be true (same idea as iMonnit Disarm). Because Alert emits Status, the pending Delay is cleared without a second wire from the Inject to the Delay. You can test by clicking the button to the left of the node.


7. Inject — “rearm”

Setting Example value Notes
Name rearm
Payload string rearm   Exact command
Repeat none
Inject once Off
Wiring → Monnit - Alert only Do not send rearm through msg.reset  

Rearm does not fire an alert by itself. It resets the rule so the next sensor message that still meets (or again meets) the condition can Alert again. You can test by clicking the button to the left of the node.


8. Template — “Alert Text”

Setting Example value Notes
Name Alert Text
Property msg.payload  
Format Mustache / Handlebars
Template See below Builds the email / HTTP body
Wiring → e-mail and http request Fan-out after the Delay

Example template body:

Monnit Edge temperature alert

Sensor ID: {{topic}}
Reading: {{primary}}
Condition: {{payload.condition}}
UTC: {{payload.utc}}
State: {{payload.state}}

msg.topic   is the sensor ID. msg.primary   is the triggering value. Full detail is also on msg.alert   / msg.payload  .


9. e-mail

The e-mail node sends a real email when you enter your email server details (SMTP host, port, TLS, username/password or OAuth, and To / From). Until those are filled in, the node is only a placeholder in the template.

Setting Example value Notes
Server Your SMTP host (e.g. smtp.gmail.com  , Microsoft 365, or your ISP/mail server) Required for outbound mail
Port 465   (SMTPS) or 587   (STARTTLS) — match your provider
Secure / TLS On as required by the provider
User / Password (or OAuth) Your mailbox credentials BASIC or OAuth per node-red-node-email  
To Recipient address(es) Who receives the alert
From Sending address Often must match the authenticated mailbox

After Deploy, when an Alert survives the 30s Delay, the Alert Text body becomes the email message and is sent through that SMTP server.

Configure credentials only on a private Edge — do not leave production passwords in shared templates.


10. http request (Webhook POST)

The http request node can call a webhook with POST. Set the method to POST, put your webhook URL in URL, and the Alert Text payload is sent as the request body (typical for Slack/Teams proxies, Zapier/Make, custom APIs, and similar).

Setting Suggested webhook value Notes
Method POST Use POST for most webhooks (template may show GET until you change it)
URL Your webhook endpoint (HTTPS) e.g. Slack Incoming Webhook, Teams connector, or internal API
Return utf8 string (or JSON as needed) Response handling is optional for fire-and-forget webhooks
Headers As required by the webhook e.g. Content-Type: application/json   or an auth header
Wiring From Alert Text Parallel to email — use one, both, or neither

You can keep email only, webhook only, or both in parallel after the template. Leave the URL blank in the shared template until you paste a real webhook.


Monnit - Alert — every setting (complete reference)

Double-click Monnit - Alert. Fields appear or hide based on Trigger and Compare.

Identity and sensors

Field Options / default Description
Name Optional text Canvas label. If blank, the node shows Monnit - Alert   or Monnit - Alert (N)   when sensors are listed.
Sensors Comma-separated IDs, e.g. 123456, 789012   Only these IDs are evaluated. Others are ignored. Leave blank only in templates; production Flows need real IDs.
Pick / Refresh Dropdown + refresh button Optionally load IDs from Edge (BACnet sensors API) or from Sensor Filter traffic. You can still type IDs manually.

Trigger

Trigger What is evaluated
Sensor Reading Primary datum (or selected Channel) vs Compare / band
Aware State Advanced Rules on Aware true/false (not a numeric threshold)
Battery (volts) Battery voltage vs Compare / band
Signal (%) Signal percent vs Compare / band
Inactivity No message from a watched sensor for Inactive minutes

Channel (Sensor Reading only)

Field Default Description
Channel 0   0   = primary / first datum; 1+   = additional readings when the message includes multiple datums

Compare and thresholds (Reading / Battery / Signal)

Field Options Description
Compare Greater than; Greater than or equal to; Less than; Less than or equal to; Outside threshold (band); Inside threshold (band) How the numeric value is tested
Value Number (default editor value often 20  ) Single threshold for gt / gte / lt / lte
Low / High Two numbers (defaults often 0   / 100  ) Band limits when Compare is Outside or Inside

Outside band — fires when value < Low or value > High.

Inside band — fires when Low ≤ value ≤ High (inclusive band behavior as implemented by the node).


Inactivity

Field Default Description
Inactive 60   minutes Minutes without a message from a watched sensor. The node checks on a short timer (~15 s). Any message from that sensor resets the inactivity clock.

Aware State — Aware rule (Trigger = Aware State)

Aware rule Extra fields Behavior
First Aware Message — Fires when the device enters Aware. Does not repeat on later Aware messages until it leaves Aware and enters again.
First Non-Aware Message — Fires when the device exits Aware (first non-Aware after being Aware).
Aware State Changed — Fires on both enter and exit edges.
Notify After Aware Period Period (minutes, default 15  ) Timer starts on first Aware; fires after consecutive Aware continues past the period.
Notify After Not Aware Period Period (minutes) Same pattern for consecutive non-Aware.
Frequent Aware Messages Count / window (defaults 5   in 60   min) Fires after N Aware messages within the window.
Aware Change Count Changes (default 3  ) Fires when Aware State changes reach the count, then resets the count.
Back Online Offline (minutes, default 60  ) Fires when a message arrives after quiet longer than the offline gap.
Assigned Sensors Meet Aware Threshold ≥ or < percent, target Aware / Not Aware Fires when the % of assigned sensors in the target state meets the compare.
Gateway On Battery — Fires when gateway power source switches to battery. Needs messages with powerSource   (battery vs line). Optional gateway ID(s) in Sensors.
Gateway Switched to Line Power — Fires when gateway returns to line power.

Snooze

Field Default Description
Enable snooze Checked (on) On: repeat Alert every Minutes while the condition persists (and the rule is not Disarmed / auto-stopped). Off: fire once until the condition returns to normal; with Auto Acknowledge the rule is then ready again.
Minutes 120   Snooze interval in minutes.
Each trigger Jointly Jointly — one shared snooze timer for all selected sensors. Independently — each sensor has its own snooze timer.

See Rules Snooze: Jointly vs Independently.


Acknowledge

Mode Default Description
Auto Yes (default) When the condition clears, the rule resets (Disarm + Rearm semantics) and can fire again on a later trigger. Status emits cleared  .
Manual — Returning to normal does not fully clear escalation. Use Disarm / Rearm Inject messages (or equivalent commands).

See Acknowledgement Mode.


Auto-stop (hours)

Field Default Description
Auto-stop 24   Hours after the first alert in an escalation before notifications stop (until Disarm / Rearm). Set 0  to never auto-stop. Status may emit stopped_24h   (or equivalent) when the cap is hit.

Matches iMonnit’s “notifications stop after 24 hours” idea, but is configurable on Edge.


Time zone (optional)

Field Default Description
Include local time Unchecked When checked, events also include localTime   and timeZone  
Zone e.g. America/Denver   IANA time zone for local formatting

Every event always includes utc  (ISO-8601 UTC), whether or not local time is enabled.


Outputs

Port Label When it fires Typical use in this example
1 Alert Notification should fire (msg.payload.state = "ALARM"  ) Into 30s Delay → template → email / HTTP
2 Status cleared  , disarmed  , rearmed  , stopped_24h  , etc. Into Resolve before delay → reset the Delay

Do not confuse port 2 with the grey core status node (that node watches canvas status text). You need Monnit - Alert’s second output.

Alert payload (example)

{
  "state": "ALARM",
  "sensorId": "123456",
  "metric": "reading",
  "condition": "≥ 20",
  "value": 21.5,
  "utc": "2026-09-24T19:00:00.000Z",
  "localTime": "09/24/2026, 13:00:00 MDT",
  "timeZone": "America/Denver"
}

Also available: msg.alert  (full detail), msg.primary  (triggering value), msg.topic  (sensor ID).


Disarm and Rearm (detailed)

Same ideas as iMonnit Rules (Disarm and Rearm):

Action What it does Effect on this Delay example
Disarm Stop repeat / snooze notifications even if the condition is still true Alert emits Status disarmed   → change sets msg.reset   → pending Delay is cancelled
Rearm Reset the rule so the next matching reading can alert again Does not send an alert by itself; wire only into Monnit - Alert

Accepted command shapes

Method Example
String payload (Inject) disarm   or rearm  
Object payload { "command": "disarm", "sensorId": "123456" }  
msg.monnitAlert   { "command": "rearm", "sensorId": "123456" }  
msg.command   "disarm"   (optional msg.sensorId   / msg.topic  )

Aliases: ack   / acknowledge   behave like disarm; reset   behaves like rearm for the Alert node — do not confuse that with Delay’s msg.reset  .

  1. Disarm: Payload type string, value disarm   → wire to Monnit - Alert.
  2. Rearm: Payload type string, value rearm   → wire to Monnit - Alert only.
  3. Deploy, then use the Inject buttons when testing.

Suggested production settings (after copying the template)

Field Suggested starting point
Sensors Your real sensor ID(s)
Trigger Sensor Reading
Channel 0  
Compare Greater than or equal to (or your site rule)
Value Your threshold (e.g. 20  )
Snooze On, 120 minutes, Jointly (or Off for once-until-normal)
Acknowledge Auto
Auto-stop 24   (or 0   to never stop)
Time zone Optional; enable if email body should show local time
Delay Keep 30s (or change) and keep Status → msg.reset  

Test plan

  1. Set Sensors and Value on Monnit - Alert (and Filter ID if used).
  2. Deploy.
  3. Force a reading that meets the condition → confirm Debug/Status shows ALARM and the Delay starts.
  4. Within 30 seconds, return the reading to normal or click disarm → confirm email / HTTP do not send.
  5. Click rearm, then send another matching reading → Alert should fire again after the Delay (if not cancelled again).
  6. With Snooze on, leave the condition true past the snooze interval → confirm a second Alert (unless Disarmed or Auto-stop hours elapsed).

Troubleshooting

Symptom Check
Never alerts Sensor IDs on Filter and Alert; Trigger / Compare / Value; wire from Edge; Deploy
Email still sends after clear Status must go to change (msg.reset  ) into the same Delay that held the Alert
Used grey status node Wrong node — use Alert port 2
Rearm “does nothing” Expected — wait for the next matching reading
Disarm does not cancel Delay Confirm Alert Status → Resolve before delay → Delay; Disarm must enter Monnit - Alert so Status fires
unknown: monnit-alert   Install node-red-contrib-monnit-alert   and restart Node-RED

Support

Questions about Monnit Edge Flows or this example: support@monnit.com

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.