Skip to content

EN Notifications

Guiyomee edited this page Nov 27, 2026 · 5 revisions

Notifications

Français

Settings → Webhooks → Add a webhook, then choose the Type at the top of the form:

Type For
Webhook (JSON) n8n, Node-RED, Home Assistant, a script: the full event as JSON
Discord a message in a channel
ntfy a notification on the phone (ntfy app), from ntfy.sh or your own server
Telegram a message from a bot

ntfy, Telegram and the choice of the type exist since 2026.11.07. Before, a Discord address was recognized by itself and any other address got the JSON.

Discord, ntfy and Telegram get a readable message: a title (« Personne · Jardin »), the details (objects and scores, zones, length…) and the attached picture. These messages are in French for now. The Try button sends a test message at once.

What triggers a call

To tick for each webhook:

Kind of call When
Motion start of a motion, with the picture (≈ 1 s later)
Recognized objects AI recognized an object, picture with boxes
End of the event length and objects, no picture
Line crossing a crossing line was crossed
Storage degraded a NAS not mounted, read-only or not answering; then back
Camera offline / back no picture for 1 minute, then online again; since 2026.11.10, also a picture frozen for 5 minutes or covered for 1 minute (detection)
Recording error a camera can no longer write (disk full…), then back at the next segment (since 2026.11.07)
AI failing / back object recognition failed 3 times in a row (AI server stopped, unreadable model), then works again (since 2026.11.10)

Filters: Cameras (none ticked: all) and Objects (none: every event; otherwise only the ticked recognized objects, without plain motion). « Attach the picture » is ticked or not per webhook.

Muting one camera's notifications (since 2026.11.09): in the camera's page, Detection tab, untick « Send the notifications of this camera ». It keeps recording and keeps its events; only the notifications of its motion, objects and crossings stop, failures still go through. In Home Assistant it is the camera's Notifications switch: an automation can for instance mute the garage while someone is home and switch it back on once everyone has left (zone.home counts the people at home):

automation:
  - alias: Garage, notifications only when away
    triggers:
      - trigger: state
        entity_id: zone.home
    actions:
      - action: >-
          {{ 'switch.turn_off' if trigger.to_state.state | int(0) > 0
             else 'switch.turn_on' }}
        target:
          entity_id: switch.garage_notifications

Schedule (since 2026.11.08): ranges (days and hours) limit the sending of detections (motion, objects, crossings), for example only at night or while you are at work. An event follows the time it starts at. Failures (storage, camera, recording) always go through.

A slow or unreachable address delays neither RustNVR nor the other webhooks: each has its own queue, a 10 s timeout and one more try after 5 s. The log never shows the full address nor the tokens.

Customizing the messages (since 2026.11.07)

In each Discord, ntfy or Telegram webhook, Customize the messages: a title and a text for each ticked kind of call. Left blank, they keep the usual message, shown as an example. The variables between braces are replaced (their names are French):

For Variables
All {camera}, {heure} (time), {date}
Motion, objects, end {objet} (object), {objets} (objects), {plaque} (plates read, since 2026.11.11), {zones}, {duree} (length, at the end)
Line crossing {ligne} (line), {sens} (direction), {compte} (count), {objet}
Storage {stockage} (destination), {etat} (state), {erreur} (error)
Camera {etat} (« hors ligne », « figée », « masquée », « rétablie »), {erreur}, {duree}
Recording {etat}, {erreur}, {echecs} (failures), {duree}
AI {etat} (« en panne », « rétablie »), {erreur}, {echecs}, {duree}

Example: title {objet} at {camera}, text {heure} · {zones}. On ntfy each kind of call can have its own priority (from 1, no notification, to 5, urgent); on Telegram it can be sent without sound.

At most one notification every X minutes per camera (every webhook): the first event of a camera is sent whole, the next ones are skipped during the wait. Handy when someone hangs around in front of the camera. Failures (storage, camera, recording) always go through.

Video of the event (since 2026.11.08)

For Discord, ntfy and Telegram, « Also send a short video » adds a second message with a few seconds of the event (from 2 s before it starts, 15 s at most). It arrives about a minute after the picture: RustNVR waits for the recording of that moment to be finished. The video is light (H.264, 480 lines) and privacy masks are blacked out in it. It needs FFmpeg (already there with Docker and the archive).

Group the journeys (since 2026.11.10)

With journeys between cameras (Detection and AI page), the « Group the journeys » box of a notification avoids getting one per camera when someone walks past the doorbell, then the entrance, then the living room:

  • the first camera alerts at once, as usual;
  • the next cameras of the journey stay silent;
  • at the end of the journey, one message sums it up: « Journey · Person », « Doorbell → Entrance → Living room », the time, arrival or departure, the duration.

When « Also send a short video » is ticked, that message comes with the video of the journey: the cameras one after the other, each at the moment it sees the person, with a « camera · time » banner and the sound of the cameras that record some (silence during the others). The video of the first camera alone is then no longer sent. It arrives about a minute after the end of the journey (once the recordings are finished).

The box is unticked by default: each notification chooses. It is meant for object notifications (« Recognized objects »); a plain motion notification may still come from a next camera.

Discord

  1. In Discord: Channel settings → Integrations → Webhooks → New webhook, then Copy webhook URL.
  2. In RustNVR: Type Discord, paste the address (https://discord.com/api/webhooks/…), tick the kinds of call, Try, then Save.

ntfy

ntfy sends notifications to the phone (Android, iOS) with a plain HTTP request. It runs on ntfy.sh (free) or in a container at home: your cameras' pictures then stay on your network.

  1. Install the ntfy app and subscribe to a topic with a name hard to guess, for example home-a7k2p9 (on ntfy.sh the topic name works as a password).
  2. In RustNVR: Type ntfy, topic address https://ntfy.sh/home-a7k2p9 (or https://ntfy.mydomain/home).
  3. Protected server: an access token (tk_…, made with ntfy token add), sent as Authorization: Bearer.

A failure (storage, camera, recording) arrives with high priority and 🚨, the return to normal with ✅.

Telegram

  1. In Telegram, write to @BotFather: /newbot, a name, then it gives the bot token (123456789:AAH…).
  2. Write once to your new bot (or add it to a group).
  3. Find the chat identifier: @userinfobot gives yours, or open https://api.telegram.org/bot<token>/getUpdates after writing to the bot ("chat":{"id":…}; a group has a negative identifier). A public channel: @channel_name.
  4. In RustNVR: Type Telegram, the token and the identifier, Try.

JSON webhook (n8n, Node-RED, script…)

RustNVR sends a POST with this JSON:

{ "type": "motion",
  "camera": "garden", "camera_name": "Garden",
  "event": { "id": 42, "kind": "motion", "start_ms": 1793607714212, "end_ms": null,
             "score": 0.31, "zones": ["Path"],
             "objects": [{ "label": "person", "score": 0.87, "bbox": [0.2, 0.3, 0.4, 0.9], "zone": "Path" }] },
  "image": "data:image/jpeg;base64,…",
  "rustnvr": "2026.11.11" }

type is motion, objects, end or test. Crossings, storage, cameras, their picture, recording errors and the AI have their own bodies ("type": "crossing", "storage", "camera", "picture", "recording", "ai"), described in API_CONTRACT.md (in French).

And with Home Assistant?

If you have Home Assistant, its mobile app can also warn you with the picture of an event, through an automation on RustNVR's MQTT entities: see Home Assistant.

Clone this wiki locally