One-process-per-camera MQTT capture worker built on the Bytronic service template. Supports six backends (dummy, opencv, GigE, FLIR, Pylon, LJS), dual event sources (MQTT trigger vs hardware/continuous frame thread), and multi-variant image publish (raw / colourmap / RGB).
- Python 3.10 or newer
- An MQTT broker at
localhost:1883(typical) - Backend SDKs as needed (Baumer CTI, Spinnaker, pylon, Keyence LJS DLL)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements-dev.txtpython app/main.py --config ./config.yamlSite examples (local; gitignored):
python app/main.py --config ./config-dunbia_seal.yaml
python app/main.py --config ./config.example.yamlpython -m pytest test- Connects the camera backend from
service.camera.camera_type - Software / single: subscribes to the
triggertopic; payload must contain"trigger"; thencapture_image - Software / continuous: MQTT on/off arms a timed capture stream (no repeated trigger messages)
- Hardware / single: camera line/edge IO via
wait_for_frame - Hardware / continuous: camera free-run stream via
wait_for_frame - For each
service.imagesentry: format → optional archive → JPEG/PNG encode → publish{image, date_time, image_id, encoding}on{image topic}/{topic_end}
Orchestrator runs multiple instances (camera-service, -2, -3) each with
its own config file.
--config PATH is required.
Topic name |
Role |
|---|---|
trigger |
subscribe + trigger (MQTT modes) |
image |
publish base; topic_end appends /raw, /colourmap, … |
Domain knobs live under service:: camera, trigger, camera_settings,
lights, images, archiving. CameraLibrary still reads them via
loadConfig.get_section / dotted return_config_value, which resolve under
service first.
Logging is stdout only (logging.level).
Push to prod runs the signed release pipeline. Keep SERVICE_SIGNING_KEY and
scripts/sign.py EXPECTED_PUBLIC_KEY aligned.
requirements.txt— runtimerequirements-dev.txt— tests / CIrequirements-signing.txt— release job only- FLIR: install Spinnaker wheel by hand on Windows
app/main.py— dual-path loop + publishapp/dependencies/CameraLibrary/— vendor backendsapp/dependencies/image_functions.py/archive_functions.pyconfig.yaml— tracked shape
License: see docs/LICENSE.