You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: clarify Path 1 vs Path 2 notification capabilities across all docs
Path 1 now supports direct FCM push notifications (ZM 1.39.2+), but the
docs still described it as "detection only" with "no notifications" in
multiple places. This updates all references to accurately reflect both
paths: feature table, principles, install guides, hooks, and FAQ.
Also adds push testing instructions to install_path1 Step 5 so users
can find them when following the Path 1 setup flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* When the Event Notification Server detects an event, it invokes the script specified in ``event_start_hook`` in your ``zmeventnotification.yml``. This is typically ``/var/lib/zmeventnotification/bin/zm_event_start.sh``
7
+
There are two paths:
8
8
9
-
* ``zm_event_start.sh`` in turn invokes ``zm_detect.py`` that does the actual machine learning. Upon exit, it returns ``0`` (success) meaning an object was found, or ``1`` (failure) meaning nothing was detected. Based on how you have configured your settings, this information is then stored in ZM and/or pushed to your mobile device as a notification.
9
+
**Path 1 (no ES):** ZoneMinder calls ``zm_detect.py`` directly via ``EventStartCommand``. The script runs ML detection and writes results back to the event. If ``push.enabled`` is ``yes`` in ``objectconfig.yml`` (requires ZM 1.39.2+), it also sends FCM push notifications directly to registered devices.
10
+
11
+
**Path 2 (full ES):** The Event Notification Server detects an event and invokes the script specified in ``event_start_hook`` in ``zmeventnotification.yml`` (typically ``/var/lib/zmeventnotification/bin/zm_event_start.sh``). That script in turn invokes ``zm_detect.py`` for the actual machine learning. Upon exit, it returns ``0`` (success) meaning an object was found, or ``1`` (failure) meaning nothing was detected. The ES then decides whether to send notifications based on your channel configuration.
* **Path 2 (Full Event Server)** — The Event Notification Server (ES) monitors shared memory for new events, invokes ML hooks, and sends notifications via FCM push, WebSockets, MQTT, and 3rd-party APIs.
8
+
* **Path 1 (Detection + optional push)** — ZoneMinder calls ``zm_detect.py`` directly via ``EventStartCommand``. No daemon needed. Optionally sends FCM push notifications directly to registered devices (requires ZM 1.39.2+). See :ref:`push_config` for push setup.
9
+
* **Path 2 (Full Event Server)** — The Event Notification Server (ES) monitors shared memory for new events, invokes ML hooks, and sends notifications via FCM push, WebSockets, MQTT, and 3rd-party APIs. Also provides notification rules, per-device monitor filtering, and a dynamic control interface.
10
10
11
-
Both paths use the same ML pipeline (``zm_detect.py`` + ``objectconfig.yml``). The difference is what triggers detection and what happens with the results.
11
+
Both paths use the same ML pipeline (``zm_detect.py`` + ``objectconfig.yml``). The difference is what triggers detection and what notification channels are available.
@@ -47,7 +47,19 @@ When detection finishes, ``zm_detect.py`` produces the following:
47
47
* **Detection metadata** — An ``objects.json`` file with labels, boxes, confidences, and frame info is saved alongside the image.
48
48
* **Event tags** — When ``tag_detected_objects: yes`` (requires ZM >= 1.37.44), detected labels are tagged in ZoneMinder.
49
49
50
-
That is the complete Path 1 flow. There is no daemon running, no shared memory polling, and no notifications — ZoneMinder calls the script, the script runs detection, and results are written back to the event.
50
+
That is the core Path 1 detection flow. There is no daemon running and no shared memory polling — ZoneMinder calls the script, the script runs detection, and results are written back to the event.
51
+
52
+
4: Optional — Direct Push Notifications
53
+
-----------------------------------------
54
+
Starting with ZM 1.39.2+, ``zm_detect.py`` can also send **FCM push notifications directly** to registered mobile devices — no Event Server needed. This is configured via the ``push`` section in ``objectconfig.yml`` (see :ref:`push_config`).
55
+
56
+
When ``push.enabled`` is set to ``yes``, after detection completes ``zm_detect`` reads registered device tokens from ZoneMinder's ``Notifications`` database table (devices register via the ZM REST API) and sends push notifications through an FCM cloud function proxy. It respects per-token monitor filtering, throttle intervals, and push state, and automatically cleans up invalid tokens.
57
+
58
+
**What Path 1 push gives you:** FCM push notifications to registered iOS/Android devices after detection, with optional event images.
59
+
60
+
**What Path 1 push does NOT give you:** WebSocket notifications, MQTT, notification rules/time-based muting, the ``tokens.txt`` per-device control file, or the ES control interface. For those, you need :ref:`Path 2 <from-detection-to-notification>`.
61
+
62
+
See :ref:`push_config` in the configuration guide and the "Testing push notifications" section in :doc:`hooks` for how to test.
51
63
52
64
.. _from-detection-to-notification:
53
65
@@ -56,7 +68,7 @@ Path 2: From Event Detection to Notification
56
68
57
69
.. note::
58
70
59
-
This section covers the full Event Notification Server (ES) flow. If you are using Path 1 (detection only via ``EventStartCommand``), you can skip this section.
71
+
This section covers the full Event Notification Server (ES) flow. If you are using Path 1 (detection + optional push via ``EventStartCommand``), you can skip this section.
0 commit comments