Problem
When using direct mode (Path 1 / ZM EventStartCommand), zm_detect.py exits early with no push notification if ML detection finds no matches. This is a problem for users with external sensor triggers (e.g. PIR, door sensors) who want a push notification regardless of whether YOLO detects anything.
In the ES path, event_start_notify_on_hook_fail: all handles this, but in direct mode there is no ES — zm_detect.py is the only thing running.
Solution
Add push.send_push_on_no_match (default: no) to objectconfig.yml. When set to yes, zm_detect.py sends a push notification using the original event cause/reason even when detection returns no matches.
Also refactored push sending into a _try_push() helper to eliminate code duplication.
Changes
hook/zm_detect.py — extract _try_push() helper, add no-match push path
hook/objectconfig.example.yml — add send_push_on_no_match: "no"
docs/guides/config.rst — document new key in reference table and setup section
Problem
When using direct mode (Path 1 / ZM EventStartCommand),
zm_detect.pyexits early with no push notification if ML detection finds no matches. This is a problem for users with external sensor triggers (e.g. PIR, door sensors) who want a push notification regardless of whether YOLO detects anything.In the ES path,
event_start_notify_on_hook_fail: allhandles this, but in direct mode there is no ES —zm_detect.pyis the only thing running.Solution
Add
push.send_push_on_no_match(default:no) toobjectconfig.yml. When set toyes,zm_detect.pysends a push notification using the original event cause/reason even when detection returns no matches.Also refactored push sending into a
_try_push()helper to eliminate code duplication.Changes
hook/zm_detect.py— extract_try_push()helper, add no-match push pathhook/objectconfig.example.yml— addsend_push_on_no_match: "no"docs/guides/config.rst— document new key in reference table and setup section