Skip to content

About

# QR & Barcode to Genetec — CamScripter package Decodes QR codes and 1D barcodes from the camera's own video and creates a **bookmark in Genetec Security Center** for every scan. Same reader as `qr_barcode_milestone` 1.7.0 — only the VMS output is swapped. Runs on **any camera CamScripter supports — ARTPEC-6/7/8/9**.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

QR & Barcode to Genetec — CamScripter package

Decodes QR codes and 1D barcodes from the camera's own video and creates a bookmark in Genetec Security Center for every scan. Same reader as qr_barcode_milestone 1.7.0 — only the VMS output is swapped. Runs on any camera CamScripter supports — ARTPEC-6/7/8/9.

qr_barcode_genetec_1_7_0.zip

Docs & screenshots: docs/index.html (GitHub Pages landing page), docs/genetec-bookmarks-setup.html (Web SDK setup walkthrough), docs/screenshots/ui-light.png + ui-dark.png (the settings page in both themes).

Install

  1. Camera → Apps → CamScripter → Package management → Add package → upload the zip.
  2. Open the package UI: /local/camscripter/package/qr_barcode_genetec/index.html.
  3. Fill in Camera credentials — a CamScripter package has no ACAP service account, so the app needs a camera user to fetch snapshots. A dedicated Viewer account is enough for image.cgi.
  4. Fill in the Genetec Security Center panel: Web SDK address / port / base URI (default WebSdk), a Security Center user with the Add bookmarks privilege, and the application ID. Leaving the application ID empty uses the CamStreamer connector ID — the same default the original videoCheckpoint script ships with.
  5. Test connection, then Load cameras and tick the cameras the bookmark should land on, then Save & restart. Send test bookmark creates a real bookmark, so use it on a test camera.

Genetec wire format (ported from videoCheckpoint / camstreamerlib GenetecAgent)

POST http(s)://<host>:<port>/<baseUri>/action
     ?q=AddCameraBookmark(<guid>,<YYYY-MM-DDThh:mm:ss.mmmZ>,<text>)[,AddCameraBookmark(...)]
Authorization: Basic base64("<user>;<appId>:<pass>")
Accept: text/json
→ 200 {"Rsp":{"Status":"Ok"}}

Three details bite here: the app ID belongs in the username, separated by a semicolon; the timestamp is UTC with milliseconds; and the Web SDK can answer HTTP 200 on a soft failure, so Rsp.Status is checked, not just the status code. Unlike GenetecAgent (which used global fetch) this port uses node http/https directly, so the https (no cert check) protocol option actually works against a self-signed Web SDK certificate.

Bookmarks are sent fire-and-forget: a slow or unreachable Web SDK never stalls the decode loop, and the failure shows up in the status panel and the log instead.

Why it is built this way

Numbers below were measured in this exact pipeline (Node + WASM, 1280×720 frame, x86 reference — an ARTPEC-8 is roughly 8× slower, ARTPEC-6/7 slower still):

choice reason
zxing-cpp via zxing-wasm fastest engine measured here: 20.5 ms vs zbar-wasm 71.6 ms and jsQR 269 ms for the same QR frame
JPEG handed straight to ZXing ZXing's own image loader reads the JPEG in ~21 ms; decoding it first with jpeg-js costs ~147 ms on its own, so any JS pre-processing (including ROI cropping) is slower than the whole decode
640×480 snapshots ~7.7 ms per frame versus ~21 ms at 1280×720, with no loss of hit rate on codes of a usable size
tryHarder / tryRotate / tryInvert all off these multiply the cost — all formats with them on measured 256 ms versus 21 ms off
decode in a worker_threads worker a ZXing pass is synchronous CPU work; on the main thread it blocks Node's event loop and starves the HTTP server and the Transact socket
no tuning knobs in the UI the fixed values in src/settings.ts (FIXED_CAPTURE / FIXED_DECODE) are the ones that behave on camera hardware; the settings page only asks about the Genetec side

Layout

manifest.json        CamScripter manifest (package_name, ui_link, …)
main.js              entry point — CamScripter runs main.js at the package root
decodeWorker.js      worker thread: JPEG in, decoded codes out
html/index.html      settings page, served through /local/camscripter/proxy/<pkg>
node_modules/        zxing-wasm reader + its .wasm, nothing else

Rebuild

sh build.sh          # npm install, tsc, prune, zip

No Docker, no ACAP SDK, no per-architecture build: CamScripter provides the Node runtime and the decoder is WASM, so one zip covers every supported chip.

Changing what it reads

Symbologies, resolution and scan interval live in src/settings.ts. Trimming the symbology list barely helps once tryHarder is off (10 formats measured 20.8 ms vs 21.4 ms for 3), so the list is deliberately generous: QR, Micro QR, DataMatrix, Code128, Code39, ITF, EAN-13, EAN-8, UPC-A, UPC-E.

About

# QR & Barcode to Genetec — CamScripter package Decodes QR codes and 1D barcodes from the camera's own video and creates a **bookmark in Genetec Security Center** for every scan. Same reader as `qr_barcode_milestone` 1.7.0 — only the VMS output is swapped. Runs on **any camera CamScripter supports — ARTPEC-6/7/8/9**.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages