BetterFrame/kiosk/Cargo.toml
Mitchell R 991c2f0cd5
feat(onvif-events): PullPoint subscription for all ONVIF cameras
New kiosk/src/onvif_events.rs: for each ONVIF camera in the bundle,
creates a PullPoint subscription, polls every 3s, parses
NotificationMessage XML into structured JSON (topic + source key/values
+ data key/values + timestamp), and POSTs to /api/kiosk/event with
source_type=onvif + camera_id.

Forwards ALL event topics: motion, ANPR (LicensePlateRecognition),
line crossing, intrusion, digital input, analytics, tamper — everything
the camera exposes. Node-RED sorts what matters.

Subscription lifecycle:
  - CreatePullPointSubscription with 60s InitialTerminationTime
  - Renew every 55s before timeout
  - Unsubscribe on bundle change / shutdown
  - Auto-resubscribe on pull/renew failure (30s backoff)
  - Generation tracking via Weak<()> so old workers self-terminate
    when start() is called with a new bundle

WSSE PasswordDigest auth for SOAP calls — same scheme the server's
onvif.ts uses. sha1 crate added.

BundleCamera extended with onvif_host/port/username/password_encrypted
fields (server already ships them; kiosk just wasn't deserializing).

Gated by BF_ENABLE_ONVIF_EVENTS=1. Enabled by default in the pi-gen
image env file.

TODO: cluster-key-based decryption of onvif_password_encrypted. For
now relies on the RTSP URI having plaintext credentials embedded (which
the ONVIF import path already ensures via rtspWithCredentials).
2026-05-21 12:03:30 +02:00

59 lines
1.6 KiB
TOML

[package]
name = "betterframe-kiosk"
version = "0.1.0"
edition = "2024"
description = "BetterFrame kiosk — multi-camera display with GTK4 + GStreamer"
license = "AGPL-3.0-only OR Commercial"
[dependencies]
# GTK4 for windowing/layout. v4_14 = Debian Trixie / Pi OS Trixie stock
# libgtk-4 — pi-gen defaults to trixie, so build chain + image are aligned.
gtk4 = { version = "0.9", features = ["v4_14"] }
# GStreamer for RTSP decode
gstreamer = "0.23"
gstreamer-video = "0.23"
gst-plugin-gtk4 = "0.13"
# HTTP client for server API
reqwest = { version = "0.12", features = ["json", "blocking"] }
# JSON
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Async runtime
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "fs"] }
# Misc
dirs = "6"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
hostname = "0.4"
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
futures-util = "0.3"
url = "2"
webkit6 = "0.4"
gpiod = "0.3"
# OTA firmware update: sha256 + Ed25519 signature verify
sha2 = "0.10"
ed25519-dalek = { version = "2", features = ["pem"] }
base64 = "0.22"
urlencoding = "2"
# ONVIF WSSE PasswordDigest auth
sha1 = "0.10"
# Hardware-bound at-rest encryption of state files (kiosk_key + bundle cache
# contain camera RTSP credentials in URL form). Keys derived via HKDF from
# the Pi CPU serial — pulling the SD doesn't yield plaintext without also
# having the same physical board.
aes-gcm = "0.10"
hkdf = "0.12"
# Local HTTP server on kiosk (LAN GET-only layout switch + admin proxy)
axum = "0.7"
tower = "0.5"
hex = "0.4"
rand = "0.8"