mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 19:06:34 +00:00
Three new Node-RED trigger nodes in BetterFrame Triggers palette: bf-trigger-motion (red) — fires on MotionAlarm, CellMotionDetector, VideoAnalytics/Motion, FieldDetector topics. Outputs msg.active (true/false) for motion start/stop. Camera ID filter optional. bf-trigger-anpr (blue) — fires on LicensePlateRecognition, Plate, ANPR, LPR, NumberPlate topics. Extracts msg.plate (string) and msg.confidence (number) from vendor-specific payload fields (Hikvision PlateNumber, Dahua plateNumber, etc.). Camera ID filter. bf-trigger-event (green) — generic catch-all. Topic substring filter + camera ID filter. Outputs msg.source + msg.data as key-value objects parsed from ONVIF SimpleItems. Use for line crossing, intrusion, digital input, tamper, audio detection, or any unknown topic. Server side: ONVIF events (source_type=onvif) now additionally forward to the fixed onvif.event route so all three nodes receive events without needing per-topic Node-RED route registration.
42 lines
1.6 KiB
HTML
42 lines
1.6 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType("bf-trigger-anpr", {
|
|
category: "BetterFrame Triggers",
|
|
color: "#99ccff",
|
|
defaults: {
|
|
name: { value: "" },
|
|
camera_id: { value: "" },
|
|
},
|
|
inputs: 0,
|
|
outputs: 1,
|
|
icon: "betterframe.svg",
|
|
label: function () {
|
|
return this.name || "ANPR Trigger";
|
|
},
|
|
paletteLabel: "ANPR Trigger",
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="bf-trigger-anpr">
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
<input type="text" id="node-input-name" placeholder="(optional)" />
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-camera_id"><i class="fa fa-video-camera"></i> Camera ID</label>
|
|
<input type="number" id="node-input-camera_id" placeholder="(blank = all cameras)" />
|
|
</div>
|
|
<div class="form-tips">
|
|
Fires on ONVIF license plate recognition events. Outputs
|
|
<code>msg.plate</code> (string) and <code>msg.confidence</code> (number).
|
|
Works with Hikvision ANPR cameras (PlateNumber field), Dahua (plateNumber),
|
|
and other ONVIF-compliant vendors.
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="bf-trigger-anpr">
|
|
<p>Triggers on ONVIF ANPR (Automatic Number Plate Recognition) events.</p>
|
|
<p>Matches topics containing: LicensePlateRecognition, Plate, ANPR, LPR, NumberPlate.</p>
|
|
<p><b>msg.plate</b> contains the recognized plate string (or null if not parsed).
|
|
<b>msg.confidence</b> is the recognition confidence score (or null).</p>
|
|
<p>Use downstream nodes for plate allowlist/blocklist matching, logging, or gate control.</p>
|
|
</script>
|