Live Traffic Receiver
The Live Traffic Receiver takes in SBN live-traffic alarms for camera-bound devices. For each alarm it attaches the recorded video clip and files an alarm receipt, so the Image Classifier can classify the alarm without fetching the clip itself.
Overview
SBN publishes each live-traffic alarm as a row. The Live Traffic Receiver files every row that belongs to a camera-bound device and skips rows for devices with no camera. When the row's event number is on the configured list, video analytics is on for the device and the device is in a classifier group, the receiver fetches the recorded clip and the alarm is classified. Otherwise the alarm is filed without classification.
If the clip fetch fails, the alarm is still filed. The Image Classifier then falls back to a live frame, but only within 10 minutes of the alarm. Nothing the receiver files is sent back to SBN or to the alarm receiving centre.
- Runs: As part of the line receiver, on at most one host per deployment.
- Required: Required to classify SBN live-traffic alarms. Not needed where live traffic is not classified.
- Depends on: NATS, the SBN Frontend (which publishes the rows), the recorder (for the clip and for signal-receipt indexing) and the Image Classifier.
Configuration
The Live Traffic Receiver is configured under the linereceiver.liveTraffic namespace. View the defaults with ./sbn-media config eject and set host-specific overrides in sbn-media.local.yaml.
| Setting | Default | Description |
|---|---|---|
linereceiver.liveTraffic.enabled | false | Turn the receiver on. |
linereceiver.liveTraffic.tenants | [] | Dealers whose rows are taken in. The receiver refuses to start enabled with no tenants. |
linereceiver.liveTraffic.eventNumbers | [0] | SBN event numbers that get a clip and are classified. The default 0 is ALARM. Other rows, such as 6 TROUBLE, are still filed, without classification. The receiver refuses to start with an empty list. |
linereceiver.liveTraffic.concurrency | 4 | Rows worked on at once, per tenant. Minimum 1. |
watchdog.host.livetrafficreceiver | none | How many receivers run on this host. Set it to 1 on the one host that runs it; no host runs one by default. |
Three other settings must also be in place:
sbnfrontend.liveTrafficDurationInSecondsmust be greater than0. The default0turns live traffic off at the SBN Frontend.imageclassifier.signalReceipt.tenantsmust list the same dealers, so the Image Classifier picks up the receipts.- The recorder must index signal receipts for those dealers.
Example:
These settings are read when the receiver starts. Restart the line receiver after changing them.
Upgrading from the Image Classifier settings
Before release 96.15 the Image Classifier took in live traffic itself, under imageclassifier.liveTraffic. Running ./sbn-media migrate moves enabled and eventNumbers to linereceiver.liveTraffic, copies the tenants, and sets watchdog.host.livetrafficreceiver to 1. The old keys are retired, and ./sbn-media validate warns while they remain.
FAQ
Does the receiver replay alarms it missed while it was stopped? No. A new receiver starts at new rows. Rows SBN published while NATS was restarting, before the receiver reconnected, are not taken in.
An alarm was filed but not classified. Why? Check that its event number is in eventNumbers, that video analytics is on for the device, and that the device is in a classifier group. If all three hold, check that the clip fetch succeeded; without a clip the Image Classifier uses a live frame only within 10 minutes of the alarm.
Why does an alarm for a device without a camera not appear? The receiver files only rows for camera-bound devices.